summaryrefslogtreecommitdiff
path: root/src/proof/proof_manager.h
diff options
context:
space:
mode:
authorAndres Notzli <andres.noetzli@gmail.com>2016-08-09 19:24:28 -0700
committerAndres Notzli <andres.noetzli@gmail.com>2016-08-11 23:28:15 -0700
commit1dddbc74f01619928263b42bf4b4ef6a6ccb2f28 (patch)
tree9fed432f9e9bcb81dd3b015326d7fa7f73c197f1 /src/proof/proof_manager.h
parent841acca266b026c9c1d20cb1adf0e73da15a0c10 (diff)
Add support for fewer preprocessing holes
This commit adds support for the --fewer-preprocessing-holes flag. This flag changes the preprocessing part in proofs in two ways: it (1) removes assertions that are just restating inputs and uses the inputs directly instead and it (2) changes the form of the preprocessed assertions to contain the input that they originate from. The code in this commit is mostly taken from the proofs branch in Guy's fork.
Diffstat (limited to 'src/proof/proof_manager.h')
-rw-r--r--src/proof/proof_manager.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/proof/proof_manager.h b/src/proof/proof_manager.h
index cb5a2bdd1..fa7224d72 100644
--- a/src/proof/proof_manager.h
+++ b/src/proof/proof_manager.h
@@ -145,6 +145,7 @@ class ProofManager {
// information that will need to be shared across proofs
ExprSet d_inputFormulas;
+ std::map<Expr, std::string> d_inputFormulaToName;
ExprSet d_inputCoreFormulas;
ExprSet d_outputCoreFormulas;
@@ -156,12 +157,11 @@ class ProofManager {
ProofFormat d_format; // used for now only in debug builds
NodeToNodes d_deps;
- // trace dependences back to unsat core
- void traceDeps(TNode n);
std::set<Type> d_printedTypes;
std::map<std::string, std::string> d_rewriteFilters;
+ std::map<Node, std::string> d_assertionFilters;
std::vector<RewriteLogEntry> d_rewriteLog;
@@ -202,6 +202,9 @@ public:
}
assertions_iterator end_assertions() const { return d_inputFormulas.end(); }
size_t num_assertions() const { return d_inputFormulas.size(); }
+ bool have_input_assertion(const Expr& assertion) {
+ return d_inputFormulas.find(assertion) != d_inputFormulas.end();
+ }
//---from Morgan---
Node mkOp(TNode n);
@@ -220,6 +223,7 @@ public:
static std::string getLearntClauseName(ClauseId id, const std::string& prefix = "");
static std::string getPreprocessedAssertionName(Node node, const std::string& prefix = "");
static std::string getAssertionName(Node node, const std::string& prefix = "");
+ static std::string getInputFormulaName(const Expr& expr);
static std::string getVarName(prop::SatVariable var, const std::string& prefix = "");
static std::string getAtomName(prop::SatVariable var, const std::string& prefix = "");
@@ -239,6 +243,8 @@ public:
void addDependence(TNode n, TNode dep);
void addUnsatCore(Expr formula);
+ // trace dependences back to unsat core
+ void traceDeps(TNode n, ExprSet* coreAssertions);
void traceUnsatCore();
assertions_iterator begin_unsat_core() const { return d_outputCoreFormulas.begin(); }
assertions_iterator end_unsat_core() const { return d_outputCoreFormulas.end(); }
@@ -260,6 +266,8 @@ public:
void addRewriteFilter(const std::string &original, const std::string &substitute);
void clearRewriteFilters();
+ void addAssertionFilter(const Node& node, const std::string& rewritten);
+
static void registerRewrite(unsigned ruleId, Node original, Node result);
static void clearRewriteLog();
@@ -287,6 +295,9 @@ class LFSCProof : public Proof {
std::ostream& os,
std::ostream& paren,
ProofLetMap& globalLetMap);
+
+ void checkUnrewrittenAssertion(const NodeSet& assertions);
+
public:
LFSCProof(SmtEngine* smtEngine,
LFSCCoreSatProof* sat,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback