8 #include "functionencoding.h"
9 #include "constraint.h"
12 This is a little sketchy, but apparently legit.
13 https://www.python.org/dev/peps/pep-3123/ */
15 #define GETBOOLEANTYPE(o) (o->type)
16 #define GETBOOLEANPARENTS(o) (&(o->parents))
17 #define GETBOOLEANPOLARITY(b) (b->polarity)
18 #define GETBOOLEANVALUE(b) (b->boolVal)
20 class Boolean : public ASTNode {
22 Boolean(ASTNodeType _type);
24 virtual Boolean *clone(CSolver *solver, CloneMap *map) { ASSERT(0); return NULL; }
27 Vector<Boolean *> parents;
31 class BooleanVar : public Boolean {
33 BooleanVar(VarType t);
34 Boolean *clone(CSolver *solver, CloneMap *map);
41 class BooleanOrder : public Boolean {
43 BooleanOrder(Order *_order, uint64_t _first, uint64_t _second);
44 Boolean *clone(CSolver *solver, CloneMap *map);
52 class BooleanPredicate : public Boolean {
54 BooleanPredicate(Predicate *_predicate, Element **_inputs, uint _numInputs, Boolean *_undefinedStatus);
55 Boolean *clone(CSolver *solver, CloneMap *map);
58 FunctionEncoding encoding;
59 Array<Element *> inputs;
61 FunctionEncoding *getFunctionEncoding() {return &encoding;}
65 class BooleanLogic : public Boolean {
67 BooleanLogic(CSolver *solver, LogicOp _op, Boolean **array, uint asize);
68 Boolean *clone(CSolver *solver, CloneMap *map);
71 Array<Boolean *> inputs;