From: Hamed Date: Tue, 29 Aug 2017 06:01:25 +0000 (-0700) Subject: Edit X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2e63175294183501a0afb43e65213ca854e4673c;p=satune.git Edit --- diff --git a/src/ASTTransform/analyzer.cc b/src/ASTTransform/analyzer.cc index bd0628f..f416110 100644 --- a/src/ASTTransform/analyzer.cc +++ b/src/ASTTransform/analyzer.cc @@ -22,8 +22,10 @@ void orderAnalysis(CSolver *This) { for (uint i = 0; i < size; i++) { Order *order = orders->get(i); DecomposeOrderTransform* decompose = new DecomposeOrderTransform(This, order, DECOMPOSEORDER, &onoff); - if (!decompose->canExecuteTransform()) + if (!decompose->canExecuteTransform()){ continue; + delete decompose; + } OrderGraph *graph = buildOrderGraph(order); if (order->type == PARTIAL) { @@ -64,8 +66,10 @@ void orderAnalysis(CSolver *This) { IntegerEncodingTransform* integerEncoding = new IntegerEncodingTransform(This, order, ORDERINTEGERENCODING, &offon); - if(!integerEncoding->canExecuteTransform()) + if(!integerEncoding->canExecuteTransform()){ continue; + delete integerEncoding; + } integerEncoding->doTransform(); delete integerEncoding; } diff --git a/src/ASTTransform/integerencoding.h b/src/ASTTransform/integerencoding.h index 61e1512..64924f2 100644 --- a/src/ASTTransform/integerencoding.h +++ b/src/ASTTransform/integerencoding.h @@ -17,7 +17,7 @@ public: void orderIntegerEncodingSATEncoder(BooleanOrder *boolOrder); void doTransform(); bool canExecuteTransform(); - ~IntegerEncodingTransform(); + virtual ~IntegerEncodingTransform(); private: Order* order; // In future we can use a singleton class instead of static variable for keeping data that needed diff --git a/src/ASTTransform/pass.cc b/src/ASTTransform/pass.cc index b774ceb..3b54821 100644 --- a/src/ASTTransform/pass.cc +++ b/src/ASTTransform/pass.cc @@ -10,5 +10,4 @@ Pass::Pass(Tunables _tunable, TunableDesc* _desc): } Pass::~Pass(){ - }