diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-07-01 08:46:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-01 08:46:30 -0500 |
commit | 12af221551c34a4bffc0282e7b3fa8dea661190c (patch) | |
tree | 40a384f74915e2c009bb2a66bd0295e62edcfc2e /src/proof/proof_manager.cpp | |
parent | c62980dab74b3db795961f90a4c49c463437a8eb (diff) | |
parent | 04154c08c1af81bb751376ae9379c071a95c5a3f (diff) |
Merge branch 'master' into lfscTestslfscTests
Diffstat (limited to 'src/proof/proof_manager.cpp')
-rw-r--r-- | src/proof/proof_manager.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/proof/proof_manager.cpp b/src/proof/proof_manager.cpp index f9e3293fa..99e3010b4 100644 --- a/src/proof/proof_manager.cpp +++ b/src/proof/proof_manager.cpp @@ -4,7 +4,7 @@ ** Top contributors (to current version): ** Guy Katz, Liana Hadarean, Andres Noetzli ** This file is part of the CVC4 project. - ** Copyright (c) 2009-2019 by the authors listed in the file AUTHORS + ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim @@ -565,6 +565,30 @@ void LFSCProof::toStream(std::ostream& out, const ProofLetMap& map) const Unreachable(); } +void collectAtoms(TNode node, std::set<Node>& seen, CnfProof* cnfProof) +{ + Debug("pf::pm::atoms") << "collectAtoms: Colleting atoms from " << node + << "\n"; + if (seen.find(node) != seen.end()) + { + Debug("pf::pm::atoms") << "collectAtoms:\t already seen\n"; + return; + } + // if I have a SAT literal for a node, save it, unless this node is a + // negation, in which case its underlying will be collected downstream + if (cnfProof->hasLiteral(node) && node.getKind() != kind::NOT) + { + Debug("pf::pm::atoms") << "collectAtoms: has SAT literal, save\n"; + seen.insert(node); + } + for (unsigned i = 0; i < node.getNumChildren(); ++i) + { + Debug("pf::pm::atoms") << push; + collectAtoms(node[i], seen, cnfProof); + Debug("pf::pm::atoms") << pop; + } +} + void LFSCProof::toStream(std::ostream& out) const { TimerStat::CodeTimer proofProductionTimer( @@ -683,10 +707,15 @@ void LFSCProof::toStream(std::ostream& out) const d_cnfProof->collectAtomsForClauses(used_lemmas, atoms); // collects the atoms in the assertions + Debug("pf::pm") << std::endl + << "LFSCProof::toStream: Colleting atoms from assertions " + << used_assertions << "\n" + << push; for (TNode used_assertion : used_assertions) { - utils::collectAtoms(used_assertion, atoms); + collectAtoms(used_assertion, atoms, d_cnfProof); } + Debug("pf::pm") << pop; std::set<Node>::iterator atomIt; Debug("pf::pm") << std::endl |