Partial commit for Boolean, Predicate, and Order
[satune.git] / src / predicate.c
index dcec97af1dbd2b13a997a244cfc6bbecf8a1b10c..2beef617d2c5ec9a5b1dee7c7289ccd79c14d14a 100644 (file)
@@ -1 +1,12 @@
 #include "predicate.h"
+#include "structs.h"
+
+
+Predicate* allocPredicate(enum CompOp op, Set ** domain, uint numDomain){
+    Predicate* predicate = (Predicate*) ourmalloc(sizeof(Predicate));
+    predicate->domains = allocDefVectorSet();
+    for(uint i=0; i<numDomain; i++)
+        pushVectorSet(predicate->domains,domain[i]);
+    predicate->op=op;
+    return predicate;
+}
\ No newline at end of file