ake
[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         Set ** domains;
18         uint numDomains;
19 };
20
21 struct PredicateTable {
22         Predicate base;
23         Table* table;
24         UndefinedBehavior undefinedbehavior;
25 };
26
27
28 Predicate* allocPredicate(CompOp op, Set ** domain, uint numDomain);
29 void deletePredicate(Predicate* predicate);
30 #endif