Disable sygus-inst when incremental (#7485)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 26 Oct 2021 16:24:31 +0000 (11:24 -0500)
committerGitHub <noreply@github.com>
Tue, 26 Oct 2021 16:24:31 +0000 (16:24 +0000)
Fixes #7385.

Option --sygus-inst relies on the quantifier-free sygus extension of datatypes, which does not support incremental mode. Updating it to support incremental is a long term project.

Until this is complete, --sygus-inst should not be run in incremental mode.

src/smt/set_defaults.cpp
test/regress/CMakeLists.txt
test/regress/regress1/quantifiers/issue7385-sygus-inst-i.smt2 [new file with mode: 0644]

index 17f0cd2c9a2cd69dea31cab6b22de5f9ba09b421..c4935340ff416cfce787722d3c916434435f869e 100644 (file)
@@ -197,7 +197,8 @@ void SetDefaults::finalizeLogic(LogicInfo& logic, Options& opts) const
   }
   else if (!isSygus(opts) && logic.isQuantified()
            && (logic.isPure(THEORY_FP)
-               || (logic.isPure(THEORY_ARITH) && !logic.isLinear())))
+               || (logic.isPure(THEORY_ARITH) && !logic.isLinear()))
+           && !opts.base.incrementalSolving)
   {
     opts.quantifiers.sygusInst = true;
   }
@@ -989,6 +990,18 @@ bool SetDefaults::incompatibleWithIncremental(const LogicInfo& logic,
              << std::endl;
     opts.quantifiers.sygusInference = false;
   }
+  if (opts.quantifiers.sygusInst)
+  {
+    if (opts.quantifiers.sygusInstWasSetByUser)
+    {
+      reason << "sygus inst";
+      return true;
+    }
+    Notice() << "SolverEngine: turning off sygus inst to support "
+                "incremental solving"
+             << std::endl;
+    opts.quantifiers.sygusInst = false;
+  }
   if (opts.smt.solveIntAsBV > 0)
   {
     reason << "solveIntAsBV";
index 2cf9554e2ec257fd05729fc2594869c13a766f46..8263152dda4cc5103afccee73eaee4b8c3d5874e 100644 (file)
@@ -1960,6 +1960,7 @@ set(regress_1_tests
   regress1/quantifiers/issue6699-nc-shadow.smt2
   regress1/quantifiers/issue6775-vts-int.smt2
   regress1/quantifiers/issue6845-nl-lemma-tc.smt2
+  regress1/quantifiers/issue7385-sygus-inst-i.smt2
   regress1/quantifiers/issue993.smt2
   regress1/quantifiers/javafe.ast.StmtVec.009.smt2
   regress1/quantifiers/lia-witness-div-pp.smt2
diff --git a/test/regress/regress1/quantifiers/issue7385-sygus-inst-i.smt2 b/test/regress/regress1/quantifiers/issue7385-sygus-inst-i.smt2
new file mode 100644 (file)
index 0000000..26fc1cf
--- /dev/null
@@ -0,0 +1,9 @@
+; COMMAND-LINE: -i
+; EXPECT: sat
+(set-logic NIRA)
+(push)
+(assert (exists ((q29 Int) (q30 Bool) (q35 Bool)) (= (= 0 q29) (= q35 q30))))
+(push)
+(pop)
+(pop)
+(check-sat)