Commit Graph

61 Commits

Author SHA1 Message Date
Matthew Brecknell 0102ef172a Isabelle2017: remove String_Compare
This was a workaround for an Isabelle2016-1 performace regression, and
is no longer required.
2017-10-30 12:23:26 +11:00
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10: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 db13ff19bb Isabelle2016-1: configure c-parser with faster string comparisons 2017-01-05 14:27:44 +11:00
Matthew Brecknell 39c144aec7 Isabelle2016-1: increase timeouts for sessions that have slowed down 2017-01-05 14:27:38 +11:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Matthew Brecknell 0b039a0735 Isabelle2016-1: syntax: use semantic markup instead of "header" 2017-01-05 14:22:24 +11:00
Thomas Sewell cc4b4102b7 Add a facility for ignoring complex asm.
To restore some previous functionality, add a mechanism by which an __asm__
statement too complex to be translated can still be ignored (handled as an
empty statement). A demo file does this for a wrapper around "nop".

Also use this facility to support legacy camkes-glue proofs which assume
that the software interrupt operator "swi" doesn't break anything.
2016-12-01 17:08:00 +11:00
Xin,Gao 8f3a4dee31 SELFOUR-421: merge with master, fix wholesystem proofs 2016-09-22 19:23:19 +10:00
Matthew Brecknell c2fa704d9b add workaround for building documents with TeX Live 2016 [VER-622]
Isabelle LaTeX style files use old font commands \bf, \rm, \tt, etc.
However, newer versions of some LaTeX document classes (e.g. scrbook)
have removed support for these commands. This brings back those
commands for documents built with isabelle.sty.
2016-07-22 07:48:08 +10:00
Alejandro Gomez-Londono 93adccc141 license-tool: missing license headers + .licenseignore [VER-551] 2016-07-14 16:34:31 +10:00
Gerwin Klein 322f1023f5 word_lib: adjust theory dependencies 2016-05-16 21:11:40 +10:00
Japheth Lim 5772559915 regression: bump timeouts further. All timeouts now multiples of 1hr. 2016-02-22 17:38:35 +11:00
Matthew Brecknell c65e290a8b Isabelle2016: merge master into 2016 2016-02-16 12:52:24 +11:00
Miki Tanaka 386e33bbbd CamkesCdlRefine finished ... 2016-02-11 11:15:59 +11:00
Japheth Lim 253b04f6d9 regression: use CPU instead of real-time timeouts for all tests.
Also update and clarify test spec documentation.
2016-02-01 19:51:13 +11:00
Japheth Lim 194b2db850 regression: fix another tests.xml dependency. 2016-01-07 18:39:50 +11:00
Joel Beeren 457a55a831 add arch_tcb object to C, rename aep -> ntfn 2015-11-20 16:02:13 +11:00
Matthew Fernandez 814275e104 camkes: Merge some updates to the arch model. 2015-10-16 14:59:37 +11:00
Matthew Fernandez b780e57759 camkes: Shuffle some helper lemmas around; labels as strings.
Moves some unnecessary stuff out of the locale and now specifies the label type
as `string` rather than a locale parameter. The purpose of the latter is to
allow us to talk about concrete labels rather than continually falling back on
the user's projection, but it's not clear yet whether this is a big win.
2015-07-27 16:09:59 +10:00
Matthew Fernandez 232ecb183f camkes: Rename `generate` to `state_of`.
This makes more sense for upcoming changes where we generate a policy as well.
2015-07-27 16:09:06 +10:00
Matthew Fernandez 9b13489a1f camkes: Update control TCB naming scheme.
This commit corresponds to CAmkES changes to disambiguate the name of a TCB for
a control thread.

See also camkes-tool/master@PR#113 on GINCA
2015-07-27 16:04:15 +10:00
Matthew Fernandez 0e19da32f4 camkes: Remove Grant from IPC buffer caps.
This makes no difference in the implementation, but is conceptually cleaner.

See also camkes-tool/master@c4e81e6116
2015-07-27 16:01:44 +10:00
Matthew Fernandez 422b1ee5ec camkes: Also depend on DPolicy in CamkesCdlBase. 2015-07-27 15:59:42 +10:00
Matthew Fernandez f84a427591 camkes: Remove empty TCB cap slots.
These were phrased as slots containing NULL caps, but the translation of CapDL
specifications into Isabelle actually just restricts the domain of the
underlying capability map. This is much cleaner and we now have exact
equivalence.
2015-06-11 15:01:45 +10:00
Matthew Fernandez b49a072fea camkes: Fix cap rights on endpoints of the seL4RPC connector.
This connection actually uses read/write caps on both sides because it is
implemented using Send and Wait. It may be worthwhile modelling seL4RPCCall
(which is implemented using Call and ReplyWait) as well. This would be a
trivial extension.
2015-06-11 15:00:19 +10:00
Matthew Fernandez b91d873d7d camkes: Skip the NULL slot when calculating CSlot offsets.
CAmkES deliberately skips over CSlot 0 when allocating caps to allow typos and
misallocations to be more easily detected. This commit captures this logic in
the generator function.
2015-06-11 14:59:04 +10:00
Matthew Fernandez a55d61cb42 camkes: Implement the actual CNode size calculation of the implementation.
Previously, the CapDL-generating function assumed a CNode size of 12 bits for
each component instance, though this was known to be inaccurate. In the
implementation of CAmkES, the code generator calculates the minimum required
size of each CNode on the fly. This commit updates the formalised generator to
perform the same calculation. The calculation is currently written in terms of
the `LEAST` binder, which as it turns out is sometimes awkward to reason about.
It may be worthwhile rephrasing this in future.
2015-06-11 14:55:50 +10:00
Matthew Fernandez cabb3e8124 camkes: Remove `no_intent` for generated TCBs.
The CapDL translation tools produce threads with an undefined intent, rather
than no intent. This commit modifies the CAmkES generation to do the same to
ease the correspondence proof.
2015-06-05 14:50:24 +10:00
Matthew Fernandez fc9048afee camkes: Fix: IRQ CNodes appear as 0 bits, not 1 bit.
Presumably this is only the case for when there are no assigned interrupts in
the system. These theories will need some tweaking to support systems with
interrupts.
2015-06-04 15:57:22 +10:00
Matthew Fernandez 2a9c060daf camkes: Introduce IRQs as a second addendum to the base generated spec.
Current example systems do not involve hardware interrupts, but each interrupt
in such a system is represented in CapDL as an empty single-slot CNode. We need
to note their existence or the final correspondence proof becomes tricky. This
commit adds support for (assumed empty) IRQ CNodes and pushes this through the
existing proofs. The generated label mapping will need some associated updates
following this.
2015-06-02 18:22:12 +10:00
Matthew Fernandez 608cf211d2 camkes: Add WordLemmaBucket to the CamkesCdlBase session.
It occasionally comes in handy.
2015-06-02 18:21:24 +10:00
Matthew Fernandez 32163d73c3 camkes: Prove the only caps in a CAmkES system are to endpoints.
This is a relatively straightforward property, but shows that CAmkES systems
fall into a constrained class of seL4 systems that it is easier to reason
about. In particular a lack of caps to more dynamic objects like untypeds
guarantees a tighter seL4 worst case execution time and an absence of many
possible dynamic behaviours.

We prove this property across all CapDL specifications produced by the high-
level generator, rather than on a concrete specification. In this way, we can
do the proof manually once and for all.
2015-05-30 15:14:08 +10:00
Gerwin Klein baa5a9c7e9 camkes: 2015 port of CamkesCdlRefine 2015-05-28 14:19:31 +10:00
Matthew Fernandez 075349ec40 camkes: Prove there are no address space objects in a low-level generated spec.
The low-level specification roughly maps to the code generator and template
instantiation phases of CAmkES. At this point no address space objects exist
(excepting slight infidelity with respect to page directories). The address
space objects are introduced in the "extra" objects that we append, which map
roughly to the ELF derivation and CapDL filters.

Separating the two collections of objects gives us some nice preserved
properties that can be shown over generation from an abstract input. In
particular, we can phrase some provable properties that are resilient against
things like changes in compiler optimisation levels and allocation strategies.
2015-05-27 17:13:07 +10:00
Matthew Fernandez 06e01e9e08 camkes: Add CamkesCdlRefine to regression tests. 2015-05-27 16:22:24 +10:00
Matthew Fernandez abb783acbd camkes: Add CAmkES↔CapDL beginnings.
These theories construct a locale with holes that are filled in by generated
code. Interpreting the locale manually is quite tedious and error prone, but we
entirely automate this process during code generation. For the details of this,
see the CAmkES 'architecture-semantics' and 'label-mapping' back ends.
2015-05-27 16:06:14 +10:00
Matthew Fernandez 69676bbae1 camkes: Add CamkesCdlBase session.
This session encompasses the theories relevant for reasoning about the
relationship between CAmkES and CapDL.
2015-05-27 15:57:18 +10:00
Matthew Fernandez b5b9248583 camkes: Update architectural model.
This brings the architectural model in line with the current implementation by
making the following adjustments:
 - Remove "trait" terminology and replace with "procedure." This was already
   done in the datatypes, but had not been updated in the accompanying text.
 - Remove both fixed size and NULL-terminated arrays and replace with the more
   recent arbitrary sized arrays. Neither of the former are supported, but can
   now be emulated if necessary.
 - Remove references to `RPCEvent` and `DirectCall` connectors. `RPCEvent` no
   longer exists and `DirectCall`, while still present, introduces complexities
   that are not adequately explained in the context of this document.
 - Remove legacy comments.
 - Various typo fixes.
2015-04-23 14:37:11 +10:00
Matthew Fernandez c80ae67666 camkes: Move libsel4 proofs to internal. 2014-11-11 11:24:15 +11:00
Matthew Fernandez 5d52e8b421 camkes: Move libsel4-related proofs to internal. 2014-11-04 09:12:25 +11:00
Matthew Fernandez 91a024bba3 camkes: Add WP lemmas for the remaining types_gen functions. 2014-10-28 16:09:44 +11:00
Matthew Fernandez 671a25f1d5 camkes: Add some generated proofs about generated bitfield code. 2014-10-28 12:08:41 +11:00
Matthew Fernandez 6387bcdb73 camkes: Update ROOT files to Isabelle 2014. 2014-10-21 11:37:55 +11:00
Matthew Fernandez 73d29ecfc3 camkes: Extend set_length proof to cover const of other fields of message info.
JIRA: VER-159
2014-10-06 16:41:48 +11:00
Matthew Fernandez ee489639c8 camkes: Setting length of a MessageInfo doesn't affect the label.
JIRA: VER-159
2014-10-06 15:28:16 +11:00
Matthew Fernandez b43511b5d8 camkes: Incorporate message info setter and getter.
JIRA: VER-159
2014-10-02 18:49:02 +10:00
Matthew Fernandez 9d07ec6a7f camkes: Another reordering lemma on SetMR.
Again, more of a sanity check as something that should be true.

JIRA: VER-159
2014-10-02 13:27:13 +10:00
Matthew Fernandez 7c16b05f88 camkes: WP lemma for seL4_MessageInfo_new.
JIRA: VER-159
2014-10-02 09:08:06 +10:00