Commit Graph

83 Commits

Author SHA1 Message Date
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
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 bd94f7907e Isabelle2016-1: fix miscellaneous proofs 2017-01-05 14:27:30 +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 4905a589bf trivial: remove some uses of find_theorems 2016-12-13 22:10:31 +11:00
Alejandro Gomez-Londono 93adccc141 license-tool: missing license headers + .licenseignore [VER-551] 2016-07-14 16:34:31 +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 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 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 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 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 8c7524405b WIP: autocorres: start merging new code back into autocorres.ML 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 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 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
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 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 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
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 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
Japheth Lim 17ed76fc19 Merge branch 'master' into autocorres-seL4 2016-05-13 17:45:06 +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
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
Japheth Lim ef096e3871 autocorres: add demo for AutoCorresFunctionInfo, etc. 2016-04-20 18:26:07 +10:00
Japheth Lim 34601c01af autocorres: fix a bug in l2_opt.
JIRA issue VER-510
2016-03-04 11:08:24 +11:00
Matthew Brecknell 4f7ac1a975 trivial: remove some comments and debug trace 2016-02-22 10:55:21 +11:00
Japheth Lim cf39e885c9 autocorres: update example theories to Isabelle2016. 2016-02-16 19:02:59 +11:00
Matthew Brecknell c65e290a8b Isabelle2016: merge master into 2016 2016-02-16 12:52:24 +11:00
Japheth Lim 4409abb7d7 autocorres: update thm and cterm instantiations to work in Isabelle2016. 2016-02-11 11:16:00 +11:00
Japheth Lim 71ac8aab51 autocorres: fix skip_heap_abs option to actually skip all work. 2016-01-22 14:52:45 +11:00
Japheth Lim 02c008d34c autocorres: add c_locale option for running in a different locale.
Solves issue VER-505.
2016-01-22 14:52:36 +11:00
Japheth Lim 1aef4580f3 trivial: autocorres: excise old internal names. 2015-10-01 17:55:31 +10:00
Japheth Lim c9b94b5064 autocorres: change generated names more consistently. Add example/regression file.
Closes VER-459 for now.
2015-10-01 15:40:28 +10:00
Japheth Lim 6ab50e0007 autocorres: rename "ccorres" predicate to "ac_corres".
This avoids a name conflict with the existing seL4 ccorres.
2015-09-21 18:20:25 +10:00
Japheth Lim ddb13653fa autocorres: fix rules for heap lifting of arrays.
Should resolve JIRA VER-423.
2015-07-21 18:57:57 +10:00
Gerwin Klein b3bbcbd4d4 autocorres: add test case for autocorres in different thy
When install_C_file is in a theory different to the autocorres command,
more care is needed to get struct type names right.
2015-05-24 22:18:37 +10:00