Commit Graph

2646 Commits

Author SHA1 Message Date
Rafal Kolanski b749a23b87 lib: add find_names command to find other names of a theorem
When given a theorem, find_names finds other names the theorem appears
under, via matching on the whole proposition. It will not identify
unnamed theorems.
2018-02-25 21:47:35 +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
Matthew Brecknell 3abbdd74a3 aspec: reintroduce spec document version information
Including version information in the spec document is tricky, because
Isabelle will rebuild the session whenever it sees that session inputs
(including document sources) have changed. Since ASpec is close to the
root of our session hierarchy, frequently changing version information
causes excessive rebuilds during development.

This commit avoids excessive rebuilding by building the document (with
version information) in a separate ASpecDoc session. The ASpecDoc
session is identical to the previous version of the ASpec session, but
is not the parent of any other sessions. The ASpec session is used as
the basis for other sessions, but has document-only inputs removed, and
also has document builds disabled.
2018-02-20 10:46:50 +11:00
Matthew Brecknell 6e74fa1ae3 arm/arm-hyp crefine: update proofs for new ccorres_rewrite 2018-02-18 13:05:41 +11:00
Matthew Brecknell 6ee106571a lib ccorres_rewrite: discard everything sequenced after a Throw
Also introduce simple conditional rewriting.
2018-02-18 12:39:16 +11:00
Matthew Brecknell 0b2cb85b8d aspec: remove ARCH and git-id from specification document
This partially reverts a recent change which adds these.

Unfortunately, including the ARCH and git-id files in the ROOT file
causes frequent rebuilds during development. For example, adding a
commit that changes only CRefine would cause a change in the git-id
file, which would in turn trigger a rebuild of ASpec and everything that
depends on it. Because the git-id file also noted uncommitted changes,
these would also trigger an ASpec rebuild. Similarly, switching to a
different L4V_ARCH would cause the ARCH file to change, also triggering
an ASpec rebuild.

Since Isabelle makes it difficult to include this information in the
document without adding these files to the ROOT file, this commit is
removing this information until we find a better way.
2018-02-17 10:44:36 +11:00
Joel Beeren 3d225cde69 VER-910: add msgLabelBits to haskell
message_info structs have 20 bit labels. On 32-bit systems, the label
does not need to be masked as there are no extra padding bits in the
struct, but this is not true for 64-bit systems. As a result, the
haskell needs to mask msgLabelBits (=20) when extracting the label in
messageInfoFromWord.
2018-02-07 10:36:59 +11:00
Thomas Sewell d2f38a0a80 lib: Add multi-crunch command 'crunches'.
It's just a parser tweak for crunch, and runs multiple crunch commands
with the same sections (wps, ignores, etc).

Also update the comments a little, and move them closer to the anchor of
command clicks (the @{command_keyword} antiquotation).
2018-02-02 10:26:15 +11:00
Thomas Sewell 5152952abb lib: Cleanup in crunch-cmd.ML
Mostly syntactic. Ensure less debug messages are generated
unconditionally.
2018-02-02 10:26:09 +11:00
Miki Tanaka 9fb7c5cf4d arm_hyp ainvs: fix a typo 2018-01-30 12:00:25 +11:00
Miki Tanaka 4efe5392f7 arm ainvs: fix a typo 2018-01-30 12:00:21 +11:00
Matthew Fernandez d675e253ba fix broken README links 2018-01-29 13:24:35 +11:00
Gerwin Klein d04547b124 link to all-version DOI in README.md 2018-01-29 09:58:43 +11:00
Gerwin Klein 07f4c60171 abstract pdf: indicate additional/dirty files in hash 2018-01-26 14:30:52 +11:00
Gerwin Klein 840e77edeb abstract pdf: update old NICTA URL to TS 2018-01-26 14:30:48 +11:00
Gerwin Klein 9f6d2c8d57 abstract pdf: update copyright 2018-01-26 14:30:44 +11:00
Gerwin Klein f310195e56 abstract pdf: update authors list 2018-01-26 14:30:38 +11:00
Gerwin Klein e6c65356a0 abstract pdf: generate VERSION, ARCH, git-id information for PDF 2018-01-26 14:30:38 +11:00
Rafal Kolanski 623f216d94 regression: meta-regression improvements for timeout_output
- timeout_output looks for isabelle relative to its file path
- run_tests looks for timeout_output relative to its file path
- output from timeout_output is utf8-decoded before attempting to
  concatenate with other strings

Meta-regression should now pass.
2018-01-23 13:27:48 +11:00
Thomas Sewell 77837d16ac Fix for python3 in run_tests.py.
We require run_tests.py to work with both python2 and python3, which requires
particular syntax for exception handling.
2018-01-23 11:48:11 +11:00
Matthew Brecknell eabbd86327 x64: remove references to x64KSCurrentCR3, following Meltdown mitigation
Changes to the C kernel to mitigate the Meltdown vulnerability have
removed x64KSCurrentCR3, and replaced it with other state. As a
temporary fix, this commit removes references to x64KSCurrentCR3 from
the C state relation to keep existing proofs working.

