Commit Graph

70 Commits

Author SHA1 Message Date
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
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 bce372b4fb ainvs: proof updates for new arch split functions
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-06-08 20:41:10 +08:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Victor Phan b9c285400d remove diminished (VER-1158)
diminished takes two caps and asserts that one is equal to the other
except that one may have fewer rights. We remove this definition and all
references to it, replacing diminished with equality.
2019-11-16 01:03:36 +11: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 3e5c0b7cf5 ainvs: provide real_cte assumption for arch decode functions 2019-07-31 16:55:32 +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 3f26cde16a arm ainvs: Update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +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
Thomas Sewell 26049db669 Repair proofs for wpsimp/crunch changes.
A handle of fiddly proofs change slightly. A common offender involves
tcb_cap_cases, which should be unfolded with the ran_tcb_cap_cases
rule where possible rather than with tcb_cap_cases_def.
2018-08-03 18:25:30 +10:00
Corey Lewis 2d0baab462 Proof update for crunch changes 2018-04-04 14:13:55 +10:00
Thomas Sewell 0f38e20094 Many proof repairs. 2018-03-16 14:57:51 +11: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
Rafal Kolanski 3a22487cf3 arm: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Colloquially known as "invert-fastpath".

Update verification efforts on ARM for the following seL4 changes:
- scheduling decisions done in possibleSwitchTo are moved to the
  scheduler
  - possibleSwitchTo only checks whether the candidate is valid for a
    fast switch, not its priority, accepting possible candidates
    immmediately as a switch-to scheduler action
  - the scheduler checks the candidate against the current thread and
    against the bitmaps before making a decision
  - attemptSwitchTo and switchIfRequiredTo are gone
  - scheduler is now more complicated, and numerous proofs related to it
    are rewritten from scratch
- fast path now checks ready queues via the scheduler bitmaps
- L2 scheduler bitmap order reversed for better cache locality

Many iterations between the kernel and verification teams were needed
to get this right.
2017-11-27 22:05:34 +11:00
Pang Luo 6b9912c47a manually adjust non-obvious cases of tab to space replacement 2017-10-20 14:22:36 +11:00
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
Matthew Brecknell 238e8b307e x64: merge master 2017-07-21 11:27:12 +10:00
Alejandro Gomez-Londono 5aefad5ccf arm-hyp ainvs: fix invariants for make_arch_fault_msg changes 2017-06-19 14:32:29 +10:00
Miki Tanaka 61dffdb6cc arm-hyp invariants: changes from rebase for ARM_HYP invariants 2017-06-19 14:32:20 +10:00
Joel Beeren 71e2db88a4 arm: refactor sanitise_register to take a bool instead of a kernel_object
This simplified the sanitise_register logic in CRefine for arm-hyp.
2017-05-03 21:51:57 +10:00
Matthew Brecknell 659088cc13 x64: merge master 2017-03-29 20:22:12 +11:00
Gerwin Klein 54fc3a840c ainvs: minor cleanup 2017-03-17 15:14:40 +11:00
Gerwin Klein 50cb719186 ainvs: fork slow proof 2017-03-14 13:16:14 +11:00
Gerwin Klein 4fc1f282be ainvs: stronger assumptions for handle_hypervisor_fault 2017-03-14 13:16:14 +11:00
Gerwin Klein db2d607786 ainvs: fork slow proof 2017-03-13 16:12:52 +11:00
Gerwin Klein eb880a9a23 ainvs: stronger assumptions for handle_hypervisor_fault 2017-03-13 16:12:52 +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
Joel Beeren a87049fde0 x64: Fixed Syscall_AI 2017-03-09 11:10:17 +11:00
Gerwin Klein 8a7d450f3a ainvs + refine: remove hv_inv_ex
The lemma was convenient, but is subsumed by others. It is not true on
ARM_HYP.
2017-03-02 10:26:10 +11:00
Miki Tanaka 14aa48bc76 invariant-abstract: updates for Hypervisor stub 2017-02-22 15:26:49 +11:00
Gerwin Klein 520921351a provide TCB argument for sanitiseRegister
Other platforms such as arm-hyp will need to look into additional TCB state
such as VCPU in sanitiseRegister. This commit provides the scaffolding for
that.
2017-02-12 12:54:42 +11:00
Joel Beeren 3dafec7d46 backport changes to ARM proofs from X64 work in progress
- replace ARM-specific constants and types with aliases which can be
  instantiated separately for each architecture.
- expand lib with lemmas used in X64 proofs.
- simplify some proofs.

Also-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2017-01-27 08:31:07 +11:00
Matthew Brecknell 979e341d0d x64: fix ARM build after merge 2017-01-18 18:46:43 +11:00
Matthew Brecknell 759a0387ab merge master into x64-split
Primarily concerns wp improvements
2017-01-18 07:49:48 +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 abf1db5b51 merge master into x64-split 2017-01-13 17:22:03 +11:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Matthew Brecknell 73a08160a1 merge master into x64-split 2016-11-30 12:08:32 +11:00
Alejandro Gomez-Londono e747996cc6 AInvs: Updating generic theories for tcb_arch reserved_irq and arch_fault
* Rephrasing of all the lemmas that used to refer to tcb_context as
  a direct value on tcb.

* Providing arch-specific lemmas about handle_arch_fault_reply and
  make_arch_fault_msg to deal with handle_fault_reply and make_fault_msg
  new arch-specific cases.

* Trivial but arch-specific proofs about reserved_irq

  tags: [VER-623][SELFOUR-413]
2016-11-25 13:05:55 +11:00
Thomas Sewell 63888fa98d SELFOUR-444: AInvs proven for preemptible retype. 2016-11-02 11:19:08 +11:00
Matthew Brecknell 256e241770 merge master into x64 2016-10-06 19:57:55 +11:00
Joel Beeren b352769016 SELFOUR-276: Prove refinement to Haskell for MCP
Also includes fixes to specs and invariants, and initial progress
towards C refinement.

A thread's maximum controlled priority (MCP) determines the maximum
thread priority or MCP it can assign to another thread (or itself).
2016-10-05 02:43:41 +11:00
Xin,Gao 113315d9a6 SELFOUR-421: merge and fix up to ArmConfidentiality proof 2016-09-22 19:21:56 +10:00
Joel Beeren 3c223b42fe SELFOUR-421: AInvs done, no added invariants yet 2016-09-22 19:11:29 +10:00
Matthew Brecknell 5880a317f2 x64 invariants: CSpace_AI checking
Includes some changes to the abstract spec:
- replace magic numbers with definitions.
- add missing IOPortCap cases to some definitions.

There is one sorry proof, which I think blast could solve if we
gave it enough time. Will need a more subtle approach.
2016-08-23 07:40:47 +10:00
Matthew Brecknell 138344f90a arch_split: invariants: split Syscall_AI [VER-571] 2016-07-12 16:50:32 +10:00
Matthew Brecknell 6b93e4bc81 arch_split: invariants: split BCorres2_AI [VER-577] 2016-07-12 16:50:32 +10:00