From 632bce5fe6c1bba0288d4e7c1e19946f0fce052b Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Tue, 8 Mar 2022 15:17:32 -0600 Subject: [PATCH] Guard another case of non-termination in quantifiers rewriting (#8255) Fixes cvc5/cvc5-projects#152. --- src/theory/quantifiers/quantifiers_rewriter.cpp | 5 +++-- test/regress/CMakeLists.txt | 1 + .../quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2 | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 test/regress/regress0/quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2 diff --git a/src/theory/quantifiers/quantifiers_rewriter.cpp b/src/theory/quantifiers/quantifiers_rewriter.cpp index 4f20ec67f..0f423828c 100644 --- a/src/theory/quantifiers/quantifiers_rewriter.cpp +++ b/src/theory/quantifiers/quantifiers_rewriter.cpp @@ -717,8 +717,9 @@ Node QuantifiersRewriter::computeCondSplit(Node body, Trace("cond-var-split-debug") << "Conditional var elim split " << body << "?" << std::endl; // we only do this splitting if miniscoping is enabled, as this is - // required to eliminate variables in conjuncts below - if (!d_opts.quantifiers.miniscopeQuant) + // required to eliminate variables in conjuncts below. We also never + // miniscope non-standard quantifiers, so this is also guarded here. + if (!d_opts.quantifiers.miniscopeQuant || !qa.isStandard()) { return body; } diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 2a6add5b2..604bb91de 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -1042,6 +1042,7 @@ set(regress_0_tests regress0/quantifiers/nested-delta.smt2 regress0/quantifiers/nested-inf.smt2 regress0/quantifiers/partial-trigger.smt2 + regress0/quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2 regress0/quantifiers/pure_dt_cbqi.smt2 regress0/quantifiers/qarray-sel-over-store.smt2 regress0/quantifiers/qbv-inequality2.smt2 diff --git a/test/regress/regress0/quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2 b/test/regress/regress0/quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2 new file mode 100644 index 000000000..761b18d84 --- /dev/null +++ b/test/regress/regress0/quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2 @@ -0,0 +1,4 @@ +; EXPECT: false +(set-logic LIA) +(set-option :ext-rewrite-quant true) +(get-qe (forall ((q92 Int) (q93 Bool) (q94 Bool)) (=> (< q92 541) (and (not (not (<= 94 660))) q93 (< 94 660) q94 q94)))) -- 2.30.2