Skip to content

Commit fa56f20

Browse files
committed
Make simplify_exprt::simplify_node virtual
While simplify is already virtual, it isn't really a useful extension point because it's called only at the start of the simplification, and all the real work is handed off to simplify_rec which, in turn, calls simplify_node, and then both of which can be recursed into from further down the expression tree. In order to customise the expression simplification we need to be able to hook into that recursive call, and simplify_node is the most useful place to do that.
1 parent 36dcc4a commit fa56f20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/simplify_expr_class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class simplify_exprt
233233
simplify_inequality_pointer_object(const binary_relation_exprt &);
234234

235235
// main recursion
236-
NODISCARD resultt<> simplify_node(exprt);
236+
NODISCARD virtual resultt<> simplify_node(exprt);
237237
bool simplify_node_preorder(exprt &expr);
238238
NODISCARD resultt<> simplify_rec(const exprt &);
239239

0 commit comments

Comments
 (0)