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. |
marcoeilers
left a comment
There was a problem hiding this comment.
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)