8 /** This is a vector of constraints that must be satisfied. */
9 VectorBoolean * constraints;
11 /** This is a vector of all boolean structs that we have allocated. */
12 VectorBoolean * allBooleans;
14 /** This is a vector of all set structs that we have allocated. */
17 /** This is a vector of all element structs that we have allocated. */
18 VectorElement * allElements;
21 /** Create a new solver instance. */
23 CSolver * allocCSolver();
25 /** This function creates a set containing the elements passed in the array. */
27 Set * createSet(CSolver *, VarType type, uint64_t * elements, uint num);
29 /** This function creates a set from lowrange to highrange (inclusive). */
31 Set * createRangeSet(CSolver *, VarType type, uint64_t lowrange, uint64_t highrange);
33 /** This function creates a mutable set. */
35 MutableSet * createMutableSet(CSolver *, VarType type);
37 /** This function adds a new item to a set. */
39 void addItem(CSolver *, MutableSet * set, uint64_t element);
41 /** This function adds a new unique item to the set and returns it.
42 This function cannot be used in conjunction with manually adding
45 uint64_t createUniqueItem(CSolver *, MutableSet * set);
47 /** This function creates an element variable over a set. */
49 Element * getElementVar(CSolver *, Set * set);
51 /** This function creates a boolean variable. */
53 Boolean * getBooleanVar(CSolver *, VarType type);
55 /** This function creates a function operator. */
57 Function * createFunctionOperator(CSolver *solver, ArithOp op, Set ** domain, uint numDomain, Set * range,
58 OverFlowBehavior overflowbehavior);
60 /** This function creates a predicate operator. */
62 Predicate * createPredicateOperator(CSolver *solver, enum CompOp op, Set ** domain, uint numDomain);
64 /** This function creates an empty instance table.*/
66 Table * createTable(CSolver *solver, Set **domains, uint numDomain, Set * range);
68 /** This function adds an input output relation to a table. */
70 void addTableEntry(CSolver *solver, uint64_t* inputs, uint inputSize, uint64_t result);
72 /** This function converts a completed table into a function. */
74 Function * completeTable(CSolver *, Table *);
76 /** This function applies a function to the Elements in its input. */
78 Element * applyFunction(CSolver *, Function * function, Element ** array, Boolean * overflowstatus);
80 /** This function applies a predicate to the Elements in its input. */
82 Boolean * applyPredicate(CSolver *, Predicate * predicate, Element ** inputs);
84 /** This function applies a logical operation to the Booleans in its input. */
86 Boolean * applyLogicalOperation(CSolver *, enum LogicOp op, Boolean ** array);
88 /** This function adds a boolean constraint to the set of constraints
91 void addBoolean(CSolver *, Boolean * constraint);
93 /** This function instantiates an order of type type over the set set. */
94 Order * createOrder(CSolver *, enum OrderType type, Set * set);
96 /** This function instantiates a predicate on two items in an order. */
97 Boolean * orderConstraint(CSolver *, Order * order, uint64_t first, uint64_t second);