Guard another case of non-termination in quantifiers rewriting (#8255)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 8 Mar 2022 21:17:32 +0000 (15:17 -0600)
committerGitHub <noreply@github.com>
Tue, 8 Mar 2022 21:17:32 +0000 (21:17 +0000)
Fixes cvc5/cvc5-projects#152.

src/theory/quantifiers/quantifiers_rewriter.cpp
test/regress/CMakeLists.txt
test/regress/regress0/quantifiers/proj-issue152-2-non-std-nterm-ext-rew.smt2 [new file with mode: 0644]

index 4f20ec67ffb0b32d107e9b956b88f28c87310561..0f423828cfc45954ff7211042a243679047e7839 100644 (file)
@@ -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;
   }
index 2a6add5b20910204227a9cd92b348d8c4981c93b..604bb91dee34e0d943a048f0e6b505da7d0bf68c 100644 (file)
@@ -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 (file)
index 0000000..761b18d
--- /dev/null
@@ -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))))