Commit Graph

803 Commits

Author SHA1 Message Date
Gerwin Klein adc22ae58f c-parser: sync Simpl with AFP-2020
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Gerwin Klein e7fb36b7e2 ROOT files: file reorg for new ROOT requirements
Isabelle2020 requires each session to declare it own set of directories that
may not overlap with other session's directories. This commit reorganises
files to comply with that requirement.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Matthew Brecknell 64a597d574 asmrefine: support small array index types
This adds support for indexing into user contexts when `register_t` is
smaller than a word type, e.g. `uint8_t`.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-09-09 21:33:35 +10:00
Edward Pierzchalski 87de976c9b asmrefine: (fixup) use `debug_config` in tests
Signed-off-by: Edward Pierzchalski <ed.pierzchalski@data61.csiro.au>
2020-09-04 22:07:17 +10:00
Edward Pierzchalski 074689730f asmrefine: add timeouts for debugging
Also cleans up some of the debug config setup and makes result reporting
more useful.

Signed-off-by: Edward Pierzchalski <ed.pierzchalski@data61.csiro.au>
2020-09-04 22:07:17 +10:00
Matthew Brecknell 6f23d50ea9 c-parser: avoid cleaning `umm_heap/ARM_HYP`
Initially the `Makefile` copied `umm_heap/ARM_HYP` from `umm_heap/ARM`,
and deleted `umm_heap/ARM_HYP` during `make clean`. However, the
contents of `umm_heap/ARM_HYP` have since been committed, so this is no
longer appropriate.

Reported-by: Michael Norrish <Michael.Norrish@data61.csiro.au>
Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-08-26 14:58:15 +10:00
Gerwin Klein fb18ca7095 haskell-translator: use datatype selectors
This commit replaces separately generated selector functions with Isabelle's
built-in datatype selectors of the new datatype package (which is not that
new any more).

It currently does not touch discriminators yet, because they have a different
naming scheme and would require larger proof updates.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-07-09 10:06:27 +08:00
Edward Pierzchalski 55d9f5741f c-parser: include alias info in mungedb
Changes the mungedb to also indicate whether a given munged name has an
alias.

In the Distant Past, the C parser emitted long and short names, and the
mungedb output recorded those names. When definitions were reordered in
a C file, different C variables might get the short name; this could
break proofs, but the mungedb output would indicate the change ahead of
time.

Now, the C parser emits long names for every C variable, but it also
emits a short abbreviation to replicate the behaviour of the C parser in
the Distant Past. However, the mungedb only displayed *definitions*, not
*abbreviations*, so if the variable abbreviated by a short name changed
then the mungedb wouldn't pick up on the change.

This commit changes the output to include an "alias status", indicating
whether the short C name has been exported as an alias for the indicated
Isabelle name. It also adds a test to confirm that the mungedb output
tracks aliasing correctly.

Signed-off-by: Edward Pierzchalski <ed.pierzchalski@data61.csiro.au>
2020-05-03 10:22:36 +10:00
Brian Huffman 3c3514fe99 c-parser: Faster automation for proving packed_type class instances.
Co-authored-by: Simon Winwood <simonjwinwood@gmail.com>

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-25 11:22:56 +10:00
Brian Huffman 2ae97d8b38 c-parser: Remove unused assumptions from field_lookup rules.
This gives a significant speedup to the install_C_file command
when it generates field_lookup lemmas for struct types.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-25 11:22:56 +10:00
Gerwin Klein 0aafe8bf80 autocorres: pull out SPDX tag
Turns out the reuse tool will get confused by the addition SPDX tag
in the file, even though it is not in a comment. This commit pulls
out the tag such that string matching will not trigger on it.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-24 11:27:03 +08:00
Matthew Brecknell 306fe017c3 autocorres: more specific Makefile pattern rule
A rule to generate `%.thy` from `%.c` was previously too general, such
that it could fire for `%.thy` files that were not intended to be
generated, overwriting existing `%.thy` files.

This recently became an intermittent problem, when several `%.c` files
were updated to comply with style checks. Depending on how an `l4v`
checkout was updated, this sometimes made those `%.c` files newer than
the corresponding `%.thy` files.

This commit converts the implicit pattern rule into a static pattern
rule that applies to exactly those `%.thy` files that are intended to be
generated.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-04-23 09:51:33 +10:00
Gerwin Klein 092b1207f7 run astyle on all C files in the repository
Leaves parse tests and generated files unchanged, and provides a style
filter for these.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-19 13:50:17 +08:00
Gerwin Klein 7e30711edf c-parser: AUXUPD modifies the heap
Previously AUXUPD did not contribute to modifies proofs, and the only
reason this worked was that there usually is some heap assignment
somewhere else in the function if there is an AUXUPD. This commit adds
a modifies clause for the heap if a function has an AUXUPD.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-10 17:53:29 +08:00
Matthew Brecknell cf48906b26 regression: force use of python3
Python 2 has passed its sunset date, and many distributions are
withdrawing support for Python 2.

PEP 394 recommends distributions always install versioned interpreter
commands (e.g. `python3`), but does not make a recommendation about
whether or not an unversioned command (`python`) should exist, or what
version it should run.

It therefore seems advisable to explicitly run scripts using the
`python3` command, for scripts that are compatible with Python 3.

