summaryrefslogtreecommitdiff
path: root/src/theory/substitutions.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-04-22 17:36:02 -0500
committerGitHub <noreply@github.com>2021-04-22 22:36:02 +0000
commitcd7432f10ca15585df81e3ef2d49fcddbfa9c3c8 (patch)
tree0bdb3f081a7c878f4b3c0a9440551f7eb1e95b8d /src/theory/substitutions.cpp
parent0e79ea91e254a716b94bc74dc9e5aef13d4a8cba (diff)
Minor improvements to substitutions (#6380)
In preparation for using this class as part of our proof checker. This removes an option that was previously used as a hack to try to make check-models work for quantifiers. It also makes supplying a context optional.
Diffstat (limited to 'src/theory/substitutions.cpp')
-rw-r--r--src/theory/substitutions.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/theory/substitutions.cpp b/src/theory/substitutions.cpp
index 5c4b36043..8ca099dae 100644
--- a/src/theory/substitutions.cpp
+++ b/src/theory/substitutions.cpp
@@ -22,6 +22,15 @@ using namespace std;
namespace cvc5 {
namespace theory {
+SubstitutionMap::SubstitutionMap(context::Context* context)
+ : d_context(),
+ d_substitutions(context ? context : &d_context),
+ d_substitutionCache(),
+ d_cacheInvalidated(false),
+ d_cacheInvalidator(context ? context : &d_context, d_cacheInvalidated)
+{
+}
+
struct substitution_stack_element {
TNode d_node;
bool d_children_added;
@@ -57,14 +66,6 @@ Node SubstitutionMap::internalSubstitute(TNode t, NodeCache& cache) {
continue;
}
- if (!d_substituteUnderQuantifiers && current.isClosure())
- {
- Debug("substitution::internal") << "--not substituting under quantifier" << endl;
- cache[current] = current;
- toVisit.pop_back();
- continue;
- }
-
NodeMap::iterator find2 = d_substitutions.find(current);
if (find2 != d_substitutions.end()) {
Node rhs = (*find2).second;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback