Commit Graph

766 Commits

Author SHA1 Message Date
Gerwin Klein daca9fbcb4 aarch64 haskell: validate InvocationLabels
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 5b77789f9d aarch64 haskell/design: sync names with C
The top-level object type is called `VSpaceObject` in C, so we use the
same name here. The top-level cap is `VSpaceCap` in C, but since we
want to keep it as a flag in the PT Cap in the specs, we call the flag
`capPTisVSpace` for consistency.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Rafal Kolanski 624ec70eb4 caseconvs: add AARCH64 design spec cases
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Rafal Kolanski cfd2990fa6 haskell translator: add AARCH64, platform TX2
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Rafal Kolanski 6052cb4bc0 haskell-translator: allow `\` to continue lines in input files
Haskell translator import statements in skeleton files can get very
long, and keeping them as one line is rather inconvenient. This change
allows a backslash (`\`) at end-of-line to indicate line continuation.

Note: the `\` acts like in shells, i.e. it must be exactly at EOL.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 52024490d5 asmrefine: remove obsolete simp rules
These are either not necessary any more or are now in the simpset by
default.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein a6c3ac2901 isabelle2021-1: AsmRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 3196054268 isabelle2021-1: remove extend from TheoryData
No longer required in Isabelle2021-1 for TheoryData and GenericData

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein afb3c7291c isabelle2021-1 autocorres: context in convs
Conv.params_conv changes the context, and the inner conversion that
it runs needs to work on that inner context, otherwise information
is lost about which of the Free variables are former Bound.

Isabelle2021-1 has more thorough checking and fails when the wrong
context is provided.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 0fbe82511d isabelle2021-1: AutoCorres
After these changes AutoCorres type checks and compiles, and the proofs
work, but for most test cases we still get runtime exceptions.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein ed194a6bc4 isabelle2021-1 c-parser: update CParser + tests
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein a235a0aec6 isabelle2021-1: sync Simpl from AFP
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
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 ffcaff6af9 c-parser: provide AARCH64 setup
The setup for L4V_ARCH=AARCH64 is identical to RISCV64, i.e. same word
length, encoding, and endianness. The setup includes the standalone
parser used for compile and preprocess checks in the seL4 repo.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-02-03 16:13:45 +11:00
Gerwin Klein ab358b835d autocorres: update release.py to python3
Apparently, we still did releases with python2 in the past. This commit
updates the script to work cleanly with python3 and with both of Linux
and Darwin.

For the latter, untarring and executing a downloaded tarball is not
easily supported on MacOS, so instead of the tarball, we take a path to
the already unpacked Isabelle release.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-31 13:41:58 +11:00
Gerwin Klein 2cf262f2b0 autocorres: release notes for autocorres-1.8
Includes some minor documentation updates.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-31 13:41:58 +11:00
Gerwin Klein 770e7a31b9 cparser: add release notes for c-parser-1.18
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-31 13:41:58 +11:00
Gerwin Klein c8a5b00bbc cparpser: make release notes more readable
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-31 13:41:58 +11:00
Gerwin Klein 0c06287c19 cparser: adjust mkrelease for MacOS
Makes the release script more portable between BSD (MacOs etc) and
Linux. Assumes a `brew` install on MacOs instead of the older macports.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-31 13:41:58 +11:00
Gerwin Klein 71bbff2eca cparser: guard bash invocation
Standard bash on MacOS is very old; invoking it via /usr/bin/env allows
the user to put a newer version in the PATH.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-31 13:41:58 +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 1b6d1e9d3c isabelle-2021 c-parser: simp rules for word types
typ_name of word types was not simplifying fully, because a shorter
simp rule is taking precedence over the shortcut rules. The added
rules make the system confluent again.

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 956b2b85e5 isabelle-2021: CParser update for all L4V_ARCH
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein 997adaf9f3 isabelle-2021: update AutoCorresQuickstart
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
Gerwin Klein ee8dbcb09c isabelle-2021: AutoCorres update
includes Word_Lib tweaks

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 90032b64b5 isabelle-2021 cparser: Word_Lib include
Word_Lib was included multiple times in the graph, leading to name
shadowing. This commit makes Addr_Type the single point of entry.

Includes some cleanup/warning reductions.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 9d7efd75e2 isabelle-2021: cparser+tests update
This includes a tweak to Word_Lib to simplify ucast(-1) which
is now a term that occurs more often.

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 411b4221b1 isabelle-2021: sync Simpl with AFP
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 28bc26c925 isabelle-2021: HOL-Word now in HOL-Library
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 512f62858a autocorres: update project link
Moved from D61 to https://trustworthy.systems

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-25 11:22:05 +10:00
Gerwin Klein 06e83ccff5 READMEs: update software links
These have also moved to https://trustworthy.systems

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-25 11:22:05 +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
Matthew Brecknell 4278e99aa4 riscv crefine: generalise and move some lemmas
Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2021-03-23 22:40:46 +11:00
Corey Lewis dd6529f520 trivial: fix c-parser link
This reverts commit 985ce0d28a.

Signed-off-by: Corey Lewis <Corey.Lewis@data61.csiro.au>
2021-03-12 10:48:55 +11:00
vjackson725 f6009f8531 c-parser: rewrite functional-record-update fN defs
Loading the FunctionaRecordUpdate file in Isabelle is slow.
This change expands the fN family of functions, which fixes the problem.

Signed-off-by: vjackson725 <v.jackson@unsw.edu.au>
2021-03-05 18:32:43 +11:00
Matthew Brecknell 96545a8312 c-parser: use fresh names for temporaries
Prior to rendering an expression to SIMPL, the C parser extracts
function calls from the expression and reinserts them as new statements
placed just before the statement containing the expression. The result
of each such function call is assigned to a temporary variable which
takes the place of the function call in the original expression.

Prior to this commit, the C parser would not always generate fresh
temporary variable names when multiple temporaries were needed. In
particular, when the left-hand side of an assignment contained a
function call returning the same type as a function call in the
right-hand side expression, the extracted function calls would be
assigned to the *same* temporary variable.

This commit addresses the issue by carrying name generation state across
all expressions in each statement. It implements a state monad as an
abstract data type for this purpose.

Fixes https://sel4.atlassian.net/browse/VER-1389.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2021-03-02 19:39:12 +11:00
Gerwin Klein 985ce0d28a trivial: fix c-parser link
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-03-02 11:44:22 +11: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
Matthew Brecknell 13ca552d67 autocorres: fix code inclusion in quickstart doc
The AutoCorres quickstart document includes code from `*.c` files from a
given line number, to avoid including license headers and other details
that aren't useful in the document. This updates the line numbers for
the current license headers.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-11-24 10:17:37 +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
Matthew Brecknell 898e5afc63 c-parser: improve asm support in modifies proofs
This commit adds support for inline assembly whose `lhs` updates a
global variable (such as the heap).

Prior to this commit, the modifies prover assumed that the `lhs` update
of an `asm_spec` only updated local variables. Specifically, the use of
`asm_store_eq_helper[OF globals.surjective globals.surjective]` as a
rewrite rule assumes that `globals (lhs v s)` simplifies to `globals s`,
exposing the `asm_store` inside `s` to the rewrite rule.

This commit avoids the assumption by using `globals.equality` as an
introduction rule. This produces more subgoals, but the subgoals are
relatively simple, so the perfomance is essentially unchanged.

This also slightly refactors `modifies_tactic` slightly:
- `asm_spec` is handled without the `vcg`, using a new rule
  `asm_spec_preserves`. This avoids having to deal with
  `asm_spec_enabled` separately in `modifies_tactic`.
- `seq_all_new`, which chains `THEN_ALL_NEW`, avoid the need to
  repeatedly use `ALLGOALS`.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-11-23 15:32:23 +11:00
Gerwin Klein e51ea95427 autocorres: README update for Isabelle2020 and RISCV64
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-02 17:16:46 +10:00
Gerwin Klein aff203786c c-parser: now Isabelle2020; mention RISCV64
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-02 17:16:46 +10:00
Gerwin Klein be78194fee c-parser: RELASES was renamed
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-02 17:16:46 +10:00
Gerwin Klein 3ab83bb94a c-parser: also release RISCV64 arch
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-02 17:16:46 +10:00
Gerwin Klein 40d9783ef2 c-parser: use markdown extension
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-02 17:16:46 +10:00