diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-07-27 15:33:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 13:33:12 -0700 |
commit | b90cfb462bde3e75c07bb14e2393ee8e4b4f4d42 (patch) | |
tree | 4e7f89713008787557ae1293c6d0149e185c9b66 /src/theory/theory_engine.cpp | |
parent | faa97a6f1ee19760dfb0a79ad18c53afdff6b09a (diff) |
(proof-new) Proof production for term formula removal (#4687)
This adds proof support in the term formula removal pass.
It also refactors this class heavily so that its interface is more intuitive and does not depend on AssertionPipeline.
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r-- | src/theory/theory_engine.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 70e744acf..9955be850 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -1610,10 +1610,25 @@ theory::LemmaStatus TheoryEngine::lemma(TNode node, << CheckSatCommand(n.toExpr()); } - // the assertion pipeline storing the lemmas - AssertionPipeline lemmas; // call preprocessor - d_tpp.preprocess(node, lemmas, preprocess); + std::vector<TrustNode> newLemmas; + std::vector<Node> newSkolems; + TrustNode tlemma = d_tpp.preprocess(node, newLemmas, newSkolems, preprocess); + + // must use an assertion pipeline due to decision engine below + AssertionPipeline lemmas; + // make the assertion pipeline + lemmas.push_back(tlemma.getNode()); + lemmas.updateRealAssertionsEnd(); + Assert(newSkolems.size() == newLemmas.size()); + for (size_t i = 0, nsize = newLemmas.size(); i < nsize; i++) + { + // store skolem mapping here + IteSkolemMap& imap = lemmas.getIteSkolemMap(); + imap[newSkolems[i]] = lemmas.size(); + lemmas.push_back(newLemmas[i].getNode()); + } + // assert lemmas to prop engine for (size_t i = 0, lsize = lemmas.size(); i < lsize; ++i) { |