out << ' ';
stillNeedToPrintParams = false;
break;
+ case kind::BITVECTOR_BITOF:
+ out << "(_ bitOf " << n.getOperator().getConst<BitVectorBitOf>().d_bitIndex
+ << ") ";
+ stillNeedToPrintParams = false;
+ break;
// sets
case kind::SINGLETON:
namespace cvc5 {
namespace proof {
-/**
+/**
* A term, type or a proof. This class is used for printing combinations of
* proofs terms and types.
*/
class PExprStream
{
public:
- /**
- * Takes a reference to a stream (vector of p-expressions), and the
- * representation true/false (tt/ff).
- */
+ /**
+ * Takes a reference to a stream (vector of p-expressions), and the
+ * representation true/false (tt/ff).
+ */
PExprStream(std::vector<PExpr>& stream,
Node tt = Node::null(),
Node ff = Node::null());
{
}
-ProofChecker::ProofChecker(uint32_t pclevel, theory::RewriteDb* rdb)
+ProofChecker::ProofChecker(uint32_t pclevel, rewriter::RewriteDb* rdb)
: d_pclevel(pclevel), d_rdb(rdb)
{
}
return it->second;
}
-theory::RewriteDb* ProofChecker::getRewriteDatabase() { return d_rdb; }
+rewriter::RewriteDb* ProofChecker::getRewriteDatabase() { return d_rdb; }
uint32_t ProofChecker::getPedanticLevel(PfRule id) const
{
class ProofChecker;
class ProofNode;
-namespace theory {
+namespace rewriter {
class RewriteDb;
}
class ProofChecker
{
public:
- ProofChecker(uint32_t pclevel = 0, theory::RewriteDb* rdb = nullptr);
+ ProofChecker(uint32_t pclevel = 0, rewriter::RewriteDb* rdb = nullptr);
~ProofChecker() {}
/**
* Return the formula that is proven by proof node pn, or null if pn is not
/** get checker for */
ProofRuleChecker* getCheckerFor(PfRule id);
/** get the rewrite database */
- theory::RewriteDb* getRewriteDatabase();
+ rewriter::RewriteDb* getRewriteDatabase();
/**
* Get the pedantic level for id if it has been assigned a pedantic
* level via registerTrustedChecker above, or zero otherwise.
/** The pedantic level of this checker */
uint32_t d_pclevel;
/** Pointer to the rewrite database */
- theory::RewriteDb* d_rdb;
+ rewriter::RewriteDb* d_rdb;
/**
* Check internal. This is used by check and checkDebug above. It writes
* checking errors on out when enableOutput is true. We treat trusted checkers
case PfRule::TRUST_SUBS_MAP: return "TRUST_SUBS_MAP";
case PfRule::TRUST_SUBS_EQ: return "TRUST_SUBS_EQ";
case PfRule::THEORY_INFERENCE: return "THEORY_INFERENCE";
+ case PfRule::SAT_REFUTATION: return "SAT_REFUTATION";
//================================================= Boolean rules
case PfRule::RESOLUTION: return "RESOLUTION";
case PfRule::CHAIN_RESOLUTION: return "CHAIN_RESOLUTION";
return TrustNode(TrustNodeKind::REWRITE, rkey, g);
}
+TrustNode TrustNode::mkReplaceGenTrustNode(const TrustNode& orig,
+ ProofGenerator* g)
+{
+ return TrustNode(orig.getKind(), orig.getProven(), g);
+}
+
TrustNode TrustNode::null()
{
return TrustNode(TrustNodeKind::INVALID, Node::null());
static TrustNode mkTrustRewrite(TNode n,
Node nr,
ProofGenerator* g = nullptr);
+ /** Make a trust node, replacing the original generator */
+ static TrustNode mkReplaceGenTrustNode(const TrustNode& orig,
+ ProofGenerator* g);
/** The null proven node */
static TrustNode null();
~TrustNode() {}
#include <sstream>
#include "options/proof_options.h"
+#include "proof/method_id.h"
#include "proof/proof.h"
#include "proof/proof_checker.h"
#include "proof/proof_node.h"
+#include "theory/quantifiers/extended_rewrite.h"
#include "theory/rewriter.h"
namespace cvc5 {
Assert(proven.getKind() == kind::EQUAL);
if (!proofStepProcessed)
{
- // maybe its just a simple rewrite?
- if (proven[1] == theory::Rewriter::rewrite(proven[0]))
+ // maybe its just an (extended) rewrite?
+ theory::quantifiers::ExtendedRewriter extr(true);
+ Node pr = extr.extendedRewrite(proven[0]);
+ if (proven[1] == pr)
{
+ Node idr = mkMethodId(MethodId::RW_EXT_REWRITE);
Trace("smt-pppg-debug") << "...add simple rewrite" << std::endl;
- cdp.addStep(proven, PfRule::REWRITE, {}, {proven[0]});
+ cdp.addStep(proven, PfRule::REWRITE, {}, {proven[0], idr});
proofStepProcessed = true;
}
}