From 41edd09dda3d18c98b6cafcf3a3c98d4155fbe19 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Tue, 18 Aug 2020 14:11:23 -0500 Subject: [PATCH] (proof-new) Minor updates to trust node (#4900) --- src/theory/trust_node.cpp | 16 ++++++++++++++++ src/theory/trust_node.h | 9 +++++++++ 2 files changed, 25 insertions(+) diff --git a/src/theory/trust_node.cpp b/src/theory/trust_node.cpp index 25aef5a72..041d04d75 100644 --- a/src/theory/trust_node.cpp +++ b/src/theory/trust_node.cpp @@ -121,6 +121,22 @@ Node TrustNode::getPropExpProven(TNode lit, Node exp) Node TrustNode::getRewriteProven(TNode n, Node nr) { return n.eqNode(nr); } +void TrustNode::debugCheckClosed(const char* c, + const char* ctx, + bool reqNullGen) +{ + pfgEnsureClosed(d_proven, d_gen, c, ctx, reqNullGen); +} + +std::string TrustNode::identifyGenerator() const +{ + if (d_gen == nullptr) + { + return "null"; + } + return d_gen->identify(); +} + std::ostream& operator<<(std::ostream& out, TrustNode n) { out << "(" << n.getKind() << " " << n.getProven() << ")"; diff --git a/src/theory/trust_node.h b/src/theory/trust_node.h index ff174b63e..b7be0e4e5 100644 --- a/src/theory/trust_node.h +++ b/src/theory/trust_node.h @@ -142,6 +142,15 @@ class TrustNode static Node getPropExpProven(TNode lit, Node exp); /** Get the proven formula corresponding to a rewrite */ static Node getRewriteProven(TNode n, Node nr); + /** For debugging */ + std::string identifyGenerator() const; + + /** + * debug check closed on Trace c, context ctx is string for debugging + * + * @param reqNullGen Whether we consider a null generator to be a failure. + */ + void debugCheckClosed(const char* c, const char* ctx, bool reqNullGen = true); private: TrustNode(TrustNodeKind tnk, Node p, ProofGenerator* g = nullptr); -- 2.30.2