Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extends the
inline_leaves
function added in #4 to support repeatedly calling it.It does this by adding a check when constructing the new operator string. If the operator string was already inlined, we replace all instances of
·
(the missing arg constant), with the new values. Otherwise, do the previous behavior of constructing a calling signature.It also adds a
saturate_inline_leaves
function, that repeatedly inlines until it is a no-op.I have added this as an example to include in the readme. E.g. this is the
physics_scientific_unsolved_4h_ellisk_2019
inlined once:Compared to the saturated inline:
Motivation
When you use a wrapper struct around a literal you might want this inlined as well, to make the graph have less overlapping edges. So I wanted to be able to run
inline_leaves
at least twice.I had been wanting to try the saturated version too for a while to see if it helps with readability at all.