From 3915eb7b497bd185385048f8c7f2b4c8f2bf7c03 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Wed, 1 Apr 2020 19:35:25 -0700 Subject: 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). --- src/theory/theory_engine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/theory/theory_engine.h') diff --git a/src/theory/theory_engine.h b/src/theory/theory_engine.h index 840d42417..dec654e76 100644 --- a/src/theory/theory_engine.h +++ b/src/theory/theory_engine.h @@ -494,6 +494,8 @@ class TheoryEngine { *d_theoryOut[theoryId], theory::Valuation(this), d_logicInfo); + theory::Rewriter::registerTheoryRewriter( + theoryId, d_theoryTable[theoryId]->mkTheoryRewriter()); } void setPropEngine(prop::PropEngine* propEngine) -- cgit v1.2.3