Binary encoding for ElementSet and table-based ElementFunction
[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 struct Predicate {
11         PredicateType type;
12 };
13
14 struct PredicateOperator {
15         Predicate base;
16         CompOp op;
17         ArraySet domains;
18 };
19
20 struct PredicateTable {
21         Predicate base;
22         Table* table;
23         UndefinedBehavior undefinedbehavior;
24 };
25
26
27 Predicate* allocPredicate(CompOp op, Set ** domain, uint numDomain);
28 void deletePredicate(Predicate* predicate);
29 #endif