#include "ops.h"
#include "corestructs.h"
#include "asthash.h"
+#include "solver_interface.h"
class CSolver {
public:
Set *createRangeSet(VarType type, uint64_t lowrange, uint64_t highrange);
+ Element *createRangeVar(VarType type, uint64_t lowrange, uint64_t highrange);
+
/** This function creates a mutable set. */
MutableSet *createMutableSet(VarType type);
Boolean *applyLogicalOperation(LogicOp op, Boolean **array, uint asize);
+ /** This function applies a logical operation to the Booleans in its input. */
+
+ Boolean *applyLogicalOperation(LogicOp op, Boolean * arg1, Boolean * arg2);
+
+ /** This function applies a logical operation to the Booleans in its input. */
+
+ Boolean *applyLogicalOperation(LogicOp op, Boolean *arg);
+
/** This function adds a boolean constraint to the set of constraints
to be satisfied */
Boolean *orderConstraint(Order *order, uint64_t first, uint64_t second);
/** When everything is done, the client calls this function and then csolver starts to encode*/
- int startEncoding();
+ int solve();
/** After getting the solution from the SAT solver, client can get the value of an element via this function*/
uint64_t getElementValue(Element *element);
HappenedBefore getOrderConstraintValue(Order *order, uint64_t first, uint64_t second);
+ bool isTrue(Boolean *b);
+ bool isFalse(Boolean *b);
+
void setUnSAT() { unsat = true; }
bool isUnSAT() { return unsat; }