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;
20 /** This is a vector of all predicate structs that we have allocated. */
21 VectorPredicate * allPredicates;
23 /** This is a vector of all table structs that we have allocated. */
24 VectorTable * allTables;
26 /** This is a vector of all order structs that we have allocated. */
27 VectorOrder * allOrders;
29 /** This is a vector of all function structs that we have allocated. */
30 VectorFunction* allFunctions;
33 /** Create a new solver instance. */
35 CSolver * allocCSolver();
37 /** This function creates a set containing the elements passed in the array. */
39 Set * createSet(CSolver *, VarType type, uint64_t * elements, uint num);
41 /** This function creates a set from lowrange to highrange (inclusive). */
43 Set * createRangeSet(CSolver *, VarType type, uint64_t lowrange, uint64_t highrange);
45 /** This function creates a mutable set. */
47 MutableSet * createMutableSet(CSolver *, VarType type);
49 /** This function adds a new item to a set. */
51 void addItem(CSolver *, MutableSet * set, uint64_t element);
53 /** This function adds a new unique item to the set and returns it.
54 This function cannot be used in conjunction with manually adding
57 uint64_t createUniqueItem(CSolver *, MutableSet * set);
59 /** This function creates an element variable over a set. */
61 Element * getElementVar(CSolver *, Set * set);
63 /** This function creates a boolean variable. */
65 Boolean * getBooleanVar(CSolver *, VarType type);
67 /** This function creates a function operator. */
69 Function * createFunctionOperator(CSolver *solver, ArithOp op, Set ** domain, uint numDomain, Set * range,
70 OverFlowBehavior overflowbehavior);
72 /** This function creates a predicate operator. */
74 Predicate * createPredicateOperator(CSolver *solver, CompOp op, Set ** domain, uint numDomain);
76 /** This function creates an empty instance table.*/
78 Table * createTable(CSolver *solver, Set **domains, uint numDomain, Set * range);
80 /** This function adds an input output relation to a table. */
82 void addTableEntry(CSolver *solver, Table* table, uint64_t* inputs, uint inputSize, uint64_t result);
84 /** This function converts a completed table into a function. */
86 Function * completeTable(CSolver *, Table *);
88 /** This function applies a function to the Elements in its input. */
90 Element * applyFunction(CSolver *, Function * function, Element ** array, uint numArrays, Boolean * overflowstatus);
92 /** This function applies a predicate to the Elements in its input. */
94 Boolean * applyPredicate(CSolver *, Predicate * predicate, Element ** inputs, uint numInputs);
96 /** This function applies a logical operation to the Booleans in its input. */
98 Boolean * applyLogicalOperation(CSolver *, LogicOp op, Boolean ** array, uint asize);
100 /** This function adds a boolean constraint to the set of constraints
103 void addBoolean(CSolver *, Boolean * constraint);
105 /** This function instantiates an order of type type over the set set. */
106 Order * createOrder(CSolver *, OrderType type, Set * set);
108 /** This function instantiates a boolean on two items in an order. */
109 Boolean * orderConstraint(CSolver *, Order * order, uint64_t first, uint64_t second);