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>
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>
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>
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>
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>
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>
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>
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>
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.
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'.