wp rules for most operators such as return, get, gets are named
return_wp, get_wp, etc. Then when, whenE, unless, unlessE operators had
an additional hoare_.. prefix that this commit removes for more
consistency.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Moving `Monad_Equations.thy` and `More_NonDetMonadVCG.thy` into Monads
session enables us to remove the Lib and CLib session dependencies in
AutoCorres.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Remove dependency on Lib.thy. Theory imports of AutoCorres are now
reduced to theories that can be moved out of the Lib session.
The proof context changes a bit, but impact on test cases is minimal.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Since most bitwise operations are now available by default for nat,
only word abstraction in AutoCorres depends on NatBitwise.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
It has no other lib dependencies and over time should probably be
merged directly into umm theories. For now, move the entire file
and keep dependency structure.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Fix missing quotes. It looks like this ROOT file worked with `isabelle
build` before, but it did not work interactively.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
The default (=first) Makefile target for the standalone parser was
`all`, which gains additional dependencies in the included Makefile.
We want `make` in this directory to just build the standalone parser,
so we set `stp_all` as the default.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
GHC 9.0.2 requires a space between ! and the operand to distinguish
the expression from a bang pattern.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
GHC 9.0.2 is more strict in its pattern syntax and rejects @ patterns
that are surrounded by parentheses.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Explicitly provide file information for errors and warnings (where not
already present in the message).
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
- Make message printing available to pars_skl.py as well, not only
lhs_pars.py.
- Add potential file/line number information printing (so far unused).
- Print status messages in a status line in the terminal (and stdout
without terminal).
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Suppress parameterised-type warnings for types we know have been
defined in Isabelle already.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Use ANSI yellow + red to make warnings/errors stand out from output.
Suppress colours if output is not a tty, apart from on GitHub, where
they do get rendered by the interface even though it is not a tty.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Use functions for uniform error reporting, so we can later introduce
terminal colours, verbosity options etc.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This target was used in the regression test setup before this repo
switched to `run_tests` and has been unused for some time.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
The pattern syntax in Isabelle that is generated for record field names
needs to escape _ in the name with ' to distinguish the _ from a dummy
pattern.
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
In order to compare ASTs for appearance/disappearance/modification of
declarations, it is easier to have the annotations obvious to any
external tool for ease of parsing.
Annotations take the form:
"##<decl_type>: <name>", e.g. "##Function: ctzl"
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
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>
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>
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>
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>