Moving back getBinaryConstraint
authorHamed <hamed.gorjiara@gmail.com>
Tue, 27 Jun 2017 17:00:25 +0000 (10:00 -0700)
committerHamed <hamed.gorjiara@gmail.com>
Tue, 27 Jun 2017 17:00:25 +0000 (10:00 -0700)
src/AST/element.c
src/Backend/constraint.c

index 8711529f53f78d2f36b02ff17c6c34c9946f7081..4116cc18960c06ba02f89622b9997522d5f27ad4 100644 (file)
@@ -62,16 +62,6 @@ Constraint * getElementValueConstraint(Element* This, uint64_t value) {
        return NULL;
 }
 
-Constraint * generateBinaryConstraint(uint numvars, Constraint ** vars, uint value) {
-       Constraint *carray[numvars];
-       for(uint j=0;j<numvars;j++) {
-               carray[j]=((value&1)==1) ? vars[j] : negateConstraint(vars[j]);
-               value=value>>1;
-       }
-
-       return allocArrayConstraint(AND, numvars, carray);
-}
-
 void deleteElement(Element *This) {
        switch(GETELEMENTTYPE(This)) {
        case ELEMFUNCRETURN: {
index 27db299233e94df3495799fa05b450558e14da2c..b491ca30f2e94ba760a84c9ee1d09573d2b13eba 100644 (file)
@@ -186,6 +186,16 @@ Constraint * cloneConstraint(Constraint * This) {
        }
 }
 
+Constraint * generateBinaryConstraint(uint numvars, Constraint ** vars, uint value) {
+       Constraint *carray[numvars];
+       for(uint j=0;j<numvars;j++) {
+               carray[j]=((value&1)==1) ? vars[j] : negateConstraint(vars[j]);
+               value=value>>1;
+       }
+
+       return allocArrayConstraint(AND, numvars, carray);
+}
+
 /** Generates a constraint to ensure that all encodings are less than value */
 Constraint * generateLTConstraint(uint numvars, Constraint ** vars, uint value) {
        Constraint *orarray[numvars];