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();
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;
}
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
}
}
+
void TheoryEngine::handleUserAttribute( const char* attr, Theory* t ){
Trace("te-attr") << "Handle user attribute " << attr << " " << t << std::endl;
std::string str( attr );
d_attr_handle[ str ].push_back( t );
}
+
+
+void TheoryEngine::checkTheoryAssertionsWithModel()
+{
+ for (TheoryId theoryId = THEORY_FIRST; theoryId < THEORY_LAST; ++theoryId) {
+ Theory* theory = d_theoryTable[theoryId];
+ if (theory && d_logicInfo.isTheoryEnabled(theoryId)) {
+ if (theoryId == THEORY_QUANTIFIERS || theoryId == THEORY_REWRITERULES) {
+ continue;
+ }
+ context::CDList<Assertion>::const_iterator it = theory->facts_begin(), it_end = theory->facts_end();
+ for (unsigned i = 0; it != it_end; ++ it, ++i) {
+ Node assertion = (*it).assertion;
+ Node val = getModel()->getValue(assertion);
+ Assert(val == d_true);
+ }
+ }
+ }
+}