summaryrefslogtreecommitdiff
path: root/src/smt/smt_engine.cpp
diff options
context:
space:
mode:
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