+ bool getBooleanValue(BooleanEdge boolean);
+
+ bool getOrderConstraintValue(Order *order, uint64_t first, uint64_t second);
+
+ bool isTrue(BooleanEdge b);
+ bool isFalse(BooleanEdge b);
+
+ void setUnSAT() { model_print("Setting UNSAT %%%%%%\n"); unsat = true; }
+ void setSatSolverTimeout(long seconds) { satsolverTimeout = seconds;}
+ bool isUnSAT() { return unsat; }
+ bool isBooleanVarUsed(){return booleanVarUsed;}
+ void printConstraint(BooleanEdge boolean);
+ void printConstraints();
+
+ Vector<Order *> *getOrders() { return &allOrders;}
+ HashsetOrder *getActiveOrders() { return &activeOrders;}
+
+ Tuner *getTuner() { return tuner; }
+
+ SetIteratorBooleanEdge *getConstraints() { return constraints.iterator(); }
+
+ SATEncoder *getSATEncoder() {return satEncoder;}
+
+ void replaceBooleanWithTrue(BooleanEdge bexpr);
+ void replaceBooleanWithTrueNoRemove(BooleanEdge bexpr);
+ void replaceBooleanWithFalseNoRemove(BooleanEdge bexpr);
+ void replaceBooleanWithFalse(BooleanEdge bexpr);
+ void replaceBooleanWithBoolean(BooleanEdge oldb, BooleanEdge newb);
+ CSolver *clone();
+ void serialize();
+ static CSolver *deserialize(const char *file, bool alloy = false);
+ void autoTune(uint budget);
+ void inferFixedOrders();
+ void inferFixedOrder(Order *order);
+ void setAlloyEncoder();
+ bool useAlloyCompiler() {return interpreter != NULL;}
+ void setTuner(Tuner *_tuner) { tuner = _tuner; }
+ long long getElapsedTime() { return elapsedTime; }
+ long long getEncodeTime();
+ long long getSolveTime();
+ long getSatSolverTimeout() { return satsolverTimeout;}
+
+ CMEMALLOC;
+
+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);
+ BooleanEdge doRewrite(BooleanEdge b);
+ /** This is a vector of constraints that must be satisfied. */
+ HashsetBooleanEdge constraints;