For x64 verification, this ultimately needs to be replaced with a
relation on the new state that has been added, and the specs updated
accordingly.
2018-01-22 16:28:33 +11:00
Thomas Sewell 18cf880573 run_tests: Create and fetch timing/timeout info. 2018-01-22 12:04:08 +11:00
Michael Sproul 995b88cefa SELFOUR-707: schedule highest priority thread on setPriority 2018-01-19 16:08:11 +11:00
Gerwin Klein 7c0e7970d6 x64 refine: proof update for ASIDMap removal 2018-01-11 18:48:37 +11:00
Gerwin Klein 147edba23e x64 haskell: remove unused x64KSASIDMap 2018-01-11 18:48:37 +11:00
Gerwin Klein 3bc1cb7f71 x64: update ainvs for asid_map removal 2018-01-11 18:48:37 +11:00
Gerwin Klein 1fbcf1d3ea x64 spec: remove unused x64_asid_map 2018-01-11 10:45:01 +11:00
Gerwin Klein 56206654eb arm-hyp spec: remove unused axiomatic constant irq_oracle_max_irqInst 2018-01-08 10:56:22 +11:00
Matthew Brecknell d108e3edee lib: a more intuitive definition of sign_extend for words
Also includes some supporting lemmas useful in bitfield proofs.
2017-12-21 21:41:01 +11:00
Matthew Brecknell edb30fa752 lib: faster simplification for common cases of word_and_max_word
In particular, this speeds up some bitfield proofs.
2017-12-21 21:41:01 +11:00
Matthew Brecknell a6d245b83f trivial lib: quote identifiers in text blocks for document builds 2017-12-21 16:19:23 +11:00
Thomas Sewell 00bc13d7ce Demo theory for strengthen. 2017-12-19 16:40:14 +11:00
Matthew Brecknell 2f540e802c add constant definitions for bounds on untyped object sizes 2017-12-18 12:58:27 +11:00
Matthew Brecknell a1b60083e8 x64 ainvs: add some lemmas about canonical addresses 2017-12-18 12:57:55 +11:00
Matthew Brecknell 09b793855b word-lib: add some lemmas about sign extension 2017-12-18 12:48:10 +11:00
Miki Tanaka dcca6d496f x64 ainvs/refine: simple_ko setter/getter 2017-12-14 18:03:41 +11:00
Miki Tanaka 6eb2cb74ad arm-hyp: simple_ko setter/getter 2017-12-14 18:03:31 +11:00
Miki Tanaka 2a1beffac1 arm: update for simple_ko getter/setter 2017-12-14 18:02:48 +11:00
Miki Tanaka b37bc04463 arm ainvs: wp rules for simple_ko setter/getter 2017-12-14 18:02:44 +11:00
Miki Tanaka c289bb60af abstract: simple kernel object getter/setter
- this commit introduces the name "simple kernel object (simple_ko)" for generic (non-arch) kernel objects that are not tcbs or cnodes. For the master l4v, endpoints and notifications are the simple kernel objects.
- simple kernel objects are simple, for instance in the sense that they don't have recursive structure and their validity is defined without using a pointer.
- he setter and getter for simple kernel objects are defined. These replace the specific getters/setters for endpoint and notification. Consequently, almost all wp rules for the two sets of getter/setter are also replaced by the ones for simple kernel object getter/setter.
2017-12-14 18:02:35 +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
Thomas Sewell d88c6e567b Upgrade strengthen for assumptions, methods.
The strengthen implementation can now do a bit more.

The new method strengthen_asm also adjusts assumptions.

The new method strengthen_meth takes a method as a parameter,
e.g. apply (strengthen_meth \<open> rule order.trans \<close>)
does the same thing as apply (strengthen order.trans)
with scope for other exciting applications I haven't thought of.
2017-12-13 17:40:06 +11:00
Joel Beeren af2b7c7792 VER-825: Change representation of SchedulerAction_ChooseNewThread from ~0 to 1
This change was a result of the constant "(tcb_t*)~0" being defined as
0x00000000FFFFFFFF on x86-64 (0 is implicitly a 32-bit integer) rather
than 0xFFFFFFFFFFFFFFFF as expected.
2017-12-13 12:13:36 +11:00
Joel Beeren ffc0640869 VER-853: put arch_check_irq into the Arch locale, and update x64 to match C 2017-12-13 12:13:36 +11:00
Joel Beeren 0c9d7269d4 x64: miscellaneous constant updates (VER-845, VER-852)
Updated syscallMessage register list, maxIRQ to match C code
2017-12-13 12:13:36 +11:00
Joel Beeren b01b341b3c x64: adjust definition of Arch.switchToIdleThread (VER-848) 2017-12-13 12:13:36 +11:00
Joel Beeren a5a5edc832 VER-849: abstractly declare a threads registers have changed
This removes an ifdef present in invokeTCB_(Copy|Write)Registers, and
adds the function Arch_postModifyRegisters which does nothing on any
arch except x86-64.
2017-12-13 12:13:36 +11:00
Matthew Brecknell d27f84767a lib: add methods for extracting conjuncts from the conclusion 2017-11-28 19:02:49 +11:00
Rafal Kolanski 2f28bfeaec x64: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Apply "invert-fastpath" changes to x64 (ainvs, refine, partial crefine).
See main commit for arm for more context.
2017-11-27 22:05:46 +11:00
Rafal Kolanski 7b36283c70 arm-hyp: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Apply "invert-fastpath" changes to arm-hyp (ainvs, refine, crefine).
See main commit for arm for more context.
2017-11-27 22:05:46 +11:00