Moved makelib
[repair.git] / Repair / RepairInterpreter / processobject.h
1 // evaluates constraints in the ICL
2
3
4 #ifndef PROCESSOBJECT_H
5 #define PROCESSOBJECT_H
6 #include "classlist.h"
7
8 #define PTRUE 1
9 #define PFALSE 0
10 #define PFAIL -1
11
12 class processobject {
13  public:
14   processobject(model *m);
15   int processpredicate(Predicate *p, Hashtable *env);
16   bool issatisfied(Constraint *c); // returns true iff c is satisfied
17   bool processconstraint(Constraint *c); // evaluates c and if it's not satisfied, calls the repair alg.
18   void breakconstraint(Constraint *c);   // breaks the given constraint by invalidating each of its satisfied sentences
19   void modifyconstraint(Constraint *c);  // modifies the given constraint
20   void setclean();
21   ~processobject();
22   void printstats();
23
24  private:
25   Repair * repair;
26   int processstatement(Statement *s, Hashtable *env);
27   model * globalmodel;
28 };
29
30 Element * evaluateexpr(Elementexpr *ee, Hashtable *env, model *m);
31 Element * evaluatevalueexpr(Valueexpr *ve, Hashtable *env, model *m);
32 #endif