Commit Graph

77 Commits

Author SHA1 Message Date
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
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
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 a45adef66a all: remove theory import path references
In Isabelle2020, when isabelle jedit is started without a session
context, e.g. `isabelle jedit -l ASpec`, theory imports with path
references cause the isabelle process to hang.

Since sessions now declare directories, Isabelle can find those files
without path reference and we therefore remove all such path references
from import statements. With this, `jedit` and `build` should work with
and without explicit session context as before.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-02 10:16:17 +10:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Gerwin Klein 73e9503575 ainvs + infoflow: invocation label proof updates 2020-02-03 12:56:19 +08:00
Corey Lewis dd48e0d899 proof: update for wp changes
Updated 'wp_once' to 'wp (once)' and removed several stray uses of 'wp_trace'.
2019-10-14 17:12:18 +11:00
Gerwin Klein c34840d09b global: isabelle update_cartouches 2019-06-14 11:41:21 +10:00
Michael McInerney 4463e9750e SELFOUR-1198: update proofs for correct restart PC
Fixes a case where a thread can go from Running->Inactive->Restart and
use a restart PC that is out of date. An out of date restart PC occurs
when a thread was transitioned to running after being in a blocked
state, but was never scheduled and so did not execute the traps code
that updates the restart PC.

This also renames relevant register names for consistency across
architectures (FaultIP and NextIP).
2019-06-13 11:43:50 +10:00
Victor Phan c9094ccbb3 ainvs: update for new definition of set_object
Added set_object_wp_strong, which infers from a given hoare triple with
command set_object that the object of same type already exists in the
heap, and hoare_set_object_weaken_pre which does the same thing, but can
be applied on top of existing lemmas about set_object.

ainvs: improve proof of set_thread_state_runnable_valid_blocked

ainvs: change return value to a more general one

in_set_object has a return value that is empty '()', but the theorem
still holds true when replaced with a generic parameter 'rv' making it
easier to use this lemma.

ainvs: trivial - updated style of proof

ainvs: strengthen set_object_idle lemma

Add conditions imposed by valid_idle into precondition.
Thank you to Matt Brecknell for the help.

ainvs: abbreviated Hoare triples and proof fix

ainvs: restated set_object_wp_strong with auxiliary lemmas

ainvs: update for new definition of set_object

ainvs: update for new definition of set_object

Move in a few set_object and set_aobject theorems from x64 theory files
as these theorems were architecture generic.

ainvs: update for new definition of set_object

ainvs: update for new definition of set_object
2019-04-18 14:32:08 +10:00
Thibaut Perami d3548a5720 arm ainvs: Cleanup 2018-12-10 20:01:37 +11:00
Thibaut Perami 3f26cde16a arm ainvs: Update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Gerwin Klein 15bfcdd98b reduce DRefine dependencies from Refine to AInvs
This needs (and includes) some deduplication and moving of lemmas formerly in
refine.
2018-10-22 13:21:11 +11:00
Gerwin Klein 6b9d9d24dd Isabelle2018: new "op x" syntax; now is "(x)"
(result of "isabelle update_op -m <dir>")
2018-08-20 09:06:35 +10:00
Gerwin Klein 011e08458e Isabelle2018: new comment syntax
(result of "isabelle update_comments <dirs>")
2018-08-20 09:06:35 +10:00
Joel Beeren f728dd25e8 x64: Add IOPortControlCaps to control IO port allocation
The previous implementation of IOPortCaps has problems with revocability
and determining parency etc. This commit adds IOPortControlCaps which
behave identically to IRQControlCaps -- invoking the IOPortControlCap
allows one to create IOPortCaps with the supplied range.

There now exist invariants to show that there is only one
IOPortControlCap and that all IOPortCaps in the system do not overlap.
Furthermore there is a global record of which IO ports have been
allocated to prevent reissuing the same ports.
2018-04-19 05:27:06 +10:00
Corey Lewis 2d0baab462 Proof update for crunch changes 2018-04-04 14:13:55 +10:00
Thomas Sewell 652cbb966e Initial proof updates for combinator changes. 2018-03-16 14:53:22 +11:00
Joel Beeren 4601f2a1ab Genericise deletion actions that occur after empty_slot
This patch adds a generic "post_cap_deletion" step that is called by
finalise_slot. Previous to this, the only caps which had actions
required at this stage were IRQHandlerCaps -- it was required that the
IRQ bitmap be updated after the cap itself was removed (as the
invariants state that for any existing IRQHandlerCap, the corresponding
bit in the IRQ bitmap must be set).

By genericising this, we add the capacity for new, arch-specific post
cap deletion actions to occur in the future.
2018-02-23 09:12:55 +11:00
Miki Tanaka b37bc04463 arm ainvs: wp rules for simple_ko setter/getter 2017-12-14 18:02:44 +11:00
Miki Tanaka 3841b6e8ba arm : add AEndpoint and ANTFN a_type simplification
in addition to the a_type ATCB simplification, the following two are now in the simpset:
  "a_type (Endpoint x) = AEndpoint"
  "a_type (Notification v) = ANTFN"
2017-12-14 07:17:27 +11:00
Miki Tanaka 6d8e917087 Remove valid_arch_objs
now that we have valid_vspace_objs to express validiy of
vspace objects, we do not need valid_arch_objs: we have
valid_objs to state the validity of non-vspace arch objects.
2017-08-17 22:44:23 +10:00
Matthew Brecknell 2f70a304da ainvs: integrate all architectures 2017-08-09 16:57:39 +10:00
Matthew Brecknell 238e8b307e x64: merge master 2017-07-21 11:27:12 +10:00
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10:00
Miki Tanaka 5e4df460e2 ainvs: adjust generic theories for ARM fix 2017-06-19 14:32:43 +10:00
Miki Tanaka 88e2c5496e arm-hyp invariants: ArchCNodeInv_AI done 2017-06-19 14:32:22 +10:00
Miki Tanaka c80cffc456 arm-hyp invariants: more fixes for crunches and sorries
* passes quick_and_dirty test but needs a bit more work
2017-06-19 14:32:21 +10:00
Miki Tanaka eb0ec4dcd0 arch_splitting, fixing sorries, some more invariants 2017-06-19 14:32:21 +10:00
Miki Tanaka 5cabf38229 arm-hyp invariants: fix arch_splitting/locales
* tcb_arch_ref: definition and invariants (to access obj_refs in tcb_arch in generic contexts)
* fixes related hyp_refs
2017-06-19 14:32:21 +10:00
Miki Tanaka c1c30691d1 arm-hyp invariants: incremental progress (sorrying, fixing crunches/alignments, etc.)
* sorry perform_vcpu_invocation invariant statements
* fix pg_entry_align and related statements
* some crunches in ArchFinalise_AI
2017-06-19 14:32:21 +10:00
Miki Tanaka 61dffdb6cc arm-hyp invariants: changes from rebase for ARM_HYP invariants 2017-06-19 14:32:20 +10:00
Miki Tanaka 1d4b6e934b arm-hyp invariants: updates for vcpu, alignments, valid_vspace_obj, wellformed_arch_obj, etc. 2017-06-19 14:32:20 +10:00
Matthew Brecknell bb92e92f52 arch_split x64 arm: make cte_level_bits an arch constant 2017-03-27 19:07:28 +11:00
Joel Beeren 95d1671940 Merge remote-tracking branch 'verification/master' into x64-split
Conflicts:
	lib/LemmaBucket.thy
	lib/NonDetMonadLemmaBucket.thy
	lib/Word_Lib/Word_Lemmas.thy
	lib/X64/WordSetup.thy
	proof/invariant-abstract/ARM/ArchDetype_AI.thy
	proof/invariant-abstract/ARM/ArchInvariants_AI.thy
	proof/invariant-abstract/BCorres_AI.thy
	proof/invariant-abstract/CSpace_AI.thy
	proof/invariant-abstract/DetSchedSchedule_AI.thy
	proof/invariant-abstract/Interrupt_AI.thy
	proof/invariant-abstract/IpcCancel_AI.thy
	proof/invariant-abstract/Syscall_AI.thy
	proof/invariant-abstract/Untyped_AI.thy
	proof/refine/ARM/Include.thy
	spec/abstract/ARM/ArchTcb_A.thy
	spec/abstract/CSpace_A.thy
	spec/abstract/Tcb_A.thy
	spec/design/ARM/ArchIntermediate_H.thy
	spec/design/X64/ArchInterruptDecls_H.thy
	spec/haskell/Makefile
	spec/machine/MachineExports.thy
	tools/c-parser/.gitignore
	tools/c-parser/standalone-parser/Makefile
	tools/c-parser/testfiles/ARM/imports/MachineWords.thy
	tools/c-parser/testfiles/X64/imports/MachineWords.thy
	tools/haskell-translator/caseconvs
