summaryrefslogtreecommitdiff
path: root/src/theory/theory_preprocessor.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-10-02 16:15:16 -0500
committerGitHub <noreply@github.com>2020-10-02 16:15:16 -0500
commit51b9c07af2001e961911e59f3e7e80728c88550a (patch)
treebd3e2139979fc183474d3254ddc59df88934b75b /src/theory/theory_preprocessor.h
parent26601663d6cc8fb8613df5a1d253eba8743e57cb (diff)
(proof-new) Fixes for theory preprocessing proofs (#5171)
This fixes several subtle issues with theory preprocessing. The main fix is to ensure proofs are correct for cases where the theory preprocessor applies either with or without theory preprocessing (calling Theory::ppRewrite on subterms) enabled, see argument doTheoryPreprocess of preprocess. If disabled, it applies term formula removal and rewriting only. This is required for processing lemmas that are marked as "do not preprocess", which is an optimization, but is also necessary since theory combination may e.g. split on equality that was solved during ppRewrite. The solution is to use 2 separate term conversion sequences for these 2 cases. It also fixes an issue where preprocessing is term-context-sensitive: terms underneath quantifiers are treated differently. This is now handled by a new TermContext callback "InQuantTermContext".
Diffstat (limited to 'src/theory/theory_preprocessor.h')
-rw-r--r--src/theory/theory_preprocessor.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/theory/theory_preprocessor.h b/src/theory/theory_preprocessor.h
index db43b6828..769d548d9 100644
--- a/src/theory/theory_preprocessor.h
+++ b/src/theory/theory_preprocessor.h
@@ -21,6 +21,7 @@
#include "expr/lazy_proof.h"
#include "expr/node.h"
+#include "expr/tconv_seq_proof_generator.h"
#include "expr/term_conversion_proof_generator.h"
#include "theory/trust_node.h"
@@ -85,8 +86,31 @@ class TheoryPreprocessor
RemoveTermFormulas& d_tfr;
/** The context for the proof generator below */
context::Context d_pfContext;
- /** A term conversion proof generator */
+ /** The term context, which computes hash values for term contexts. */
+ InQuantTermContext d_iqtc;
+ /**
+ * A term conversion proof generator storing preprocessing and rewriting
+ * steps.
+ */
std::unique_ptr<TConvProofGenerator> d_tpg;
+ /**
+ * A term conversion sequence generator, which applies theory preprocessing,
+ * term formula removal, and rewriting in sequence.
+ */
+ std::unique_ptr<TConvSeqProofGenerator> d_tspg;
+ /**
+ * A term conversion proof generator storing rewriting steps, which is used
+ * for calls to preprocess when doTheoryPreprocess is false. We store
+ * (top-level) rewrite steps only. Notice this is intentionally separate
+ * from d_tpg, which interleaves both preprocessing and rewriting.
+ */
+ std::unique_ptr<TConvProofGenerator> d_tpgRew;
+ /**
+ * A term conversion sequence generator, which applies term formula removal
+ * and rewriting in sequence. This is used for reconstruct proofs of
+ * calls to preprocess where doTheoryPreprocess is false.
+ */
+ std::unique_ptr<TConvSeqProofGenerator> d_tspgNoPp;
/** A lazy proof, for additional lemmas. */
std::unique_ptr<LazyCDProof> d_lp;
/** Helper for theoryPreprocess */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback