Generalize definition of SumExpr a little...Lets sum all elements of
[repair.git] / Repair / RepairInterpreter / Action.h
1 #ifndef Action_H
2 #define Action_H
3
4 #include "classlist.h"
5 class Action {
6  public:
7   virtual void repairpredicate(Hashtable *env, CoercePredicate *p)=0;
8   virtual void breakpredicate(Hashtable *env, CoercePredicate *p)=0;
9   virtual bool conflict(Constraint *c1, CoercePredicate *p1, Constraint *c2, CoercePredicate *p2)=0;
10   virtual bool canrepairpredicate(CoercePredicate *p)=0;
11
12  protected:
13   char * getset(Constraint *c, char *v);
14   char * calculatebound(Constraint *c, Label *clabel);
15   bool comparepredicates(Constraint *c1, CoercePredicate *cp1, Constraint *c2, CoercePredicate *cp2);
16   bool comparesetexpr(Setexpr *s1,char *v1,Setexpr *s2,char *v2);
17   bool compareee(Elementexpr *ee1,char *v1,Elementexpr *ee2,char *v2);
18   bool testforconflict(char *setv, char *seta, char *rel, Constraint *c, CoercePredicate *p);
19   bool testforconflictremove(char *setv, char *seta, char *rel, Constraint *c, CoercePredicate *p);
20   DomainRelation *domrelation;
21   model * globalmodel;
22   bool possiblysameset(char *v1, Constraint *c1, char *v2, Constraint *c2);
23   bool possiblysameset(char *set1, char *v2, Constraint *c2);
24   bool possiblysameset(char *set1, char *set2);
25   bool conflictwithaddtoset(char *set, Constraint *c, CoercePredicate *p);
26   bool conflictwithremovefromset(WorkSet *,char *set, Constraint *c, CoercePredicate *p);
27 };
28 #endif