From: Hamed Gorjiara Date: Tue, 8 May 2018 18:00:33 +0000 (-0700) Subject: making the qsort deterministic for BooleanEdge X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satune.git;a=commitdiff_plain;h=238830745ba3939323c285b722c9ae512b7baa9b;hp=9ef6c2bc13c8474fa7848e06f312cdcd05254b6b;ds=sidebyside making the qsort deterministic for BooleanEdge --- diff --git a/src/AST/boolean.cc b/src/AST/boolean.cc index c576268..647f548 100644 --- a/src/AST/boolean.cc +++ b/src/AST/boolean.cc @@ -5,11 +5,13 @@ #include "order.h" #include "predicate.h" +uint64_t Boolean::counter = 0; + Boolean::Boolean(ASTNodeType _type) : ASTNode(_type), polarity(P_UNDEFINED), boolVal(BV_UNDEFINED), - parents() { + parents(), id(counter++) { } BooleanConst::BooleanConst(bool _isTrue) : diff --git a/src/AST/boolean.h b/src/AST/boolean.h index 207b327..1f218b2 100644 --- a/src/AST/boolean.h +++ b/src/AST/boolean.h @@ -11,6 +11,8 @@ #include "serializer.h" class Boolean : public ASTNode { +private: + static uint64_t counter; public: Boolean(ASTNodeType _type); virtual ~Boolean() {} @@ -23,7 +25,7 @@ public: BooleanValue boolVal; Vector parents; virtual void updateParents() {} - + uint64_t id; CMEMALLOC; };