Bug fix
[satune.git] / src / AST / predicate.h
index 9a1766962392fc36c70c9a9427792481b204cd3e..183a96099c9d69157f8a63dc7d4c6bd323a91f36 100644 (file)
@@ -2,8 +2,36 @@
 #define PREDICATE_H
 #include "classlist.h"
 #include "mymemory.h"
+#include "ops.h"
+#include "astops.h"
+#include "structs.h"
+#include "common.h"
 
-struct Predicate {
+class Predicate {
+public:
+       Predicate(PredicateType _type) : type(_type) {}
+       virtual ~Predicate() {}
+       virtual Predicate *clone(CSolver *solver, CloneMap *map) {ASSERT(0); return NULL;}
+       PredicateType type;
+       CMEMALLOC;
+};
+
+class PredicateOperator : public Predicate {
+public:
+       PredicateOperator(CompOp op, Set **domain, uint numDomain);
+       bool evalPredicateOperator(uint64_t *inputs);
+       Predicate *clone(CSolver *solver, CloneMap *map);
+       CompOp op;
+       Array<Set *> domains;
+       CMEMALLOC;
+};
 
+class PredicateTable : public Predicate {
+public:
+       PredicateTable(Table *table, UndefinedBehavior undefBehavior);
+       Predicate *clone(CSolver *solver, CloneMap *map);
+       Table *table;
+       UndefinedBehavior undefinedbehavior;
+       CMEMALLOC;
 };
 #endif