-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add support for serializing / deserializing SAW core modules to/from disk #1257
Comments
I don't think there's anything inherently hard about doing this. But before we can really get started on implementing it, we need to figure out exactly how we want it to work. First, we need a way to specify exactly what gets exported: Do we want to dump the entire environment of every known definition and declaration in the current Also, should we take a transitive closure of dependencies for exported definitions, or should we omit certain low-level definitions from the export? For example, if we have a bunch of saw-core constants defined in terms of other constants that are defined in the saw-core prelude, we don't necessarily want to export all the contents of the saw-core prelude at the same time. On the import side, we have some other decisions to make too. If you export a saw-core module that includes definitions of constants and datatypes, and then you import that module back in, should it always redefine fresh copies of everything that was imported? Or, if one or more of the imported declarations is already present in the current |
In response to @brianhuffman: Here is how I was imagining this would work, as a starting point, but please point out any problems! The point of making this export / import per-module is so that we can use SAW modules as a convenient way to specify what definitions actually need to get serialized / deserialized. The idea would be that each SAW “session” would make its own SAW core module, which would keep all of the definitions, proofs, axioms, etc., that were created in that session. Those objects in the session module would be the objects that would be serialized. Any objects not created in that session would be objects in one of the preludes, which have already been pre-loaded into SAW, and so shouldn’t be serialized. If you then have session 2 that depends on objects from session 1, then session 2 has to import the module that was created for session 1. When you serialize session 2, you only serialize its module, not that of session 1, because you have already serialized session 1 to a different file. This sort of separation is important when you have import diamonds, as in having sessions 2 and 3 independently relying on session 1, and session 4 then relying on both 2 and 3. We want session 4 to be able to import both 2 and 3 but have them both rely on a single import of 1, and not import 1 twice. It might be nice to have syntax to start a new session that depends on a set of serialized former sessions. It might also be nice to store in the serialized sessions the file names of (or maybe some other sort of reference to?) the other sessions they depend on, so the user can just load the sessions they need and have their dependencies be loaded automatically, rather than having to manually specify a session and all its dependencies. |
Copying some text from the Mattermost discussion on this topic:
|
It would be really helpful if we could take an entire SAW core module and write it out to disk, to "freeze" it, in order to save progress in the middle of a long proof. This sort of feature could also have other uses; e.g., it could allow multiple different verification processes to run in parallel, in different instances of SAW, and then have all the results be loaded by future tasks that rely on those results.
The text was updated successfully, but these errors were encountered: