1 // evaluates model definition rules
3 #ifndef PROCESSABSTRACT_H
4 #define PROCESSABSTRACT_H
8 Element * evaluateexpr(model *m, AElementexpr *ee, Hashtable *env,bool enforcetyping,bool compute);
12 class processabstract {
14 processabstract(model *m);
15 void processrule(Rule *r);
18 bool dirtyflagstatus();
20 void processrule(Rule *r, Element *ele, char *set);
22 bool evaluatestatementa(Statementa *sa, Hashtable *env);
23 void satisfystatementb(Statementb *sb, Hashtable *env);
32 /* A RelationSet keeps the current state of a quantifier.
33 There are three types of RelationSet's:
34 TYPE_SET: "for left in set"
35 TYPE_RELATION: "for <left,right> in set"
36 TYPE_RANGE: "for left=lower..upper */
38 #define TYPE_RELATION 2
43 RelationSet(Set *s, char *l, Type *tl);
44 RelationSet(Set *s, char *l, Type *tl, char *r, Type *tr);
45 RelationSet(char *l,AElementexpr *lower,AElementexpr*upper);
47 bool incrementassignment(bitreader *br,Hashtable *env, model *m);
48 bool incrementassignment(Hashtable *env, model *m);
49 bool incrementassignment(processconcrete *pc,Hashtable *env, model *m);
50 void resetassignment(Hashtable *env);
52 void print(Hashtable *env, model *m); // prints the quantifier and its current state
54 AElementexpr *lower,*upper;
57 /* char's are not the responsibility of this class to dispose of*/
65 // Keeps the current state of the quantifiers of a given rule or constraint
68 State(Rule *r, Hashtable *h);
69 State(Constraint *c, Hashtable *h);
71 bool initializestate(bitreader *br, model *m);
72 bool increment(bitreader *br, model *m);
73 bool initializestate(model *m);
74 bool increment(model *m);
76 bool initializestate(processconcrete*, model *m);
77 bool increment(processconcrete*, model *m);