-
Notifications
You must be signed in to change notification settings - Fork 34
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
Optional Snapshot Generation in Consume #879
Optional Snapshot Generation in Consume #879
Conversation
I wonder, did you benchmark this on sth like scion or sth generated by Prusti? I wonder what are the implications in performance (and potentially completeness) |
Completeness should not be impacted in any way, the snapshots are only omitted when they definitely won't be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I marked three things, everything else looks fine to me.
For the moment there are no measurable benefits for Scion. However, I expect it will improve the performance of As an illustrative example, consider a case where we sum over n arrays. The following table demonstrates how the number of quantifier instantiations is reduced when using this approach:
Example Code
|
During the execution of certain statements, consume generates snapshots that are unused. For consuming QP-Chunks, this results in unnecessary snapshot map definitions being triggered, increasing the number of quantifier instantiations and negatively impacting performance.
To address this, snapshot generation is now prevented for these cases. While the primary performance improvement applies to consuming QP-Chunks, the change is also applied to consuming non-QP-Chunks to ensure consistent behavior across all scenarios.
Example:
Affected Statements:
Field assignments
Method calls (consume of pres)
Exhale statements
Assert statements
While loops (consume of invariants)