Skip to content

Add count-aborts binary #3911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 3, 2024
Merged

Add count-aborts binary #3911

merged 11 commits into from
Jun 3, 2024

Conversation

goodlyrottenapple
Copy link
Contributor

@goodlyrottenapple goodlyrottenapple commented May 31, 2024

Add count-aborts binary which can count aborts via count-aborts file_1 ... file_n, producing a simple table of the form:

rewrite 179aea3c173679c3568195c367cbdf4b7f72d02e32a852f726b5286722dc7fbe | ...kproj/evm-semantics/optimizations.md :  (171, 5) | 67
rewrite 43eb3e2a897e191ad8a0aed993827e0c0a0e3623fa4636e4f5834bb31d9a50a7 | ...kproj/evm-semantics/optimizations.md :  (61, 5) | 30
function ecb5b6d1121b7f2fc876e1ad066144ead1eaa1a8017fc23c1f0b8b3ffa85963b | ...kproj/evm-semantics/gas.md :  (73, 10) | 15
function 4d2edce98d6aab3105157ce4d52822aece63337021be772d2c629aea2d74a6ea | GAS-FEES.allBut64th.pos | 10
function 33ba3c99a617c91a569409550a961b9fedca6c72f0d5a6c7bf27fec57c09305e | ...kproj/evm-semantics/gas.md :  (40, 10) | 7
function 03559fc500e32e41e4457d6ff45cc1018bd17f725596956593f2bc14bcaecfb6 | ...kproj/evm-semantics/gas.md :  (39, 10) | 4
rewrite 83ce37b021b397430e4a51e1b820f6db7c7aba8bff7abc4a53dd4a8a6834d6dd | ...kproj/evm-semantics/evm.md :  (1922, 10) | 1
rewrite 0186d9d6871e56906a010470eec9b54205c77d884af5294e0d032efe8e789d4c | EVM.create-valid | 1

The files expected as input to this tool are produced by the booster via --log-format json --log-file <file>.

@goodlyrottenapple goodlyrottenapple marked this pull request as ready for review May 31, 2024 15:32
Copy link
Contributor

@geo2a geo2a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me! I would like to see more comments and a --help description of what the commands are supposed to de. Also, I understand that @jberthold is working on a similar solution as well. We need to sync in the daily to coordinate.

@goodlyrottenapple goodlyrottenapple changed the title Add context-logs binary Add count-aborts binary Jun 3, 2024
@goodlyrottenapple goodlyrottenapple requested a review from geo2a June 3, 2024 12:39
@goodlyrottenapple goodlyrottenapple merged commit b83a455 into master Jun 3, 2024
6 checks passed
@goodlyrottenapple goodlyrottenapple deleted the sam/context-log-tools branch June 3, 2024 13:41
goodlyrottenapple added a commit that referenced this pull request Jun 4, 2024
More tweaks and cleanup of the contextual logs including:
* Remove monad logger from booster code fully and add an "always show"
flag to simulate info logs that should be always used no matter the
context filter (use sparingly!!). the flag is set when logging via
`logMessage'` (perhaps need a different name?). Fixes #3867
* Switch abort analysis to using the JSON context logs. This includes
translating the required context filters into the previously used `-l
Abort` log level, as well as using the new `count-aborts` (#3911)
utility. Fixes #3865
* Introduce new `failure,break` and `failure,continue` nested contexts,
which are emitted based on whether we are evaluating functions or
simplifications.
* Improve ceil analysis contextual logs

---------

Co-authored-by: github-actions <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants