| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Also be more careful to avoid pattern bindings with identifiers to avoid
parsing clashes, eg `let 'bytes := ...` which is confused with the
notation for binary literals.
|
|
|
|
|
|
Now used in RISC-V model.
|
|
Useful for tracking down non-determinism
|
|
|
|
Was being overly conservative with nested structs and used an incorrect location for the error message
|
|
This is useful because an arbitrary vector of a fixed size N can be represented symbolically as a
vector of N symbolic values, whereas an arbitrary vector of arbitrary size cannot be easily
represented.
|
|
|
|
Instead handle it specially in c_backend, leaving the type information in the IR available for other consumers
|
|
|
|
(using match rather than let-and-projections because the latter would
be reduced by tactics like unfold)
|
|
|
|
- add liftRS support to tactics
- define uint and sint in terms of functions without proof terms
- eq_vec correctness
- lemma that rounding up integers using reals is the obvious integer calculation
- another proof irrelevance tactic
- try lemmas in the sail hintdb both before and after goal processing
|
|
execution
|
|
|
|
|
|
|
|
|
|
Add github actions to build on macOS and ubuntu
|
|
This commit adds two github action to build Sail on macOS and ubuntu (both using the latest version
of each for now). These just build and don't run any tests, as we run those on our own Jenkins
server which is much faster than the github build runners.
I also fixed INSTALL.md to include brew installing pkg-config on macOS as this seems to be required.
From testing on a personal fork it seems quite email happy when it fails. Maybe that's what we want
though.
There's also a windows option but I leave that as future work...
|
|
Now we less desugared ASL we'd like to translate some notions more idiomatically, such as bitfields
with names. However the current bitfield implementation in Sail is really ugly (entirely my fault)
This commit introduces a new flag -new_bitfields which changes the behavior of bitfields as follows
bitfield B : bits(32) = {
Field: 7..0
}
Is now treated as a struct with a single field called `bits`
register R : B
function main() -> unit = {
R[Field] = 0xFF;
assert(R[Field] == 0xFF)
}
then desugars as
R.bits[7..0] = 0xFF
and
assert(R.bits[7..0] == 0xFF)
which is much simpler, matches ASL and is probably how it should have worked all along
|
|
- break up goals more in unbool
- remove intuition from guess_ex_solver because it can be too expensive
- flip goals around because the side that evars appears on has changed
- generalise the and/or tactics
- make a couple of tactics more specific/robust
|
|
|
|
|
|
Includes removing an explicit use of a lemma generated by abstract, which
was causing problems with different versions of Coq because the names
change.
|
|
Mostly from making the aarch64 model compile again
- switch order some arithmetic lemmas
- move list membership rewrites alongside other comparisons to enable more
rewriting
- copy hypotheses used in other types/definitions so that they can be
rewritten
- lift boolean existentials out of implications in hypotheses so they can
be used as witnesses without proving the condition
- add negation to solve_bool_with_Z
- add some new bool solving for goals from and_boolMP/or_boolMP
|
|
|
|
|
|
|
|
|
|
Other minor tweaks.
|
|
the wiki page).
|
|
... not just in type abbreviations.
Fixes an error in the RV32 build of CHERI-RISC-V.
|
|
(plus test, as it wasn't covered before)
|
|
|
|
Don't include length and indexing order in Regval_vector constructor, as
these can get in the way of proofs without providing any value.
|
|
- ArithFact takes a boolean predicate
- defined in terms of ArithFactP, which takes a Prop predicate,
and is used directly for existentials
- used abstract in more definitions with direct proofs
- beef up solve_bool_with_Z to handle more equalities, andb and orb
|
|
If, for example, we have a bidirectional encoding-decoding mapping as in
sail-riscv, but want to translate only the decoder to a theorem prover,
this commit allows us to stub out the the encoder by splicing in dummy
definitions.
|
|
|
|
|
|
|
|
The val spec generation for partially evaluated function copies did not
pick up type variables originally declared using the new "constant"
syntax, as well as some implicit existential variables (e.g. in "bool")
that were not declared originally but appear and get bound during
instantiation. Change the code to just recreate the list of type
variables from scratch from the new type. This will lose "constant"
annotations, but the new list of type variables should be correct.
|
|
When considering whether to add a cast, now also consider the updated
environment within an if branch / match clause to compare against the
outer environment. This picks up not only constraints on type variables
added by an if condition or pattern guard (e.g. "if (size == 16) ..."),
but also constraints depending on those (e.g. in "bits('width)" where
"'width == 'size * 8"). Fixes a type error observed when generating Lem
for sail-arm (in aget__Mem).
|
|
... with one field per register *type*, instead of one field per
register. The fields store functions from register name to value.
This leads to dramatically reduced processing time for the register
state record in HOL4.
|
|
|
|
Means we can avoid the use of -undefined_gen for Sail->SMT
|