Commit Graph

71 Commits

Author SHA1 Message Date
Gerwin Klein af6e0765c5 riscv aspec+ainvs: spec bugfix for arch_finalise_cap; finish ArchFinalise 2019-07-31 16:55:32 +10: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 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
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
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
Matthew Brecknell 4f68967bfc Isabelle2017: update AInvs for RC0
* word_eqI is no longer rule_format.

  * Updated Isabelle/ML Thm.join_proofs to Thm.consolidate.

  * Updated suffix_refl to suffix_order.order.refl.

  * Removed some lines of proofs, thanks to improved simplifier.
2017-10-30 12:23:26 +11: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 e839c9f2a4 arm-hyp invariants: rename live' (to avoid name-clashing with execspec invariants) 2017-06-19 14:32:23 +10:00
Miki Tanaka 88e2c5496e arm-hyp invariants: ArchCNodeInv_AI done 2017-06-19 14:32:22 +10:00
Miki Tanaka 317b2b3ff2 arm-hyp invariants: new liveness definition
* the definition of liveness is extended for tcb/vcpu reference
* proved liveness related properties for dissociate_vcpu_tcb, prepare_thread_delete, etc.
2017-06-19 14:32:22 +10:00
Miki Tanaka eb0ec4dcd0 arch_splitting, fixing sorries, some more invariants 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
Gerwin Klein 99c7dd8a04 cleanup: remove old wp_cleanup comments 2017-03-03 09:01:28 +11:00
Miki Tanaka bcabadbcaa update invariants for prepare_thread_delete 2017-02-20 09:23:55 +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
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 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 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 7784e80940 SELFOUR-421: fix refine 2016-09-22 19:11:36 +10:00
Joel Beeren 3c223b42fe SELFOUR-421: AInvs done, no added invariants yet 2016-09-22 19:11:29 +10:00
Matthew Brecknell 6ef4c2d60f arch_split: invariants: split InterruptAcc_AI [VER-606] 2016-07-09 11:04:22 +10:00
Alejandro Gomez-Londono 3d7660613a arch_split: Finalise_AI [VER-568] 2016-06-26 15:26:50 +10:00
Daniel Matichuk 9f62622532 arch_split: skeleton arch files for AInvs 2016-05-31 15:05:24 +10:00
Japheth Lim 26a7907c95 Merge pull request #43 in SEL4/l4v from ~JALIM/l4v:autocorres-seL4 to master
* commit 'ecbb860532b4c576fc4726a805802f16bcf5302c': (29 commits)
  autocorres-crefine: specialise corres_no_failI for compatibility with Refine
  Add license tags for autocorres-crefine files
  crefine: refactor AutoCorresTest a bit
  autocorres-crefine: remove local debugging imports
  Fix InfoFlowC to accommodate corres_underlying changes.
  Fix DRefine to accommodate corres_underlying changes.
  autocorres-crefine: experiment with manually translating a function (clzl).
  autocorres-crefine: experiment with translating bitfield_gen specs.
  autocorres-crefine: start a test case for function calls.
  autocorres-crefine: update example proofs to work with no_c_termination, which does not require proving termination for the C spec.
  autocorres: add user option "no_c_termination" for previous patch.
  Making termination proof optional for AutoCorres.
  WIP: autocorres: hacky proof of concept for incremental translation.
  autocorres: add some missing WordAbstract rules.
  autocorres-crefine: fix some comments in work theory.
  autocorres-crefine: prove modifies and (simple) terminates specs.
  autocorres-crefine: experiment with generating modifies proofs
  autocorres-crefine: run autocorres in kernel_all_substitute locale
  autocorres-crefine: update another corres_UL that snuck in before rebasing.
  autocorres-crefine: working ccorres for handleYield (modulo some white lies).
  ...
2016-05-19 01:19:58 +00:00
Gerwin Klein 322f1023f5 word_lib: adjust theory dependencies 2016-05-16 21:11:40 +10:00
Japheth Lim 0f0f731ab7 Merge branch 'master' of ssh://bitbucket.keg.ertos.in.nicta.com.au:7999/SEL4/l4v into autocorres-seL4
This is to prepare for merging back into master.

Conflicts:
	proof/crefine/Refine_C.thy
2016-05-11 15:08:22 +10:00
Daniel Matichuk 9ceed1eb12 arch_split: fix proofs after removing shadow and unqualify commands and adding fix for crunch. Checks up to DPolicy. 2016-05-04 15:14:41 +10:00
Daniel Matichuk 1d20b393c0 arch_split: replaced sublocale with global_naming 2016-04-27 14:32:38 +10:00
Matthew Brecknell 286c592a8e arch_split: invariants: checking up to Arch_AI 2016-04-17 16:59:54 +10:00
Matthew Brecknell 4e6369f86d arch_split: invariants: Finalise_AI checking 2016-04-15 15:11:32 +10:00
Matthew Brecknell d683425e0d arch_split: invariants: fixup CSpaceInv_AI, working on Finalise_AI 2016-04-14 19:01:20 +10:00
Daniel Matichuk 04362dba27 arch_split: some quick and dirty arch_splitting by selectively interpreting the ARM locale (with FIXMEs) 2016-04-07 17:05:14 +10:00
Japheth Lim bb83b53b15 Merge branch 'master' into autocorres-seL4
This updates autocorres-seL4 to Isabelle2016.

Conflicts:
	proof/crefine/Refine_C.thy
2016-03-29 14:07:54 +11:00
Matthew Brecknell 84d2889d45 Isabelle2016: merge master into 2016 2016-02-19 16:17:26 +11:00
Gao Xin 50fa257113 rebase and fix problems caused by new machine constants 2016-02-17 11:18:02 +11:00
Matthew Brecknell c65e290a8b Isabelle2016: merge master into 2016 2016-02-16 12:52:24 +11:00