7 Boolean::Boolean(ASTNodeType _type) : ASTNode(_type), polarity(P_UNDEFINED), boolVal(BV_UNDEFINED) {
8 initDefVectorBoolean(GETBOOLEANPARENTS(this));
11 BooleanVar::BooleanVar(VarType t) : Boolean(BOOLEANVAR), vtype(t), var(E_NULL) {
14 BooleanOrder::BooleanOrder(Order *_order, uint64_t _first, uint64_t _second) : Boolean(ORDERCONST), order(_order), first(_first), second(_second) {
15 pushVectorBooleanOrder(&order->constraints, this);
18 BooleanPredicate::BooleanPredicate(Predicate *_predicate, Element **_inputs, uint _numInputs, Boolean *_undefinedStatus) : Boolean(PREDICATEOP), predicate(_predicate), undefStatus(_undefinedStatus) {
19 initArrayInitElement(&inputs, _inputs, _numInputs);
21 for (uint i = 0; i < _numInputs; i++) {
22 pushVectorASTNode(GETELEMENTPARENTS(_inputs[i]), this);
24 initPredicateEncoding(&encoding, this);
27 BooleanLogic::BooleanLogic(CSolver *solver, LogicOp _op, Boolean **array, uint asize) : Boolean(LOGICOP), op(_op) {
28 initArrayInitBoolean(&inputs, array, asize);
29 pushVectorBoolean(solver->allBooleans, (Boolean *) this);
33 deleteVectorArrayBoolean(GETBOOLEANPARENTS(this));
36 BooleanPredicate::~BooleanPredicate() {
37 deleteInlineArrayElement(&inputs );
38 deleteFunctionEncoding(&encoding);
41 BooleanLogic::~BooleanLogic() {
42 deleteInlineArrayBoolean(&inputs);