Commit Graph

4350 Commits

Author SHA1 Message Date
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
Ryan Barry 4429a6bda4 access: CNode_AC arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry 9863065915 aspec+access: Access arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry ea73ffe26b proof/ROOT: access control arch split
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +10:00
Ryan Barry a9c757ceb2 access: replace magic numbers
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-06-21 20:10:32 +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
Mitchell Buckley e617e179fb lib: Standard 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
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
Mitchell Buckley ca9b20e65b misc: Add search-replace.sh and README.md
search-replace.sh is a very simple script which takes a list of text
replacements and applies those replacements in all files in the current
directory. The README file contains more detailed information.

Signed-off-by: Mitchell Buckley <mitchell.alan.buckley@gmail.com>
2021-06-21 10:30:04 +10:00
Gerwin Klein 59973b553d docs: hook in new Haskell assertions doc
Signed-Off-By: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-06-07 15:01:35 +10:00
Zoltan A. Kocsis ec016bba3f
Import documentation: Haskell assertions (#285)
* Import documentation: Haskell assertions

We import some documentation regarding the role of assertions in Haskell, and how we use assertions in Haskell to transport information from abstract invariants to Haskell-to-C refinement proofs.

The file is a Markdown-ified version of previous documentation hosted at UNSW and Data61.

Co-authored-by: Zoltan A. Kocsis <zoltan.kocsis@data61.csiro.au>
Co-authored-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
Signed-off-by: Zoltan A. Kocsis <zoltan.kocsis@data61.csiro.au>
2021-06-03 08:24:56 +10:00
Matthew Brecknell 73649d2ce4 arm crefine: fix `decodeARMMMUInvocation` branch hint
A previous update to C code added a disjunct to an `if` condition
outside the existing `unlikely` branch hint. This commit is the proof
update for a C patch that extends the branch hint to the full `if`
condition.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2021-05-20 11:52:45 +10:00
Gerwin Klein e9c7c48ed4 setup docs: markdown lint and slight tweaks
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-05-17 13:01:51 +10:00
Mitchell Buckley 51ac27ad10 Some improvement to rec_del_termination
* Add comments into proof.
* Unwind some automation to clarify how each subgoal is resolved.
* Remove some "in monad" lemmas about `premption_point`.

Signed-off-by: Mitchell Buckley <Mitchell.Buckley@data61.csiro.au>
2021-05-13 09:52:43 +10:00
Gerwin Klein c0fe17e785 Remove remaining tab characters in .thy files
Closes VER-748

Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-04-21 13:30:13 +10:00
Gerwin Klein fb150e8a7c add proog-eng plans to contents
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-04-13 16:27:42 +10:00
Gerwin Klein a250628cc5 make Jira links nicer
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-04-13 16:27:42 +10:00
Gerwin Klein fcceb13a9e Add list of proof engineering ideas
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-04-13 16:27:42 +10:00
Gerwin Klein 2a89db327c provide a table of contents
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-04-13 10:41:28 +10:00
Gerwin Klein 400c7b7131 Japheth's guide to find_consts
Co-authored-by: Japheth Lim <Japheth.Lim@data61.csiro.au>
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-04-13 10:41:28 +10:00
Gerwin Klein f00bf67a5a Japheth's guide to find_theorems
Co-authored-by: Japheth Lim <Japheth.Lim@data61.csiro.au>
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-04-13 10:41:28 +10:00