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);
25 VectorBoolean parents;
30 class BooleanVar : public Boolean {
32 BooleanVar(VarType t);
38 class BooleanOrder : public Boolean {
40 BooleanOrder(Order *_order, uint64_t _first, uint64_t _second);
47 class BooleanPredicate : public Boolean {
49 BooleanPredicate(Predicate *_predicate, Element **_inputs, uint _numInputs, Boolean *_undefinedStatus);
52 FunctionEncoding encoding;
59 class BooleanLogic : public Boolean {
61 BooleanLogic(CSolver *solver, LogicOp _op, Boolean **array, uint asize);
70 Boolean *allocBooleanVar(VarType t);
71 Boolean *allocBooleanOrder(Order *order, uint64_t first, uint64_t second);
72 Boolean *allocBooleanPredicate(Predicate *predicate, Element **inputs, uint numInputs, Boolean *undefinedStatus);
73 Boolean *allocBooleanLogicArray(CSolver *solver, LogicOp op, Boolean **array, uint asize);
74 void deleteBoolean(Boolean *This);
75 static inline FunctionEncoding *getPredicateFunctionEncoding(BooleanPredicate *func) {
76 return &func->encoding;