Commit Graph

37 Commits

Author SHA1 Message Date
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 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 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 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 8c7524405b WIP: autocorres: start merging new code back into autocorres.ML 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 5a98b61127 autocorres: consolidate documentation for command line 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 9c46cf5211 autocorres: add user option "no_c_termination" for previous patch. 2016-05-02 17:20:00 +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 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 00cb83efdd autocorres: fix-up to treat C-parser-undefined functions properly.
The recent “scope” change increases the number of function “definedness”
classes to three:
  1. have SIMPL and AC defs (within “scope”);
  2. have SIMPL but not AC defs (outside “scope”)
  3. have no SIMPL nor AC defs (“scope” irrelevant)
This fixup ensures that (3) functions are not handled by code for (2).
2016-01-22 14:50:12 +11:00
Japheth Lim 84f9d62958 autocorres: do more sanity checking and sanitising for "scope" feature.
Functions excluded from "scope" should not be candidates for
word-abstraction or recursive function processing.
2016-01-22 14:50:12 +11:00
Japheth Lim 4e386568d3 autocorres: minor cleanup, mostly from previous commit. 2016-01-22 14:49:48 +11:00
Japheth Lim 8954c3ca11 autocorres: use SIMPL semantics for un-translated functions.
Previously, these functions were unsatisfyingly translated to “fail”.
By default, functions are wrapped in the constructs AC_call_simpl
and L1_call_simpl.
2016-01-22 14:49:13 +11: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 0ba1cbf2c8 autocorres: add options to change how names are generated.
New options: lifted_globals_field_prefix, lifted_globals_field_suffix,
function_name_prefix, function_name_suffix. See README.md.

JIRA VER-459.
2015-09-16 21:46:09 +10:00
Japheth Lim 5824c37094 autocorres: add “skip_heap_abs” option. 2015-09-16 21:46:09 +10:00
Gerwin Klein 854b89f071 autocorres: 2015 update 2015-05-21 19:49:11 +10:00
Japheth Lim 408bf219a0 autocorres: save fn_info at the end, instead of throwing it away. 2015-03-23 15:44:59 +11:00
Japheth Lim 3fe688e05d autocorres: fix "scope" option. 2015-03-21 11:32:46 +11:00
Japheth Lim 73e28343ae autocorres: no_opt now disables optimisations in SimplConv and TypeStrengthen.
This moves some mandatory optimisations to the L2unfold attribute, which marks
the first use of this attribute only three years after it was defined.
2014-12-04 20:19:26 +11:00
David Greenaway 8dd95a344c autocorres: Translate missing functions into constant "FUNCTION_BODY_NOT_IN_INPUT_C_FILE".
Functions that are declared in the C file, called by other C functions,
but are never actually _defined_ are translated simply into a "fail"
monadic statement. This sometimes causes confusion to new users.

We update AutoCorres to instead emit a new constant:

  FUNCTION_BODY_NOT_IN_INPUT_C_FILE

defined simply as "fail" for such functions.
2014-12-03 14:49:12 +11:00
Japheth Lim 5591b0ebf9 autocorres: record which rules were used by L2Opt; enable using "trace_opt" option.
The traces are stored in AutoCorresData under the keys "{L2,HL,WA} {peephole,flow} opt".

"Trace" is currently a misnomer because we actually use Apply_Trace to
dig out the used facts afterward. Completeness is not guaranteed.
2014-12-02 14:31:39 +11:00
Japheth Lim f6e116db45 trivial: autocorres: add gen_word_heaps option, which forces all word heaps to be generated. 2014-11-27 17:49:28 +11:00
Japheth Lim 26b389ae54 autocorres: add "no_opt" option to turn off some simplifications.
No guarantee that this will make autocorres produce the output you want, or produce output at all.

JIRA issue: VER-428
2014-11-24 11:39:21 +11:00
Japheth Lim be9947f3e1 autocorres: experimental support for tracing heap_lift and word_abstract.
See tests/examples/TraceDemo.thy for an example.
2014-10-31 20:02:58 +11:00
David Greenaway cf0d1abce6 Merge 'master' into 'isabelle-2014'.
Conflicts:
	proof/crefine/Fastpath_C.thy
	proof/drefine/KHeap_DR.thy
	proof/infoflow/Noninterference.thy
	spec/design/version
	sys-init/DuplicateCaps_SI.thy
	sys-init/InitTCB_SI.thy
	sys-init/Proof_SI.thy
	tools/asmrefine/SimplExport.thy
	tools/autocorres/tests/examples/SchorrWaite.thy
2014-09-17 14:21:13 +10:00
Japheth Lim 7cc357e093 autocorres: translate accesses to nested structs correctly. See tests/proof-tests/nested_struct.thy.
This should (finally) close issue JIRA VER-321. Unfortunately it also breaks some other things,
such as heap_abs_syntax, which we'll need to examine later.
2014-09-09 14:10:52 +10:00
Lars Noschinski fe36a97b4d Port AutoCorres to Isabelle 2014-RC0 2014-08-08 17:29:54 +10:00
Gerwin Klein 2a03e81df4 Import release snapshot. 2014-07-14 21:32:44 +02:00