Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Jan 15, 2025
1 parent c532fad commit 44bb957
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/smt/assertions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "options/expr_options.h"
#include "options/language.h"
#include "options/smt_options.h"
#include "proof/lazy_proof.h"
#include "proof/proof_node_algorithm.h"
#include "smt/env.h"
#include "theory/trust_substitutions.h"
#include "util/result.h"
#include "proof/lazy_proof.h"
#include "proof/proof_node_algorithm.h"

using namespace cvc5::internal::theory;
using namespace cvc5::internal::kind;
Expand Down Expand Up @@ -122,20 +122,25 @@ void Assertions::addFormula(TNode n,
if (isFunDef)
{
// if a non-recursive define-fun, just add as a top-level substitution
if (n.getKind() == Kind::EQUAL && n[0].isVar() && n[1].getKind()==Kind::LAMBDA)
if (n.getKind() == Kind::EQUAL && n[0].isVar()
&& n[1].getKind() == Kind::LAMBDA)
{
Trace("smt-define-fun") << "Define fun: " << n[0] << " = " << n[1] << std::endl;
NodeManager * nm = nodeManager();
Trace("smt-define-fun")
<< "Define fun: " << n[0] << " = " << n[1] << std::endl;
NodeManager* nm = nodeManager();
TrustSubstitutionMap& tsm = d_env.getTopLevelSubstitutions();
TrustNode defRewBody = tsm.applyTrusted(n[1][1], d_env.getRewriter());
Node defRew = defRewBody.isNull() ? Node(n[1]) : nm->mkNode(Kind::LAMBDA, n[1][0], defRewBody.getNode());
Node defRew =
defRewBody.isNull()
? Node(n[1])
: nm->mkNode(Kind::LAMBDA, n[1][0], defRewBody.getNode());
if (d_env.isProofProducing())
{
if (d_defFunRewPf==nullptr)
if (d_defFunRewPf == nullptr)
{
d_defFunRewPf = std::make_shared<LazyCDProof>(d_env);
}
if (defRew!=n[1])
if (defRew != n[1])
{
// A define-fun is an assumption in the overall proof, thus
// we justify the substitution with ASSUME here.
Expand Down

0 comments on commit 44bb957

Please sign in to comment.