summaryrefslogtreecommitdiff
path: root/src/smt/smt_engine.cpp
diff options
context:
space:
mode:
authorYing Sheng <sqy1415@gmail.com>2019-10-08 08:18:21 -0700
committerAndres Noetzli <andres.noetzli@gmail.com>2019-10-08 08:18:21 -0700
commit00ccc01140bcdeaadedf8ae1b9f224ccdc812bc0 (patch)
treebc4981945d06c25d57854fbf2651431061e9ae42 /src/smt/smt_engine.cpp
parent94feff6c3b03325115e2c1c91121b83945dba4b0 (diff)
Make ackermannization generally applicable rather than just BV (#3315)
The ackermannization process is currently already support general theories rather than specifically for BV. In this pull request, an option has been added to turn on ackermannization independently.
Diffstat (limited to 'src/smt/smt_engine.cpp')
-rw-r--r--src/smt/smt_engine.cpp51
1 files changed, 44 insertions, 7 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index 918539f4f..8705bfb9b 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -1185,6 +1185,10 @@ void SmtEngine::setDefaults() {
<< "generation" << endl;
setOption("bitblastMode", SExpr("lazy"));
}
+ else if (!options::incrementalSolving())
+ {
+ options::ackermann.set(true);
+ }
if (options::incrementalSolving() && !d_logic.isPure(THEORY_BV))
{
@@ -1208,11 +1212,45 @@ void SmtEngine::setDefaults() {
{
d_logic = LogicInfo("QF_NIA");
}
- else if ((d_logic.getLogicString() == "QF_UFBV"
- || d_logic.getLogicString() == "QF_ABV")
- && options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER)
+
+ // set options about ackermannization
+ if (options::produceModels())
{
- d_logic = LogicInfo("QF_BV");
+ if (options::ackermann()
+ && (d_logic.isTheoryEnabled(THEORY_ARRAYS)
+ || d_logic.isTheoryEnabled(THEORY_UF)))
+ {
+ if (options::produceModels.wasSetByUser())
+ {
+ throw OptionException(std::string(
+ "Ackermannization currently does not support model generation."));
+ }
+ Notice() << "SmtEngine: turn off ackermannization to support model"
+ << "generation" << endl;
+ options::ackermann.set(false);
+ }
+ }
+
+ if (options::ackermann())
+ {
+ if (options::incrementalSolving())
+ {
+ throw OptionException(
+ "Incremental Ackermannization is currently not supported.");
+ }
+
+ if (d_logic.isTheoryEnabled(THEORY_UF))
+ {
+ d_logic = d_logic.getUnlockedCopy();
+ d_logic.disableTheory(THEORY_UF);
+ d_logic.lock();
+ }
+ if (d_logic.isTheoryEnabled(THEORY_ARRAYS))
+ {
+ d_logic = d_logic.getUnlockedCopy();
+ d_logic.disableTheory(THEORY_ARRAYS);
+ d_logic.lock();
+ }
}
// set default options associated with strings-exp
@@ -3241,10 +3279,9 @@ void SmtEnginePrivate::processAssertions() {
"Try --bv-div-zero-const to interpret division by zero as a constant.");
}
- if (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER
- && !options::incrementalSolving())
+ if (options::ackermann())
{
- d_passes["bv-ackermann"]->apply(&d_assertions);
+ d_passes["ackermann"]->apply(&d_assertions);
}
if (options::bvAbstraction() && !options::incrementalSolving())
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback