Commit Graph

2142 Commits

Author SHA1 Message Date
Daniel Matichuk 680c12992e lib/corres_method: better lift_corres_args
Handles multiple arguments and fails if no arguments are lifted
2017-07-17 13:08:19 -06:00
Daniel Matichuk 2bc620c670 addressing protect_r -> corres_protect rename 2017-07-17 13:08:19 -06:00
Daniel Matichuk 07c54b5276 lib/corres_method: repair Corres_Test after changes 2017-07-17 13:06:56 -06:00
Daniel Matichuk 26ec1733fd lib/corres_method: misc tuning 2017-07-17 13:06:55 -06:00
Daniel Matichuk d8e0bd1d22 lib/corres_method: remove simp step from corres
Instead of doing rewriting corres should only rely on
rule application to ensure it only manipulates the
head function (and only if such manipulation causes
corres progress to be made).
2017-07-17 13:06:55 -06:00
Daniel Matichuk 07ed0a42d8 lib/corres_method: generalize assumption protection
Generated goal premises (i.e. from bind or if split rules)
should in most cases be redundant, as necessary conditions can
simply be propagated. By aggressively protecting them, we afford
ourselves greater control over how function bodies are rewritten.
2017-07-17 13:06:55 -06:00
Daniel Matichuk ad82c6c751 workaround for bad bug in dcorres
This line invokes "wp" with a schematic postcondition, which makes
this proof very unstable when new wp rules are added.
2017-07-17 13:06:55 -06:00
Daniel Matichuk 196e2e2e0a fix corres proofs for corres method
Fixing the fact that ex_abs is slightly rephrased

VER-737
2017-07-17 13:06:55 -06:00
Daniel Matichuk e8ce56f5d2 lib/corres_method: ex_abs -> ex_abs_underlying
ex_abs appears later in Refine so it can just be
rephrased as an abbreviation
2017-07-17 12:55:48 -06:00
Daniel Matichuk 57086fd782 lib/corres_method: make theory for corresK lemmas
Includes mapME_x rule
2017-07-17 12:55:48 -06:00
Daniel Matichuk 63f68eb6c1 lib/corres_method: unfold protect_r in corressimp
Allow corressimp to use the return-value relation in its clarsimp step
if doing so allows it to solve the subgoal.

This addresses some occasions where wp generates in-place goals that can
be easily solved (rather than pushing them into preconditions).
2017-07-17 12:55:48 -06:00
Daniel Matichuk f9fde43783 lib/corres_method: misc cleanup 2017-07-17 12:55:48 -06:00
Daniel Matichuk 46d5278f23 lib/corres_method: speed up corresc
This avoids any backtracking when solving the contradictions
emerging from left/right case splitting. Should result in 2-3x
speedup in some cases.
2017-07-17 12:55:47 -06:00
Daniel Matichuk 64d4a29e08 lib/corres_method: add const for instantiation
Some schematic instantiations require knowledge from return-value
relations. The special const "corres_eq_inst" indicates to corres
that a schematic instantiation should be possible/obvious by
unfolding the protected assumptions and applying fastforce.
2017-07-17 12:55:47 -06:00
Daniel Matichuk e07af805af lib/corres_method: add better corres_rv rules 2017-07-17 12:55:47 -06:00
Daniel Matichuk 9ab936e815 fix refine after changes to corres_method 2017-07-17 12:54:08 -06:00
Daniel Matichuk fac5b22095 lib/corres_method: hide return relation
Protect the return value relation by default so we can control
the simplifier.
2017-07-17 12:51:58 -06:00
Daniel Matichuk b7b25d89fa lib/corres_method: add corres to wp lifting rules 2017-07-17 12:51:58 -06:00
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10:00
Joel Beeren 81064fdb55 idle-thread-pd: run idle thread with the global PD all the time.
This avoids the multicore scenario of the idle thread running in the
address space that has been deleted by a thread running on another core.
2017-07-11 11:29:34 +10:00
Thomas Sewell be53fc89ee Trace locals fields like globals.
Always trace the fields of the locals record, like the globals
record.

Also omit the global record fields that do not in fact go into
the record.
2017-07-05 15:36:00 +10:00
Thomas Sewell 8f9695b705 Tweak use of choice axiom in GraphRefine. 2017-07-05 15:27:38 +10:00
Thomas Sewell 971c6782e5 Support extra specs, ctzl, clzl in SimplExport.
This patch permits the user to supply additional specs for functions
whose bodies were not imported (DONT_TRANSLATE or not present in parsed
C source). Those specs are exported by SimplExport.

The existing apparatus can import builtin functions like ctzl/clzl in C
sources by admitting them without bodies (DONT_TRANSLATE) and giving
them axiomatic Hoare triples (FNSPEC).

Translation validation then requires export of useful semantics. The user
can supply a made-up body, and show that it is a refinement of the body
that the parser created (derived from the FNSPEC and MODIFIES clauses).
The body must export out the graph language correctly. For ctzl/clzl etc
this is easy.
2017-07-05 15:27:38 +10:00
Thomas Sewell 6cda8f50d0 Update GraphProof, slightly bitrotted.
This isn't part of any official proof at the moment, but it's a
notable next step, and I'm starting to write it up for my PhD.
2017-07-05 15:27:38 +10:00
Sidney Amani 08940d5612 Fix bug in apply_trace when used with grouped lemmas.
This commit fixes a typo in apply_trace which
prevented correct printing of the index of
the lemma used in a grouped lemma.
An example is given in Apply_Trace_Cmd.thy
2017-07-04 11:51:45 +10:00
Miki Tanaka 5a82068c34 crefine: resolve a small issue in design spec coming from haskell translator inflexibility
- a case-statement in decodeARMMMUInvocation has an if-statement with a conjunction of three conditions, but they are translated in different orders between arm and arm-hyp and currently the crefine proofs depend on those orders.
- this fix is not a fundumental solution, but, given how reliable the haskell translator is, not sure how much effort we should be putting in here
2017-07-03 10:31:34 +10:00
Miki Tanaka 9f3924d1ea design spec: adjust skeleton files for unified haskell files 2017-07-03 10:31:34 +10:00
Miki Tanaka c2b02d96b7 haskell translator: change cpp options for ARM_HYP to use unified ARM haskell files 2017-07-03 10:31:34 +10:00
Miki Tanaka d8d1ee014c haskell: unify arm and arm-hyp haskell files
- both ARM and ARM_HYP haskell specs are now generated from the same set of files using cpp
- callbacks and platform files are merged into one directory (ARM)
- remove check-arm-hyp.py now that there are no ARM_HYP.lhs files
2017-07-03 10:30:49 +10:00
Miki Tanaka 41fe1a0845 update proofs for SELFOUR-30/291 "Reschedule on self-modification"
- SELFOUR-30 Reschedule when changing own IPC buffer
Previously if you invoked the TCB of the current thread and
changed the IPC buffer frame this would not immediately take
affect, as the kernels view of the current IPC buffer is
updated in Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.

- SELFOUR-291 Reschedule when changing own registers
Previously if you wrote to TCB of the current thread and
changed the TLS_BASE this would not immediately take
affect, as the kernel only updates this register in
Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.
2017-06-26 15:52:35 +10:00
Alejandro Gomez-Londono 4671d2615a test: run_tests.py now prints a warning when excluding unknown tests (with [-x] [-r])
* This allows mentioning internal tests in exclusion lists without
    breaking external (github) builds

    tags: [NO_PROOF]
2017-06-26 15:21:06 +10:00
Matthew Brecknell a719cb3e47 trivial: ignore haskell-translator outputs in spec/machine
tags: [NO_PROOF]
2017-06-22 11:43:44 +10:00
Matthew Brecknell 546ad8652e regression: add dependency between haskell-translator and CKernel
tags: [NO_PROOF]
2017-06-22 11:43:40 +10:00
Joel Beeren 392d055e99 SELFOUR-748: rename tlb invalidation functions 2017-06-20 14:05:45 +10:00
Alejandro Gomez-Londono 819f1492ee test: Reestablish ARM as the default platform for test 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono bba0bb842a arm-hyp cparsertest: Adds ARM_HYP dependencies for testsfiles
* This is just a copy of the files inside testfile/ARM into an
    arm-hyp specific.
2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 492d6c1817 arm infoflow: Fix argument of getActiveIRQ in check_active_irq_if
* This is trivial/irrelevant since getActiveIRQ ignores its argument
    in ARM, but it makes a bit more sense to have it being this way,
    and it is consistent with the equivalent function in InfoFlowC.
2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 8bac9cc586 arm infoflowc: Refactors proofs for new definitions (pteBits, pdeBits, etc) 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono a8258ae6a3 arm infoflowc: Updates for the new argument of getActiveIRQ 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono d44ab4082a arm crefine: Refactors createMappingEntries_valid_pde_slots'2 due to new definitions 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 1950b051a5 arm crefine: Refactors Arch_finaliseCap_ccorres for new if-body 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 284cb43f7b arm crefine: Updates clearMemory_setObject_PTE_ccorres to use pteBits 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 4c1d294a75 arm crefine: Updates {getActiveIRQ,isIRQPending}_ccorres with new argument 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 17776ce6d3 arm crefine: Refactors proofs for new definitions (pteBits, pdeBits, etc) 2017-06-19 14:32:45 +10:00
Miki Tanaka bd1a600cfb arm DRefine: updates for backports from arm-hyp 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono a2a1522bae arm access: updates for the backport from arm-hyp 2017-06-19 14:32:45 +10:00
Alejandro Gomez-Londono 2d20221396 arm refine: updates for the backport from arm-hyp completed 2017-06-19 14:32:44 +10:00
Joel Beeren 7d4a7b5f64 arm ainvs: clear sorry in ArchAcc_AI 2017-06-19 14:32:44 +10:00
Alejandro Gomez-Londono fb9de60cfe arm ainvs: Update for create_mapping_entries changes 2017-06-19 14:32:44 +10:00
Alejandro Gomez-Londono 758ed38246 arm aspec: definitions + map instead of ad-hoc upto_enum in create_mapping_entries
* Defined largePagePTE_offsets and superSectionPDE_offsets as is the
    case in arm-hyp

  * Used a map over largePagePTE_offsets/superSectionPDE_offsets
    instead of upto_enum
2017-06-19 14:32:44 +10:00