Commit Graph

678 Commits

Author SHA1 Message Date
Thomas Sewell dbd888ad3e asmrefine: add one README.md, update another.
Better documentation of what's in the proof/asmrefine and
tools/asmrefine directories.
2017-08-16 18:15:21 +10:00
Joel Beeren f05bc45d59 misc: clean up before merging x64 2017-08-11 11:49:18 +10:00
Matthew Brecknell caeab8889a c-parser: refactor arch-specific array memory model
This places all arch-specific aspects of the array memory
model in ArchArraysmemInstance.thy.
2017-08-11 11:24:25 +10:00
Joel Beeren 82863978bd Merge branch 'master' into x64 2017-08-09 17:10:06 +10:00
Matthew Brecknell 045744843a asmrefine: revert simplification of ghost_assertions
The previous simplfication broke SimplExportAndRefine.
2017-08-09 17:02:50 +10:00
Matthew Brecknell b5bb4e083c c-parser: add missing arch-specific files for arm and arm-hyp 2017-08-09 17:02:49 +10:00
Alejandro Gomez-Londono dba1b08caa c-parser: Removes automatically generated lexer and parser files 2017-07-27 11:19:19 +10:00
Rafal Kolanski f08c0bf178 haskell translator: make compatible with bash 3
Rewrite associative array usage as a function lookup.

OSX users do not have access to a non-ancient /bin/bash by default and
complain that our use of associative arrays (declare -A) does not work.

Tags: VER-802
2017-07-25 16:19:13 +10:00
Rafal Kolanski c74da29407 design: create arch directories in haskell translator
Architecture directories were previously created in the Makefile, and
not in make_spec.sh. As a result, running make_spec would fail on a
clean repo.
2017-07-25 16:16:52 +10:00
Matthew Brecknell 238e8b307e x64: merge master 2017-07-21 11:27:12 +10:00
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
Matthew Brecknell 1edd007b33 x64: add new modifies prover
Modifies proofs now include a preprocessing step which breaks programs
into parts before passing goals to the VCG. This means there are more
calls to the VCG, but the VCG only sees individual Basic and Spec
commands, and procedure calls.

This avoids performance issues in some pathological cases. In
particular, long sequences of updates to arrays via pointer-to-struct
previously seemed to be exponential in the number of updates.
2017-06-22 17:26:51 +10:00
Matthew Brecknell 2f4b822da9 x64: configure arch-specific array types 2017-06-22 17:24:53 +10:00
Matthew Brecknell ce748b7522 x64: create arch-specific CKernel 2017-06-22 17:24:53 +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
Thomas Sewell 8ce2a86cb7 c-parser: adjust completion messages in modifies
The 'success' messages in the modifies proof were being produced as
soon as Goal.prove_future returned, which is pretty much right away.
Instead produce messages once the forked proof is finished.
2017-05-18 15:23:09 +10:00
Thomas Sewell dffc8cf0df c-parser: improve tracing
Unify some tracing features that didn't go through the Feedback structure.

Add config to isar_install allowing Feedback to be traced to a file in real
time as well as to standard Isabelle output channels.
2017-05-18 15:23:09 +10:00
Thomas Sewell a04a489c21 c-parser: add hook to ignore more asm statements if needed 2017-05-16 11:27:03 +10:00
Joel Beeren 993ab453ab x64: more caseconvs 2017-04-20 14:37:19 +10:00
Joel Beeren 6ce0dac56e x64: more caseconvs 2017-04-11 18:36:29 +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
Joel Beeren 33a1fed708 x64: haskell-translator: make translator use whitespace removal tool 2017-03-29 18:08:08 +11:00
Joel Beeren da23c8c76d x64: misc: added more caseconvs 2017-03-29 17:23:25 +11:00
Joel Beeren 178b95a6d3 x64: haskell: fix broken caseconvs; use generic ptTranslationBits 2017-03-23 15:34:52 +11:00
Joel Beeren 62510b33d9 x64: haskell-translator: fixed broken caseconvs 2017-03-16 14:19:40 +11:00
Joel Beeren 532995922b x64: got haskell translator running on existing haskell kernel 2017-03-14 17:59:08 +11:00
Joel Beeren 95d1671940 Merge remote-tracking branch 'verification/master' into x64-split
Conflicts:
	lib/LemmaBucket.thy
	lib/NonDetMonadLemmaBucket.thy
	lib/Word_Lib/Word_Lemmas.thy
	lib/X64/WordSetup.thy
	proof/invariant-abstract/ARM/ArchDetype_AI.thy
	proof/invariant-abstract/ARM/ArchInvariants_AI.thy
	proof/invariant-abstract/BCorres_AI.thy
	proof/invariant-abstract/CSpace_AI.thy
	proof/invariant-abstract/DetSchedSchedule_AI.thy
	proof/invariant-abstract/Interrupt_AI.thy
	proof/invariant-abstract/IpcCancel_AI.thy
	proof/invariant-abstract/Syscall_AI.thy
	proof/invariant-abstract/Untyped_AI.thy
	proof/refine/ARM/Include.thy
	spec/abstract/ARM/ArchTcb_A.thy
	spec/abstract/CSpace_A.thy
	spec/abstract/Tcb_A.thy
	spec/design/ARM/ArchIntermediate_H.thy
	spec/design/X64/ArchInterruptDecls_H.thy
	spec/haskell/Makefile
	spec/machine/MachineExports.thy
	tools/c-parser/.gitignore
	tools/c-parser/standalone-parser/Makefile
	tools/c-parser/testfiles/ARM/imports/MachineWords.thy
	tools/c-parser/testfiles/X64/imports/MachineWords.thy
	tools/haskell-translator/caseconvs
2017-03-10 19:35:39 +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
Matthew Brecknell 759a0387ab merge master into x64-split
Primarily concerns wp improvements
2017-01-18 07:49:48 +11:00
Matthew Brecknell ed19e4a341 c-parser: support arch-specific testfiles 2017-01-18 07:43:36 +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
Matthew Brecknell abf1db5b51 merge master into x64-split 2017-01-13 17:22:03 +11:00
Matthew Brecknell 5bdcbe537e fix ARM build after merge
Also:
- move some ARM-specific things out of Tcb_AI
- port changes from ARM to X64, up to beginning of ArchVSpace_AI
2017-01-10 17:09:31 +11: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
Matthew Brecknell 73a08160a1 merge master into x64-split 2016-11-30 12:08:32 +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
Thomas Sewell 6ad456ca03 SELFOUR-444: Adjust Haskell, new ghost data.
The new ghost data is saved in the design spec when Untyped caps
are modified and will be used by CRefine.
2016-11-02 11:19:09 +11:00
Joel Beeren 3ff1029376 c-parser: Added X64 CParserTest to regression 2016-10-11 14:08:55 +11:00
Joel Beeren 33262e9bef c-parser: fixed testfiles to support multiple architectures 2016-10-11 12:20:04 +11:00
Joel Beeren 0dbaf71636 c-parser: Adjusted X64 TargetNumbers file for experimentation. 2016-10-10 15:16:56 +11:00
Matthew Brecknell 256e241770 merge master into x64 2016-10-06 19:57:55 +11:00
Sophie Taylor 20539620f9 SELFOUR-276: Add MCP to specs and invariants
A thread's maximum controlled priority (MCP) determines the maximum
thread priority or MCP it can assign to another thread (or itself).
2016-10-05 02:43:41 +11:00
Xin Gao 00f64879de Merge pull request #110 in SEL4/l4v from SELFOUR-421-rebased to master
* commit '8d4a8eb238090999b4b41f588d5fa63453d58ae8':
  SELFOUR-421: fix coding style
  SELFOUR-421: fix drefine
  SELFOUR-421: add device bit in UntypedCap and FrameCap in capdl
  SELFOUR-421: infoflow and infoflow_c builds
  SELFOUR-421: crefine builds
  SELFOUR-421: commit before change abstract again
  SELFOUR-421: fix refine
  SELFOUR-421: a defend version before wild changes
  SELFOUR-421: new haskell spec after UserDataDevice changes
  SELFOUR-421: broken crefine after conversation with gerwin
  SELFOUR-421: up to VSpace_C done
  SELFOUR-421: temp work in CSpace_C
  SELFOUR-421: fixed Refine after merge with master
  SELFOUR-421: retranslate haskell after merge with master
  SELFOUR-421: random uncommitted stuff before merge
  SELFOUR-421: retranslate haskell for fixed range check
  SELFOUR-421: refine done
  SELFOUR-421: added check to decoding asid control invocations and stole an asid bit from the high bits not the low ones
  SELFOUR-421: AInvs done, no added invariants yet
  SELFOUR-421: first attempt at abstract spec
