Commit Graph

26 Commits

Author SHA1 Message Date
Corey Lewis 02116815be proof+autocorres: update for select_wp and alternative_wp
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-08-09 16:42:01 +10: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
Corey Lewis fc7a113286
riscv infoflow: physBase abstraction
- Distinguish between virtual and physical address for the shared page
  in the example state.

- Reuse lemmas from ArchKernelInit to solve address translation proofs.

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-03-29 11:05:27 +11:00
Corey Lewis 7514d9ee69
arm access+infoflow: physBase abstraction
The example valid state is changed to correctly use both the virtual
and physical address of the shared page, instead of just the virtual
address.

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-03-29 11:05:26 +11:00
Rafal Kolanski d5fa6043cb proof: update (non-x64) for physBase-dependent defs
Co-authored-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-03-20 09:34:42 +11:00
Gerwin Klein 9c3a7faefd
lib+proofs: s/non_fail_/no_fail/
Some of the no_fail lemmas had he wrong name (non_fail instead of
no_fail).

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:02:10 +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 59529d4522 infoflow: 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 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 17ed8b9f25 proof: rename corres_underlying_split to corres_split_forwards
sed -E -i "s/\bcorres_underlying_split\b/corres_split_forwards'/g" proof/**/*.thy

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-10-20 08:59:52 +11:00
Gerwin Klein ba033cc300 riscv haskell+proofs: fix PageTablePTE encoding
According to the RISC-V spec, PageTablePTEs must have the access,
dirty, and user bits set to 0. This means that

- there is no user attribute that can be set on PageTablePTEs
  (removed from Haskell spec)
- the encoding for PageTablePTEs in C must have 0 in these fields
  instead of 1.

See PR seL4/seL4#880 for discussion and corresponding C changes.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-07-18 10:40:17 +10:00
Gerwin Klein bbdc1e53db isabelle2021-1 riscv: InfoFlowC
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 8d6dbafbea isabelle2021-1: InfoFlowC
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 24c0c5c390 spec+proof: use generated config constants
This includes replacing previous ASpec names for such constants with
the names used in Haskell/ExecSpec to avoid duplication. This also
makes some of the proofs slightly more generic.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-12-23 14:54:13 +11:00
Rafal Kolanski 73911da72d infoflow refine: make proofs independent of number of domains
The InfoFlow proof itself does not care about the number of domains, and
that assumption was removed in another commit.
The specific example in the information flow refinement requires two
domains (one "high" and one "low") to be of any interest. Since it
cannot be instantiated with only one domain, the example theorems in
Example_Valid_StateH now assume that `1 <= maxDomain`.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2021-12-22 23:50:22 +11:00
Ryan Barry 72ab7cc180 various: resolve some new fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-11-12 09:39:16 +11:00
Ryan Barry 0c2767b197 riscv infoflow refine: add Example_Valid_StateH
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-11-12 09:39:16 +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
Ryan Barry 8124b326b4 infoflow+crefine: refine arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-10-05 08:46:11 +11:00
Gerwin Klein 9355a059f6 isabelle-2021: update InfoFlowC
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Miki Tanaka bfef8d9601 arm InfoFlowC: proof fix for removing magic number cleanup etc
Signed-off-by: Miki Tanaka <miki.tanaka@data61.csiro.au>
2021-07-24 12:09:57 +10:00
Mitchell Buckley e54e04c9d3 infoflow: Standardise corres lemmas to match refine
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 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
Rafal Kolanski 9ed45e17bd arm+arm-hyp: kernelBase and physMappingOffset renames
This brings the naming convention closer to the other architectures,
closer to the Haskell, and closer to the constant renames that happened
in C. It is, however, quite an invasive change.

kernelBase_addr -> pptrBase
kernelBase -> pptrBase
physMappingOffset -> ptrBaseOffset

Signed-off-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
2020-11-16 16:52:40 +11:00
Gerwin Klein ad2e73ce4d infoflow: update InfoFlowC session for Isabelle2020
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Gerwin Klein e2e580664a infoflow: update InfoFlowC to Isabelle2020
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00