summaryrefslogtreecommitdiff
path: root/src/theory/evaluator.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2019-12-16 15:02:28 -0600
committerAndres Noetzli <andres.noetzli@gmail.com>2019-12-16 13:02:28 -0800
commite1074c87769d079936b52a8e8ea33cc03f8b4638 (patch)
tree4b962b255603e66ebca84e2607cb1def1b800326 /src/theory/evaluator.cpp
parent0db2265511cf553c793cfb150079c524bb1e6449 (diff)
Use the evaluator utility in the function definition evaluator (#3576)
Improves performance on ground conjectures with recursive functions. We use the evalutator to (partially) evaluate bodies of recursive functions, instead of relying on substitution+rewriting.
Diffstat (limited to 'src/theory/evaluator.cpp')
-rw-r--r--src/theory/evaluator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/theory/evaluator.cpp b/src/theory/evaluator.cpp
index b5fa79cd0..f95160df7 100644
--- a/src/theory/evaluator.cpp
+++ b/src/theory/evaluator.cpp
@@ -116,7 +116,7 @@ Node EvalResult::toNode() const
Node Evaluator::eval(TNode n,
const std::vector<Node>& args,
- const std::vector<Node>& vals)
+ const std::vector<Node>& vals) const
{
Trace("evaluator") << "Evaluating " << n << " under substitution " << args
<< " " << vals << std::endl;
@@ -142,7 +142,7 @@ EvalResult Evaluator::evalInternal(
TNode n,
const std::vector<Node>& args,
const std::vector<Node>& vals,
- std::unordered_map<TNode, Node, NodeHashFunction>& evalAsNode)
+ std::unordered_map<TNode, Node, NodeHashFunction>& evalAsNode) const
{
std::unordered_map<TNode, EvalResult, TNodeHashFunction> results;
std::vector<TNode> queue;
@@ -793,7 +793,7 @@ EvalResult Evaluator::evalInternal(
Node Evaluator::reconstruct(
TNode n,
std::unordered_map<TNode, EvalResult, TNodeHashFunction>& eresults,
- std::unordered_map<TNode, Node, NodeHashFunction>& evalAsNode)
+ std::unordered_map<TNode, Node, NodeHashFunction>& evalAsNode) const
{
if (n.getNumChildren() == 0)
{
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback