History log of /seL4-l4v-10.1.1/l4v/lib/Corres_Method.thy
Revision Date Author Comments
# 15bfcdd9 12-Oct-2018 Gerwin Klein <gerwin.klein@data61.csiro.au>

reduce DRefine dependencies from Refine to AInvs

This needs (and includes) some deduplication and moving of lemmas formerly in
refine.


# 6b9d9d24 09-Jun-2018 Gerwin Klein <gerwin.klein@data61.csiro.au>

Isabelle2018: new "op x" syntax; now is "(x)"

(result of "isabelle update_op -m <dir>")


# b0f2217a 14-Mar-2018 Thomas Sewell <Thomas.Sewell@data61.csiro.au>

lib/wp: Remove old wp combinator rules.

These combinator rules do something like what wp_pre does now.

They were helpful in the ancient past, but now that wp_pre exists it is
much better to just use automation.


# 5b1f7dde 11-May-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: update docs


# 7bf1e144 11-May-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: bug fixes

* corres_pre now performs more conservative weakening
if the goal is already a corresK goal. This prevents
introducing a verification condition in the middle
of a proof.

* corres_inst_eq avoids splitting if statements when
unfolding corres_protect.

* corres_rv correctly handles schematic atomic postconditions
(previously would loop, now instiates them to True)

* corressimp fails on schematic goals to avoid looping


# 7964a5c9 07-May-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: more robust schematics

corres method now fails outright if the subgoal
conclusion is schematic, otherwise it can loop.

Handle cases where corressimp
would leave preconditions uninstantiated if the
goal was solved by clarsimp.


# fb6cd81a 21-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: tuning and documentation


# 66c34a3e 19-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: method for corres_rv

This removes corres_choice in favour of making corres_rv smarter.
Now corres_rv can propagate a stateless condition, and the new
corres_rv method (called from corres) tries to push the generated
obligation into the appropriate place (stateless, left or right
precondition) based on which variables it discusses.

This avoids most cases where the corres_rv_wp_left/right or
corres_rv_defer rules needed to be specified manually.


# af314bdb 19-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: careful treatment for schematics

The new "corres_choice_true" and "corres_choice_false" constants
represent a deferred choice for how to propagate a generated
stateless precondition. If possible, we would prefer to do so
via the outermost stateless precondition, since it has access
to all green variables. Importantly corres_rv_defer_left/right
are subsumed by the more general corres_rv_defer.

Also we introduce alternative wp_comb rules which introduce
a corres_inst_eq goal, rather than a raw meta-implication. This
is to avoid cases where the existing wp_comb methods would incorrectly
introduce schematic assumptions, resulting in unprovable goals. This
allows for more carefully controlling unification in cases where
the precondition of a hoare triple doesn't have access to all
necessary green variables.


# 7a229632 18-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: misc bugfixes

Avoid introducing schematic assumption when corres preconditions
are concrete put stateless condition is schematic.

Avoid empty ruleset for corres_concrete_rER: causes corres to
loop unless it has at least one member.


# ac4ab01c 17-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: mark more rules as corres_split

Since corres_splits rules are applied conservatively, we
can safely put the straightforward "corresK_if" rule in it,
leaving the reverse rule for corres_search.

Also "when" and "liftM" rules should be corres_splits,
rather than corresK, to handle cases where we might have
some more specific rule about a particular scenario and don't
necessarily want to unwrap the function.


# 4818bfb0 17-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: add more conservative correswp

Correswp is wp but with more conservative treatment for
schematics. Rules in wp_comb that do precondition weakening
are avoided when the precondition is schematic, and there
is a final check which fails if any schematic preconditions
are found.

Realistically this should be the default behaviour for wp, but
that's a potentially bigger change.


# 680c1299 13-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: better lift_corres_args

Handles multiple arguments and fails if no arguments are lifted


# 26ec1733 13-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: misc tuning


# d8e0bd1d 13-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: remove simp step from corres

