Commit Graph

28 Commits

Author SHA1 Message Date
Michael McInerney 45cde7049b lib: reorder assumptions of no_fail_bind
In order to aid wp-style reasoning

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-15 18:08:12 +10:30
Gerwin Klein 314158480a
proof: update to Isabelle2023 mapsto syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:41:41 +11:00
Corey Lewis 7999632872 proof: update for changes to nondet monad
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-10-05 11:24:05 +11:00
Corey Lewis 2c8f9eeff1 lib+spec+proof+autocorres: consistent Nondet filename prefix
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-08-09 12:07:06 +10:00
Gerwin Klein e89813ecf2
proofs: updates for monad refactor
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-02-09 11:46:55 +11:00
Gerwin Klein e3c2e878b9
lib+proof+autocorres: consolidate when[E]/unless[E]_wp naming
wp rules for most operators such as return, get, gets are named
return_wp, get_wp, etc. Then when, whenE, unless, unlessE operators had
an additional hoare_.. prefix that this commit removes for more
consistency.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-25 11:48:39 +11:00
Gerwin Klein 3960115459
lib+proofs+sys-init+tools: proof updates for Fun_Pred_Syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-09 14:54:11 +11:00
Corey Lewis c51d812de7 riscv refine: update for changed corres split rules
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-10-20 08:59:52 +11:00
Corey Lewis 73a52be413 proof: change more simple corres split cases
perl -0777 -pi -e "s/corres_split_nor([\w'-]*) *\[ *OF +_ +([^_][\w'-]+) +([\w'-]+)/corres_split_nor\1\[OF \2 _ \3/g" **/*.thy
perl -0777 -pi -e 's/corres_split_nor([\w]?) *\[ *OF +_ +(?!_)/corres_split_nor\1\[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_split_eqr([\w]?) *\[ *OF +_ +(?!_)/corres_split_eqr\1\[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_split_mapr([\w]?) *\[ *OF +_ +(?!_)/corres_split_mapr\1\[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_split_noop_rhs([\w]?) *\[ *OF +_ +(?!_)/corres_split_noop_rhs\1\[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_split_dc([\w]?) *\[ *OF +_ +(?!_)/corres_split_dc\1\[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_split_handle([\w]?) *\[ *OF +_ +(?!_)/corres_split_handle\1\[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_split_catch([\w]?) *\[ *OF +_ +(?!_)/corres_split_catch\1\[OF /g' **/*.thy
perl -0777 -pi -e "s/corres_split_eqr(\w?) *\[ *OF +([^\W_][\w'-]+) +([^\W_][\w'-]*)/corres_split_eqr\1\[OF \3 \2/g" **/*.thy
perl -0777 -pi -e 's/corres_split_nor(\w?) *(.*)\)\n\s*prefer +2/corres_split_nor\1\2\)/g' **/*.thy

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-10-20 08:59:52 +11:00
Corey Lewis f4e9295424 proof: change simple corres_split_deprecated cases
perl -0777 -pi -e 's/corres_split_deprecated *\[ *OF +_ +([^_].*)\)\n\s*prefer 2/corres_split[OF \1\)/g' **/*.thy
perl -0777 -pi -e 's/corres_split_deprecated *\[ *OF +_ +(?!_)/corres_split[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_split_deprecated *\[ *OF +([^_]\w+) +([^_]\w+) +(.*)\)\n\s*prefer +2/corres_split[OF \2 \1 \3\)/g' **/*.thy
perl -0777 -pi -e 's/corres_split_deprecated *\[ *OF +([^_]\w+) +([^_]\w+)/corres_split[OF \2 \1/g' **/*.thy
perl -0777 -pi -e 's/corres_split_deprecated *(.*)\)\n\s*prefer +2/corres_split\1\)/g' **/*.thy

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-10-20 08:59:52 +11:00
Corey Lewis 6d37587b0b proof: rename corres_split' to corres_underlying_split
sed -E -i "s/\bcorres_split'\b/corres_underlying_split/g" proof/**/*.thy

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-10-20 08:59:52 +11:00
Gerwin Klein b864ae0159 isabelle2021-1 riscv: Refine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Ryan Barry 9f1d259f87 infoflow refine + refine: add refinement proofs
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-11-12 09:39:16 +11:00
Gerwin Klein 492c236121 isabelle-2021 riscv: update Refine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Miki Tanaka de7c2f7605 riscv refine: define valid_idle' directly, without using itcb
- this introduces idle_tcb' which is defined directly using tcb fields
- backport from MCS ARM Refine

Signed-off-by: Miki Tanaka <miki.tanaka@data61.csiro.au>
2021-07-24 12:09:57 +10:00
Mitchell Buckley 7180ee4e70 refine: Standardise names of some corres lemmas
Ideally all corres lemmas of the form
`corres rrel P P' my_abstract_function myHaskellFunction`
should be named `myHaskellFunction_corres`.

This commit renames over 200 lemmas to match this style.

Signed-off-by: Mitchell Buckley <mitchell.alan.buckley@gmail.com>
Co-authored-by: Victor Phan <Victor.Phan@data61.csiro.au>
2021-06-21 10:30:04 +10:00
Corey Lewis dd07ffd197 refine: move invariant field update lemmas
Signed-off-by: Corey Lewis <Corey.Lewis@data61.csiro.au>
2021-03-11 10:42:49 +11:00
Corey Lewis 008969fc02 lib proof: reorder the assumptions of corres_split
Currently this just modifies the rule but not any of the proofs that use
it. The old version is kept for now but should be removed once all of
the proofs are updated.

Signed-off-by: Corey Lewis <Corey.Lewis@data61.csiro.au>
2021-02-19 11:37:12 +11:00
Gerwin Klein 81117dc587 riscv cleanup: remove stray diagnostic commands
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-06-08 20:41:10 +08:00
Gerwin Klein 71e7f87614 haskell/refine/crefine: rename isBlocked to isStopped
sync with corresponding change in C

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-05-06 15:49:02 +10:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Victor Phan 966734c69b Collect abstract lemmas in Refine
Create ArchMove_R.thy for transporting arch specific lemmas (and generic
lemmas that are used somewhat specifically by one architecture) to theory
files before Refine.

Create Move_R.thy as an arch generic Refine theory file for transporting
generic lemmas to theory files before Refine.

Also delete some lemmas that have existed earlier already or are not
needed.

Rename Move.thy in CRefine to Move_C.thy for consistency.
2020-02-21 11:49:25 +11:00
Victor Phan f2d1f5ada7 refine/crefine: convert crunch with multiple constants into crunches 2020-02-03 16:29:19 +11:00
Victor Phan 285c47f622 cleanup for crunch_ignore in refine and crefine for all arches
Several constants are are added to the top level crunch_ignore statement in
Bits_R.thy, then removed from individual crunch statements across Refine and
CRefine.
2020-02-03 16:29:18 +11:00
Gerwin Klein 01c6c9f7b5 riscv refine: weaken precondition of threadSet_invs_trivialT 2019-11-12 18:28:39 +11:00
Gerwin Klein e850ab5ea5 riscv refine: reduce Haskell guards in TcbAcc 2019-11-12 18:28:39 +11:00
Gerwin Klein e25631e919 riscv refine: more guard cross-over rules 2019-11-12 18:28:39 +11:00
Gerwin Klein 7fde8b47a0 riscv refine: set up TcbAcc_R (0 sorries) 2019-11-12 18:28:39 +11:00