summaryrefslogtreecommitdiff
path: root/src/theory/strings
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-12-16 10:52:26 -0600
committerGitHub <noreply@github.com>2020-12-16 10:52:26 -0600
commit496aed3f37c37519b6a26b3346b7f06e43bb5351 (patch)
tree709ba9b60db9c3550603a8e923568039cd2365a8 /src/theory/strings
parent3a3735d58ddac7ecfac80dad35da963901f15f55 (diff)
(proof-new) Use bound variable manager (#5679)
This uses BoundVarManager for several key places where bound variables are introduced, including for array extensionality witness terms, string preprocessing, quantifiers rewriting, and skolemization. This is motivated by making certain steps in solving deterministic for the sake of proofs, and gives a more consistent pattern in general for constructing bound variables.
Diffstat (limited to 'src/theory/strings')
-rw-r--r--src/theory/strings/skolem_cache.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/theory/strings/skolem_cache.cpp b/src/theory/strings/skolem_cache.cpp
index f5f2dfd35..b68eb4a04 100644
--- a/src/theory/strings/skolem_cache.cpp
+++ b/src/theory/strings/skolem_cache.cpp
@@ -15,6 +15,8 @@
#include "theory/strings/skolem_cache.h"
#include "expr/attribute.h"
+#include "expr/bound_var_manager.h"
+#include "expr/skolem_manager.h"
#include "theory/rewriter.h"
#include "theory/strings/arith_entail.h"
#include "theory/strings/theory_strings_utils.h"
@@ -273,15 +275,10 @@ SkolemCache::normalizeStringSkolem(SkolemId id, Node a, Node b)
Node SkolemCache::mkIndexVar(Node t)
{
- IndexVarAttribute iva;
- if (t.hasAttribute(iva))
- {
- return t.getAttribute(iva);
- }
NodeManager* nm = NodeManager::currentNM();
- Node v = nm->mkBoundVar(nm->integerType());
- t.setAttribute(iva, v);
- return v;
+ TypeNode intType = nm->integerType();
+ BoundVarManager* bvm = nm->getBoundVarManager();
+ return bvm->mkBoundVar<IndexVarAttribute>(t, intType);
}
} // namespace strings
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback