1 /******************************************************************************
2 * Top contributors (to current version):
5 * This file is part of the cvc5 project.
7 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8 * in the top-level source directory and their institutional affiliations.
9 * All rights reserved. See the file COPYING in the top-level source
10 * directory for licensing information.
11 * ****************************************************************************
13 * The TheoryRewriter class.
15 * The interface that theory rewriters implement.
18 #include "theory/theory_rewriter.h"
23 TrustRewriteResponse::TrustRewriteResponse(RewriteStatus status
,
29 // we always make non-null, regardless of whether n = nr
30 d_node
= TrustNode::mkTrustRewrite(n
, nr
, pg
);
33 TrustRewriteResponse
TheoryRewriter::postRewriteWithProof(TNode node
)
35 RewriteResponse response
= postRewrite(node
);
36 // by default, we return a trust rewrite response with no proof generator
37 return TrustRewriteResponse(
38 response
.d_status
, node
, response
.d_node
, nullptr);
41 TrustRewriteResponse
TheoryRewriter::preRewriteWithProof(TNode node
)
43 RewriteResponse response
= preRewrite(node
);
44 // by default, we return a trust rewrite response with no proof generator
45 return TrustRewriteResponse(
46 response
.d_status
, node
, response
.d_node
, nullptr);
49 Node
TheoryRewriter::rewriteEqualityExt(Node node
) { return node
; }
51 TrustNode
TheoryRewriter::rewriteEqualityExtWithProof(Node node
)
53 Node nodeRew
= rewriteEqualityExt(node
);
56 // by default, we return a trust rewrite response with no proof generator
57 return TrustNode::mkTrustRewrite(node
, nodeRew
, nullptr);
60 return TrustNode::null();
63 TrustNode
TheoryRewriter::expandDefinition(Node node
)
66 return TrustNode::null();