diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2021-04-21 21:42:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 02:42:08 +0000 |
commit | 89620a0d73e7134437a39d742e91de11a08a4962 (patch) | |
tree | 46b37970a7d3f74317f8e255b6aefa9cfae127b1 /src/theory/arith/arith_rewriter.h | |
parent | 90cde45ee963b994054f96f97111684cce808d82 (diff) |
Move expand definition from Theory to TheoryRewriter (#6408)
This is work towards eliminating global calls to getCurrentSmtEngine()->expandDefinition.
The next step will be to add Rewriter::expandDefinition.
Diffstat (limited to 'src/theory/arith/arith_rewriter.h')
-rw-r--r-- | src/theory/arith/arith_rewriter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/theory/arith/arith_rewriter.h b/src/theory/arith/arith_rewriter.h index e476fbd62..6a92ba1cc 100644 --- a/src/theory/arith/arith_rewriter.h +++ b/src/theory/arith/arith_rewriter.h @@ -28,11 +28,19 @@ namespace cvc5 { namespace theory { namespace arith { +class OperatorElim; + class ArithRewriter : public TheoryRewriter { public: + ArithRewriter(OperatorElim& oe); RewriteResponse preRewrite(TNode n) override; RewriteResponse postRewrite(TNode n) override; + /** + * Expand definition, which eliminates extended operators like div/mod in + * the given node. + */ + TrustNode expandDefinition(Node node) override; private: static Node makeSubtractionNode(TNode l, TNode r); @@ -70,6 +78,8 @@ class ArithRewriter : public TheoryRewriter } /** return rewrite */ static RewriteResponse returnRewrite(TNode t, Node ret, Rewrite r); + /** The operator elimination utility */ + OperatorElim& d_opElim; }; /* class ArithRewriter */ } // namespace arith |