Moved the interpreter
[repair.git] / Repair / RepairInterpreter / repair.h
diff --git a/Repair/RepairInterpreter/repair.h b/Repair/RepairInterpreter/repair.h
new file mode 100755 (executable)
index 0000000..bc90f44
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef REPAIR_H
+#define REPAIR_H
+#include "classlist.h"
+class Repair {
+ public:
+  Repair(model *m);
+  void repairconstraint(Constraint *c, processobject *po, Hashtable *env);
+  Action * findrepairaction(CoercePredicate *cp);
+  Action * findbreakaction(CoercePredicate *cp);
+  bool analyzetermination();
+
+
+ private:
+  void outputgraph(WorkSet *removededges, WorkRelation *wr, char *filename);
+  void repaireleexpr(Constraint *c, processobject *po, Elementexpr *ee, Hashtable *env);
+  void buildmap(WorkRelation *wr);
+  void checkpredicate(Action *repair,WorkRelation *wr, Constraint *c,CoercePredicate *cp);
+  bool checkforcycles(WorkSet *removededges, WorkRelation *wr);
+  bool checkcycles(CoerceSentence *cs,WorkSet *removededges, WorkSet *searchset,WorkRelation *wr);
+  bool breakcycles(WorkSet *removeedge, int number, WorkSet *cyclelinks, WorkRelation *wr);
+  void detectcycles(CoerceSentence *cs,WorkSet *searchset,WorkSet *cycleset, WorkRelation *wr);
+  WorkSet * searchcycles(WorkRelation *wr);
+  model * globalmodel;
+
+  Action ** repairactions;  // the available repair actions
+  int numactions;
+
+  WorkSet *removedsentences;
+};
+#endif
+