Commit Graph

4370 Commits

Author SHA1 Message Date
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
Miki Tanaka 4ecf7755f3 arm refine: remove magic numbers from valid_irq_node' and global_refs'
Signed-off-by: Miki Tanaka <miki.tanaka@data61.csiro.au>
2021-07-24 12:09:57 +10:00
Ryan Barry a99a2bf739 various: resolve some existing fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 0d53d6909f lib+ainvs+access+refine: resolve most of the new fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry c7cb94f8bf run_tests: enable RISCV64 access control test
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 2c03d8cd27 infoflow: misc fixes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 1fbe4895ed access: update ARM proofs
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry cb9249cb4a riscv access: add ExampleSystem
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 9f85f6c2d2 riscv access: add proofs for ADT_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry b61aaa7ce6 riscv access: add proofs for Syscall_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 638bc490d2 riscv access: add proofs for DomainSepInv
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry c3a88fa901 riscv access: add proofs for Ipc_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 1bf9139886 riscv access: add proofs for Tcb_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 5ea4d2b6ba riscv access: add proofs for Interrupt_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry a485d26f23 riscv access: add proofs for Finalise_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry ed8971a269 riscv access: add proofs for Arch_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry cc5014240d riscv ainvs+access: add proofs for Retype_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 9478264f19 riscv access: add proofs for CNode_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 52abdf42de riscv access: add proofs for Access_AC
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 16e9242665 riscv access: specify riscv access control
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Rafal Kolanski 2248d34495 abstract x64+riscv: clean up some Word_Lib imports
These are already imported upstream.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2021-07-16 23:39:39 +10:00
Mitchell Buckley 2cf89e20c8 Cleanup some FIXMEs in AInvs and related sessions
Mostly moving lemmas up into various lemma bucket theories. Also:
* replace cte_wp_at_eqD with cte_wp_at_norm (equal lemmas)
* pd_shifting_gen generalise pd_shifting' in 2 architectures
* remove some redundant crunch lemmas

Signed-off-by: Mitchell Buckley <Mitchell.Buckley@data61.csiro.au>
2021-07-16 14:13:07 +10:00
Gerwin Klein 115b12f1e2 run_tests: flush output
On GitHub, the output of external processes such as isabelle overtake
the stdout/stderr output of the test driver. Flushing stdout/stderr
in the right spots avoids that.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-15 13:53:14 +10:00
Gerwin Klein 0ac43566d7 run_tests.py: use colour on github
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-15 13:53:14 +10:00
Gerwin Klein d8699b0222 github: provide pull request head
Easier to provide at the call site than trying to extract it from within
the GitHub action.

Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-07-14 19:25:00 +10:00
Gerwin Klein 92cdf47946 runtests.py: nicer logs on GitHub
Add a folding group for verbose log output if running in a GitHub
context. GITHUB_REPOSITORY will be set for all GitHub contexts we're
interested in.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-13 21:28:21 +10:00
Gerwin Klein 106cf5ac03 github: add artifact log upload
This makes the full low-level logs available in the "Artifacts" tab of
the "Actions" screen.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-13 21:28:21 +10:00
Gerwin Klein 90d5de3ea4 github: complete "switch proof runs to AWS"
This completes the previous commit to run all proof tests on reasonably
high-powered AWS VMs instead of GitHub runners. All tests run in one
go for efficiency.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-13 21:28:21 +10:00
Gerwin Klein d51908d195 github: switch proof runs to AWS
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-12 15:18:04 +10:00
Corey Lewis 284ef78ae9 lib: support crunching lifted monadic functions
This also changes crunch to collect preconditions one at a time.

Signed-off-by: Corey Lewis <Corey.Lewis@data61.csiro.au>
2021-07-12 15:09:50 +10:00
Gerwin Klein 5f0f373a0e auto-deploy CParser docker container
This action triggers docker container deployment in the repo
seL4/ci-actions when the C parser changes here.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-08 09:23:32 +10:00
Matthew Brecknell ef87791124 docs: add style guide to `run_tests`
Signed-off-by: Mitchell Buckley <mitchell.alan.buckley@gmail.com>
2021-06-29 10:57:53 +10:00
Mitchell Buckley b1f1f56fd8 docs: improvements to style guide
* Add Style_pre.thy to contain helpful preliminary definitions.
* Change some style advice according to feedback from the team.

Co-authored-by: Corey Lewis <corlewis@gmail.com>
Co-authored-by: Matthew Brecknell <matthew@brecknell.net>
Signed-off-by: Mitchell Buckley <mitchell.alan.buckley@gmail.com>
2021-06-29 10:57:53 +10:00
Gerwin Klein 087dc1ecc9 docs: Add principles/goals to style guide
The rules in this style guide should work towards achieving these
goals and form the basis for arguing whether a rule should be
there or not.

Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-06-29 10:57:53 +10:00
Mitchell Buckley 3eaa6dce22 docs: start an isabelle style guide
Add docs/Style.thy.

This is a starting point for an isabelle style guide. Some of the
material is original and some is incorporated from confluence pages.
I believe that the basics are correct but it will need to be tweaked
and corrected by other proof engineers.

Signed-off-by: Mitchell Buckley <mitchell.alan.buckley@gmail.com>
2021-06-29 10:57:53 +10:00
Mitchell Buckley 184bdfb954 refine: fix regression caused by bad theory import
Importing Init_R into ADT_H was causing EmptyFail_H to fail. Since
no other theories actually depend on Init_R we can instead include
it in the Refine session directly.

Signed-off-by: Mitchell Buckley <mitchell.alan.buckley@gmail.com>
2021-06-27 10:13:01 +10:00
Mitchell Buckley ee3b84fb57 refine: Give a trivial member of the abstract-haskell state relation
Describe an extremely simple abstract kernel state, and haskell state
that obey the state relation. These states are `zeroed` in the sense
that they have empty heaps, and default values of 0, False, None, []
and similar in all fields.

These states do not satisfy invs or invs', and this is not as strong
a result as showing that kernel initial states satisfy the state
relation, but it is a good sanity check on the relation itself.

Signed-off-by: Mitchell Buckley <mitchell.buckley@data61.csiro.au>
2021-06-26 10:58:14 +10:00
Matthew Brecknell fd01872121 always use `addrFromKPPtr` for kernel addresses
This verifies a C kernel patch (seL4/seL4#409) which consolidates
translation between virtual and physical addresses, and makes it
consistent across architectures. In particular, we always use
`addrFromKPPtr`, even on architectures that don't use a distinct region
to map the kernel ELF. This will facilitate future improvements which
move the ELF mapping into a distinct virtual address region.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2021-06-25 16:31:22 +10:00
Matthew Brecknell 2aadbf9589 trivial: restyle `spec/machine/ARM*/Platform.thy`
Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2021-06-25 16:31:22 +10:00
Ryan Barry 8dd93a52a0 infoflow+dpolicy+cdl-refine: misc fixes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry c2939c771a access: move ExampleSystem
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry bcba6594e4 aspec+access: ADT_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry f75f26ff0d aspec+access: Syscall_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry c36d6e367d access: DomainSepInv arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry 9d543d29c1 access: Ipc_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry 0026b0dd34 access: Tcb_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry 79799754f0 access: Interrupt_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry 2f6bdeb14e access: Finalise_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry 6f2f9774f1 access: Arch_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry 0f611fa0a4 access: Retype_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00