From ca5fd891038a93bd63b3863faa8c5e39fff88ed0 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Mon, 5 Apr 2021 12:17:39 -0500 Subject: [PATCH] Enable UF when pre-skolem nested option is enabled (#6282) Fixes #4328. --- src/smt/set_defaults.cpp | 9 +++++++++ test/regress/CMakeLists.txt | 1 + test/regress/regress1/quantifiers/issue4328-nqe.smt2 | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 test/regress/regress1/quantifiers/issue4328-nqe.smt2 diff --git a/src/smt/set_defaults.cpp b/src/smt/set_defaults.cpp index 5fed0d664..6c10eeb94 100644 --- a/src/smt/set_defaults.cpp +++ b/src/smt/set_defaults.cpp @@ -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) diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 98976994e..58ad56276 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -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 index 000000000..9ee9ea974 --- /dev/null +++ b/test/regress/regress1/quantifiers/issue4328-nqe.smt2 @@ -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) -- 2.30.2