Commit Graph

29 Commits

Author SHA1 Message Date
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 c1fe4ad10f
lib+refine: rename Corres_Method to CorresK_Method
This also renames most of the corres* methods to corresK* methods,
including corressimp -> corresKsimp.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-30 10:56:47 +10:00
Corey Lewis a2ffb3b4f5 proof: remove is_thread_control and thread_control_target
Instead use discriminator and selector provided by the datatype
package.

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-02-14 18:33:44 +11: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 625c6e359d
lib+proof: eliminate hoare_ex_wp
duplicate of hoare_vcg_ex_lift

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-25 11:48:38 +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 8ffdb5eb76 proof: change simple corres_splitEE cases
perl -0777 -pi -e 's/corres_splitEE *\[ *OF +_ +([^_]\w+) +(\w+)/corres_splitEE[OF \1 _ \2/g' **/*.thy
perl -0777 -pi -e 's/corres_splitEE *\[ *OF +_ +(?!_)/corres_splitEE[OF /g' **/*.thy
perl -0777 -pi -e 's/corres_splitEE *\[ *OF +([^_]\w+) +([^_]\w+)/corres_splitEE[OF \2 \1/g' **/*.thy
perl -0777 -pi -e 's/corres_splitEE *(.*)\)\n\s*prefer +2/corres_splitEE\1\)/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
Gerwin Klein b29a3433ef isabelle2021-1: remove no_take_bit
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +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 300d62e6b3 riscv refine: update to Isabelle2020
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Miki Tanaka 0b9c186eb0 armhyp/x64/riscv64 refine: remove interrupt/irq from p_monad
- fix armhyp/x64/riscv64 Refine for the above change

Signed-off-by: Miki Tanaka <miki.tanaka@data61.csiro.au>
2020-10-25 13:15:00 +11:00
Gerwin Klein c3f3656942 refine + crefine: proof updates for haskell datatype selectors
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-07-09 10:06:31 +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 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 54f557f2b2 refine: invocation label proof updates 2020-02-03 12:56:19 +08:00
Victor Phan 3ef1e6845c riscv refine: update after adding thread id registers to TCB 2019-11-12 18:28:40 +11:00
Gerwin Klein a5e27933a5 riscv: cleanup; resolve remaining FIXMEs 2019-11-12 18:28:40 +11:00
Gerwin Klein 4f1e8e51ee riscv refine: cleanup in Tcb_R 2019-11-12 18:28:39 +11:00
Gerwin Klein 4bd67d3c4e riscv refine: clean up theory imports + fix fallout 2019-11-12 18:28:39 +11:00
Gerwin Klein 1d9328dbcd riscv refine: set up Tcb_R (0 sorries) 2019-11-12 18:28:39 +11:00