Switch array struct to class
[satune.git] / src / AST / predicate.h
1 #ifndef PREDICATE_H
2 #define PREDICATE_H
3 #include "classlist.h"
4 #include "mymemory.h"
5 #include "ops.h"
6 #include "structs.h"
7
8 #define GETPREDICATETYPE(o) (((Predicate *)(o))->type)
9
10 class Predicate {
11  public:
12   Predicate(PredicateType _type) : type(_type) {}
13         PredicateType type;
14         MEMALLOC;
15 };
16
17 class PredicateOperator : public Predicate {
18  public:
19         PredicateOperator(CompOp op, Set **domain, uint numDomain);
20         bool evalPredicateOperator(uint64_t *inputs);
21         CompOp op;
22         Array<Set *> domains;
23         MEMALLOC;
24 };
25
26 class PredicateTable : public Predicate {
27  public:
28         PredicateTable(Table *table, UndefinedBehavior undefBehavior);
29         Table *table;
30         UndefinedBehavior undefinedbehavior;
31         MEMALLOC;
32 };
33 #endif