Pancake Named Shapes#1393
Merged
Merged
Conversation
…m base expression in parsing)
…to pan_to_word and pan_passes (+ minor shape related pan_passes improvements)
…n (includes several cheats)
…t and add todos for named structs
Add a switch that controls the "safety" of the pancake named-structs features. The idea is to get to the point where the main proofs are repaired, and the named-structs features are installed but aren't considered safe for verified code. Repair panSem and panProps proofs for the additional types and ops. The fact that the safety switch is set to off hasn't actually been used yet.
Repair pan_globals and pan_to_crep, that was painful, and bring in the (mostly stubbed out) "verification" of the pan_structs pass. Committing prior to refactoring some things for pan_to_word.
The pan_to_target proof *finally* passes after minimising changes to the preconditions of the various semantics theorems.
It seems not that much additional effort to just verify the pan-structs pass. OK, some of the issues about using a sub-shape-construct (dropWhile etc) were fiddly, but the verification is now handling "eval", except for the part about deducing the shape of an expression.
Proof is now completed. There was some confusion about the compiler but it turns out it doesn't need to change. There was one new surprise: the exception shapes (eshapes) need to be modified. Unclear if that will matter.
A whole bunch of work to purge some approaches to the drop-struct-context issue. Also retire the separate code_rel with a little fixing in a couple of places.
This workaround should no longer be needed.
Verification now passes up to pan_to_target. Slight fallout in pan_to_word caused by the fact that pan_structs now needs to adjust the input state (replacing the exception-shapes with compiled variants).
Lots of merge conflicts between pancake static maintenance and strlit updates.
That merge created a lot of merge conflicts. They were resolved in favour of the local (pancake) changes, so some strlits will need to be removed again. Some errors were also introduced, which should now be fixed.
Looks like a merge issue spliced the syntax around, but it's not clear why or what it was merging with.
Still to do: from_pancakeXProgScripts.
The cheats are now fixed. The complicated conv_Exp issue (which derailed me for multiple days) is fixed by using the OPT_MMAP rewrite hack. This is simple enough for the user but probably means that the generated compiler will build an unnecessary intermediate list at runtime. Replicating the old fix (elaborating the conversion to have more mutual recursion) seemed to cause the translator (specifically translate_no_ind) to diverge. This may be a mistake in the way I set it up, others are welcome to investigate.
Merging with ac654a0, a recent successful CakeML regression test.
Conflict fix looks suspicious, to be checked.
Contributor
Author
|
Hurrah! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the "named shapes" feature to pancake, as implemented by @halogentlepersuasion and subsequently verified by @talsewell .
This permits structs (values of compound shape) to have fields named "x", "y", "head", "tail" etc as opposed to just 0, 1, 2, 3.
The verification and translation is believed to be complete.