summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/dynamic_rewrite.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-08-01 01:31:14 -0500
committerAndres Noetzli <andres.noetzli@gmail.com>2018-07-31 23:31:14 -0700
commitdef4b45fa41ddf128ab0b2e8f6bb3b8454974008 (patch)
treee39c3ca613d328f09985b2c0d3d25fd6679d2f68 /src/theory/quantifiers/dynamic_rewrite.cpp
parentad61299aa24a83f935daedab32440d25006e18bb (diff)
Make candidate rewrite match filtering handle polymorphic operators properly (#2236)
Currently, the discrimination tree index used for candidate rewrite rule filtering based on matching does not properly distinguish polymorphic operators, which leads to type errors. This makes the index handle them correctly. Fixes #1923.
Diffstat (limited to 'src/theory/quantifiers/dynamic_rewrite.cpp')
-rw-r--r--src/theory/quantifiers/dynamic_rewrite.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/theory/quantifiers/dynamic_rewrite.cpp b/src/theory/quantifiers/dynamic_rewrite.cpp
index ef1cb3a9d..d8c5ac7b5 100644
--- a/src/theory/quantifiers/dynamic_rewrite.cpp
+++ b/src/theory/quantifiers/dynamic_rewrite.cpp
@@ -124,9 +124,20 @@ Node DynamicRewriter::toInternal(Node a)
}
}
d_term_to_internal[a] = ret;
+ d_internal_to_term[ret] = a;
return ret;
}
+Node DynamicRewriter::toExternal(Node ai)
+{
+ std::map<Node, Node>::iterator it = d_internal_to_term.find(ai);
+ if (it != d_internal_to_term.end())
+ {
+ return it->second;
+ }
+ return Node::null();
+}
+
Node DynamicRewriter::OpInternalSymTrie::getSymbol(Node n)
{
std::vector<TypeNode> ctypes;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback