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;
19 VectorPredicate * allPredicates;
20 VectorTable * allTables;
23 /** Create a new solver instance. */
25 CSolver * allocCSolver();
27 /** This function creates a set containing the elements passed in the array. */
29 Set * createSet(CSolver *, VarType type, uint64_t * elements, uint num);
31 /** This function creates a set from lowrange to highrange (inclusive). */
33 Set * createRangeSet(CSolver *, VarType type, uint64_t lowrange, uint64_t highrange);
35 /** This function creates a mutable set. */
37 MutableSet * createMutableSet(CSolver *, VarType type);
39 /** This function adds a new item to a set. */
41 void addItem(CSolver *, MutableSet * set, uint64_t element);
43 /** This function adds a new unique item to the set and returns it.
44 This function cannot be used in conjunction with manually adding
47 uint64_t createUniqueItem(CSolver *, MutableSet * set);
49 /** This function creates an element variable over a set. */
51 Element * getElementVar(CSolver *, Set * set);
53 /** This function creates a boolean variable. */
55 Boolean * getBooleanVar(CSolver *, VarType type);
57 /** This function creates a function operator. */
59 Function * createFunctionOperator(CSolver *solver, ArithOp op, Set ** domain, uint numDomain, Set * range,
60 OverFlowBehavior overflowbehavior);
62 /** This function creates a predicate operator. */
64 Predicate * createPredicateOperator(CSolver *solver, CompOp op, Set ** domain, uint numDomain);
66 /** This function creates an empty instance table.*/
68 Table * createTable(CSolver *solver, Set **domains, uint numDomain, Set * range);
70 /** This function adds an input output relation to a table. */
72 void addTableEntry(CSolver *solver, Table* table, uint64_t* inputs, uint inputSize, uint64_t result);
74 /** This function converts a completed table into a function. */
76 Function * completeTable(CSolver *, Table *);
78 /** This function applies a function to the Elements in its input. */
80 Element * applyFunction(CSolver *, Function * function, Element ** array, Boolean * overflowstatus);
82 /** This function applies a predicate to the Elements in its input. */
84 Boolean * applyPredicate(CSolver *, Predicate * predicate, Element ** inputs);
86 /** This function applies a logical operation to the Booleans in its input. */
88 Boolean * applyLogicalOperation(CSolver *, LogicOp op, Boolean ** array);
90 /** This function adds a boolean constraint to the set of constraints
93 void addBoolean(CSolver *, Boolean * constraint);
95 /** This function instantiates an order of type type over the set set. */
96 Order * createOrder(CSolver *, OrderType type, Set * set);
98 /** This function instantiates a boolean on two items in an order. */
99 Boolean * orderConstraint(CSolver *, Order * order, uint64_t first, uint64_t second);