2016-09-23 04:17:09 +00:00
Xin,Gao 8d4a8eb238 SELFOUR-421: fix coding style 2016-09-22 19:23:28 +10:00
Xin,Gao 8f3a4dee31 SELFOUR-421: merge with master, fix wholesystem proofs 2016-09-22 19:23:19 +10:00
Xin,Gao 113315d9a6 SELFOUR-421: merge and fix up to ArmConfidentiality proof 2016-09-22 19:21:56 +10:00
Xin,Gao 328846ee1a SELFOUR-421: crefine builds 2016-09-22 19:11:37 +10:00
Joel Beeren df877769fc SELFOUR-421: refine done 2016-09-22 19:11:36 +10:00
Joel Beeren 3c223b42fe SELFOUR-421: AInvs done, no added invariants yet 2016-09-22 19:11:29 +10:00
Michael Norrish 6b5d1b5e5d Allow empty top-level declarations, consisting of bare semi 2016-09-09 14:14:32 +10:00
Matthew Brecknell 28c0c2ed1e merge master into c-parser multi_arch_refactor 2016-09-02 23:40:44 +10:00
Matthew Brecknell 034232a704 trivial: remove debug tracing code 2016-09-02 23:38:40 +10:00
Matthew Brecknell 945ee811c3 CParser multi_arch_refactor: build standalone parser in dir named after arch
Architecture names follow L4V_ARCH-style naming conventions ('ARM', 'FAKE64').
However, the standalone parser does not make use of the L4V_ARCH environment
variable.

The standalone-parser Makefile builds all architectures at once, producing
binaries at 'ARM/c-parser', 'FAKE64/c-parser', and similarly for the tokenizer.

There are also wrapper scripts 'c-parser' and 'tokenizer' in the
standalone-parser directory, which take an architecture on the command line.

The make_munge.sh script calls the appropriate binary parser directly.
2016-09-02 23:38:40 +10:00
Thomas Sewell 2515f8c2e0 Allow use of previous enum values in enums.
This is apparently valid C:
enum {
  One,
  Two = One + 1,
};

