X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satune.git;a=blobdiff_plain;f=src%2Fcsolver.h;h=b27e3c00038d586908d6d17bb80f79a774b7eaed;hp=6996e4229c9376f78b5d4258ee7d2669f334b858;hb=0fc529c88d7ea03156af7a2f1ad1fbb956c23c98;hpb=73e6a63d0683c953722370f12a420ada87ed81a7 diff --git a/src/csolver.h b/src/csolver.h index 6996e42..b27e3c0 100644 --- a/src/csolver.h +++ b/src/csolver.h @@ -58,7 +58,7 @@ public: Set *getElementRange (Element *element); void mustHaveValue(Element *element); - + BooleanEdge getBooleanTrue(); BooleanEdge getBooleanFalse(); @@ -103,9 +103,9 @@ public: /** This exactly one element of array can be true! (i.e. a1 + a2 + a3 + ... + an = 1)*/ BooleanEdge applyExactlyOneConstraint (BooleanEdge *array, uint asize); - + /** This function applies a logical operation to the Booleans in its input. */ - + BooleanEdge applyLogicalOperation(LogicOp op, BooleanEdge *array, uint asize); /** This function applies a logical operation to the Booleans in its input. */ @@ -133,15 +133,15 @@ public: * Incremental Solving for SATUNE. * It only supports incremental solving for elements! * No support for BooleanVar, BooleanOrder or using interpreters - * @return + * @return */ int solveIncremental(); - + /** After getting the solution from the SAT solver, client can get the value of an element via this function*/ uint64_t getElementValue(Element *element); void freezeElement(Element *e); - + /** After getting the solution from the SAT solver, client can get the value of a boolean via this function*/ bool getBooleanValue(BooleanEdge boolean); @@ -165,7 +165,7 @@ public: SetIteratorBooleanEdge *getConstraints() { return constraints.iterator(); } bool isConstraintEncoded(BooleanEdge be) { return encodedConstraints.contains(be);} void addEncodedConstraint(BooleanEdge be) {encodedConstraints.add(be);} - + SATEncoder *getSATEncoder() {return satEncoder;} void replaceBooleanWithTrue(BooleanEdge bexpr); @@ -194,7 +194,7 @@ private: void handleIFFTrue(BooleanLogic *bexpr, BooleanEdge child); void handleANDTrue(BooleanLogic *bexpr, BooleanEdge child); void handleFunction(ElementFunction *ef, BooleanEdge child); - + //These two functions are helpers if the client has a pointer to a //Boolean object that we have since replaced BooleanEdge rewriteLogicalOperation(LogicOp op, BooleanEdge *array, uint asize);