summaryrefslogtreecommitdiff
path: root/src/theory/mkrewriter
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-04-01 19:35:25 -0700
committerGitHub <noreply@github.com>2020-04-01 19:35:25 -0700
commit3915eb7b497bd185385048f8c7f2b4c8f2bf7c03 (patch)
tree8686d5ceea120ebda1ea65c0a8696ab1bdf78543 /src/theory/mkrewriter
parent936e9c442443799c866a65c6ca3fbdcd3ac9aab8 (diff)
Initialize theory rewriters in theories (#4197)
Until now, the `Rewriter` was responsible for creating `TheoryRewriter` instances. This commit adds a method `mkTheoryRewriter()` that theories override to create an instance of their corresponding theory rewriter. The advantage is that the theories can pass additional information to their theory rewriter (e.g. a statistics object).
Diffstat (limited to 'src/theory/mkrewriter')
-rwxr-xr-xsrc/theory/mkrewriter4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/theory/mkrewriter b/src/theory/mkrewriter
index dd5abd219..3c27f1b53 100755
--- a/src/theory/mkrewriter
+++ b/src/theory/mkrewriter
@@ -37,7 +37,6 @@ me=$(basename "$0")
template=$1; shift
rewriter_includes=
-rewrite_init=
pre_rewrite_get_cache=
pre_rewrite_set_cache=
@@ -140,8 +139,6 @@ function rewriter {
rewriter_includes="${rewriter_includes}#include \"$header\"
"
- rewrite_init="${rewrite_init} d_theoryRewriters[${theory_id}].reset(new ${class});
-"
pre_rewrite_attribute_ids="${pre_rewrite_attribute_ids} preids.push_back(expr::attr::AttributeManager::getAttributeId(RewriteAttibute<${theory_id}>::pre_rewrite()));
"
post_rewrite_attribute_ids="${post_rewrite_attribute_ids} postids.push_back(expr::attr::AttributeManager::getAttributeId(RewriteAttibute<${theory_id}>::post_rewrite()));
@@ -257,7 +254,6 @@ for var in \
post_rewrite_get_cache \
pre_rewrite_set_cache \
post_rewrite_set_cache \
- rewrite_init \
pre_rewrite_attribute_ids \
post_rewrite_attribute_ids \
template \
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback