-
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
Update Heapster, Monadification, and MRSolver to handle high-order SpecM functions #2017
Conversation
…fact that it now generates a SpecDef type
…rsive shapes and permissions to use exprCtxPureTypeTerms for the arguments, to match their definitions
…tead of a translation term
… and pis when they are type-checked, in order to make the Coq translation work in cases where these argument types have identifiers that translate to alternate Coq definitions
… information is in a reader effect and not a state effect, making it clearer where in the translator code variables are bound; also fixed #1927
… directly translates an LLVM zero initializer to a Heapster permission + SAW core term, so that we use repeatBVVec in the SAW term rather than a giant vector literal
…ainst emptyBitSet with the new termIsClosed function
…e unsafeAssert Coq tactic is currently defined *after* the translation to Coq of the Prelude
… in SpecM.v instead of automatically generated
…the other way around, so that it can use the generated Num operations like tcAdd and tcMul
…e_llvmshape to make sure the user-supplied type and type description match
…ow that Heapster checks that these agree
…debug level is at least 2
…use it currently has a panic
@RyanGlScott Could you please re-review this? Or are there still things you think I should address? |
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, @eddywestbrook. Two minor comments, but otherwise this LGTM.
@@ -4,12 +4,14 @@ env <- heapster_init_env_from_file "clearbufs.sawcore" "clearbufs.bc"; | |||
// Integer types | |||
heapster_define_perm env "int64" " " "llvmptr 64" "exists x:bv 64.eq(llvmword(x))"; | |||
|
|||
// FIXME: get reachability perms working again! |
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.
This sort of thing would also be worth mentioning in an issue about re-enabling Heapster tests (should you choose to file one), along with the other FIXMEs in the heapster-saw/examples
subdirectory.
This PR makes changes to Heapster, Cryptol Monadification, and MRSolver to support higher-order SpecM functions. In particular, this brings things into parity with the update to the Coq definition of the
SpecM
monad which allows such functions to be defined in a sound way (theuntyped-ho-calls
branch ofentree-specs
, I believe - @eddywestbrook is that right?).Outside of the technical details of Heapster, Monadification, and MRSolver, this PR:
Prelude.sawcore
into their own file,SpecM.sawcore
, which is also included by default like the Preludeheaspter-saw/examples
which verifies that the top-level interface of the dilithium reference implementation satisfies a Cryptol spec using MRSolver