projects
/
satune.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'hamed' into brian
[satune.git]
/
src
/
csolver.h
diff --git
a/src/csolver.h
b/src/csolver.h
index aedef9391ea27c586b5b838e38c1cbf21611cb5a..bd90bf3054a5cbf85e4b506097391c2786e51d7d 100644
(file)
--- a/
src/csolver.h
+++ b/
src/csolver.h
@@
-16,14
+16,28
@@
struct CSolver {
/** This is a vector of all element structs that we have allocated. */
VectorElement * allElements;
/** This is a vector of all element structs that we have allocated. */
VectorElement * allElements;
+
+ /** This is a vector of all predicate structs that we have allocated. */
VectorPredicate * allPredicates;
VectorPredicate * allPredicates;
+
+ /** This is a vector of all table structs that we have allocated. */
VectorTable * allTables;
VectorTable * allTables;
+
+ /** This is a vector of all order structs that we have allocated. */
+ VectorOrder * allOrders;
+
+ /** This is a vector of all function structs that we have allocated. */
+ VectorFunction* allFunctions;
};
/** Create a new solver instance. */
CSolver * allocCSolver();
};
/** Create a new solver instance. */
CSolver * allocCSolver();
+/** Delete solver instance. */
+
+void deleteSolver(CSolver * This);
+
/** This function creates a set containing the elements passed in the array. */
Set * createSet(CSolver *, VarType type, uint64_t * elements, uint num);
/** This function creates a set containing the elements passed in the array. */
Set * createSet(CSolver *, VarType type, uint64_t * elements, uint num);
@@
-61,7
+75,7
@@
Function * createFunctionOperator(CSolver *solver, ArithOp op, Set ** domain, ui
/** This function creates a predicate operator. */
/** This function creates a predicate operator. */
-Predicate * createPredicateOperator(CSolver *solver,
enum
CompOp op, Set ** domain, uint numDomain);
+Predicate * createPredicateOperator(CSolver *solver, CompOp op, Set ** domain, uint numDomain);
/** This function creates an empty instance table.*/
/** This function creates an empty instance table.*/
@@
-77,15
+91,15
@@
Function * completeTable(CSolver *, Table *);
/** This function applies a function to the Elements in its input. */
/** This function applies a function to the Elements in its input. */
-Element * applyFunction(CSolver *, Function * function, Element ** array, Boolean * overflowstatus);
+Element * applyFunction(CSolver *, Function * function, Element ** array,
uint numArrays,
Boolean * overflowstatus);
/** This function applies a predicate to the Elements in its input. */
/** This function applies a predicate to the Elements in its input. */
-Boolean * applyPredicate(CSolver *, Predicate * predicate, Element ** inputs);
+Boolean * applyPredicate(CSolver *, Predicate * predicate, Element ** inputs
, uint numInputs
);
/** This function applies a logical operation to the Booleans in its input. */
/** This function applies a logical operation to the Booleans in its input. */
-Boolean * applyLogicalOperation(CSolver *,
enum LogicOp op, Boolean ** array
);
+Boolean * applyLogicalOperation(CSolver *,
LogicOp op, Boolean ** array, uint asize
);
/** This function adds a boolean constraint to the set of constraints
to be satisfied */
/** This function adds a boolean constraint to the set of constraints
to be satisfied */
@@
-93,8
+107,11
@@
Boolean * applyLogicalOperation(CSolver *, enum LogicOp op, Boolean ** array);
void addBoolean(CSolver *, Boolean * constraint);
/** This function instantiates an order of type type over the set set. */
void addBoolean(CSolver *, Boolean * constraint);
/** This function instantiates an order of type type over the set set. */
-Order * createOrder(CSolver *,
enum
OrderType type, Set * set);
+Order * createOrder(CSolver *, OrderType type, Set * set);
/** This function instantiates a boolean on two items in an order. */
Boolean * orderConstraint(CSolver *, Order * order, uint64_t first, uint64_t second);
/** This function instantiates a boolean on two items in an order. */
Boolean * orderConstraint(CSolver *, Order * order, uint64_t first, uint64_t second);
+
+/** When everything is done, the client calls this function and then csolver starts to encode*/
+void startEncoding(CSolver*);
#endif
#endif