Commit Graph

726 Commits

Author SHA1 Message Date
Gerwin Klein e5ce178f1e word_lib: add mask_range 2019-11-15 12:08:20 +11:00
Gerwin Klein 3cffac8415 word_lib: word_eqI and word_eqI_solve methods
Improvements on initial version by Thomas Sewell
2019-11-15 12:08:20 +11:00
Gerwin Klein 16c15920a8 lib: move word_eqI_solve out of HaskellLemmaBucket 2019-11-15 12:08:20 +11:00
Gerwin Klein 59818de68e lib: avoid ambiguous syntax 2019-11-15 12:04:50 +11:00
Gerwin Klein bdd882d17e lib: more lifting rules for validE_R and validE_E 2019-11-15 12:04:50 +11:00
Victor Phan 67b8237e61 lib: add word lemma
Add of_nat_unat_le_mask_ucast: equality of words where one is wrapped with
of_nat (unat _).
2019-11-12 18:28:40 +11:00
Gerwin Klein a5e27933a5 riscv: cleanup; resolve remaining FIXMEs 2019-11-12 18:28:40 +11:00
Gerwin Klein d2584a3692 cleanup: collect word lemmas 2019-11-12 18:28:40 +11:00
Victor Phan 67bba7edc3 lib, x64 crefine: remove word lemma unat_ucast_8_64
unat_ucast_8_64 states that upcasting an 8 word to a 64 word does not
changes its value. We have a generic lemma for this which can be
specialised to this lemma: unat_ucast_up_simp[where 'a=8 and 'b=64,
simplified].
2019-10-30 19:09:39 +11:00
Corey Lewis 41b486365c lib: add a warning if crunch fails and top-level constant is being ignored 2019-10-15 15:07:50 +11:00
Corey Lewis b6689ba321 lib: restrict safe in core crunch tactic so that we can avoid passing around the index 2019-10-14 17:23:42 +11:00
Corey Lewis 8c3e7aa103 lib: make wp_cases_tac subgoal aware 2019-10-14 17:23:41 +11:00
Corey Lewis 96588daf92 lib: improve message printing for crunch and wp, and refactor common printing functions 2019-10-14 17:23:41 +11:00
Corey Lewis 9a9c6320be lib: various crunch improvements
The main one is that crunch now uses wpsimp when determining whether a goal
can already be solved, instead of just wp. Crunch can also now use wps
when proving a goal and will now always ignore a constant if told to, even
if it is the top-level constant being crunched.
2019-10-14 17:12:29 +11:00
Corey Lewis 36e7fe3e50 lib: update for wp changes 2019-10-12 16:22:24 +11:00
Corey Lewis f757e0ca5b lib: wp cleanup and parser improvements
The main visible change is from wp_trace', 'wp_once' and 'wp_once_trace' to
'wp (trace)', 'wp (once)' and 'wp (once, trace)'. The option for printing a
warning for unused supplied wp rules has also been removed.
2019-10-12 16:22:24 +11:00
Victor Phan bbfd9e2a82 lib: add helper lemmas 2019-10-10 11:27:17 +11:00
Victor Phan ccb5174b94 lib: add lemma hoare_vcg_disj_lift_R
Lifts a Hoare triple with disjunctions in the pre and post-conditions
into two separate Hoare triples.
2019-10-10 11:27:01 +11:00
MiladKetabi 1a49aacc31 lib: three lemmas moved from refine theories 2019-10-06 18:31:19 +11:00
Japheth Lim 26f450f2f4 lib: change @{file} antiquote to @{path}
When extracting files for C parser and AutoCorres standalone releases,
we don't want Isabelle to fail a build when files referred to in
`@{file}` antiquotations no longer exist. Using `@{path}` avoids this
problem.
2019-09-05 14:19:14 +10:00
Edward Pierzchalski ba5983d22e lib: extend schematic instantiation tracer
Adds a combinator, `trace_schematic_insts_tac`, which wraps a rule-using
tactic and reports any schematic instantiations.
2019-08-27 16:12:06 +10:00
Edward Pierzchalski 8ffebe8f94 lib: add utilities for using options. 2019-08-27 16:12:06 +10:00
Edward Pierzchalski b0cf5638fd lib: trivial: use cartouches for ML comments.
Useful for antiquotations.
2019-08-27 16:12:06 +10:00
Japheth Lim 2c3b4c24fc CamkesCdlRefine, Lib: add debug tag for integrity policy
This tags each generated policy goal with the object and cap that
led to that goal.

