Fix warnings, merge, and check my code in
[satune.git] / src / AST / predicate.c
1 #include "predicate.h"
2 #include "structs.h"
3
4
5 Predicate* allocPredicate(CompOp op, Set ** domain, uint numDomain){
6     Predicate* predicate = (Predicate*) ourmalloc(sizeof(Predicate));
7     predicate->domains = allocDefVectorSet();
8     for(uint i=0; i<numDomain; i++)
9         pushVectorSet(predicate->domains,domain[i]);
10     predicate->op=op;
11     return predicate;
12 }
13
14 void deletePredicate(Predicate* predicate){
15     deleteVectorSet(predicate->domains);
16     ourfree(predicate);
17 }
18