It's easy to support this by using the partially modified enum
environment in evaluation of the following right hand sides.
2016-09-02 13:58:57 +10:00
Matthew Brecknell 886fe0ef12 CParser multi_arch_refactor: fix tokenizer build 2016-09-01 12:35:33 +10:00
Matthew Brecknell 5f501b09a9 CParser multi_arch_refactor: add license headers to new files 2016-08-31 16:25:46 +10:00
Matthew Brecknell 86e8cd4a33 CParser multi_arch_refactor: fix broken factorial test
Another case requiring simplification with ucast_id.
2016-08-31 16:24:28 +10:00
Thomas Sewell 4c23410f6c Haskell translator: can keep type constructors.
A skeleton line of the form
\#INCLUDE_SETTINGS keep_constructor=asidpool
now ensures that the asidpool type constructor is actually created in
subsequent #INCLUDE_HASKELL declarations. It turns out this feature was already
available, and already used for asidpools, this change just makes it externally
adjustable.
2016-08-25 15:33:19 +10:00
Michael Norrish 4062decf79 Merge branch 'sort-munge-output' into multi_arch_refactor 2016-08-17 10:42:38 +10:00
Michael Norrish af1c77243b c-parser: fix list sorting to use Isabelle code
This makes the licensing situation clearer than with the code coming
from Moscow ML (which might conceivably be GPL).
2016-08-17 10:38:21 +10:00
Michael Norrish 936caa2e4f c-parser: multi_arch_refactor: merge with master
factorial regression test does not succeed.
2016-08-15 11:30:24 +10:00
Michael Norrish 7da160d23b Create standalone parser per architecture
Also include a wrapper that calls any of them in a completely
straightforward way.
2016-08-13 17:24:49 +10:00
Michael Norrish e321cae1b3 c-parser: sort munge output 2016-08-12 09:41:16 +10:00
Matthew Brecknell 5ba5bd03fb merge master into x64-split 2016-08-11 10:07:43 +10:00
Matthew Brecknell 5b19e2c284 merge master into x64-split
This resurrects the ARM architecture on the x64-split branch.
It also brings X64 up-to-date with progress on arch_split.
2016-08-09 18:58:37 +10:00
Thomas Sewell 7236874353 Support some more signed word cases in asmrefine. 2016-08-09 13:31:29 +10:00
Corey Richardson 91f4d4ebb3
tools: haskell-translator: use only basename in generated-file notice
This was breaking spec-check because the paths sometimes had ..'s
in them and sometimes not, depending on where the translator was run.
2016-07-21 15:54:34 +10:00
Corey Richardson b791b79f22
tools: haskell-translator: add warning to not edit generated files 2016-07-20 18:16:21 +10:00
Alejandro Gomez-Londono 6f2e2d750e Make CParseTools depend on CParser
CParseTools was triggering a race condition by removing a mistakenly
added license header on CSpec.grm.sig while (potentially) the CParser
session was still being build by Isabelle, thus causing all sessions
depending on CParser to rebuild (At the same time!).
2016-07-20 18:02:13 +10:00
Alejandro Gomez-Londono 7c13256d89 license-tool: .licenseignore update + some fixes [VER-551] 2016-07-20 18:01:35 +10:00
Alejandro Gomez-Londono 7724dff916 test_munge.sh updated to print diff of symbols and kernel [VER-584] 2016-07-14 16:34:55 +10:00
Alejandro Gomez-Londono 93adccc141 license-tool: missing license headers + .licenseignore [VER-551] 2016-07-14 16:34:31 +10:00
Alejandro Gomez-Londono 6991fab7e8 c-parser: allow_underscore_idents flag added + examples [VER-619][NO_PROOF] 2016-07-12 12:07:53 +10:00
Alejandro Gomez-Londono 89b64646ec test_munge.sh and make_munge.sh updated to support
the new --ast flag in c-parser [VER-584][VER-512][NO_PROOF]
2016-07-06 16:59:37 +10:00
Thomas Sewell 50ab074d71 Tweak serial code, don't reference print.
The function print isn't in scope in the Isabelle environment.
2016-07-05 17:37:14 +10:00
Thomas Sewell 20c50e46b0 Finish serialisation code for AST. 2016-07-05 17:37:14 +10:00
Thomas Sewell 0490bcba6a Start of AST-dump analysis for c-parser.
Give the standalone c-parser the facility to dump out its internal AST. Only
half finished, I got bored writing serialisers for the many syntax datatypes.

