Commit Graph

5422 Commits

Author SHA1 Message Date
Michael McInerney 71255d25bf lib: add monadic_rewrite_guard_arg_cong
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney f03be1244c lib: strengthen no_ofail_gets_the
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney c840839ab7 lib: add some rules involving ex_abs_underlying, including corres_from_valid
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney 375b19261a lib: add corres_if_strong
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney 7493e71298 lib+refine: strengthen corres_assert_assume_l and move to Lib
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 3daad13f39 clib: suppress simp warnings in simpl_rewrite
This gets rid of the simplified warning for Collect_const that
ccorres_rewrite produces in many CRefine proofs.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein cddd42ae76 lib: provide warning suppression for Eisbach methods
Contexts have the "visible" flag that determine whether warnings such
as duplicate rewrite rules are shown or not. Make setting this flag to
false available in Eisbach methods.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 2b17160c2b github: add num_domains key to artifact upload
If we don't provide the additional name fragment, previous artifacts
would be overwritten, which leads to a failure with error message on
GitHub.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 28197a5b9e runtest: echo NUM_DOMAINS override
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein d2940797c4 github: add NUM_DOMAINS test matrix
This will now test with the following num_domains settings:

- PRs: default as in config file, no matrix
- push to master: with NUM_DOMAINS = 1 and default (= '')
- weekly test: with NUM_DOMAINS = 1, 7, and default

The default in the current config files is 16. 1 leads to structural
code changes is the setting most likely to break. 7 is for checking
that the proofs also work with a value that is not a power of 2.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 6cc6e1b52f cspec/c: provide NUM_DOMAINS build override option
Setting the environment variable INPUT_NUM_DOMAINS will cause the
build to override the KernelNumDomains setting in the config file with
the provided setting.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein e01e42943e github: docs for platform branch rebase workflow
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney 8f0b505826 clib: further improvements to ccorres_While
This adds information about the return relation to the C guards
and the C preconditions of the assumptions.

The C hoare triples for cond have also been consolidated, to
help simplify applications where the C guards are minimal.

A comment about its intended use is given.

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Rafal Kolanski 18640b8db6 arm-hyp crefine: update length to word_t for VCPU functions
Length argument for these functions was previously unsigned int, which
was fine for AArch32, but an implicit downcast on AArch64. Changing it
to word_t makes it unsigned long, thus requiring signature update in
ccorres proofs.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 289bf94e2c autocorres: bring CONTRIBUTORS file up to date
- remove defunct email addresses
- add myself as current maintainer

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein ee7c8101da autocorres: update release ROOT files and manifest
AutoCorres no longer depends on the Lib session. This means:

- remove Lib session ROOT parsing in release.py
- copy over ROOT files of new library sessions
- add new theory NatBitWise to manifest
- update release ROOTS and ROOT files

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein c2e964eb3c autocorres: format ChangeLog
- convert tabs to spaces
- add top-level heading
- underline headings more nicely

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 7bf0cbd8f2 autocorres: update change log for upcoming release
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein f1f1027125 c-parser: update change log for upcoming release
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein a881c04a37 autocorres: bump Isabelle version in docs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein fdaec17711 c-parser: bump Isabelle version in docs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein f2a0f7cfc9 c-parser: update mkrelease for changed lib sessions
- Basics and ML_Utils are their own sessions now; include their
  ROOT files
- remove separate obsolete lib/ROOT file

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 550feb18dd c-parser: clarify mkrelease command line
The script does not expect the tag (e.g. c-parser-1.20), but only the
version number in the tag.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 02928556ff c-parser: remove obsolete mkrelease checks
The @License tags are no longer used, and SPDX tags are checked in CI,
and name tags are no longer used in the sources either.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 65dabc2a0e cspec: adjust for kernel build change
PR seL4/seL4#1105 moves config generation back to configure time.
This means we can revert eaf735c38f.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney 4d19f6616f clib: improve ccorres_While
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney 5568eb56a1 clib+crefine: improve and consolidate variants of ccorres_to_vcg
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney 5b618c7fe4 clib: add some rules for hoarep
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Michael McInerney e122ad9d92 clib: improve ccorres_call_getter_setter
This generalises the rule ccorres_call_getter_setter by allowing the return
relation between the "getter" and the C function called to be arbitrary,
rather than just the identity relation.

A variant of this rule, ccorres_call_getter_setter_dc, is provided for
when we do not care about the return relation.

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Corey Lewis af3505401b lib/monads: remove more uses of _tac methods
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein ec1f38c8bc run_tests+proof: exclude SimplExportAndRefine for AARCH64
The SimplExportAndRefine session is only needed for binary verification
and is currently failing. There are no plans yet for binary
verification on AArch64, so the session will remain disabled for now.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 5a5e5e363d proof: switch AArch64 quick_and_dirty from Refine to CRefine
Refine for AArch64 is now completed and doesn't need quick_and_dirty
any more. CRefine is now in development mode.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Rafal Kolanski ab7fdfeebe run_tests: enable CBaseRefine for AARCH64
Switch exclusion to CRefine.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Rafal Kolanski 2f6771cb50 aarch64 cspec: add Kernel_C.thy to base CKernel image on
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Rafal Kolanski a22c624031 aarch64 asmrefine: copy ArchSetup from RISCV64
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein f089db3448 lib/monads: avoid clarsimp as initial Isar method
The AFP linter is stricter about this than we are, and it is definitely
bad style to start with "proof (clarsimp ..)"

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 5b5fb045d8 lib/monads: fix remaining document preparation issues
Fix document preparation issues in the theory files that have been
added to ROOT in the previous commit.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 1182415f0c lib/monads: add new Trace_* files to ROOT
As the AFP submission system correctly points out, these theory files
had not been included in any session yet.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein cd40ce33a3 lib/monads: coherent document structure
Now that we're producing a proof document, theory order and
chapter/section nesting matters more.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 9e06a820bf lib/monads: minor style + warning cleanup
K_def is now [simp], so doesn't need to be added explicitly any more.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein ab8b7d2e4d lib/monads: fix document preparation issues
Fix remaining unquoted underscore names and similar to make the LaTeX
document preparation pass.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein 35256907e9 lib/monads: add AFP document setup
Abstract and author list for upcoming AFP entry. Author list is
determined separate for each session (ML_Utils, Eisbach_Tools, Monads)
by lines added/removed over the repo history. Acknowledgements are from
the repo history.

The latter might be incomplete, because git has trouble following more
than a single file through renames, and these files were renamed a lot.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Gerwin Klein eb65c07d67 misc/scripts: remove Darwin cpp wrapper
This wrapper around Apple llvm-gcc has been obsolete and unused for a
few years now. Remove to avoid confusion.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 19:09:44 +00:00
Achim D. Brucker 3f12bcde49 If cpp_path is relative, make it relative to the current theory.
Signed-off-by: Achim D. Brucker <adbrucker@0x5f.org>
2024-01-22 19:09:33 +00:00
Gerwin Klein ad24d954aa word lib: fix broken style introduced from AFP
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:59:27 +11:00
Gerwin Klein 0d984f3fa3
camkes: update to Isabelle2023 mapsto syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:41:53 +11:00
Gerwin Klein 0f99a75300
autocorres: update to Isabelle2023
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:41:53 +11:00
Gerwin Klein 4c0b3dfe9d
capdDL-api: update to Isabelle2023 mapsto syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:41:53 +11:00
Gerwin Klein f7768ee90e
sep-capDL: update to Isabelle2023 mapsto syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:41:53 +11:00
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