Skip to content
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

Summarized rules for fidSwap #42

Merged
merged 5 commits into from
Sep 26, 2024
Merged

Summarized rules for fidSwap #42

merged 5 commits into from
Sep 26, 2024

Conversation

mariaKt
Copy link
Contributor

@mariaKt mariaKt commented Sep 25, 2024

This PR adds rules to summarize different parts of the function fidSwap.

function fidSwap(uint[] memory amounts, address[] memory path, address vidTo) private {

We attempt to summarize as much as possible, aiming to go from summary to summary. This is achieved, with only two exceptions:

  • the if statement that the while is rewritten to (that uses the normal if rule, not included in a summary)
  • the block statement of that if statement's then and else clauses, which is extracted using the normal block rule.

@mariaKt mariaKt marked this pull request as ready for review September 25, 2024 01:34
Copy link
Contributor

@Robertorosmaninho Robertorosmaninho left a comment

Choose a reason for hiding this comment

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

Looks good to me. I tested it using --statistics with and without the summary and the results are:

  • Without: 28765
  • With: 27191
  • Diff: 1.574

@mariaKt mariaKt merged commit 9b57361 into main Sep 26, 2024
1 check passed
@mariaKt mariaKt deleted the fidswap-summary branch September 26, 2024 18:54
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