There has been some discussion about how to check whether an seL4 change
impacts verification. My thought was that the obvious thing to check is the
C-parser's AST. If this is unchanged, then further analyses must be unchanged.
2016-07-05 17:37:14 +10:00
Japheth Lim 35e260ec0b autocorres: add conceptual documentation for AutoCorresUtil
This is the “hub” that ties most of the other phases together,
so documenting its control/data flow is quite important.
2016-06-30 17:48:20 +10:00
Japheth Lim 8b598d08a0 autocorres: add acceptance tests for corner cases in name handling 2016-06-30 15:20:41 +10:00
Japheth Lim c31ee7a6a9 autocorres-crefine: update CRefine demo to work after AutoCorres refactor
Also fixes an AutoCorres bug that surfaced in the demo.
2016-06-30 14:41:55 +10:00
Japheth Lim 0afb748b1b autocorres: fix up remaining failures in test suite (all typo level) 2016-06-30 10:00:39 +10:00
Japheth Lim 162a2266a1 autocorres: revert debugging slag in testsuite 2016-06-30 10:00:39 +10:00
Japheth Lim 62b43e360c autocorres: remove Statistics and print_stats code
The “statistics” output has been disabled for some time, and the
print_stats option has never been part of the publicly documented
interface, so hopefully this removal will go unnoticed.

Some of the terms measured by the stats code are available through
the recently-added trace_* options (but not all).
2016-06-30 10:00:39 +10:00
Japheth Lim f67c6146ef autocorres: remove obsolete trace recording mechanism 2016-06-30 10:00:39 +10:00
Japheth Lim b7f8aa0ba3 autocorres: move new modules over the old ones
This is the “last” step of the Jira VER-517/VER-522 refactoring
(still does not support pausing between phases, but the relevant
infrastructure is there now).

Ought to pass AutoCorresTest suite now.
2016-06-30 10:00:39 +10:00
Japheth Lim 6b72212597 WIP: autocorres: make trace results available again
This changes the interface to access traces, making the underlying
symtabs explicit.
2016-06-30 10:00:39 +10:00
Japheth Lim cc1329c232 trivial: autocorres: remove temporary debugging output 2016-06-30 10:00:39 +10:00
Japheth Lim b7c354f798 autocorres: actually check results of type strengthening demo 2016-06-30 10:00:39 +10:00
Japheth Lim a933c6b7b7 autocorres: update FunctionInfo demo theory 2016-06-30 10:00:39 +10:00
Japheth Lim 3a3a8b4983 WIP: autocorres: remove some debugging code 2016-06-30 10:00:39 +10:00
Japheth Lim 3ade9cb717 WIP: autocorres: parallelise ac_corres; add mono theorems to theory 2016-06-30 10:00:39 +10:00
Japheth Lim e238064215 WIP: autocorres: parallelise ac_corres; add mono theorems 2016-06-30 10:00:39 +10:00
Japheth Lim b8a1743148 WIP: autocorres: more incremental translation fixes; update a testcase 2016-06-30 10:00:39 +10:00
Japheth Lim 1181b9bc1f WIP: autocorres: restore incremental translation behaviour
The incremental translation demo in crefine has not been updated yet.
2016-06-30 10:00:39 +10:00
Japheth Lim 1ad6d39192 autocorres: restore ac_corres proof generation 2016-06-30 10:00:39 +10:00
Japheth Lim 10de34936e autocorres: split recursive groups less eagerly (partial revert)
Brain fart: the corres proofs still have recursive assumptions,
even if the final function does not use them. This means that
attempting to split groups prior to definitions is doomed to fail.
2016-06-30 10:00:39 +10:00
Japheth Lim 8c7524405b WIP: autocorres: start merging new code back into autocorres.ML 2016-06-30 10:00:39 +10:00
Japheth Lim e14da9e3d4 WIP: autocorres: refactor some L1 helpers 2016-06-30 10:00:39 +10:00
Japheth Lim 2f53afd90b WIP: autocorres: refactor add_defs 2016-06-30 10:00:39 +10:00
Japheth Lim 6c35cf176a trivial: autocorres: refactor symtab_merge 2016-06-30 10:00:39 +10:00
Japheth Lim 6ce286e3b6 WIP: autocorres: refactor result sequence type 2016-06-30 10:00:39 +10:00
Japheth Lim 4a06a63ae3 WIP: autocorres: refactor measureT 2016-06-30 10:00:39 +10:00
Japheth Lim 5277de2927 WIP: autocorres: refactor define_funcs a bit more 2016-06-30 10:00:39 +10:00
Japheth Lim 2d24e1ebef WIP: autocorres: refactor prepare_fn_body 2016-06-30 10:00:39 +10:00
Japheth Lim 46460cedf0 WIP: autocorres: refactor rec_callees calculation 2016-06-30 10:00:39 +10:00
Japheth Lim 7b2832861d WIP: autocorres: make SimplConv.convert/define more uniform with other phases 2016-06-30 10:00:39 +10:00
Japheth Lim a5b98df2b6 WIP: autocorres: clean up more uses of free and schematic variables 2016-06-30 10:00:39 +10:00
Japheth Lim a4e2a85397 WIP: autocorres: detect splitting of recursive groups; misc fixes
The topology of recursive function groups can change due to dead code
elimination. This used to be handled (buggily, after define stages) by
the old code. This commit attempts to handle it properly (between convert
and define stages), using a new variant of the Seq data structure.
(Still not done for TS, though.)