Instead of doing rewriting corres should only rely on
rule application to ensure it only manipulates the
head function (and only if such manipulation causes
corres progress to be made).


# 07ed0a42 13-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: generalize assumption protection

Generated goal premises (i.e. from bind or if split rules)
should in most cases be redundant, as necessary conditions can
simply be propagated. By aggressively protecting them, we afford
ourselves greater control over how function bodies are rewritten.


# e8ce56f5 12-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: ex_abs -> ex_abs_underlying

ex_abs appears later in Refine so it can just be
rephrased as an abbreviation


# 63f68eb6 12-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: unfold protect_r in corressimp

Allow corressimp to use the return-value relation in its clarsimp step
if doing so allows it to solve the subgoal.

This addresses some occasions where wp generates in-place goals that can
be easily solved (rather than pushing them into preconditions).


# f9fde437 12-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: misc cleanup


# 46d5278f 12-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: speed up corresc

This avoids any backtracking when solving the contradictions
emerging from left/right case splitting. Should result in 2-3x
speedup in some cases.


# 64d4a29e 12-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: add const for instantiation

Some schematic instantiations require knowledge from return-value
relations. The special const "corres_eq_inst" indicates to corres
that a schematic instantiation should be possible/obvious by
unfolding the protected assumptions and applying fastforce.


# e07af805 12-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: add better corres_rv rules


# fac5b220 07-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: hide return relation

Protect the return value relation by default so we can control
the simplifier.


# b7b25d89 07-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: add corres to wp lifting rules


# 776408a2 07-Apr-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

lib/corres_method: add better corres_rv rules


# c01e9f68 10-Apr-2017 Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>

x64: progress in VSpace_R

Corres lemmas are proven. Remaining:
- A handfull of Hoare triples.
- The Haskell spec for invalidateASID needs to be updated
to close a small hole in each of unmap_pd_corres and
unmap_pdpt_corres.


# 5788ada1 07-Apr-2017 Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>

x64 refine: fix Retype_R

Also:
- Design spec and haskell invariants fixes.
- Moves corresK rules for mapM and mapM_x into Corres_Method.


# 66970686 28-Mar-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: remove corres_concrete_P, reorder preconditions

Prefer to solve corres_rv/stateless preconditions first. This
lets them easily be introduced as assumptions with context_conjI.


# d1193f30 27-Mar-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: don't add F to goal prems

This causes too much unintentional simplification.


# 4e3bcc38 28-Mar-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: major overhaul to use corres_underlyingK

This gives the corres method its own calculus where it has better
control over additional rule assumptions.


# 2c618944 28-Mar-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: add right-hand variant of normal_corres

This allows stateless preconditions to propagate from the
right (concrete) side rather than the left side as usual.


# c20a112a 28-Mar-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: more careful treatment of schematics

This adds new classes of corres rules which require different
goal parameters to be instantiated. corressimp avoids applying
wp or simp rules which would expose schematics.


# 3880048e 28-Mar-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: invoke corresc from corres

This is done so that "corres_once" will consider it a successful
application if it manages to perform a case split.


# e2105982 28-Mar-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: better symbolic execution support

- Abstract symbolic execution theorems into named_theorems
- More rules for error monad


# 2ac4fa35 14-Feb-2017 Daniel Matichuk <daniel.matichuk@nicta.com.au>

corres_method: use corres method by default


# 76d817c5 14-Feb-2017 Daniel Matichuk <daniel.matichuk@nicta.com.au>

corres_method: edge case with corres_search

Handle case where corres_search requires no searching at all.


# 7c1869b3 09-Feb-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: avoid unnecessary goal restriction

This makes traces a bit more readable


# 96630f98 09-Feb-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

corres_method: add breakpoints


# f8c58793 09-Feb-2017 Daniel Matichuk <daniel.matichuk@data61.csiro.au>

fixed algorithm for corres_search

added Corres_Test theory file with example proofs from VSpace_R


# 315acdc6 08-Feb-2017 Daniel Matichuk <daniel.matichuk@nicta.com.au>

initial commit for corres method (experimental)