Commit Graph

5400 Commits

Author SHA1 Message Date
Gerwin Klein 238acb46bb
lib+tools: MLUtils -> ML_Utils for consistency
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-20 13:43:39 +11:00
Gerwin Klein 9092a0f115
c-parser+autocorres: use ML_Utils session
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-20 13:43:39 +11:00
Gerwin Klein d86d577657
lib: make ML_Utils a separate session
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-20 13:43:39 +11:00
Gerwin Klein f0f19375f7
lib: rename ml-helpers to ML_Utils
In preparation for making it its own separate session.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-20 11:26:48 +11:00
Gerwin Klein 2e608b5a5c
crefine+capDL: proof updates for theLeft/theRight
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:41:11 +11:00
Gerwin Klein 7424005a66
lib: make theLeft/theRight/isLeft/isRight abbreviations
Since the creation of these constants the sum type has been updated to
come with its own discriminators and selectors. We use these, but keep
our longer names as abbreviations.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:41:11 +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 79eccd3c10
lib+spec+proofs: proof fixes for NonDetMonadLemmaBucket split
Very minor changes, but in many modules.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:01:34 +11:00
Gerwin Klein fc5af7e402
lib: rename More_Monad to Monad_Lists and fix style
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:01:25 +11:00
Gerwin Klein d86acc885a
lib: move wp lemmas for mapM et al into More_Monad
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:01:13 +11:00
Gerwin Klein d275068826
lib: move empty_fail lemmas up into NonDetMonadVCG
This enables a few more moves of remaining lemmas in
NonDetMonadLemmaBucket into the theories they belong thematically.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:01:12 +11:00
Gerwin Klein f19364a38b
lib: split NonDetMonadLemmaBucket into multiple theories
- organizes the material
- enables more concurrency
- allows us to pick and choose which parts to import

Currently NonDetMonadLemmaBucket still imports Lib to keep the overall
exports from this theory unchanged, but none of the factored-out
theories depend on Lib.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:01:12 +11:00
Gerwin Klein de9cb04a11
lib: factor out monad dependencies
Factors out definitions and lemmas that are used in monads from Lib.thy
into a separate theory Monad_Lib, which itself does not have further
dependencies.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-19 17:00:14 +11:00
Michael McInerney 619e941631 c-parser+crefine+clib: move is_aligned_c_guard to c-parser session
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2023-01-12 11:48:59 +10:30
Michael McInerney 640d352148 c-parser+crefine: move h_t_array_valid_field to c-parser session
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2023-01-11 14:39:57 +10:30
Gerwin Klein 5305090cdc
autocorres: fix AutoCorresDoc ROOT
Fix missing quotes. It looks like this ROOT file worked with `isabelle
build` before, but it did not work interactively.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-09 14:54:11 +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
Gerwin Klein 369a926e4d
lib: factor out and generalise bool syntax for functions
pred_conj, pred_disj, and pred_neg only worked for functions with a
single argument and did not have the standard boolean laws available.

This commit factors out these declarations into their own theory, so
they can be used independently. It generalises them to functions of
arbitrarily many arguments, using the existing instance of fun in class
boolean_algebra.

We also factor out top/bottom, but leave them as abbreviations for now,
because the impact of changing them to the type class is too large.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-09 14:54:06 +11:00
Gerwin Klein 6e11c9d000 github: replace obsolete access token
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-09 11:27:42 +11:00
Gerwin Klein 5ff1ac1346 c-parser: fix default target for standalone parser
The default (=first) Makefile target for the standalone parser was
`all`, which gains additional dependencies in the included Makefile.
We want `make` in this directory to just build the standalone parser,
so we set `stp_all` as the default.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-30 10:27:59 +11:00
Gerwin Klein 477a7c1016 github: bump github action dependencies
Upgrade to node16 actions to reduce warnings on CI.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-11 14:22:37 +11:00
Michael McInerney 03426eada0 lib: add hoare_from_abs rule
This also moves ex_abs_underlying from Corres_Method.thy to
ExtraCorres.thy and adds a variant of corres_underlying_split

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2022-11-10 16:09:13 +11:00
Michael McInerney 9b33cfad36 update copyright
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2022-11-09 15:52:50 +11:00
Corey Lewis db6b3b839e isabelle2022 crefine: update CRefine for all architectures
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Corey Lewis 4d46308d9e isabelle2022 cspec: update mk_umm_types.py
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Corey Lewis 5cd111a61e isabelle2022 autocorres: update Autocorres
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Corey Lewis 7e44994a55 isabelle2022 lib: update Concurrency
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Corey Lewis 821f9ed0c7 isabelle2022 c-parser: update CParser
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Corey Lewis c6b137dfba isabelle2022 lib: update Lib
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Gerwin Klein e101f37cfc isabelle2022: import Word_Lib AFP changes
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Gerwin Klein 9ef097e85f aarch64 ainvs/cleanup: prefer invariant syntax
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein 05838c4855 aarch64 ainvs: progress in ArchFinalise_AI
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein 46adec77fd aarch64 ainvs: ArchIpc_AI sorry-free
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein 52fcfa5f06 aarch64 ainvs: ArchTcb_AI sorry-free
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein ba8f8a6be3 aarch64 ainvs: ArchVSpaceEntries_AI sorry-free
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein 3f4f36e05a aarch64 ainvs: ArchEmptyFail_AI sorry-free
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein 009fa075d5 aarch64 ainvs: ArchInterrupt_AI sorry-free
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein 74c525ffcc aarch64 ainvs: asid_map sorries in ArchFinalise
Close some of the more hairy asid_map-related sorries in
ArchFinalise_AI.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Gerwin Klein 1f8eff2fa9 aarch64 spec+haskell: atomic write in delete_asid
At the point we call set_asid_pool, the pool we are writing is out
of date, because invalidate_asid_entry will have changed it. This
commit adds another read operation after invalidate_asid_entry to
perform a write that is similarly atomic as the corresponding C code.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 29a997e0fe riscv64+aarch64 ainvs: remove two unused lemmas
set_asid_pool_empty and delete_asid_empty_table_pt aren't used on
RISCV64 (despite being proved and declared [wp]). Hopefully these won't
be needed on AARCH64.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 5040547836 aarch64 ainvs: progress on ArchFinalise_AI
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 8544186298 aarch64 ainvs: ArchSchedule_AI and ArchUntyped_AI sorry-free
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 2c8ccb8c81 aarch64 aspec: update arch_is_frame_type
Did not take into account VCPUs previously.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 013c4442de aarch64 ainvs: ArchDetype_AI sorry-free
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski da9939a3be ainvs: add valid_obj_arch_valid_obj
On HYP platforms with projections it's sometimes useful to be able to
grab the `arch_valid_obj` formulation for specific arch types like page
tables before the simplifier breaks them apart for you.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 6b4f875e9e ainvs: LevityCatch: add ranD
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 828a410137 aarch64 ainvs: ArchRetype_AI sorry-free
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 9dfc4c9c5b ainvs: assume invs for valid_vspace_objs in locale
For AARCH64 showing that valid_vspace_objs is preserved over a retype
operation via the retype_region_proofs_invs locale, it is not sufficient
to only know valid_vspace_objs. Since this locale already assumes invs,
use invs, which implies the other requirements for AARCH64.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-09 08:26:44 +11:00
Rafal Kolanski 2909c56924 arm+arm-hyp crefine: indent pass over Fastpath_Equiv
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-02 05:05:44 +11:00
Rafal Kolanski 536eec39e4 proof: update copyrights for monadic_rewrite improvements
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-11-02 05:05:44 +11:00