Also (literally) fixes many free variables that used to be unhygienic.

Also makes the L2,HL,WA dataflow more uniform (but not yet refactored).
2016-06-30 10:00:39 +10:00
Japheth Lim e923520acd autocorres: remove unused code from AutoCorresUtil 2016-06-30 10:00:39 +10:00
Japheth Lim bbf889882e WIP: autocorres: VER-517 prototype for heap lifting
Heap lifting is annoying because we need to join all intermediate L2 results
before defining the lifted heap and proving heap lemmas.
This has been refactored into a new prepare_heap_lift stage that runs between
L2 conversion and HL proper.
2016-06-30 10:00:38 +10:00
Japheth Lim 08c3475a09 WIP: autocorres: crude VER-517 prototypes for WA and TS phases
HL is still pending; the new code also needs to be refactored itself.
2016-06-30 10:00:38 +10:00
Japheth Lim 84cb9deaf8 WIP: autocorres: split up function_info data structures
With this we move away from a global mutable fn_info; instead we will
use a table of persistent (lazy) entries for each phase.
Function call metadata is also now either stored locally or recomputed
on-demand for each stage (with a few TODOs).
2016-06-30 10:00:38 +10:00
Japheth Lim 2caf6520e5 WIP: autocorres: draft of more modular dependencies for L1, L2
Prototype for Jira VER-517.
2016-06-30 10:00:38 +10:00
Japheth Lim 3400debdc2 autocorres: add test case for Jira issue VER-591 2016-06-29 14:48:16 +10:00
Rafal Kolanski 27607011cd verification update for seL4 arm_hyp merge to master 2016-06-22 22:28:36 +10:00
Alejandro Gomez-Londono 495665e3c9 Munge make/test scripts 2016-06-21 14:50:04 +10:00
Michael Norrish a344d156c6 c-parser: make munge_info available from standalone-parser
Specification of file to emit to is via command-line switch.  Take the
opportunity to make comand-line processing be done via GetOpt library.

JIRA VER-473
2016-06-14 12:39:03 +10:00
Japheth Lim 21a420dfad autocorres: add example for N. Suzuki's proof challenge
This is basically a regression test for David G's claim that the
AutoCorres output can be verified by "auto". Fortunately still true.
2016-06-02 16:50:03 +10:00
Japheth Lim 4453635a8d autocorres: global context cleanup; minor tweaks to proofs
This removes some modifications that the theories make to the simpset
and other global context, which slightly reduces breakage when importing
AutoCorres into other theories.

