Commit Graph

89 Commits

Author SHA1 Message Date
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
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
Matthew Brecknell ce748b7522 x64: create arch-specific CKernel 2017-06-22 17:24:53 +10: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
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 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +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 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
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 7236874353 Support some more signed word cases in asmrefine. 2016-08-09 13:31:29 +10:00
Alejandro Gomez-Londono 93adccc141 license-tool: missing license headers + .licenseignore [VER-551] 2016-07-14 16:34:31 +10:00
Rafal Kolanski 27607011cd verification update for seL4 arm_hyp merge to master 2016-06-22 22:28:36 +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
Joel Beeren 6a2692abc6 lib: fix theory includes for arch-splitted WordSetup 2016-05-20 12:31:10 +10:00
Gerwin Klein 322f1023f5 word_lib: adjust theory dependencies 2016-05-16 21:11:40 +10:00
Matthew Brecknell 84d2889d45 Isabelle2016: merge master into 2016 2016-02-19 16:17:26 +11:00
Gao Xin d2130dc985 GraphRefine: improve while-condition guard stuff.
The existing code only captured a single Guard in the body of a while.
Replace it with some ML for capturing the intersection of all guards.

(Thomas typing on Xin's keyboard.)
2016-02-17 11:18:03 +11:00
Thomas Sewell 228d2d1971 Strengthen prove_ptr_safe.
Handles some signed inequalities, this should solve the issue that
Xin is seeing.
2016-02-12 01:28:31 +11:00
Matthew Brecknell 10ac05453f Isabelle2016: SimplExportAndRefine updated for RC3 2016-02-11 11:16:00 +11:00