-
Notifications
You must be signed in to change notification settings - Fork 112
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
Persistent caching of verification results #762
Comments
Actually, translation to Boogie is never cached, also not by the IDE, although that's something we'd like to do. Also, caching of verification after translation to Boogie is an experimental feature that's off by default. I'm not sure I understand the two options you describe for caching. Wouldn't any cache boil down to a Key-Value map, where persisting that cache requires serializing the Key and Value? The Key is likely a hash so simple to persist, and the value some complicated object. |
The first option I was describing is to make the The second option corresponds to what you are describing. However, I was hoping that for the value of the cache we would not have to serialize a complicated object. It seems tricky to serialize an object such as |
I think what you're saying is you only want to cache verification of methods that successfully verified, since that would simplify what needs to be persisted. I think making the cache work in such a partial way might be more effort, and be more prone to error, than serializing the whole I think the main effort in caching verification is in determining the keys of the cache. |
The cache keys can be the cryptographic hash (to avoid collisions) of the content of the boogie One problem with this approach is that parameters passed to Boogie that can change the verification results and do not influence the IR are not taken into account. They need to be included somehow to the hashed string to avoid any unsoundness issue. |
During the verification of multiple files using the Dafny CLI, most of the time is spent on the VCs generation, the conversion of these VCs to SMTLib queries, and solving these queries.It would be convenient to cache some of the verification results as done is the Dafny’s VSCode extension to avoid all of this processing if a file has not been changed.
One option is to make the current cache persistent but serializing the implementation object and all the nested objects that it contains is tricky.
A simpler option is to hash the Boogie code of an implementation once everything is inlined and use it as a key to store the verification result. An optional argument could be added to Boogie like
cache:<filename>
where<filename>
is the file containing the map of boogie implementation hashes to verification results.This option would make developing using the Dafny CLI faster by reverifying only what has changed.
The text was updated successfully, but these errors were encountered: