diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-08-01 01:31:14 -0500 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2018-07-31 23:31:14 -0700 |
commit | def4b45fa41ddf128ab0b2e8f6bb3b8454974008 (patch) | |
tree | e39c3ca613d328f09985b2c0d3d25fd6679d2f68 /src/theory/quantifiers/dynamic_rewrite.cpp | |
parent | ad61299aa24a83f935daedab32440d25006e18bb (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.cpp | 11 |
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; |