Initial Skeletons
[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         Set * createSet(Type type, uint64_t ** elements);
8         Set * createSet(Type type, uint64_t lowrange, uint64_t highrange);
9         MutableSet * createMutableSet(Type type);
10
11         void addItem(MutableSet * set, uint64_t element);
12         int64_t createUniqueItem(MutableSet * set);
13
14         Element * getElementVar(Set * set);
15         Constraint * getBooleanVar();
16
17         Function * createFunctionOperator(enum ArithOp op, Set ** domain, Set * range, enum OverFlowBehavior overflowbehavior, Constraint * overflowstatus);
18         Function * createFunctionOperator(enum ArithOp op);                                                                                                             //Does Not Overflow
19         Predicate * createPredicateOperator(enum CompOp op, Set ** domain);
20
21         Table * createTable(Set **domains, Set * range);
22         void addTableEntry(Element ** inputs, Element *result);
23         Function * completeTable(struct Table *);
24
25         Element * applyFunction(Function * function, Element ** array);
26         Constraint * applyPredicate(Predicate * predicate, Element ** inputs);
27         Constraint * applyLogicalOperation(enum LogicOp op, Constraint ** array);
28
29         void addConstraint(Constraint * constraint);
30
31         Order * createOrder(enum OrderType type, Set * set);
32         Constraint * orderedConstraint(Order * order, uint64_t first, uint64_t second);
33 };
34 #endif