diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2021-07-13 09:11:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 16:11:33 +0000 |
commit | 36d01a7fd74c6dff52bf9dcba490ff7ded29ad5d (patch) | |
tree | f55ae38faaac751276089c1e3744090a0833b10f /src/theory/bv | |
parent | 956a2b1b8a8ef51cd3794dc3ee4887ccf8778e1e (diff) |
bv: Do not rewrite below BV leafs in BBProof's TConvProofGenerator. (#6869)
Introduces a TermContext class that can be used to skip rewrites below theory leafs. Fixes issues related to bit-vector leafs begin incorrectly rewritten.
Diffstat (limited to 'src/theory/bv')
-rw-r--r-- | src/theory/bv/bitblast/proof_bitblaster.cpp | 3 | ||||
-rw-r--r-- | src/theory/bv/bitblast/proof_bitblaster.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/theory/bv/bitblast/proof_bitblaster.cpp b/src/theory/bv/bitblast/proof_bitblaster.cpp index ea7ba1a13..a1b856d88 100644 --- a/src/theory/bv/bitblast/proof_bitblaster.cpp +++ b/src/theory/bv/bitblast/proof_bitblaster.cpp @@ -70,6 +70,7 @@ std::unordered_map<Kind, PfRule, kind::KindHashFunction> BBProof::BBProof(TheoryState* state, ProofNodeManager* pnm, bool fineGrained) : d_bb(new BBSimple(state)), d_pnm(pnm), + d_tcontext(new TheoryLeafTermContext(theory::THEORY_BV)), d_tcpg(pnm ? new TConvProofGenerator( pnm, nullptr, @@ -80,7 +81,7 @@ BBProof::BBProof(TheoryState* state, ProofNodeManager* pnm, bool fineGrained) /* STATIC to get the same ProofNode for a shared subterm. */ TConvCachePolicy::STATIC, "BBProof::TConvProofGenerator", - nullptr, + d_tcontext.get(), false) : nullptr), d_recordFineGrainedProofs(fineGrained) diff --git a/src/theory/bv/bitblast/proof_bitblaster.h b/src/theory/bv/bitblast/proof_bitblaster.h index 86cbeae81..428581fe0 100644 --- a/src/theory/bv/bitblast/proof_bitblaster.h +++ b/src/theory/bv/bitblast/proof_bitblaster.h @@ -17,6 +17,7 @@ #ifndef CVC5__THEORY__BV__BITBLAST__PROOF_BITBLASTER_H #define CVC5__THEORY__BV__BITBLAST__PROOF_BITBLASTER_H +#include "expr/term_context.h" #include "theory/bv/bitblast/simple_bitblaster.h" namespace cvc5 { @@ -59,6 +60,8 @@ class BBProof std::unique_ptr<BBSimple> d_bb; /** The associated proof node manager. */ ProofNodeManager* d_pnm; + /** Term context for d_tcpg to not rewrite below BV leafs. */ + std::unique_ptr<TermContext> d_tcontext; /** The associated term conversion proof generator. */ std::unique_ptr<TConvProofGenerator> d_tcpg; /** Map bit-vector nodes to bit-blasted nodes. */ |