#include "element.h"
#include "order.h"
-Boolean::Boolean(ASTNodeType _type) : ASTNode(_type), polarity(P_UNDEFINED), boolVal(BV_UNDEFINED) {
- initDefVectorBoolean(GETBOOLEANPARENTS(this));
+Boolean::Boolean(ASTNodeType _type) :
+ ASTNode(_type),
+ polarity(P_UNDEFINED),
+ boolVal(BV_UNDEFINED),
+ parents() {
}
-BooleanVar::BooleanVar(VarType t) : Boolean(BOOLEANVAR), vtype(t), var(E_NULL) {
+BooleanVar::BooleanVar(VarType t) :
+ Boolean(BOOLEANVAR),
+ vtype(t),
+ var(E_NULL) {
}
-BooleanOrder::BooleanOrder(Order *_order, uint64_t _first, uint64_t _second) : Boolean(ORDERCONST), order(_order), first(_first), second(_second) {
- pushVectorBooleanOrder(&order->constraints, this);
+BooleanOrder::BooleanOrder(Order *_order, uint64_t _first, uint64_t _second) :
+ Boolean(ORDERCONST),
+ order(_order),
+ first(_first),
+ second(_second) {
+ order->constraints.push(this);
}
BooleanPredicate::BooleanPredicate(Predicate *_predicate, Element **_inputs, uint _numInputs, Boolean *_undefinedStatus) :
inputs(_inputs, _numInputs),
undefStatus(_undefinedStatus) {
for (uint i = 0; i < _numInputs; i++) {
- pushVectorASTNode(GETELEMENTPARENTS(_inputs[i]), this);
+ GETELEMENTPARENTS(_inputs[i])->push(this);
}
initPredicateEncoding(&encoding, this);
}
Boolean(LOGICOP),
op(_op),
inputs(array, asize) {
- pushVectorBoolean(solver->allBooleans, (Boolean *) this);
-}
-
-Boolean::~Boolean() {
- deleteVectorArrayBoolean(GETBOOLEANPARENTS(this));
+ solver->allBooleans.push(this);
}
BooleanPredicate::~BooleanPredicate() {