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

Propagate modifies clause through boogie program #115

Merged
merged 5 commits into from
Oct 19, 2023
Merged

Conversation

ailrst
Copy link
Contributor

@ailrst ailrst commented Oct 18, 2023

  • Fixes Spurious mem in modifies clause #111 by pushing all the values in the modifies clause up the call tree of the boogie program, right at the end of generation instead of always inserting an extra mem for the rely().
  • Also renames "boogie.ProcedureCall" to "boogie.BProcedureCall".

This implementation is fairly inefficient, @l-kent you referred to a broader refactor to do something like this but I'm not sure what you had in mind for that.

@ailrst ailrst requested a review from l-kent October 18, 2023 07:29
@l-kent
Copy link
Contributor

l-kent commented Oct 18, 2023

The broader refactor I was thinking of would be moving all the insertion of relies, Gammas, etc. to be a stage of the IR transformation rather than happening as part of the Boogie translation process at the end. This would allow various analyses to directly relate to those if necessary, so we wouldn't need to do two different fixed point propagation of modifies clauses like is happening here.

This will work for now though, sure.

Copy link
Contributor

@l-kent l-kent left a comment

Choose a reason for hiding this comment

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

I've just made it use a Set which should make it marginally more efficient, and made the final modifies output be fully sorted again to ensure the future output is more consistent.

@ailrst
Copy link
Contributor Author

ailrst commented Oct 19, 2023

The broader refactor I was thinking of would be moving all the insertion of relies, Gammas, etc. to be a stage of the IR transformation rather than happening as part of the Boogie translation process at the end. This would allow various analyses to directly relate to those if necessary, so we wouldn't need to do two different fixed point propagation of modifies clauses like is happening here.

This will work for now though, sure.

Yeah that makers sense that would be a good approach

@ailrst ailrst merged commit e082890 into main Oct 19, 2023
1 check passed
@l-kent l-kent deleted the fix-extra-mem-modifies branch November 6, 2023 23:52
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.

Spurious mem in modifies clause
2 participants