Skip to content

Conversation

@talsewell
Copy link
Contributor

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.

talsewell added 30 commits May 6, 2019 11:18
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
talsewell and others added 28 commits August 5, 2019 17:19
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
Trying to avoid typing out compile_lab's definition again
in the translation theories, previously made some mistakes
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
@xrchz xrchz merged commit b890559 into master Aug 21, 2019
@xrchz xrchz deleted the clos-install branch August 21, 2019 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants