Commit Graph

5400 Commits

Author SHA1 Message Date
Gerwin Klein 20b09e19a2 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 09:40:09 +00:00
Gerwin Klein f6702ed92b 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 09:40:09 +00:00
Michael McInerney cd22fc388f clib: improve ccorres_While
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 09:40:09 +00:00
Michael McInerney 8549a7fbc2 clib+crefine: improve and consolidate variants of ccorres_to_vcg
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 09:40:08 +00:00
Michael McInerney 81eaa5c7f0 clib: add some rules for hoarep
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2024-01-22 09:40:08 +00:00
Michael McInerney 5992b66f87 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 09:40:08 +00:00
Corey Lewis c99f9bf400 lib/monads: remove more uses of _tac methods
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2024-01-22 09:40:08 +00:00
Gerwin Klein 197b7980f8 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 09:40:08 +00:00
Gerwin Klein 42767c69bf 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 09:40:08 +00:00
Rafal Kolanski e67513b920 run_tests: enable CBaseRefine for AARCH64
Switch exclusion to CRefine.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-01-22 09:40:08 +00:00
Rafal Kolanski febf5312f2 aarch64 cspec: add Kernel_C.thy to base CKernel image on
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-01-22 09:40:08 +00:00
Rafal Kolanski 0f4e5a5091 aarch64 asmrefine: copy ArchSetup from RISCV64
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-01-22 09:40:08 +00:00
Gerwin Klein 34ec0ba6b7 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 09:40:08 +00:00
Gerwin Klein ab92fb0de0 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 09:40:08 +00:00
Gerwin Klein 0f1e9fc3fe 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 09:40:08 +00:00
Gerwin Klein 902e75f5a2 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 09:40:08 +00:00
Gerwin Klein f4a47b97f2 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 09:40:08 +00:00
Gerwin Klein f8320364d1 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 09:40:08 +00:00
Gerwin Klein 5c021c3789 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 09:40:08 +00:00
Gerwin Klein ee07f0ccf3 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 09:40:08 +00:00
Achim D. Brucker 4551b58ddb Merge remote-tracking branch 'upstream/master' into autogenerated_parser 2023-10-07 17:12:44 +01: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
Gerwin Klein f88d2d4c83
clib: update to Isabelle2023 mapsto syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:31:27 +11:00
Gerwin Klein 26807f74d9
c-parser: adapt standalone parser to Isabelle2023
The code draws in table.ML from the Isabelle source, which changed
in the 2023 release. This commit adds further library functions from
Isabelle library.ML and extracts the parts of unsynchronized.ML that
work with mlton.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:31:27 +11:00
Gerwin Klein be44fad056
c-parser: update to Isabelle2023 maps-to syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:31:27 +11:00
Gerwin Klein 83fc513452
c-parser: sync Simpl from AFP for Isabelle2023
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:31:26 +11:00
Gerwin Klein 450234e062
aspec: mapsto syntax update for Isabelle2023
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:31:26 +11:00
Rafal Kolanski 286278d9e8 misc: goto-error jEdit macro: update for 2023
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-10-06 14:29:15 +11:00
Gerwin Klein eeae2af478 lib: Isabelle2023 update
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:29:15 +11:00
Gerwin Klein 3f66cb0005 lib/Eisbach_Tools: morphism type changed in Isabelle2023
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:29:15 +11:00
Gerwin Klein 6721c7a15e lib: sync Word_Lib with AFP
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-06 14:29:15 +11:00
Michael McInerney e7cca6ab03 lib: improve corres_underlying rules for whileLoop
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2023-10-06 09:52:41 +10:30
Michael McInerney 6680297141 lib/monads: add no_fail_ex_lift and no_fail_grab_asm
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2023-10-06 09:52:41 +10:30
Corey Lewis 34038fcdf0 lib/monads/nondet: remove uses of _tac methods
In particular, try to remove as many as possible _tac methods that refer
to system-generated variable names. Any remaining uses are explicitly
protected by a rename_tac.

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-10-05 22:08:38 +11:00
Corey Lewis 3333395cc3 lib/monads: improve style of nondet and trace
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-10-05 22:00:55 +11:00
Corey Lewis 293b97cb17 lib/monads/trace: prove more lemmas connecting valid and validI
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-10-05 11:32:21 +11:00
Corey Lewis 0aac7ac581 lib/monads/trace: update definitions and rules taken from nondet
This commit has all of the changes required so that the definitions and
rules added in the previous commit work for the trace monad.

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-10-05 11:32:21 +11:00
Corey Lewis d66ac95f44 lib/monads/trace: copy in definitions and rules from nondet
This fills out the trace monad rule set by copying in as many
definitions and rules as possible from the nondet monad. Most of these
do not immediately work for the trace monad, see the next commit for the
required changes.

Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-10-05 11:32:21 +11:00
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 df31523239 lib/monads: more cleanup and restyle in nondet monad
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2023-10-05 11:24:05 +11:00
Gerwin Klein 5497666b8b
aarch64 ainvs+refine: remove unused dom_ucast_eq
The old version of dom_ucast_eq in AInvs is not useful, because the
necessary constants are not available yet in AInvs.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-09-27 14:28:37 +10:00
Gerwin Klein dcf6ee4d55
aarch64 ainvs+refine: move lemmas from Refine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-09-27 14:28:36 +10:00
Gerwin Klein 0369a4bd91
lib+ainvs+aarch64 refine: move+consolidate vcg_op_lift lemmas
Collect all operator lifting lemmas in one place under
hoare_vcg_op_lift. (Moved from Refine)

Move the lifting lemmas that were still in AInvs up to lib.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-09-27 14:28:36 +10:00
Gerwin Klein de50741ec0
lib+aarch64 refine: move lemmas to lib
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-09-27 14:28:36 +10:00
Gerwin Klein a24ddbefad
aarch64 refine: move lemmas internally
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-09-27 14:28:36 +10:00