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

Context Gas per Function ⛽ #1570

Merged
merged 16 commits into from
Sep 23, 2024
Merged

Context Gas per Function ⛽ #1570

merged 16 commits into from
Sep 23, 2024

Conversation

michael-schwarz
Copy link
Member

This provides an alternative version of the context gas where it is tracked per function.

  • The gas lifter now takes another module that specifies how the gas is handled (allows for further instances)
  • The lattice for the gas is now the chain lattice of the actually desired height rather than always having infinite height

I only have two regression tests so far, it would be great if someone else could come up with some more tests before we merge this and run experiments.

Closes #1569

@michael-schwarz michael-schwarz added cleanup Refactoring, clean-up feature precision performance Analysis time, memory usage labels Sep 20, 2024
Copy link
Member

@jerhard jerhard left a comment

Choose a reason for hiding this comment

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

Looks mostly good, nice capsulation of the Gas internals using the modules! I left some small remarks.

src/framework/constraints.ml Outdated Show resolved Hide resolved
src/framework/constraints.ml Outdated Show resolved Hide resolved
src/framework/control.ml Outdated Show resolved Hide resolved
src/framework/control.ml Outdated Show resolved Hide resolved
Copy link
Collaborator

@SchiJoha SchiJoha left a comment

Choose a reason for hiding this comment

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

I looked through the changes from the Lifter, and everything looks good :)

src/framework/contextGasLifter.ml Show resolved Hide resolved
src/framework/contextGasLifter.ml Outdated Show resolved Hide resolved
src/framework/contextGasLifter.ml Show resolved Hide resolved
@sim642 sim642 self-requested a review September 23, 2024 07:52
@michael-schwarz michael-schwarz merged commit 147935a into master Sep 23, 2024
21 checks passed
@michael-schwarz michael-schwarz deleted the issue_1569 branch September 23, 2024 19:20
@michael-schwarz michael-schwarz added this to the v2.5.0 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Refactoring, clean-up feature performance Analysis time, memory usage precision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide per-fundec context gas
4 participants