Commit Graph

111 Commits

Author SHA1 Message Date
Rafal Kolanski 6c7798d512 asmrefine: add prefixes for testfiles/*_gref.thy
These currently work with an empty prefix as well, but using the name of
the theory file containing the respective install_C_file is more stable.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-02-22 18:24:02 +11:00
Rafal Kolanski 289de4fef7 asmrefine: use a prefix for constant lookups
Add and carry around a `pfx` parameter indicating the prefix under which
constants should be found. Without this prefix, items such as
enumeration constant names are guessed at from unqualified names. If the
unqualified name is hidden for some reason, or clobbered with another
name, the wrong constant gets used and leads to exciting errors.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-02-22 18:24:02 +11:00
Gerwin Klein f18f5752ab trivial: remove trailing whitespace
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein e3f50549c6 isabelle-2021 asmrefine: make 64 bit clean
The previous proof of unat_word32_less_2p_word_bits worked only for
word_bits = 32.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein 953cc78732 isabelle-2021: update AsmRefine
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Florian Haftmann ea9a25950d isabelle-2021: ad-hoc adjustions to preview
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 81b95eb6bf READMEs: fix publication links
PDFs and abstracts have moved to trustworthy.systems/

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-25 11:22:05 +10:00
Gerwin Klein bf5b97500a trivial: fix links to papers
The TS website has settled on no `.pml` postfix

Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-03-02 11:44:22 +11:00
Gerwin Klein ba38ae33ab update publications links
The links to nicta.com.au have stopped working, so the publication links
now point to the TS publication pages.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-23 17:06:46 +11:00
Gerwin Klein a45adef66a all: remove theory import path references
In Isabelle2020, when isabelle jedit is started without a session
context, e.g. `isabelle jedit -l ASpec`, theory imports with path
references cause the isabelle process to hang.

Since sessions now declare directories, Isabelle can find those files
without path reference and we therefore remove all such path references
from import statements. With this, `jedit` and `build` should work with
and without explicit session context as before.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-02 10:16:17 +10:00
Gerwin Klein 12615092de asmrefine: comment out failing test
This should not be ignored longer term. The test itself is failing anyway,
but the code now throws an exception, which it shouldn't do.

See VER-1295

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Gerwin Klein 91cc9d8521 tools/asmrefine: update to Isabelle2020
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
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
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 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 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
Zoltan Kocsis 788b4bd180 refactored irq_t structure (VER-1159) 2020-02-05 17:58:45 +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 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
Gerwin Klein c0a2d54c15 asmrefine: update to Isabelle2019; reduce warnings 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
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
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 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 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
Matthew Brecknell e3d209eb24 Isabelle2017: update SimplExportAndRefine for RC0 2017-10-30 12:23:26 +11:00
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
Matthew Brecknell 045744843a asmrefine: revert simplification of ghost_assertions
The previous simplfication broke SimplExportAndRefine.
2017-08-09 17:02:50 +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 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