Unfortunately, some of the tests/examples seem to rely on specific
modifications to simp and wp, so removing those will be harder.
Also some simplification stages still seem to use the global simpset
instead of AUTOCORRES_SIMPSET; need to debug later.
2016-06-02 16:50:03 +10:00
Japheth Lim 55cb03af41 autocorres: demangle variable names better
Not perfect yet, but does fix issue VER-351.
2016-06-02 16:50:03 +10:00
Japheth Lim 5b0f2ebbcd autocorres: upgrade from Named_Thm to named_theorems
This gets rid of the attribute setup boilerplate (but see Utils.get_rules).
Closes issue VER-293.
2016-06-02 16:50:03 +10:00
Japheth Lim 5a98b61127 autocorres: consolidate documentation for command line 2016-06-02 16:50:03 +10:00
Japheth Lim 77429f19ec trivial: autocorres: fix simpl_conv diagnostic 2016-06-02 16:50:03 +10:00
Japheth Lim 4ec1820f0e autocorres: streamline translation of lvar_nondet_init
Now no longer relies on L1opt.
2016-06-02 16:50:03 +10:00
Japheth Lim b645a60e87 autocorres: record all intermediate translation data
This allows us to perform incremental translation (VER-518) without
resorting to hacks.
2016-06-02 16:50:03 +10:00
Alejandro Gomez-Londono a3bebf98d1 VER-559: patch ./make_spec.sh with the new Haskell location 2016-06-02 12:10:22 +10:00
Joel Beeren 73b731562c x64: add arch_split'd x64 spec with IOMMU stuff 2016-06-01 11:12:55 +10:00
Japheth Lim 40570bc4fe regression: add test to check theory import paths
This commit also fixes all bad imports reported by the test script.
Jira issue VER-560
2016-05-27 16:17:13 +10:00
Japheth Lim a9e3db44ab autocorres: fix web link in quickstart document
Reported by Zilin C.
2016-05-23 14:43:48 +10:00
Joel Beeren 6a2692abc6 lib: fix theory includes for arch-splitted WordSetup 2016-05-20 12:31:10 +10:00
Japheth Lim 26a7907c95 Merge pull request #43 in SEL4/l4v from ~JALIM/l4v:autocorres-seL4 to master
* commit 'ecbb860532b4c576fc4726a805802f16bcf5302c': (29 commits)
  autocorres-crefine: specialise corres_no_failI for compatibility with Refine
  Add license tags for autocorres-crefine files
  crefine: refactor AutoCorresTest a bit
  autocorres-crefine: remove local debugging imports
  Fix InfoFlowC to accommodate corres_underlying changes.
  Fix DRefine to accommodate corres_underlying changes.
  autocorres-crefine: experiment with manually translating a function (clzl).
  autocorres-crefine: experiment with translating bitfield_gen specs.
  autocorres-crefine: start a test case for function calls.
  autocorres-crefine: update example proofs to work with no_c_termination, which does not require proving termination for the C spec.
  autocorres: add user option "no_c_termination" for previous patch.
  Making termination proof optional for AutoCorres.
  WIP: autocorres: hacky proof of concept for incremental translation.
  autocorres: add some missing WordAbstract rules.
  autocorres-crefine: fix some comments in work theory.
  autocorres-crefine: prove modifies and (simple) terminates specs.
  autocorres-crefine: experiment with generating modifies proofs
  autocorres-crefine: run autocorres in kernel_all_substitute locale
  autocorres-crefine: update another corres_UL that snuck in before rebasing.
  autocorres-crefine: working ccorres for handleYield (modulo some white lies).
  ...
