summaryrefslogtreecommitdiff
path: root/src/theory/rewriter.h
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/rewriter.h
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/rewriter.h')
-rw-r--r--src/theory/rewriter.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/theory/rewriter.h b/src/theory/rewriter.h
index f7298e1fb..8a641743b 100644
--- a/src/theory/rewriter.h
+++ b/src/theory/rewriter.h
@@ -63,6 +63,16 @@ class Rewriter {
static void clearCaches();
/**
+ * Registers a theory rewriter with this rewriter. This transfers the
+ * ownership of the theory rewriter to the rewriter.
+ *
+ * @param tid The theory that the theory rewriter should be associated with.
+ * @param trew The theory rewriter to register.
+ */
+ static void registerTheoryRewriter(theory::TheoryId tid,
+ std::unique_ptr<TheoryRewriter> trew);
+
+ /**
* Register a prerewrite for a given kind.
*
* @param k The kind to register a rewrite for.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback