1d398ce9b4736aaeab384232258da29f9e9ae35f
[satune.git] / src / csolver.h
1 #ifndef CSOLVER_H
2 #define CSOLVER_H
3 #include "classlist.h"
4 #include "ops.h"
5
6 class CSolver {
7 public:
8         CSolver();
9
10         Set * createSet(Type type, uint64_t ** elements);
11         Set * createSet(Type type, uint64_t lowrange, uint64_t highrange);
12         MutableSet * createMutableSet(Type type);
13
14         void addItem(MutableSet * set, uint64_t element);
15         int64_t createUniqueItem(MutableSet * set);
16
17         Element * getElementVar(Set * set);
18         Constraint * getBooleanVar();
19
20         Function * createFunctionOperator(enum ArithOp op, Set ** domain, Set * range, enum OverFlowBehavior overflowbehavior, Constraint * overflowstatus);
21         Function * createFunctionOperator(enum ArithOp op);                                                                                                                                                                                                                                                                                                                                                                                                                                                                             //Does Not Overflow
22         Predicate * createPredicateOperator(enum CompOp op, Set ** domain);
23
24         Table * createTable(Set **domains, Set * range);
25         void addTableEntry(Element ** inputs, Element *result);
26         Function * completeTable(struct Table *);
27
28         Element * applyFunction(Function * function, Element ** array);
29         Constraint * applyPredicate(Predicate * predicate, Element ** inputs);
30         Constraint * applyLogicalOperation(enum LogicOp op, Constraint ** array);
31
32         void addConstraint(Constraint * constraint);
33
34         Order * createOrder(enum OrderType type, Set * set);
35         Constraint * orderedConstraint(Order * order, uint64_t first, uint64_t second);
36 private:
37
38 };
39 #endif