2016-05-19 01:19:58 +00:00
Japheth Lim 45c5aaa875 autocorres: finer control of Collect simps.
Fixes translation of empty Specs.
2016-05-16 21:11:40 +10:00
Gerwin Klein 9a4e8a8b9a autocorres: Monad_WP fixes 2016-05-16 21:11:40 +10:00
Gerwin Klein 322f1023f5 word_lib: adjust theory dependencies 2016-05-16 21:11:40 +10:00
Gerwin Klein f0faa90f8a lib/spec/proof/tools: fix word change fallout 2016-05-16 21:11:40 +10:00
Gerwin Klein 84b923a677 lib: start disentangling spaghetti word dependencies 2016-05-16 21:11:40 +10:00
Sophie Taylor a652ec7697 Adding regression test for c-parser JIRA bug VER-550 2016-05-16 14:59:47 +10:00
Japheth Lim 17ed76fc19 Merge branch 'master' into autocorres-seL4 2016-05-13 17:45:06 +10:00
Michael Norrish 41f12cf570 Merge branch 'master' into multi_arch_refactor 2016-05-12 15:35:25 +10:00
Japheth Lim 05dd160007 autocorres: add Spec translation rules for heap and word abstraction.
Heap abstraction can now translate MODIFIES specs, but will probably
break on anything more exotic.
2016-05-12 15:20:10 +10:00
Japheth Lim f06d5267e6 autocorres: fix translation for Spec, which should work again for simple cases.
Also add basic regression test.
2016-05-11 17:31:17 +10:00
Michael Norrish ecc1f03735 c-parser: fix broken regression tests
Something I've done seems to now require simplification with ucast_id to
make proofs go through in these old, old and disgusting tests.
2016-05-11 16:37:20 +10:00
Japheth Lim 0f0f731ab7 Merge branch 'master' of ssh://bitbucket.keg.ertos.in.nicta.com.au:7999/SEL4/l4v into autocorres-seL4
This is to prepare for merging back into master.

Conflicts:
	proof/crefine/Refine_C.thy
2016-05-11 15:08:22 +10:00
Michael Norrish e86c60c698 c-parser: fix architecture refactor bugs arising
- the symbol table constant had a hard map to word32 instead of the addr
  alias
- when cast to integers, the parser believed pointers gave rise to 32
  bit values. This latter required the TargetNumbers signature to get a
  smidge wider, with a new ptr_t entry where the intptr type gets
  listed.
2016-05-10 15:59:00 +10:00
Michael Norrish a1be2aa9e8 c-parser: introduce a FAKE64 architecture
This ignores issues that would need getting right in a real x64
specification (signedness of char, endianness, perhaps others), but can
be used as a test vehicle.
2016-05-09 17:02:01 +10:00
Michael Norrish 345fd7ab20 c-parser: factor out more 32-bit dependencies in umm_heap
If one changes the occurrences of 32 in Addr_Type to 64, everything up
to CTranslation still builds successfully.

Work towards JIRA VER-487
2016-05-09 16:55:40 +10:00
Michael Norrish a3e6c6484e Refactor more of the UMM memory model to allow for 64bit arch
This is progress with JIRA VER-487
2016-05-09 14:15:15 +10:00
Matthew Brecknell bb0644beaa arch_split: merge master 2016-05-06 16:44:43 +10:00
Daniel Matichuk 9ceed1eb12 arch_split: fix proofs after removing shadow and unqualify commands and adding fix for crunch. Checks up to DPolicy. 2016-05-04 15:14:41 +10:00
Japheth Lim 9c46cf5211 autocorres: add user option "no_c_termination" for previous patch. 2016-05-02 17:20:00 +10:00
Thomas Sewell f50bb14f25 Making termination proof optional for AutoCorres.
By default, the only change users will see is a new parameter to
ac_corres which will default to 'True'.
2016-05-02 14:10:23 +10:00
Japheth Lim 7f97e0b34a WIP: autocorres: hacky proof of concept for incremental translation.
Demo in tests/examples/Incremental. Note that changing autocorres options
between invocations will probably just fail ungracefully.

Meant for issue VER-518 but not yet tested on CKernel.
2016-04-28 17:02:09 +10:00
Japheth Lim a6f8332d60 autocorres: add some missing WordAbstract rules. 2016-04-28 17:01:13 +10:00
Matthew Brecknell 0c3a12771d arch_split: merge master 2016-04-28 14:36:43 +10:00
Japheth Lim 07472f35f5 Merge branch 'master' of ssh://bitbucket.keg.ertos.in.nicta.com.au:7999/SEL4/l4v into autocorres-seL4
Grab some AutoCorres fixes from master.
2016-04-27 16:58:30 +10:00
agomezl 319c9d3dc2 Haskell-translator mod (>>) to (>>_) 2016-04-27 16:23:15 +10:00
Daniel Matichuk 1d20b393c0 arch_split: replaced sublocale with global_naming 2016-04-27 14:32:38 +10:00