summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.nyu.edu>2015-06-14 08:30:09 -0700
committerClark Barrett <barrett@cs.nyu.edu>2015-06-14 08:30:09 -0700
commitcba911ca62d5a4eaa386f3e1f20fb37f776e0f58 (patch)
tree1ee7a59575be904592fe751d085eb36e3947e8b3 /src
parent9baed9b7718c1bfc97040ea90169270d65331d14 (diff)
Fix for potential cache problem in intToBV pass
Diffstat (limited to 'src')
-rw-r--r--src/smt/smt_engine.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index fc08de74a..99467b03a 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -1999,13 +1999,12 @@ Node SmtEnginePrivate::intToBVMakeBinary(TNode n, NodeMap& cache) {
}
Node SmtEnginePrivate::intToBV(TNode n, NodeMap& cache) {
- // Do a topological sort of the subexpressions and substitute them
int size = options::solveIntAsBV();
Assert(size > 0);
vector<intToBV_stack_element> toVisit;
- Node n_binary = intToBVMakeBinary(n, cache);
+ NodeMap binaryCache;
+ Node n_binary = intToBVMakeBinary(n, binaryCache);
toVisit.push_back(TNode(n_binary));
- cache.clear();
while (!toVisit.empty())
{
@@ -2013,7 +2012,7 @@ Node SmtEnginePrivate::intToBV(TNode n, NodeMap& cache) {
intToBV_stack_element& stackHead = toVisit.back();
TNode current = stackHead.node;
- // If node has no ITE's or already in the cache we're done, pop from the stack
+ // If node is already in the cache we're done, pop from the stack
NodeMap::iterator find = cache.find(current);
if (find != cache.end()) {
toVisit.pop_back();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback