-
Notifications
You must be signed in to change notification settings - Fork 92
Clos install #677
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
Merged
Merged
Clos install #677
Conversation
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
Replace the call to do_install in the closLang semantics. Cheat the key proof about SUBMAP. No idea how to fix that.
Add a generic proof for do_install for the various closLang phases before clos_call, where there are expressions but not installed code
Proofs in clos_call are repaired. It also looks like there's some more commented-out stuff still to be excavated. Attempts to fix clos_labels were then abandoned, it's not clear how to make it make any sense in the incremental case.
Introduce combinators is_state_oracle and oracle_monotonic. is_state_oracle: an oracle's config values (states) are what you'd get by repeatedly applying the incremental compiler. oracle_monotonic: some projection of an oracle's values increases monotonically in some order. The first is used to make invariant-style reasoning local. We prove the invariant on the state in the proof about the phase, and just export the requirement that the config values that will be passed back in via the oracle are the ones we'd expect. The monotonic one is for ALL_DISTINCT style proofs across various generations. All the names from install-generation 2 should be greater than any in the previous generation.
The proof hypothesises a 'future point' at which the analysis is completed. This is complicated by future installs. There was a plan to use the clock to pick a future point after all installs, but instead I just adjusted the proof to let the 'future point' walk forward through the induction.
Splits out many helper results from compile_common_semantics, which is close to complete
The big result is a proof of clos_to_bvl's compile_oracle_inv based on a simplified syntax_oracle_ok which uses the new combinators, and progress is being made, but it's a big ugly problem
Define a constant that captures the names/addresses that will be occupied by clos code once all the chaining and extracting is finished, and use that to rephrase ugly syntactic properties
Cover syntactic naming conditions for most phases of clos_to_bvl, but there's a troubling assumption that there's some code present (because extract_name acts strangely if there isn't)
It's fine for some code to be empty, but the extract_name helper and proofs about it need to be carefully adjusted
The toplevel compile function now returns the whole config rather than just the lab_to_target part, probably fixing a former oversight
This proof previously define custom copies of state_co and state_cc
This monotonicity result goes all the way up to source_to_flat where the globals are enumerated
Because three different namespaces with different correctness principles are so pleasant to deal with
Everything now builds, just two more cheats to chase down
With new tricks for showing that labels are disjoint, clos_labels is no longer needed
No longer used, and there were cheats present, better off gone
The compile function (in both backend and compiler theories) now returns a complete config, with predictable minor fallout
A temporary fix for compatibility with multiple HOL4 versions, can now be dropped
The compiler now returns the full config, not just the lab-level config, requiring minor adjustments to compilation theories
This one is subtly different and escaped previous search/replace
Adjust the definition of from_livesets to handle the modified config more carefully, not yet tested with compilationLib
It happens that the to_data_change_config theorem can coerce between configs with different type parameters, which can allow a type variable to escape and create problems with saving definitions later on
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.
This batch of changes restores the Install primitive of closLang, completes its syntactic proofs, and also adds a lot more structure to the approach to syntactic proofs about oracles substantially at the clos and backend level.