Commit Graph

3902 Commits

Author SHA1 Message Date
Gerwin Klein 73e9503575 ainvs + infoflow: invocation label proof updates 2020-02-03 12:56:19 +08:00
Gerwin Klein f50985b448 abstract: use new invocation label enum 2020-02-03 12:56:19 +08:00
Gerwin Klein 700dab41aa design: generate new GenInvocationLabels type 2020-02-03 12:56:19 +08:00
Gerwin Klein 3a6ce53def haskell: remove invocationLabel triplication
We listed the invocation labels 3 times -- this commit removes the duplication
and instead derives the enum from the order the constructors are listed in.
2020-02-03 12:56:19 +08:00
Gerwin Klein 8356f303b6 haskell-translator: instance proofs for types without 0-arg constructors 2020-02-03 12:56:19 +08:00
Corey Lewis d21ea9da41 lib: reimplement crunch call stack feature so that it works when proofs fail.
This stopped working when crunch was changed to fork proofs.
2020-01-30 15:09:44 +11:00
Corey Lewis 5120e351b3 lib: improve wp tracing
When tracing wp can now print the instantiated version of the rules being used.
It also says which set each used rule is from.
2020-01-29 09:26:18 +11:00
Corey Lewis 7107f9abaf lib: implement instantiate_thm for Trace_Schematic_Insts
This is a function that instantiates a thm with the instantiations provided by
trace_schematic_insts.
2020-01-29 09:26:16 +11:00
Corey Lewis 9b9ae104fc lib: restructure the instantiations type of Trace_Schematic_Insts
This allows us to explicitly record the bound variables from the subgoal so that
they can be more easily handled. We also now drop binders when constructing typ
instantiations.
2020-01-29 09:26:15 +11:00
Edward Pierzchalski 68606b7c23 spec: refactor test dependencies.
Since test sets are recursive, we can clean up shared dependencies.
2020-01-22 15:13:53 +11:00
Edward Pierzchalski 2fec23d646 spec: factor out common `design-spec` task.
`ASpec`, `ExecSpec`, and `DSpec` were identical tests which built the
`design-spec` make target. This means that when `./run_tests` runs tests
concurrently, multiple instances of the `design-spec` make target were
also run concurrently.

We address the issue by making a new "test" called `design-spec` which
builds the `design-spec` make target, and making `{A,Exec,D}Spec`
dependees on `design-spec`.
2020-01-22 15:13:53 +11:00
Victor Phan ff6c0d8a0a Move vcpu_switch into Arch_switchToThread and update proofs
Currently the vcpu_switch function is called in the setVMRoot function
after possible early returns. In order to make sure the vcpu is
always switched, the call is moved into Arch_switchToThread before the
call to setVMRoot.
2020-01-20 16:53:32 +11:00
Edward Pierzchalski 050c192e0d asmrefine riscv: enable SimplExportAndRefine 2019-12-19 17:05:10 +11:00
Edward Pierzchalski 4a222d1189 asmrefine: add arch setup licenses 2019-12-19 17:05:10 +11:00
Edward Pierzchalski c1747628b1 asmrefine: Add support for 64-bit architectures. 2019-12-19 17:05:10 +11:00
Edward Pierzchalski 94513392ac asmrefine: remove unused lemmas. 2019-12-19 17:05:10 +11:00
Edward Pierzchalski 16f02df8b5 asmrefine: be more explicit when reporting results 2019-12-19 17:05:10 +11:00
Edward Pierzchalski b257ff60fd asmrefine: clean up SEL4GraphRefine
Consolidates ML setup code, adds some extra output.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 437ae807c2 asmrefine: improve debugging
Splits parts of step 4 of the SimplExport proof process, in order to
expose them to the test theory. Add some instructions on how to use
them.

Tags subgoals so that the user can identify which ones caused the
failure.

Consolidates ML setup code, and demarcates it to let uses ignore it.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski d59ccc3fdf asmrefine: update tests
Includes some formatting changes.

Includes a comment explaining why `global_array_swap_gref` fails and is
commented out.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 708a62795e asmrefine: arch split CFunDump files
Now that asmrefine targets several arches, it's useful to separate out
any intermediate artefacts by L4V_ARCH. For instance, this lets us use
the same directory to test two arches at once.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 9ba1d498df asmrefine: remove globals_swap ref
Using a shared ref for configuration reduces the understandability of
code. It turns out the contents of the `globals_swap` ref:

1. Was always the same.
2. Was only used in one spot.
3. Could be recreated at that one spot.

So we do that instead.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski b4242a3ae8 asmrefine: arch-split for machine word size.
Arch-split memory operations used when translating graph-lang.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 89a53c0818 asmrefine: add field offset rewrite rules.
Currently unused, but these are useful for debugging proofs in SEAR
about struct access updates.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski b1940d750c asmrefine: ML style. 2019-12-19 17:05:10 +11:00
Edward Pierzchalski 36a26e23a5 c-parser: handle symbolic names in assembly
Previously the parser rejected symbolic names in assembly specifiers
(the `[foo]` in `[foo]"r"(bar)`). Since the SIMPL semantics ignores the
body content of assembly, and since these specifiers only affect the
meaning of the body, this rejection was overcautious.

Previously, the parser rejected rval `"i"` and `"rK"` specifiers (which
indicate that the expression is to be used in some kind of immediate
mode). Again, this is out of scope for the SIMPL semantics, so we allow
it.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 794dfb2f94 c-parser: fix register type to match ptr type 2019-12-18 12:04:48 +11:00
Edward Pierzchalski 31b779739e c-parser: add aliases for useful types 2019-12-18 12:04:48 +11:00
Edward Pierzchalski fb9f5d972d asmrefine riscv: allow assembly 2019-12-18 12:04:48 +11:00
Edward Pierzchalski c3b5f2917a asmrefine: fix debug output
Previously, if a graph refine proof failed it would cause the ML block
defining the debug variable to be discarded; this prevented the user
from investigating the debug output. This change splits the ML block to
avoid the issue.
2019-11-29 13:59:50 +11: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
Gerwin Klein 1970ed0ce0 word_lib internal + crefine: remove duplicate lemma 2019-11-15 12:08:22 +11:00
Gerwin Klein c390ba7404 proofs: adjustments for word_lib changes 2019-11-15 12:08:22 +11:00
Gerwin Klein 3bce45dd25 word_lib: avoid shadowing existing lemma 2019-11-15 12:08:20 +11:00
Gerwin Klein 0fc9ab947d word_lib: add new material from l4v to AFP; cleanup 2019-11-15 12:08:20 +11:00
Gerwin Klein 9a1231bf97 word_lib internal: move up lemmas from Word_Lemmas_Internal
(non-AFP part)
2019-11-15 12:08:20 +11:00
Gerwin Klein 13143d7246 word_lib internal: cleanup 2019-11-15 12:08:20 +11:00
Gerwin Klein ad8923293e word_lib: shorter, more automatic proofs 2019-11-15 12:08:20 +11:00
Gerwin Klein e5ce178f1e word_lib: add mask_range 2019-11-15 12:08:20 +11:00
Gerwin Klein 821085f7b1 ainvs: move mask_range into Word_Lib 2019-11-15 12:08:20 +11:00
Gerwin Klein 3cffac8415 word_lib: word_eqI and word_eqI_solve methods
Improvements on initial version by Thomas Sewell
2019-11-15 12:08:20 +11:00
Gerwin Klein 16c15920a8 lib: move word_eqI_solve out of HaskellLemmaBucket 2019-11-15 12:08:20 +11:00
Gerwin Klein 59818de68e lib: avoid ambiguous syntax 2019-11-15 12:04:50 +11:00
Gerwin Klein bdd882d17e lib: more lifting rules for validE_R and validE_E 2019-11-15 12:04:50 +11:00
Gerwin Klein c826b33b88 bisim: Bisim session for ARM, X64, RISCV64
ARM_HYP would be possible, but require arch split for hyp-faults.
2019-11-15 12:04:50 +11:00
Gerwin Klein 55aeefdb64 x64: avoid automatic unfolding of handle_vm_fault
(fun -> definition)
2019-11-15 12:04:50 +11:00
Gerwin Klein b820b13d06 riscv: avoid automatic unfolding of handle_vm_fault
(fun -> definition)
2019-11-15 12:04:50 +11:00
Victor Phan 9fda73732a x64 crefine: update for seL4 bugfix [GITHUB PR 107]
Always invalidate TLB during unmapPage.
2019-11-14 18:05:24 +11:00
Edward Pierzchalski 831d3b4f70 docs: clarify installation instructions
Miscellaneous changes to make instructions easier to follow, as well as
updating instructions for Haskell Stack (which is no longer available on
Debian Testing).
2019-11-14 16:12:49 +11:00
Victor Phan 1db6ae7cf0 riscv: add kdev_base/kdevBase to handle RISCVVSpaceDeviceWindow and update proofs
- Add HiFive.hs to replace Spike.hs, it's the same except for kdevBase
  addition.
- Originally called KDEV_PPTR in the C Code, to be changed to KDEV_BASE
  across all architectures.
- Add RISCVVSpaceDeviceWindow case for valid_uses_2 definition.
2019-11-13 16:27:30 +11:00