Skip to content

Commit

Permalink
Do not print BITVECTOR_EAGER_ATOM in cpc proofs (cvc5#11377)
Browse files Browse the repository at this point in the history
BV_EAGER_ATOM can now be `refl`.

Note that I've opened a wishue if we want a deeper refactoring to never
print this kind at all, which will require changes to the smt2 printer.
  • Loading branch information
ajreynol authored Dec 20, 2024
1 parent dede2ea commit 5ee60a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions proofs/eo/cpc/theories/BitVectors.eo
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@
(BitVec m) Int)
)

(declare-const BITVECTOR_EAGER_ATOM (-> Bool Bool))

; internal operators

(declare-const @bit
Expand Down
7 changes: 7 additions & 0 deletions src/proof/alf/alf_node_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ Node AlfNodeConverter::postConvert(Node n)
return mkInternalApp("to_fp_bv", children, tn);
}
}
else if (k == Kind::BITVECTOR_EAGER_ATOM)
{
// For now, we explicity remove the application.
// https://github.com/cvc5/cvc5-wishues/issues/156: if the smt2 printer
// is refactored to silently ignore this kind, this case can be deleted.
return n[0];
}
else if (GenericOp::isIndexedOperatorKind(k))
{
TypeNode tn = n.getType();
Expand Down
4 changes: 3 additions & 1 deletion src/proof/alf/alf_printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ bool AlfPrinter::isHandled(const Options& opts, const ProofNode* pfn)
case ProofRule::QUANT_VAR_REORDERING:
case ProofRule::ENCODE_EQ_INTRO:
case ProofRule::HO_APP_ENCODE:
case ProofRule::BV_EAGER_ATOM:
case ProofRule::ACI_NORM:
case ProofRule::ARITH_POLY_NORM:
case ProofRule::ARITH_POLY_NORM_REL:
Expand Down Expand Up @@ -496,7 +497,8 @@ std::string AlfPrinter::getRuleName(const ProofNode* pfn) const
ss << id;
return ss.str();
}
else if (r == ProofRule::ENCODE_EQ_INTRO || r == ProofRule::HO_APP_ENCODE)
else if (r == ProofRule::ENCODE_EQ_INTRO || r == ProofRule::HO_APP_ENCODE
|| r == ProofRule::BV_EAGER_ATOM)
{
// ENCODE_EQ_INTRO proves (= t (convert t)) from argument t,
// where (convert t) is indistinguishable from t according to the proof.
Expand Down

0 comments on commit 5ee60a5

Please sign in to comment.