diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-05-21 18:58:32 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-05-21 18:58:32 -0400 |
commit | fd076209b073aff3ad3db6eccfc51a59ec5d87c2 (patch) | |
tree | 466739844ba495ae22d3451fb40513fbc60f8905 | |
parent | 7cb22c139978c154b13f0159a9308922a36ac6db (diff) | |
parent | 7709fff002e3345bd727eaef2677e28830efb84d (diff) |
Merge branch '1.2.x'
-rw-r--r-- | src/parser/parser.cpp | 1 | ||||
-rw-r--r-- | src/theory/theory_engine.cpp | 12 | ||||
-rw-r--r-- | src/util/ite_removal.cpp | 6 | ||||
-rw-r--r-- | test/regress/regress0/Makefile.am | 3 | ||||
-rw-r--r-- | test/regress/regress0/bug512.minimized.smt2 | 8 |
5 files changed, 28 insertions, 2 deletions
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 1c275add7..370bdfcf0 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -42,6 +42,7 @@ Parser::Parser(ExprManager* exprManager, Input* input, bool strictMode, bool par d_input(input), d_symtabAllocated(), d_symtab(&d_symtabAllocated), + d_assertionLevel(0), d_anonymousFunctionCount(0), d_done(false), d_checksEnabled(true), diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index ee37f331e..53f5d10f3 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -1311,6 +1311,18 @@ theory::LemmaStatus TheoryEngine::lemma(TNode node, bool negated, bool removable d_iteRemover.run(additionalLemmas, iteSkolemMap); additionalLemmas[0] = theory::Rewriter::rewrite(additionalLemmas[0]); + if(Trace.isOn("lemma-ites")) { + Debug("lemma-ites") << "removed ITEs from lemma: " << node << std::endl; + Debug("lemma-ites") << " + now have the following " + << additionalLemmas.size() << " lemma(s):" << std::endl; + for(std::vector<Node>::const_iterator i = additionalLemmas.begin(); + i != additionalLemmas.end(); + ++i) { + Debug("lemma-ites") << " + " << *i << std::endl; + } + Debug("lemma-ites") << std::endl; + } + // assert to prop engine d_propEngine->assertLemma(additionalLemmas[0], negated, removable); for (unsigned i = 1; i < additionalLemmas.size(); ++ i) { diff --git a/src/util/ite_removal.cpp b/src/util/ite_removal.cpp index f26bbe0aa..7d4948251 100644 --- a/src/util/ite_removal.cpp +++ b/src/util/ite_removal.cpp @@ -30,7 +30,11 @@ void RemoveITE::run(std::vector<Node>& output, IteSkolemMap& iteSkolemMap) { for (unsigned i = 0, i_end = output.size(); i < i_end; ++ i) { std::vector<Node> quantVar; - output[i] = run(output[i], output, iteSkolemMap, quantVar); + // Do this in two steps to avoid Node problems(?) + // Appears related to bug 512, splitting this into two lines + // fixes the bug on clang on Mac OS + Node itesRemoved = run(output[i], output, iteSkolemMap, quantVar); + output[i] = itesRemoved; } } diff --git a/test/regress/regress0/Makefile.am b/test/regress/regress0/Makefile.am index 4c14de996..6cdd18403 100644 --- a/test/regress/regress0/Makefile.am +++ b/test/regress/regress0/Makefile.am @@ -151,7 +151,8 @@ BUG_TESTS = \ bug484.smt2 \ bug486.cvc \ bug497.cvc \ - bug507.smt2 + bug507.smt2 \ + bug512.minimized.smt2 TESTS = $(SMT_TESTS) $(SMT2_TESTS) $(CVC_TESTS) $(TPTP_TESTS) $(BUG_TESTS) diff --git a/test/regress/regress0/bug512.minimized.smt2 b/test/regress/regress0/bug512.minimized.smt2 new file mode 100644 index 000000000..5fcbf5a9f --- /dev/null +++ b/test/regress/regress0/bug512.minimized.smt2 @@ -0,0 +1,8 @@ +; EXPECT: unknown +; EXIT: 0 +(set-logic UF) +(declare-sort T 0) +(declare-fun bool_2_U (Bool) T) +(declare-fun U_2_bool (T) Bool) +(assert (forall ((x T)) (= (bool_2_U (U_2_bool x)) x))) +(check-sat) |