summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.nyu.edu>2012-10-26 02:37:38 +0000
committerClark Barrett <barrett@cs.nyu.edu>2012-10-26 02:37:38 +0000
commitddd3797ee72443bd35f6cea146c3752ea0dd2286 (patch)
treeda5f69ec295e31eddcca999247f98025bd8e5752 /src/smt
parent20897efe113ff62e5a91840933a0b424e32f6771 (diff)
More bug fixes and more checks for models
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index 3813f964d..55ac15ebc 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -712,11 +712,22 @@ void SmtEngine::setLogicInternal() throw() {
if(! options::unconstrainedSimp.wasSetByUser() || options::incrementalSolving()) {
// bool qf_sat = d_logic.isPure(THEORY_BOOL) && !d_logic.isQuantified();
// bool uncSimp = false && !qf_sat && !options::incrementalSolving();
- bool uncSimp = !options::incrementalSolving() && !d_logic.isQuantified() &&
+ bool uncSimp = !options::incrementalSolving() && !d_logic.isQuantified() && !options::produceModels() &&
(d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_BV));
Trace("smt") << "setting unconstrained simplification to " << uncSimp << std::endl;
options::unconstrainedSimp.set(uncSimp);
}
+ // Unconstrained simp currently does *not* support model generation
+ if (options::unconstrainedSimp.wasSetByUser() && options::unconstrainedSimp()) {
+ if (options::produceModels()) {
+ Notice() << "SmtEngine: turning off produce-models to support unconstrainedSimp" << std::endl;
+ setOption("produce-models", SExpr("false"));
+ }
+ if (options::checkModels()) {
+ Notice() << "SmtEngine: turning off check-models to support unconstrainedSimp" << std::endl;
+ setOption("check-models", SExpr("false"));
+ }
+ }
// Turn on arith rewrite equalities only for pure arithmetic
if(! options::arithRewriteEq.wasSetByUser()) {
bool arithRewriteEq = d_logic.isPure(THEORY_ARITH) && !d_logic.isQuantified();
@@ -1494,6 +1505,11 @@ bool SmtEnginePrivate::nonClausalSimplify() {
SubstitutionMap::iterator pos = constantPropagations.begin();
for (; pos != constantPropagations.end(); ++pos) {
Node cProp = (*pos).first.eqNode((*pos).second);
+ Node cPropNew = d_topLevelSubstitutions.apply(cProp);
+ if (cProp != cPropNew) {
+ cProp = Rewriter::rewrite(cPropNew);
+ Assert(Rewriter::rewrite(cProp) == cProp);
+ }
if (s.find(cProp) != s.end()) {
continue;
}
@@ -2343,6 +2359,10 @@ void SmtEngine::checkModel(bool hardFailure) {
Notice() << "SmtEngine::checkModel(): generating model" << endl;
TheoryModel* m = d_theoryEngine->getModel();
+
+ // Check individual theory assertions
+ d_theoryEngine->checkTheoryAssertionsWithModel();
+
if(Notice.isOn()) {
// This operator<< routine is non-const (i.e., takes a non-const Model&).
// This confuses the Notice() output routines, so extract the ostream
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback