Hack grammar to add unary minus.
[repair.git] / Repair / RepairInterpreter / repair.h
1 #ifndef REPAIR_H
2 #define REPAIR_H
3 #include "classlist.h"
4 class Repair {
5  public:
6   Repair(model *m);
7   void repairconstraint(Constraint *c, processobject *po, Hashtable *env);
8   Action * findrepairaction(CoercePredicate *cp);
9   Action * findbreakaction(CoercePredicate *cp);
10   bool analyzetermination();
11
12
13  private:
14   void outputgraph(WorkSet *removededges, WorkRelation *wr, char *filename);
15   void repaireleexpr(Constraint *c, processobject *po, Elementexpr *ee, Hashtable *env);
16   void buildmap(WorkRelation *wr);
17   void checkpredicate(Action *repair,WorkRelation *wr, Constraint *c,CoercePredicate *cp);
18   bool checkforcycles(WorkSet *removededges, WorkRelation *wr);
19   bool checkcycles(CoerceSentence *cs,WorkSet *removededges, WorkSet *searchset,WorkRelation *wr);
20   bool breakcycles(WorkSet *removeedge, int number, WorkSet *cyclelinks, WorkRelation *wr);
21   void detectcycles(CoerceSentence *cs,WorkSet *searchset,WorkSet *cycleset, WorkRelation *wr);
22   WorkSet * searchcycles(WorkRelation *wr);
23   model * globalmodel;
24
25   Action ** repairactions;  // the available repair actions
26   int numactions;
27
28   WorkSet *removedsentences;
29 };
30 #endif
31