1 // converts constraints into disjunctive normal form
9 class CoercePredicate {
11 CoercePredicate(bool, Predicate *);
12 CoercePredicate(char *ts, char *lt, char *rs);
13 CoercePredicate(char *ts, char *lt, char *rt,char *rs);
14 Predicate * getpredicate();
18 char *gettriggerset();
36 class CoerceSentence {
38 CoerceSentence(CoercePredicate **pred, int numpredicates);
39 int getnumpredicates();
40 CoercePredicate *getpredicate(int i);
41 bool issatisfied(processobject *po, Hashtable *env);
42 int cost(processobject *po, Hashtable *env);
46 CoercePredicate **predicates;
52 // represents a statement in normal form
55 SentenceArray(CoerceSentence **sentences, int l);
57 CoerceSentence **sentences;
61 // represents a constraint in normal form
64 NormalForm(Constraint *c);
65 CoerceSentence * closestmatch(WorkSet *,processobject *po,Hashtable *env);
66 int getnumsentences();
67 CoerceSentence *getsentence(int i);
71 Constraint *c; /*keep reference for quantifiers */
72 CoerceSentence **sentences; // the number of sentences in this constraint
77 SentenceArray * computesentences(Statement *st,bool stat);
78 int costfunction(CoercePredicate *p);
79 char * gettype(char *label, char *set,AElementexpr *ae);