8 VectorBoolean * constraints;
9 VectorBoolean * allBooleans;
11 VectorElement * allElements;
12 VectorPredicate * allPredicates;
13 VectorTable * allTables;
16 /** Create a new solver instance. */
18 CSolver * allocCSolver();
20 /** This function creates a set containing the elements passed in the array. */
22 Set * createSet(CSolver *, VarType type, uint64_t * elements, uint num);
24 /** This function creates a set from lowrange to highrange (inclusive). */
26 Set * createRangeSet(CSolver *, VarType type, uint64_t lowrange, uint64_t highrange);
28 /** This function creates a mutable set. */
30 MutableSet * createMutableSet(CSolver *, VarType type);
32 /** This function adds a new item to a set. */
34 void addItem(CSolver *, MutableSet * set, uint64_t element);
36 /** This function adds a new unique item to the set and returns it.
37 This function cannot be used in conjunction with manually adding
40 uint64_t createUniqueItem(CSolver *, MutableSet * set);
42 /** This function creates an element variable over a set. */
44 Element * getElementVar(CSolver *, Set * set);
46 /** This function creates a boolean variable. */
48 Boolean * getBooleanVar(CSolver *, VarType type);
50 /** This function creates a function operator. */
52 Function * createFunctionOperator(CSolver *solver, enum ArithOp op, Set ** domain, uint numDomain, Set * range,
53 enum OverFlowBehavior overflowbehavior, Boolean * overflowstatus);
55 /** This function creates a predicate operator. */
57 Predicate * createPredicateOperator(CSolver *solver, enum CompOp op, Set ** domain, uint numDomain);
59 /** This function creates an empty instance table.*/
61 Table * createTable(CSolver *solver, Set **domains, uint numDomain, Set * range);
63 /** This function adds an input output relation to a table. */
65 void addTableEntry(CSolver *solver, Table* table, uint64_t* inputs, uint inputSize, uint64_t result);
67 /** This function converts a completed table into a function. */
69 Function * completeTable(CSolver *, Table *);
71 /** This function applies a function to the Elements in its input. */
73 Element * applyFunction(CSolver *, Function * function, Element ** array);
75 /** This function applies a predicate to the Elements in its input. */
77 Boolean * applyPredicate(CSolver *, Predicate * predicate, Element ** inputs);
79 /** This function applies a logical operation to the Booleans in its input. */
81 Boolean * applyLogicalOperation(CSolver *, enum LogicOp op, Boolean ** array);
83 /** This function adds a boolean constraint to the set of constraints
86 void addBoolean(CSolver *, Boolean * constraint);
88 /** This function instantiates an order of type type over the set set. */
89 Order * createOrder(CSolver *, enum OrderType type, Set * set);
91 /** This function instantiates a boolean on two items in an order. */
92 Boolean * orderConstraint(CSolver *, Order * order, uint64_t first, uint64_t second);