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

[Certora] Simplify summarization of mulDiv and price #722

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

QGarchery
Copy link
Contributor

@QGarchery QGarchery commented Feb 21, 2025

This PR:

  • removes summarization of mulDiv that was not needed
  • simplifies the summarization of the oracle, that was essentially always used as a constant
  • removes the assumption about summaryMulDiv in specs

@QGarchery QGarchery self-assigned this Feb 21, 2025
@MathisGD MathisGD changed the title Simplify summarization of mulDiv and price [Certora] Simplify summarization of mulDiv and price Feb 21, 2025
Comment on lines 31 to 33
function mulDivUp(uint256 x, uint256 y, uint256 d) returns uint256 {
assert d != 0;
return assert_uint256((x * y + (d - 1)) / d);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this is not making any assumption as summaryMulDiv* were doing before

@QGarchery QGarchery marked this pull request as ready for review February 25, 2025 16:08
colin-morpho
colin-morpho previously approved these changes Feb 25, 2025
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