summaryrefslogtreecommitdiff
path: root/src/expr/proof_node_manager.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-09-30 08:20:03 -0500
committerGitHub <noreply@github.com>2020-09-30 08:20:03 -0500
commit0cf0dc3b3661e668f8c03113faad5078d91cea98 (patch)
tree78bd8ec763638e662d1f945d82f26607d2472793 /src/expr/proof_node_manager.cpp
parentf51491e43e86abb862ea081568b8aa106293d64a (diff)
(proof-new) Add the term conversion sequence generator (#5097)
This class will be used in the theory preprocessor and is planned to be used in other preprocessing passes that can be understood as sequences of rewrite systems.
Diffstat (limited to 'src/expr/proof_node_manager.cpp')
-rw-r--r--src/expr/proof_node_manager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/expr/proof_node_manager.cpp b/src/expr/proof_node_manager.cpp
index eb298cc83..9f60a49e4 100644
--- a/src/expr/proof_node_manager.cpp
+++ b/src/expr/proof_node_manager.cpp
@@ -56,6 +56,18 @@ std::shared_ptr<ProofNode> ProofNodeManager::mkAssume(Node fact)
return mkNode(PfRule::ASSUME, {}, {fact}, fact);
}
+std::shared_ptr<ProofNode> ProofNodeManager::mkTrans(
+ const std::vector<std::shared_ptr<ProofNode>>& children, Node expected)
+{
+ Assert(!children.empty());
+ if (children.size() == 1)
+ {
+ Assert(expected.isNull() || children[0]->getResult() == expected);
+ return children[0];
+ }
+ return mkNode(PfRule::TRANS, children, {}, expected);
+}
+
std::shared_ptr<ProofNode> ProofNodeManager::mkScope(
std::shared_ptr<ProofNode> pf,
std::vector<Node>& assumps,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback