Commit Graph

492 Commits

Author SHA1 Message Date
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +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
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
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
Rafal Kolanski 3349303b14 cparser: add support for ARM_HYP platform: umm_heap specs
These are copied verbatim from ARM as the word and pointer sizes are
identical.

These could be auto-generated by a Makefile, but a Makefile is not
invoked when building CKernel.
2017-06-19 14:32:30 +10:00
Rafal Kolanski 4e1409668e haskell translator: update caseconvs
after making ARM look like preprocessed ARM_HYP
2017-06-19 14:32:22 +10:00
Miki Tanaka 7e79b1b7b2 changes after rebasing (for isabelle2016-1 and the new wp) 2017-06-19 14:32:21 +10:00
Miki Tanaka c079f39e3b arm-hyp execspec: pdates for VER-623
with correct copy_global_mappings for ARM_HYP
2017-06-19 14:32:19 +10:00
Miki Tanaka c32e6552e5 arm-hyp execspec: add irqVGICMaintenane and initInterruptController
with caseconvs, generated files
2017-06-19 14:32:19 +10:00
Miki Tanaka 629ea900b7 arm-hyp execspec: caseconvs for VGIC interface etc. 2017-06-19 14:32:19 +10:00
Miki Tanaka 00f1393c5b arm-hyp execspec: add caseconvs, fixes in haskell + VCPU_H 2017-06-19 14:32:19 +10:00
Miki Tanaka 81663c978d arm-hyp execspec: add skel/ARM_HYP, m-skel/ARM_HYP, make haskell-translator work for ARM_HYP
(copied from ARM)
Per-plaform CPP configuration for spec-check and make-spec.

The configuration is still duplicated between the two scripts, but now
the translation/check for ARM_HYP will use correct CPP settings.
2017-06-19 14:31:56 +10:00
Rafal Kolanski 298d4ea6fe arm-hyp haskell: changes from meeting 2017-06-17 16:26:11 +10:00
Matthew Brecknell 366460e76c autocorres: prepare packaging scripts for release 1.3 2017-04-03 14:46:53 +10:00
Matthew Brecknell 58efe0804f autocorres: support 64-bit platforms
* Consistently use the c-parser 'addr' type alias for pointer values.
* Include word abstraction and polish for 64-bit integral types.
* Include all current c-parser platforms in release packaging scripts.

More work is required to properly abstract AutoCorres tests across
architectures. The tests currently pass for both ARM and X64.  However,
in a number of tests, we exploit the coincidences that 'int' is the same
size on both platforms (32 bits), and that 'long' is the same as the
pointer size on each platform (32 bits and 64 bits, respectively).
2017-04-03 14:46:53 +10:00
Matthew Brecknell e263d4e7cd c-parser: improve support for 64-bit platforms
* Correct 64-bit pointer alignment.
* Consistently use 'addr' type alias for pointer values.
2017-04-03 14:44:17 +10:00
Alejandro Gomez-Londono 32f3a731ac Munge test: Support for multi Arch CSpec
tag: [NO_PROOF]
2017-04-03 13:21:00 +10:00
Rafal Kolanski c41c7a97ca update references from/to moved crefine, parametrise over L4V_ARCH 2017-03-31 16:13:41 +11:00
Alejandro Gomez-Londono d6ac616294 CParser multi_arch_refactor: Adding support for ARM_HYP 2017-03-10 11:10:24 +11:00
Joel Beeren 81b3e7808b licenses: Updated licenses added from x64 backport
tags: [NO_PROOF]
2017-02-28 12:26:19 +11:00
Miki Tanaka 98832f8ccd execspec: add hypervisor, HypFaultType in skeletons (ARM), generated files 2017-02-22 15:26:46 +11:00
Rafal Kolanski cfd2eefe3d Merge pull request #159 in SEL4/l4v from ~TSEWELL/l4v:length-1-array to master
* commit 'dbd226f899c83ae0b44d58446b88d2dd0fb67a83':
  SimplExportAndRefine: length 1 arrays.
2017-02-17 15:08:46 +11:00
Thomas Sewell dbd226f899 SimplExportAndRefine: length 1 arrays.
This creates an issue because "unat x < 1" is reduced to "unat x = 0"
by the simplifier, meaning the unat_mono tactic doesn't get to operate on
it. The fix is pretty easy. Also includes some extra investigation material.
2017-02-17 14:58:22 +11:00
Daniel Matichuk 1541641faf apply_trace: fix autocorres 2017-02-17 14:29:39 +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
Gerwin Klein 7fc499be53 Isabelle2016-1: update AutoCorres READMEs 2017-01-07 14:22: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 bd94f7907e Isabelle2016-1: fix miscellaneous proofs 2017-01-05 14:27:30 +11:00
Matthew Brecknell c7d2a8bb97 Isabelle2016-1: fix bnf proofs
The 'bnf' command now generates a slightly different set of subgoals.
2017-01-05 14:27:10 +11:00
Matthew Brecknell 85341f8b69 Isabelle2016-1: update CParser and AutoCorres to new character representation 2017-01-05 14:27:07 +11:00
Matthew Brecknell 08d8a8f2fa Isabelle2016-1: replace 'unfolded' attr with 'simplified' where the former now loops 2017-01-05 14:27:04 +11:00
Matthew Brecknell 30122b5d80 Isabelle2016-1: update to new ML API
Update references to renamed ML constants; supply default arguments to
functions with additional parameters; etc.
2017-01-05 14:26:14 +11:00
Matthew Brecknell 511c6b2d3a Isabelle2016-1: rename free variables to avoid capture 2017-01-05 14:24:36 +11:00
Matthew Brecknell 7d0425dd3e Isabelle2016-1: fix proofs using lemmas now removed
Some lemmas that were specific instances of more general lemmas have
been removed from the library. In most cases, broken references could
simply be replaced with the more general fact.
2017-01-05 14:23:11 +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
Matthew Brecknell f8b1c7d5ae Isabelle2016-1: update Simpl 2017-01-05 14:21:12 +11:00
Matthew Brecknell 4905a589bf trivial: remove some uses of find_theorems 2016-12-13 22:10:31 +11:00
Alejandro Gomez-Londono 858bff7a7f Munge Test: adding --underscore_idents flag to c-parser
tags: [NO_PROOF]
2016-12-13 14:57:28 +11:00
Thomas Sewell 77d86cfc5f GraphRefine + CRefine: handle slightly more cases.
New testfile for graph-refine export with new handling code. Also
some slight tweaks to some CRefine proofs that will be needed to
remove DONT_TRANSLATE markers from certain key places in the seL4
code. These proofs are also compatible with previous seL4.
2016-12-08 16:12:17 +11:00
Thomas Sewell 5a367ea7e5 Standalone C parser: scan for unhandled ASM.
Adds an additional analysis option to the external C parser. This
will report about any asm statements that were encountered and could
not be properly handled.

[NO_PROOF]
2016-12-06 16:01:23 +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
Thomas Sewell 8e7c55c1a5 Handling of AsmStmt in c-parser, more tests.
The C-parser contains a full parser for __asm__ syntax but
up until now hasn't done anything with it. Instead we export
some semantics. It's unspecified exactly what these semantics
are but they are parametrised with the __asm__ semantics that
went in to them, so the translation validation has something
to reason about.

Tweak modifies proofs as a result, and add some more test files.
2016-12-01 17:07:54 +11:00
Rafal Kolanski 4262cc231a asmrefine: teach div and sdiv handling to graph refine tactic 2016-11-15 12:11:01 +11:00
Thomas Sewell edddf623ec ProveGraphRefine: Handle power operations w/sign.
Support some more kinds of power operations in the C code when
proving the export to Simpl is OK.
2016-11-02 11:19:09 +11:00
Thomas Sewell 0128e3b66d Handle another operation in SimplExport.
Handle pointer comparison operations in SimplExport.
2016-11-02 11:19:09 +11:00