Here, we do this for Python scripts used by `run_tests`. For this to
work, some scripts have been updated in ways that will break Python 2
compatibility. But for some other scripts which were already compatible
with both Python 2 and 3, we have not yet removed Python 2
compatibility. There are also miscellaneous scripts that are not used by
`run_tests`, and these have not yet been updated to Python 3.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-04-01 14:31:36 +11:00
Edward Pierzchalski ec93298afa asmrefine: handle THM failures during proofs
Signed-off-by: Edward Pierzchalski <ed.pierzchalski@data61.csiro.au>
2020-03-28 11:17:29 +11:00
Edward Pierzchalski 62c8c799bc asmrefine: add missing signed cast rewrite
Signed-off-by: Edward Pierzchalski <ed.pierzchalski@data61.csiro.au>
2020-03-28 11:17:28 +11:00
Gerwin Klein 75acf19dcd style: pep8 style for python files 2020-03-25 22:42:27 +11:00
Gerwin Klein c68915b92b license: provide documentation under CC-BY-SA-4.0
Datat61 provides all docs under CC-BY-SA-4.0.
2020-03-16 14:19:15 +08:00
Gerwin Klein d6953e2f0e spdx: provide copyright info for mllex/mlyacc 2020-03-16 14:19:15 +08:00
Gerwin Klein 86a941e7e7 spdx: review missing copyright & license info
Some files were missing machine-readable copyright info, others were tagged
incorrectly.
2020-03-16 14:19:15 +08:00
Gerwin Klein 8d1ec3e324 license: SMLNJ and MLTON licenses moved to LICENSES/
The MLton license is now HPND (see also http://mlton.org/License)
2020-03-16 14:19:15 +08:00
Gerwin Klein 2f32deb44a asmrefine: review license for $ARCH/ArchSetup.thy 2020-03-13 14:38:47 +08:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Gerwin Klein 8d12d8e4be licenses: tag .md and document file 2020-03-02 18:52:15 +08:00
Rafal Kolanski f9ea44ef89 arm-hyp: update spec+proofs for multi-VM support
Highlights:
- new reserved IRQ and associated handler: VPPIEvent
- VPPI events are virtual interrupts we can forward to VMs; currently there is
  only one event: virtual timer interrupt
- VGICMaintenance and VPPIEvent can both receive late interrupts from hardware,
  which are now discarded instead of being delivered to current thread
- given only one possible VPPI event, simplifier tends to mop up more than it
  should, making some proofs fragile w.r.t. adding a new VPPI event
- the order of some lemmas/specs needed shuffling, as now VCPU code needs some
  interrupt code, which uses VCPU code
2020-02-19 10:52:07 +11:00
Rafal Kolanski 504565e57d haskell: translator: handle datatype Enum with one constructor
There is a special case for deriving Enum for datatypes with a single
constructor, but it should only fire when that constructor has exactly
one argument. Previously, one constructor with any other argument count
that one resulted in assertion failed.
2020-02-13 12:29:52 +11:00
Zoltan Kocsis 788b4bd180 refactored irq_t structure (VER-1159) 2020-02-05 17:58:45 +11:00
Gerwin Klein 8356f303b6 haskell-translator: instance proofs for types without 0-arg constructors 2020-02-03 12:56:19 +08:00
Corey Lewis 5120e351b3 lib: improve wp tracing
When tracing wp can now print the instantiated version of the rules being used.
It also says which set each used rule is from.
2020-01-29 09:26:18 +11:00
Edward Pierzchalski 4a222d1189 asmrefine: add arch setup licenses 2019-12-19 17:05:10 +11:00
Edward Pierzchalski c1747628b1 asmrefine: Add support for 64-bit architectures. 2019-12-19 17:05:10 +11:00
Edward Pierzchalski 94513392ac asmrefine: remove unused lemmas. 2019-12-19 17:05:10 +11:00
Edward Pierzchalski 16f02df8b5 asmrefine: be more explicit when reporting results 2019-12-19 17:05:10 +11:00
Edward Pierzchalski 437ae807c2 asmrefine: improve debugging
Splits parts of step 4 of the SimplExport proof process, in order to
expose them to the test theory. Add some instructions on how to use
them.

Tags subgoals so that the user can identify which ones caused the
failure.

Consolidates ML setup code, and demarcates it to let uses ignore it.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski d59ccc3fdf asmrefine: update tests
Includes some formatting changes.

Includes a comment explaining why `global_array_swap_gref` fails and is
commented out.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 708a62795e asmrefine: arch split CFunDump files
Now that asmrefine targets several arches, it's useful to separate out
any intermediate artefacts by L4V_ARCH. For instance, this lets us use
the same directory to test two arches at once.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 9ba1d498df asmrefine: remove globals_swap ref
Using a shared ref for configuration reduces the understandability of
code. It turns out the contents of the `globals_swap` ref:

1. Was always the same.
2. Was only used in one spot.
3. Could be recreated at that one spot.

So we do that instead.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski b4242a3ae8 asmrefine: arch-split for machine word size.
Arch-split memory operations used when translating graph-lang.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 89a53c0818 asmrefine: add field offset rewrite rules.
Currently unused, but these are useful for debugging proofs in SEAR
about struct access updates.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 36a26e23a5 c-parser: handle symbolic names in assembly
Previously the parser rejected symbolic names in assembly specifiers
(the `[foo]` in `[foo]"r"(bar)`). Since the SIMPL semantics ignores the
body content of assembly, and since these specifiers only affect the
meaning of the body, this rejection was overcautious.

Previously, the parser rejected rval `"i"` and `"rK"` specifiers (which
indicate that the expression is to be used in some kind of immediate
mode). Again, this is out of scope for the SIMPL semantics, so we allow
it.
2019-12-19 17:05:10 +11:00
Edward Pierzchalski 794dfb2f94 c-parser: fix register type to match ptr type 2019-12-18 12:04:48 +11:00
Edward Pierzchalski 31b779739e c-parser: add aliases for useful types 2019-12-18 12:04:48 +11:00
Victor Phan 79513ae604 riscv: update to HiFive platform from Spike
- Increase maxIRQ to 53
- Change keywords to build HiFive instead of Spike
2019-11-13 16:26:55 +11:00
Victor Phan 8bf03d45a0 riscv haskell/design: add and implement IRQ invocations
setIRQTrigger added but unimplemented because it's a machine op.
irqInvalid added, set to 0, since this is what's defined on the Spike
platform, may need to implement irqInvalid for other platforms if we
want generality for later proofs (Refine).
check, decode, perform IRQ control fully implemented to match the CSpec.
2019-11-12 18:28:40 +11:00
Gerwin Klein 09dbc34a0c riscv haskell/design: fix lookupPTSlotFromLevel and lookupPTFromLevel 2019-11-12 18:28:39 +11:00
Edward Pierzchalski f067068a88 asmrefine: improve initial debugging experience.
Adds a 'debug' configuration type to the main ProveSimplToGraphGoals
functions. Configuration lets the user control which functions will be
tested, and logs which functions fail testing.

Adds a 'single step' debug tactic for use in TestGraphRefine, and
demonstrates a few useful initial ML tactic for e.g. narrowing down
which subgoals are failing, and how to inspect a successful subgoal.
2019-11-12 14:25:58 +11:00
Corey Lewis dd48e0d899 proof: update for wp changes
Updated 'wp_once' to 'wp (once)' and removed several stray uses of 'wp_trace'.
2019-10-14 17:12:18 +11:00
Victor Phan dede199780 haskell-translator: remove PageRemap case conversion 2019-10-10 11:27:07 +11:00
Japheth Lim de9c069473 c-parser: update changelog for license change 2019-10-02 22:19:21 +10:00
Gerwin Klein c43472f1ce c-parser: correct license for shorten_names.ML 2019-10-02 09:16:23 +10:00
Japheth Lim 4f0b0558c3 autocorres: update tools for Isabelle2019 release 2019-09-05 14:18:18 +10:00
Japheth Lim 44bdf90ae8 autocorres, lib: refactor `nat :: bit_operations` instance
This refactors the instances in HaskellLib and AutoCorres into a new
theory, Lib.NatBitwise.
2019-07-24 11:00:02 +10:00
Japheth Lim de97108f14 autocorres: exhaustive testsuite for arithmetic op word abstraction 2019-07-24 10:48:13 +10:00
Japheth Lim 50e79b0fdb autocorres: exhaustive testsuite for bitwise op word abstraction 2019-07-24 10:48:13 +10:00
Japheth Lim 5685af2bcb autocorres: word abs for bitwise operators
This adds translation rules for bitwise operators, along with suitable
guards. Note that the guard for signed `shiftl` follows the C standard,
rather than the incorrect c-parser guard (see VER-509).

There was no standard instance of `nat :: bit_operations` for unsigned
abstraction, so we also add one. It should be merged with the
(incomplete) HaskellLib instance later.

Closes Jira VER-1122.
2019-07-24 10:41:55 +10:00
Japheth Lim fa0b62380a autocorres: solve a bad ":000" var name from L2Opt
Not sure if this breaks the property in the rule's comment, but
we'll probably find out if it does.
2019-07-10 13:59:53 +10:00
Japheth Lim ec74efcb9e autocorres: fix bug between heap abs and signed word abs
Jira VER-1112
2019-07-10 13:59:53 +10:00
Matthew Brecknell 52dae5f25a c-parser standalone: don't delete original source files on Isabelle2019 2019-06-19 14:39:56 +10:00
Japheth Lim 7a99f89ae3 c-parser: don't delete original source files on Isabelle2019
Some code in the parser would incorrectly delete the source file
jiraver337.c, because the `Path` module now normalises the filename to
a different-looking name. This is fixed by adding a boolean flag for
whether the parsed file should be deleted or not.

Fixes Jira VER-1114.
2019-06-19 13:01:30 +10:00
Gerwin Klein 4e12863b0f docs: update README files for Isabelle2019 2019-06-14 11:41:21 +10:00
Gerwin Klein c34840d09b global: isabelle update_cartouches 2019-06-14 11:41:21 +10:00
Gerwin Klein 22433afbb7 c-parser: keep word_neq_0_conv[simp] for now 2019-06-14 11:41:20 +10:00
Gerwin Klein ab0d486eb7 c-parser: update release log 2019-06-14 11:41:20 +10:00
Gerwin Klein c9244ff530 c-parser cleanup: convert README to markup 2019-06-14 11:41:20 +10:00
Gerwin Klein bde3977456 c-parser: proof cleanup in main c-parser 2019-06-14 11:41:20 +10:00
Gerwin Klein aea325ac6a c-parser umm_heap: larger cleanup pass
Mainly proof indentation, elimination of non-terminal auto, and modernizing
ancient proofs.
2019-06-14 11:41:20 +10:00
Michael McInerney 6812e6d0b6 haskell-translator: use new comment syntax 2019-06-13 16:22:33 +10:00
Gerwin Klein c0a2d54c15 asmrefine: update to Isabelle2019; reduce warnings 2019-06-13 16:22:33 +10:00
Gerwin Klein ea831ceb5c autocorres tests: port to Isabelle2019 2019-06-13 16:22:33 +10:00
Gerwin Klein b812c74c00 autocorres SchorrWaite example: clean up and update to Isabelle2019 2019-06-13 16:22:33 +10:00
Gerwin Klein f3db601e35 autocorres: minor cleanup, remove some warnings 2019-06-13 16:22:33 +10:00
Gerwin Klein 1cbefe0eb7 autocorres: update cartouches for Isabelle2019 2019-06-13 16:22:33 +10:00
Gerwin Klein 3b0699b656 autocorres: Isabelle2019 update 2019-06-13 16:22:33 +10:00
Gerwin Klein 0e48f483bf c-parser: expand $USER_HOME in cpp path name; export cpp_path config 2019-06-13 16:22:33 +10:00
Gerwin Klein e95d1691e1 c-parser: cleanup of horribly old CTypes.thy
Purging old sins, remove all non-terminal auto, indent, etc.
2019-06-13 16:22:33 +10:00
Gerwin Klein 14589157b1 c-parser cleanup: eliminate typ_struct_splits 2019-06-13 16:22:33 +10:00
Gerwin Klein 3ebeaeffab c-parser: more pair-like setup for DTPair (splitting, collapsing) 2019-06-13 16:22:33 +10:00
Gerwin Klein 512c134761 c-parser cleanup: remove warnings, avoid Local_Theory.reset 2019-06-13 16:22:33 +10:00
Gerwin Klein dadcd8f65b c-parser: update to cartouches 2019-06-13 16:22:33 +10:00
Gerwin Klein 081742b738 c-parser: sync Simpl with AFP 2019-06-13 16:22:33 +10:00
Japheth Lim 211fbe6d28 asmrefine: print running time for each function's graph proof
These summary statistics should be useful while not being too verbose.
2019-05-29 14:23:29 +10:00
Japheth Lim f21e440c15 asmrefine: add some rules to help array-of-struct subgoals
This handles the new implementation of `init_freemem` in seL4, and thus
the workaround of seL4 d0d97779cb is no longer required.
2019-05-29 14:23:29 +10:00
Japheth Lim 071ebbd398 lib: move @{mk_term} antiquotation from AutoCorres; add examples 2019-05-17 18:07:59 +10:00
Matthew Brecknell e9ac64ba2d binary: improve support for array access via pointer addition 2019-05-15 14:49:20 +10:00
Matthew Brecknell 976eca1a28 binary: improve support for array access via pointer addition 2019-05-03 13:52:52 +10:00
Edward Pierzchalski 85ec1a61cb c-parser: add type syntax for Ptr and ptr_coerce
A common frustration is seeing a term `Ptr x :: foo ptr` and not being
able to inspect the inferred type `foo` (this is especially true when
`Ptr` occurs within another expression).

Copying the style of `UCAST`, this adds syntax rules for displaying `Ptr
x :: foo ptr` as `PTR(foo) x` and `ptr_coerce (bar :: a ptr) :: b ptr`
as `PTR_COERCE(a -> b) bar`.
2019-05-02 10:34:25 +10:00
Edward Pierzchalski 7cea1ad1b4 lib: don't extend core signatures.
Just because we *can* extend the core SML `List` signature, that doesn't
mean we *should*. It's a neat trick, but it makes it harder to find uses
of the new modules, and obfuscates definitions for very little gain.
2019-03-07 15:29:13 +11:00
Edward Pierzchalski caf2d2cfef autocorres: use c-parser name demangler
The C parser tracks what short names a given long name corresponds to.
Change AutoCorres to use that information, instead of trying to demangle
the names 'manually'.
2019-03-07 13:34:32 +11:00
Edward Pierzchalski 7ec43436ba c-parser: update test files.
Short-name constants don't exist any more, so we change the (single)
explicit reference to a short name into a long name.
2019-03-07 13:34:32 +11:00
Edward Pierzchalski 5beef4b4e6 c-parser: always emit long names.
Previously, the C parser would define locals differently depending on
the order they appear in the source (the first instance got a short
name, the second etc. got a longer one). This would sometimes make
things break when source was reordered.

Now, the C parser emits the long name for _every_ local, and emits an
abbreviation for backwards-compatibility and convenience for common
variables (like loop indexes `int i`).

Adjusts the Simpl syntax modifiers to work with abbreviations.

Modifies the VCG tactic to try and convert long-name bound variables in
the goal to their abbreviated names.
2019-03-07 13:34:32 +11:00
Thibaut Perami ddf222700f haskell: Update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Gerwin Klein c53f7850d7 Base ASpec + machine on OptionMonad_ND; fix proof fallout 2018-10-25 12:54:02 +11:00
Edward Pierzchalski d75740201c Remove pure word lemmas from proof/*
Removes redundant lemmas after moving them up to Word_Lib.
2018-10-10 14:15:00 +11:00
Japheth Lim dc626e99d3 autocorres, crefine: remove early AutoCorres–CRefine experiment
This has been superseded by actual AutoCorres integration with CRefine.
2018-09-27 15:03:25 +10:00
Japheth Lim 1b4c3d06cf autocorres: fix external_file declaration 2018-09-26 17:08:34 +10:00
Mitchell Buckley 8173a37c2d Updated specs and proofs for SELFOUR-1491: control IRQ triggering on ARM. 2018-09-19 16:18:09 +10:00
Japheth Lim 38d30a895a autocorres: record date of 1.5 release 2018-09-10 14:18:25 +10:00
Japheth Lim 1af23137f0 autocorres: update release tool for Isabelle2018
Note that we have removed the LIB_FILES manifest and no longer intend
to maintain it manually. Instead, we just extract the entire Lib and
CLib sessions from the L4.verified repository. This means that the
next AutoCorres release will have some unneeded theories and a couple
of files with GPL licenses.
2018-09-06 20:34:59 +10:00
Japheth Lim 703c43fa2b c-parser: update release script and README 2018-09-06 20:34:59 +10:00
Japheth Lim fc94ed7539 c-parser/doc: describe reality of evaluation order semantics (see VER-503) 2018-09-06 20:34:59 +10:00
Japheth Lim 0847265be3 c-parser/doc: better example for target arch files 2018-09-06 20:34:59 +10:00
Japheth Lim cb9492c4fb c-parser/doc: update with x64 array sizes; other minor fixes 2018-09-06 20:34:59 +10:00
Michael Norrish 423606ae60 c-parser: always attach GCC attributes to vars.
Some attributes attached to global variables weren't kept in
the AST if they appeared at the front of the declaration rather
than the back.

For instance, the aligned attribute was lost in this declaration:
   int __attribute__((aligned(16))) x;
but kept if it appeared last:
   int y __attribute__((aligned(16)));

Now fixed.
2018-08-23 18:57:09 +10:00
Gerwin Klein 3101eba8e7 remove trailing whitespace from ulem.sty 2018-08-21 15:15:08 +10:00
Gerwin Klein af056bc00d Isabelle2018 riscv: theory import for c-parser 2018-08-20 09:06:37 +10:00
Gerwin Klein 8af6b2ec1a Isabelle2018: add ulem.sty which is now required by isabelle.sty
(available by default in newer tetex installs, but not older ones)
2018-08-20 09:06:37 +10:00
Gerwin Klein 1383f4ceee Isabelle2018 autocorres: declare external files 2018-08-20 09:06:37 +10:00
Gerwin Klein d4738b079f Isabelle2018: AutoCorresTest 2018-08-20 09:06:36 +10:00
Gerwin Klein 7e29504194 Isabelle2018: AutoCorresDoc 2018-08-20 09:06:36 +10:00
Gerwin Klein 1c82254a3c Isabelle2018: AutoCorres 2018-08-20 09:06:36 +10:00
Gerwin Klein eea38b25c4 Isabelle2018: READMEs and docs 2018-08-20 09:06:36 +10:00
Gerwin Klein 75b38be012 Isabelle2018: new AsmRefine session + test 2018-08-20 09:06:36 +10:00
Gerwin Klein 1ae3a8d65b Isabelle2018: Lib update 2018-08-20 09:06:36 +10:00
Gerwin Klein 4dc3ffb1ba Isabelle2018 c-parser: declare external files 2018-08-20 09:06:36 +10:00
Gerwin Klein 86bad831e2 Isabelle2018: C parser tests 2018-08-20 09:06:36 +10:00
Gerwin Klein b213aa9ba0 Isabelle2018: CParser 2018-08-20 09:06:36 +10:00
Gerwin Klein 49eceeaf41 Isabelle2018: re-import Simpl from the AFP 2018-08-20 09:06:36 +10:00
Gerwin Klein 6b9d9d24dd Isabelle2018: new "op x" syntax; now is "(x)"
(result of "isabelle update_op -m <dir>")
2018-08-20 09:06:35 +10:00
Gerwin Klein 011e08458e Isabelle2018: new comment syntax
(result of "isabelle update_comments <dirs>")
2018-08-20 09:06:35 +10:00
Gerwin Klein b5cdf4703f globally use session-qualified imports; add Lib session
Session-qualified imports will be required for Isabelle2018 and help clarify
the structure of sessions in the build tree.

This commit mainly adds a new set of sessions for lib/, including a Lib
session that includes most theories in lib/ and a few separate sessions for
parts that have dependencies beyond CParser or are separate AFP sessions.
The group "lib" collects all lib/ sessions.

As a consequence, other theories should use lib/ theories by session name,
not by path, which in turns means spec and proof sessions should also refer
to each other by session name, not path, to avoid duplicate theory errors in
theory merges later.
2018-08-20 09:06:34 +10:00
Gerwin Klein 382b07dc20 c-parser: remove unused dependency on Lib 2018-08-20 09:05:52 +10:00
Gerwin Klein f2a8c3e07e c-parser: session qualified imports for parser tests 2018-08-20 09:05:52 +10:00
Gerwin Klein 5ae795c586 c-parser: qualified session imports; Word_Lib base image
Previously, everything was counted under session CParser, incl most of
Word_Lib. The dependency on Word_Lib thus revealed means Word_lib is the
better base image for session Simpl-VCG.
2018-08-20 09:05:52 +10:00
Gerwin Klein 20d0db1e7e autocorres: mark Auto_Separation_Algebra as unfinished
(uses cheat_tac for a few tactics that are not filled in yet)
2018-08-06 14:28:44 +10:00
Gerwin Klein 377caf0a86 c-parser: allow skipping modifies-proof in quick_and_dirty only 2018-08-06 14:28:44 +10:00
Gerwin Klein 2d8233bb76 cparser: set sorry_modifies_proofs conditionally on env var
This includes replacing the non-thread-safe ref sorry_modifies_proofs with a
proper Config option.
2018-08-06 14:28:44 +10:00
Matthew Brecknell c390013909 x64 crefine: prove several lemmas in Retype_C
To prove that retyping a TCB establishes the state relation for TCBs,
it is necessary to prove that the C FPU null state is always equal to
the Haskell FPU null state. This commit therefore includes some
machinery for maintaining the state relation for the FPU null state,
and repairs many proofs.
2018-07-05 16:23:15 +10:00
Gerwin Klein 05281b90fe c-parser: consolidate IsaMakefile into Makefile
resolves remaining part of github issue #22
2018-07-02 08:52:01 +02:00
Gerwin Klein 7741eaccab riscv c-parser: ignore generated standalone parser files 2018-07-02 08:52:01 +02:00
Gerwin Klein 47a7511941 c-parser: tweaks for mlton 20180207 in standalone C parser 2018-07-02 08:51:40 +02:00
Rafal Kolanski edd02390e1 c-parser: reinstate X64 target accidentally clobbered by RISCV64 2018-06-28 18:42:43 +10:00
Gerwin Klein 23a1bae103 riscv c-parser: RISCV64 test setup 2018-06-27 10:06:49 +02:00
Gerwin Klein 48531d2d67 riscv haskell-translator: caseconvs update 2018-06-27 10:06:48 +02:00
Gerwin Klein b3e1be7783 haskell-translator: enable RISCV64 target 2018-06-27 10:06:47 +02:00
Gerwin Klein 52b9f958aa haskell-translator: add parsing of .hs files
In addition to .lhs only.
2018-06-27 10:06:47 +02:00
Rafal Kolanski 31b635401d riscv: setup cspec build for L4V_ARCH=RISCV64
C parser and word setup copied from X64
2018-06-27 10:05:44 +02:00
Joel Beeren 25125763bd arm-hyp: ioportcontrol: fixes after adding IOPortControlCaps to x64 2018-04-19 05:27:06 +10:00
Joel Beeren f728dd25e8 x64: Add IOPortControlCaps to control IO port allocation
The previous implementation of IOPortCaps has problems with revocability
and determining parency etc. This commit adds IOPortControlCaps which
behave identically to IRQControlCaps -- invoking the IOPortControlCap
allows one to create IOPortCaps with the supplied range.

There now exist invariants to show that there is only one
IOPortControlCap and that all IOPortCaps in the system do not overlap.
Furthermore there is a global record of which IO ports have been
allocated to prevent reissuing the same ports.
2018-04-19 05:27:06 +10:00
Thomas Sewell d4d89922af lib/wp: Adjust some problematic attributes.
In particular, some intro! attributes for some wp rules are removed.
These previously caused auto/fastforce to play a really strange role
in some proofs.
2018-03-16 14:57:09 +11:00
Thomas Sewell b0f2217af4 lib/wp: Remove old wp combinator rules.
These combinator rules do something like what wp_pre does now.

They were helpful in the ancient past, but now that wp_pre exists it is
much better to just use automation.
2018-03-16 14:51:31 +11:00
Japheth Lim 26b45dc466 c-parser: automated testing for JIRA VER-881 2018-03-14 17:56:53 +11:00
Thomas Sewell 97a4e3753e Revert designs, fix with more processing.
Abandon post-processing. There's some fragility somewhere that requires
process_stmt to see exactly the statements that go out, so it needs to run
last.

To handle initialiser elements, re-run process_stmt over the initialiser
statements that are created by process_decl. That's repeating some steps,
but it seems to work.

Waiting on input from Michael N about how crazy this is, but for now we're
pushing it to testing.
2018-03-14 17:56:53 +11:00
Thomas Sewell 4b2c812323 c-parser: VER-881: process more function calls.
Two kinds of function calls were escaping the analysis. The first is simple,
the ReturnFnCall statement type, which was a silly omission from before.

Function calls inside initialiser statements are a more difficult problem.
The simplest solution was to move the VER-881 calculation into a
post-processing phase once those function calls have been moved to statement
positions.
2018-03-14 17:56:53 +11:00
Japheth Lim 055e8984b7 c-parser: fix release script 2018-03-02 15:04:52 +11:00
Japheth Lim d22a054262 c-parser: update install instructions 2018-03-02 13:08:16 +11:00
Japheth Lim 7144e380a8 autocorres: fixes for quickstart doc formatting; update bib entries 2018-03-02 13:07:49 +11:00
Japheth Lim 7c818daaea autocorres: fix C source formatting in quickstart doc 2018-03-02 11:34:54 +11:00
Japheth Lim 35eae1f0c1 autocorres: update for version 1.4 release 2018-03-02 11:13:21 +11:00
Gerwin Klein 561be5e196 autocorres: NICTA URLs -> D61 URLs 2018-03-01 16:54:05 +11:00