This removes a bug for reading data that has been popped from the back of a vector...
authorTim King <taking@google.com>
Fri, 23 Oct 2015 22:43:27 +0000 (15:43 -0700)
committerTim King <taking@google.com>
Sat, 24 Oct 2015 02:14:18 +0000 (19:14 -0700)
src/theory/unconstrained_simplifier.cpp

index 244cb303d90d3ace816c620c0e689748ef68dc28..997c998e6b5a9525e64422fbed00b598e92c1f36 100644 (file)
@@ -57,9 +57,9 @@ void UnconstrainedSimplifier::visitAll(TNode assertion)
   while (!toVisit.empty())
   {
     // The current node we are processing
-    unc_preprocess_stack_element& stackHead = toVisit.back();
+    TNode current = toVisit.back().node;
+    TNode parent = toVisit.back().parent;
     toVisit.pop_back();
-    TNode current = stackHead.node;
 
     TNodeCountMap::iterator find = d_visited.find(current);
     if (find != d_visited.end()) {
@@ -74,7 +74,7 @@ void UnconstrainedSimplifier::visitAll(TNode assertion)
     }
 
     d_visited[current] = 1;
-    d_visitedOnce[current] = stackHead.parent;
+    d_visitedOnce[current] = parent;
 
     if (current.getNumChildren() == 0) {
       if (current.isVar()) {