From 06af2c9f2f6b5db9c148abd8cbcec6df01823172 Mon Sep 17 00:00:00 2001 From: Hamed Gorjiara Date: Fri, 29 Sep 2017 14:16:17 -0700 Subject: [PATCH] Fixing missing changes --- src/AST/boolean.cc | 34 ++++++++++++++++++++++++++++++++++ src/AST/boolean.h | 2 +- src/AST/element.h | 2 +- src/AST/predicate.cc | 6 ++++++ 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/AST/boolean.cc b/src/AST/boolean.cc index 8a6f0d3..0f699f7 100644 --- a/src/AST/boolean.cc +++ b/src/AST/boolean.cc @@ -109,6 +109,10 @@ void BooleanVar::serialize(Serializer* serializer){ serializer->mywrite(&vtype, sizeof(VarType)); } +void BooleanVar::print(){ + model_println("BooleanVar"); +} + void BooleanOrder::serialize(Serializer* serializer){ if(serializer->isSerialized(this)) return; @@ -123,6 +127,12 @@ void BooleanOrder::serialize(Serializer* serializer){ serializer->mywrite(&second, sizeof(uint64_t)); } +void BooleanOrder::print(){ + model_println("{BooleanOrder: First= %lu, Second = %lu on Order:", first, second); + order->print(); + model_println("}\n"); +} + void BooleanPredicate::serialize(Serializer* serializer){ if(serializer->isSerialized(this)) return; @@ -149,6 +159,18 @@ void BooleanPredicate::serialize(Serializer* serializer){ serializer->mywrite(&undefStat, sizeof(Boolean*)); } +void BooleanPredicate::print(){ + model_println("{BooleanPredicate:"); + predicate->print(); + model_println("elements:"); + uint size = inputs.getSize(); + for(uint i=0; iprint(); + } + model_println("}\n"); +} + void BooleanLogic::serialize(Serializer* serializer){ if(serializer->isSerialized(this)) return; @@ -169,3 +191,15 @@ void BooleanLogic::serialize(Serializer* serializer){ } } +void BooleanLogic::print(){ + model_println("{BooleanLogic: %s", + op ==SATC_AND? "AND": op == SATC_OR? "OR": op==SATC_NOT? "NOT": + op == SATC_XOR? "XOR" : op==SATC_IFF? "IFF" : "IMPLIES"); + uint size = inputs.getSize(); + for(uint i=0; iprint(); + } + model_println("}\n"); +} + diff --git a/src/AST/boolean.h b/src/AST/boolean.h index 3674d9f..6a81429 100644 --- a/src/AST/boolean.h +++ b/src/AST/boolean.h @@ -34,7 +34,7 @@ public: bool isTrue() {return istrue;} bool isFalse() {return !istrue;} void serialize(Serializer *serializer ){}; - virtual void print(); + virtual void print(){}; bool istrue; CMEMALLOC; }; diff --git a/src/AST/element.h b/src/AST/element.h index b045186..c643603 100644 --- a/src/AST/element.h +++ b/src/AST/element.h @@ -17,7 +17,7 @@ public: inline ElementEncoding *getElementEncoding(){ return &encoding; } virtual Element *clone(CSolver *solver, CloneMap *map) {ASSERT(0); return NULL;}; virtual void serialize(Serializer* serializer) =0; - virtual void print(); + virtual void print() = 0; virtual void updateParents() {} virtual Set * getRange() = 0; CMEMALLOC; diff --git a/src/AST/predicate.cc b/src/AST/predicate.cc index 659a3e3..f320a4d 100644 --- a/src/AST/predicate.cc +++ b/src/AST/predicate.cc @@ -95,3 +95,9 @@ void PredicateOperator::serialize(Serializer* serializer){ } } +void PredicateOperator::print(){ + model_println("{PredicateOperator: %s }", op ==SATC_EQUALS? "EQUAL": "NOT-EQUAL"); +} + + + -- 2.34.1