Skip to content

Commit a69fba7

Browse files
authored
Do not purify ground Boolean subterms in quantifier bodies (cvc5#11654)
Fixes cvc5/cvc5-projects#763. More generally, this issue suggests it is not safe to introduce purification skolems for any Boolean term, as this can make them allocated as an "internal-only" SAT literal, where if later the same purification skolem is introduced as a Boolean term skolem, the theory solvers will not be notified. This will require more thought.
1 parent 0ab0f2d commit a69fba7

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/theory/quantifiers/ematching/trigger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ uint64_t Trigger::addInstantiations()
160160
eq::EqualityEngine* ee = d_qstate.getEqualityEngine();
161161
for (const Node& gt : d_groundTerms)
162162
{
163-
if (!ee->hasTerm(gt))
163+
if (!ee->hasTerm(gt) && !gt.getType().isBoolean())
164164
{
165165
Node k = SkolemManager::mkPurifySkolem(gt);
166166
Node eq = k.eqNode(gt);

test/regress/cli/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,7 @@ set(regress_0_tests
15721572
regress0/quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2
15731573
regress0/quantifiers/proj-issue512-has-skolem.smt2
15741574
regress0/quantifiers/proj-issue608-mbqi-cegqi.smt2
1575+
regress0/quantifiers/proj-issue763-no-gt-purify-bool.smt2
15751576
regress0/quantifiers/pure_dt_cbqi.smt2
15761577
regress0/quantifiers/qarray-sel-over-store.smt2
15771578
regress0/quantifiers/qbv-inequality2.smt2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
; COMMAND-LINE: --mbqi
2+
; EXPECT: sat
3+
(set-logic ALL)
4+
(declare-const x5 (Seq Bool))
5+
(declare-const x (Array Bool Bool))
6+
(assert (not (select x (exists ((_x (Seq Bool))) (forall ((x (Array Bool Bool))) (select x (seq.prefixof x5 _x)))))))
7+
(check-sat)

0 commit comments

Comments
 (0)