2017-03-10 19:35:39 +11:00
Gerwin Klein 941d383594 ainvs: allow valid_arch_state to depend on arch objs 2017-03-03 13:51:35 +11:00
Miki Tanaka bcabadbcaa update invariants for prepare_thread_delete 2017-02-20 09:23:55 +11:00
Joel Beeren 6723b58cb7 x64: CnodeInv_AI, ArchCNodeInv_AI now process 2017-02-15 14:11:32 +11:00
Gerwin Klein 47119bf43e wp_cleanup: update proofs for new wp behaviour
The things that usually go wrong:
  - wp fall through: add +, e.g.
      apply (wp select_wp) -> apply (wp select_wp)+

  - precondition: you can remove most hoare_pre, but wpc still needs it, and
    sometimes the wp instance relies on being able to fit a rule to the
    current non-schematic precondition. In that case, use "including no_pre"
    to switch off the automatic hoare_pre application.

  - very rarely there is a schematic postcondition that interferes with the
    new trivial cleanup rules, because the rest of the script assumes some
    specific state afterwards (shouldn't happen in a reasonable proof, but
    not all proofs are reasonable..). In that case, (wp_once ...)+ should
    emulate the old behaviour precisely.
2017-01-13 14:04:15 +01:00
Matthew Brecknell 08d8a8f2fa Isabelle2016-1: replace 'unfolded' attr with 'simplified' where the former now loops 2017-01-05 14:27:04 +11:00
Matthew Brecknell 511c6b2d3a Isabelle2016-1: rename free variables to avoid capture 2017-01-05 14:24:36 +11:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Joel Beeren 2553371a14 SELFOUR-64: Remove general Recycle operation
This removes the RecycleCap CNodeInvocation, whilst
retaining recycle behaviour for Endpoints -- now renamed
CNodeCancelBadgedSends.
2016-11-18 14:11:12 +11:00
Thomas Sewell 63888fa98d SELFOUR-444: AInvs proven for preemptible retype. 2016-11-02 11:19:08 +11:00
Xin,Gao 8d4a8eb238 SELFOUR-421: fix coding style 2016-09-22 19:23:28 +10:00
Xin,Gao 8f3a4dee31 SELFOUR-421: merge with master, fix wholesystem proofs 2016-09-22 19:23:19 +10:00
Xin,Gao 113315d9a6 SELFOUR-421: merge and fix up to ArmConfidentiality proof 2016-09-22 19:21:56 +10:00
Xin,Gao 252ce8df4c SELFOUR-421: infoflow and infoflow_c builds 2016-09-22 19:11:37 +10:00
Xin,Gao 328846ee1a SELFOUR-421: crefine builds 2016-09-22 19:11:37 +10:00
Xin,Gao c3be923ca0 SELFOUR-421: a defend version before wild changes 2016-09-22 19:11:36 +10:00