We create a new constant `generic_tag` in Lib for this purpose.
2019-08-21 14:23:22 +10:00
Gerwin Klein f29e73bc58 lib: move more facts on Numeral_Type from invariant proofs into lib 2019-07-31 16:56:29 +10:00
Rafal Kolanski d804b7a8d1 Word_Lib: add ucast_shiftl_eq_0 2019-07-31 16:55:32 +10:00
Rafal Kolanski e46f2d7af0 lib: add graph_of_SomeD 2019-07-31 16:55:32 +10:00
Rafal Kolanski 212ea6724a lib: add obind_eqI_full to OptionMonad
Sometimes after showing equality of the heads of the obind, we need this
result in proof of equality of the tails.
2019-07-31 16:55:32 +10:00
Rafal Kolanski f3d95dbb8f Word_Lib: add masking lemmas from RISCV64 lookup proofs 2019-07-31 16:55:31 +10:00
Gerwin Klein 7a4d5b1ea9 lib: general update lemmas for opt_map 2019-07-31 16:55:31 +10:00
Gerwin Klein 65cc19c172 lib: move up library lemmas from RISCV64 and X64 2019-07-31 16:55:31 +10:00
Rafal Kolanski 4cc9a1fb19 lib: add option_Some_value_independent 2019-07-31 16:55:31 +10:00
Rafal Kolanski 66d87cd550 lib: OptionMonad: add more obind decomposition, oassert simps 2019-07-31 16:55:31 +10:00
Gerwin Klein b5cb85de96 lib: complete/full induction for Numeral_Type 2019-07-31 14:13:56 +10:00
Gerwin Klein 39e7b65aad lib: additional library lemmas for Numeral_Type 2019-07-31 14:13:56 +10:00
Gerwin Klein bd7a6113ae lib: more library lemmas for OptionMonad 2019-07-31 14:13:56 +10:00
Japheth Lim 18a40abd44 lib: move int bitwise lemmas from NatBitwise to Lib
NB: this now imports HOL-Word into Lib and Lib in turn
into NatBitwise.
2019-07-24 11:00:13 +10:00
Japheth Lim 44bdf90ae8 autocorres, lib: refactor `nat :: bit_operations` instance
This refactors the instances in HaskellLib and AutoCorres into a new
theory, Lib.NatBitwise.
2019-07-24 11:00:02 +10:00
Gerwin Klein c34840d09b global: isabelle update_cartouches 2019-06-14 11:41:21 +10:00
Michael McInerney c13432b0c4 misc updates for Isabelle2019 2019-06-14 11:41:20 +10:00
Michael McInerney 6ff1a38f65 lib: update for Isabelle 2019 2019-06-13 16:22:33 +10:00
Gerwin Klein c409f85ec9 lib: remove obsolete theory import 2019-06-13 16:22:33 +10:00
Gerwin Klein 21f9a86dd9 lib: sync Word_Lib with AFP 2019-06-13 16:22:33 +10:00
Michael McInerney 81dab3dcec lib: add unit_dc_is_eq 2019-06-13 11:43:50 +10:00
Edward Pierzchalski e8e40a572c lib: Use `datatype_schem` arguments in `wpfix`.
`wpfix` delegates to `datatype_schem`, so we include the option to add
new accessor lemmas.
2019-06-12 10:35:48 +10:00
Edward Pierzchalski 02dcb099ff lib: Allow additional rules for `datatype_schem`.
Previously, the method `datatype_schem` used a specific list of
hard-coded rules to "fix" datatypes in schematics. This adds an
attribute so users can add new datatype "lenses"/"accessors" as needed.
2019-06-12 10:35:37 +10:00
Edward Pierzchalski 7ac89448a1 lib: Add `find_index`. 2019-06-12 10:35:32 +10:00
Edward Pierzchalski c1e9a09e26 lib: move "tl_nat_list_simp" up. 2019-05-28 10:00:10 +10:00
Japheth Lim c397b16f42 lib: license header for RangeMap 2019-05-20 00:15:31 +10:00
Japheth Lim 071ebbd398 lib: move @{mk_term} antiquotation from AutoCorres; add examples 2019-05-17 18:07:59 +10:00