summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-07-29 20:15:44 -0500
committerGitHub <noreply@github.com>2020-07-29 20:15:44 -0500
commitf5eb204df574d8f680e802601ca279f82eaf0146 (patch)
tree8d92e66d81fb0d024a459a04653bd0cfb54e4427
parent24710c2f7f754cd8297409f82b5cb0789e16ee18 (diff)
(proof-new) Fixes for getFreeAssumptions (#4802)
Free assumptions weren't getting cleaned up due to not doing a postorder traversal. This issue came up when doing subproof sharing involving SCOPE proofs.
-rw-r--r--src/expr/proof_node_algorithm.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/expr/proof_node_algorithm.cpp b/src/expr/proof_node_algorithm.cpp
index 45dc2d995..9e1018024 100644
--- a/src/expr/proof_node_algorithm.cpp
+++ b/src/expr/proof_node_algorithm.cpp
@@ -86,6 +86,7 @@ void getFreeAssumptionsMap(ProofNode* pn,
}
// will need to unbind the variables below
visited[cur] = false;
+ visit.push_back(cur);
}
// The following loop cannot be merged with the loop above because the
// same subproof
@@ -98,6 +99,7 @@ void getFreeAssumptionsMap(ProofNode* pn,
}
else if (!it->second)
{
+ visited[cur] = true;
Assert(cur->getRule() == PfRule::SCOPE);
// unbind its assumptions
for (const Node& a : cargs)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback