diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-03-11 06:54:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 06:54:50 -0700 |
commit | 2b355305ef635ddfaad7fe75c29221cb2f744a62 (patch) | |
tree | 1667cc362fcf2f770bf7a47b81d887f648c8a857 /src/theory/rewriter_tables_template.h | |
parent | edcc81b08b4d6c67da81b7ba2fcefbab3286f02c (diff) |
Introduce tables in the rewriter (#3742)
This commit adds tables in the rewriter that store which function should
be used to rewrite which kind. We have separate tables for `EQUAL`
because every theory has its own equality rewriter.
Diffstat (limited to 'src/theory/rewriter_tables_template.h')
-rw-r--r-- | src/theory/rewriter_tables_template.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/theory/rewriter_tables_template.h b/src/theory/rewriter_tables_template.h index e1be6355b..1bb03e253 100644 --- a/src/theory/rewriter_tables_template.h +++ b/src/theory/rewriter_tables_template.h @@ -64,6 +64,19 @@ ${post_rewrite_set_cache} Rewriter::Rewriter() { ${rewrite_init} + +for (size_t i = 0; i < kind::LAST_KIND; ++i) +{ + d_preRewriters[i] = nullptr; + d_postRewriters[i] = nullptr; +} + +for (size_t i = 0; i < theory::THEORY_LAST; ++i) +{ + d_preRewritersEqual[i] = nullptr; + d_postRewritersEqual[i] = nullptr; + d_theoryRewriters[i]->registerRewrites(this); +} } void Rewriter::clearCachesInternal() { |