Improve precision of interference analysis. Allow sizeof(v.r1.r2) expressions.
[repair.git] / Repair / RepairInterpreter / fieldcheck.h
1 #ifndef Fieldcheck_H
2 #define Fieldcheck_H
3 #include "classlist.h"
4 #include "element.h"
5
6 class FieldCheck {
7  public:
8   FieldCheck(model *m);
9   void analyze();
10   void buildmaps();
11   int getindexthatprovides(char *set, char *relation);
12  private:
13   bool setok(Constraint *c, char *set);
14   bool testsatisfy(WorkSet *satisfies, FieldTuple *ft);
15   WorkSet * requireswhat(Constraint *c,CoercePredicate *cp);
16   void processee(WorkSet *ws, Constraint *c, Elementexpr *ee);
17   FieldTuple * provideswhat(Constraint *c,CoercePredicate *cp);
18   model *globalmodel;
19   Hashtable *cptoreqs;
20   Hashtable *propertytonf;
21   Hashtable *nftoprovides;
22 };
23
24 char *getset(Constraint *c, char *var);
25
26 class FieldTuple:public ElementWrapper {
27  public:
28   FieldTuple(FieldTuple *o);
29   unsigned int hashCode();
30   bool equals(ElementWrapper *other);
31   int type();
32
33   FieldTuple(char * r, char *s);
34   char * relation;
35   char * set;
36 };
37 #endif
38