vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.83k stars 789 forks source link

fix[venom]: fix `cfg` output format #4010

Closed harkal closed 3 months ago

harkal commented 3 months ago

What I did

Added as_graph() method to IRContext to support cfg output types Refactored as_graph() of IRFunction to allow the emission of a subgraph in order to be included in the context's larger graph

How I did it

How to verify it

Commit message

this commit fixes a regression introduced in ace3789e4b9e2307, as we now
have multiple `IRFunction` objects grouped in an `IRContext`. This
commit adds the required `as_graph()` method to `IRContext`. At the same
time the `IRFuntions.as_graph()` is updated to support emitting only a
subgraph without wrapping it into a graphviz `digraph`.

Description for the changelog

Cute Animal Picture

![Put a link to a cute animal picture inside the parenthesis-->]()

charles-cooper commented 3 months ago

looks like sccp is rejecting valid code: https://github.com/vyperlang/vyper/actions/runs/9029074557/job/24810740170?pr=4010#step:6:297

we could revert the changes to output formats and reopen that in a separate PR. basically with the changes to output formats we are running the bb output on a larger range of inputs (including the fuzzing suite) so sccp is getting tested on a wider range of inputs.