Commit Graph

741 Commits

Author SHA1 Message Date
Rafal Kolanski 8c42173a70 Word_Lib: add from_bool_eqI 2020-02-13 12:29:52 +11:00
Rafal Kolanski 327bed748d lib: migrate distinct_map_enum into Lib 2020-02-13 12:29:52 +11:00
Rafal Kolanski 88e6737337 lib: add corres_cases'
This version augments the schematic preconditions with the knowledge of
which case we are in. It should replace corres_cases eventually.
2020-02-13 12:29:52 +11:00
Zoltan Kocsis 72064236cd word-lib: strengthen ucast_less_ucast 2020-02-05 17:50:45 +11:00
Zoltan Kocsis 43fc7e26d8 word-lib: add upward cast monotonicity lemmata 2020-02-03 16:53:43 +11:00
Corey Lewis d21ea9da41 lib: reimplement crunch call stack feature so that it works when proofs fail.
This stopped working when crunch was changed to fork proofs.
2020-01-30 15:09:44 +11:00
Corey Lewis 5120e351b3 lib: improve wp tracing
When tracing wp can now print the instantiated version of the rules being used.
It also says which set each used rule is from.
2020-01-29 09:26:18 +11:00
Corey Lewis 7107f9abaf lib: implement instantiate_thm for Trace_Schematic_Insts
This is a function that instantiates a thm with the instantiations provided by
trace_schematic_insts.
2020-01-29 09:26:16 +11:00
Corey Lewis 9b9ae104fc lib: restructure the instantiations type of Trace_Schematic_Insts
This allows us to explicitly record the bound variables from the subgoal so that
they can be more easily handled. We also now drop binders when constructing typ
instantiations.
2020-01-29 09:26:15 +11:00
Gerwin Klein 1970ed0ce0 word_lib internal + crefine: remove duplicate lemma 2019-11-15 12:08:22 +11:00
Gerwin Klein 3bce45dd25 word_lib: avoid shadowing existing lemma 2019-11-15 12:08:20 +11:00
Gerwin Klein 0fc9ab947d word_lib: add new material from l4v to AFP; cleanup 2019-11-15 12:08:20 +11:00
Gerwin Klein 9a1231bf97 word_lib internal: move up lemmas from Word_Lemmas_Internal
(non-AFP part)
2019-11-15 12:08:20 +11:00
Gerwin Klein 13143d7246 word_lib internal: cleanup 2019-11-15 12:08:20 +11:00
Gerwin Klein ad8923293e word_lib: shorter, more automatic proofs 2019-11-15 12:08:20 +11:00
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