Enable UF when pre-skolem nested option is enabled (#6282)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Mon, 5 Apr 2021 17:17:39 +0000 (12:17 -0500)
committerGitHub <noreply@github.com>
Mon, 5 Apr 2021 17:17:39 +0000 (17:17 +0000)
Fixes #4328.

src/smt/set_defaults.cpp
test/regress/CMakeLists.txt
test/regress/regress1/quantifiers/issue4328-nqe.smt2 [new file with mode: 0644]

index 5fed0d66489187ff18eafba54f9d1d32c14c953a..6c10eeb948adac8b3ef8c2cefc91387da94c5c42 100644 (file)
@@ -631,6 +631,15 @@ void setDefaults(LogicInfo& logic, bool isInternalSubsolver)
     Notice() << "Enabling UF because bvAbstraction requires it." << std::endl;
     needsUf = true;
   }
+  else if (options::preSkolemQuantNested()
+           && options::preSkolemQuantNested.wasSetByUser())
+  {
+    // if pre-skolem nested is explictly set, then we require UF. If it is
+    // not explicitly set, it is disabled below if UF is not present.
+    Notice() << "Enabling UF because preSkolemQuantNested requires it."
+             << std::endl;
+    needsUf = true;
+  }
   if (needsUf
       // Arrays, datatypes and sets permit Boolean terms and thus require UF
       || logic.isTheoryEnabled(THEORY_ARRAYS)
index 98976994e94b3960a0e5c684ec91c238c9535ccf..58ad56276e771d3dbdc66864eaf456ea407a2f00 100644 (file)
@@ -1759,6 +1759,7 @@ set(regress_1_tests
   regress1/quantifiers/issue4062-cegqi-aux.smt2
   regress1/quantifiers/issue4243-prereg-inc.smt2
   regress1/quantifiers/issue4290-cegqi-r.smt2
+  regress1/quantifiers/issue4328-nqe.smt2
   regress1/quantifiers/issue4433-nqe.smt2
   regress1/quantifiers/issue4620-erq-witness-unsound.smt2
   regress1/quantifiers/issue4685-wrewrite.smt2
diff --git a/test/regress/regress1/quantifiers/issue4328-nqe.smt2 b/test/regress/regress1/quantifiers/issue4328-nqe.smt2
new file mode 100644 (file)
index 0000000..9ee9ea9
--- /dev/null
@@ -0,0 +1,7 @@
+(set-logic BV)
+(set-info :status sat)
+(set-option :finite-model-find true)
+(set-option :pre-skolem-quant-nested true)
+(set-option :cegqi-nested-qe true)
+(assert (forall ((a (_ BitVec 32))) (exists ((b (_ BitVec 32))) (bvsle a b))))
+(check-sat)