summaryrefslogtreecommitdiff
path: root/src/theory/strings/skolem_cache.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-05-12 08:30:42 -0500
committerGitHub <noreply@github.com>2021-05-12 13:30:42 +0000
commit111f98a41b488b8124fbecd28dba17465ea30786 (patch)
treeaaec0192960bdb3e47efc39917c4e2db23ea1f5d /src/theory/strings/skolem_cache.cpp
parentf41d71cbf1946a5ee5a63c062a23c7426ec5e87d (diff)
Ensure sequences of Booleans generate Boolean term variable skolems when applicable (#6529)
Fixes #6510. This PR also eliminates a deprecated variant mkBooleanTermVariable from SkolemManager.
Diffstat (limited to 'src/theory/strings/skolem_cache.cpp')
-rw-r--r--src/theory/strings/skolem_cache.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/theory/strings/skolem_cache.cpp b/src/theory/strings/skolem_cache.cpp
index eb2df1285..9b23301f3 100644
--- a/src/theory/strings/skolem_cache.cpp
+++ b/src/theory/strings/skolem_cache.cpp
@@ -96,8 +96,14 @@ Node SkolemCache::mkTypedSkolemCached(
{
// exists k. k = a
case SK_PURIFY:
- sk = sm->mkPurifySkolem(a, c, "string purify skolem");
- break;
+ {
+ // for sequences of Booleans, we may purify Boolean terms, in which case
+ // they must be Boolean term variables.
+ int flags = a.getType().isBoolean() ? NodeManager::SKOLEM_BOOL_TERM_VAR
+ : NodeManager::SKOLEM_DEFAULT;
+ sk = sm->mkPurifySkolem(a, c, "string purify skolem", flags);
+ }
+ break;
// these are eliminated by normalizeStringSkolem
case SK_ID_V_SPT:
case SK_ID_V_SPT_REV:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback