Commit Graph

839 Commits

Author SHA1 Message Date
Gerwin Klein 49f75949b0 isabelle2021-1: CSpec (via lib/BitFieldProofsLib)
Isabelle2021-1 simplifies `a << Suc 0` too eagerly, so we add simp
rules to compensate for new forms of goals. Removing the too-eager simp
rules would be less stable against theory merge.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 78930612c3 isabelle2021-1: Sep_Algebra
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 71e78ac126 isabelle2021-1 word_lib: make bit_simps [simp]
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein c9f8e023f4 isabelle2021-1 word_lib: tweak word_eqI method
More controlled simpset setup, so we don't get warnings if we have
bit_simps in the simpset already.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein a0bf14024e isabelle2021-1 word_lib: sync from AFP
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein ac87d6e28b lib: update for Word_Lib tweaks
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein bba7dd942b word_lib internal: update from definition tweaks
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 15d9167521 word_lib: provide more backwards compatible names
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 60126b5591 word_lib: use more general bit_simps in word_eqI
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 3196054268 isabelle2021-1: remove extend from TheoryData
No longer required in Isabelle2021-1 for TheoryData and GenericData

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 84a8b4a4dd isabelle2021-1 clib: update CLib session
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 0f633ce387 isabelle2021-1 lib: update Lib session, retire wpx
The benefit of the wpx method is not worth the maintenance effort.
There are still a few instances of wpx left in AInvs, which will have
to be fixed later.

We are keeping the wps method from the same file (WPEx.thy), because
that is used more widely and does not break with Isabelle2021-1

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 7ce3ccb068 isabelle2021-1 lib: remove unused theories
In particular, retire the unused AutoLevity and TSubst

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 25d2da46e1 isabelle2021-1: Word_Lib adjustments for l4v
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 1b15714cbf isabelle2021-1: sync Word_Lib from afp
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Michael McInerney 9b7df2713b lib: add forward_inv_step_rules set and forward_inv_step method
Signed-off-by: Michael McInerney <m.mcinerney@unsw.edu.au>
2022-03-28 11:04:05 +10:30
Michael McInerney 416a097cec lib: add hoare_seq_ext_skip and friends (from AInvs)
This commit was cherry-picked from the rt branch.

Signed-off-by: Michael McInerney <Michael.McInerney@data61.csiro.au>
2022-03-08 21:49:10 +10:30
Michael McInerney f9234e9f27 lib: add FIXME for repeat_unless
Signed-off-by: Michael McInerney <m.mcinerney@unsw.edu.au>
2022-03-08 21:49:10 +10:30
Michael McInerney ce3fc6b9b4 lib: add repeat_unless Eisbach method
The repeat_unless method allows one to repeatedly apply some method
until some other method can be applied. This should be particularly
useful in Hoare triple proofs that use the forward-reasoning style

This commit was cherry-picked from the rt branch.

Signed-off-by: Michael McInerney <Michael.McInerney@data61.csiro.au>
2022-03-08 21:49:10 +10:30
Gerwin Klein d3ecd0e451 aarch64 lib: add 64 bit word setup
This is equal to the setup for RISCV64 and X64.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-02-03 16:13:45 +11:00
Gerwin Klein 78007a4179 lib: add value_type command
The `value_type` top-level command allows evaluating a term down to a
natural number, and using that number to define an enumerated type, as
well as (optionally) a constant definition.

Co-authored-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-12-22 23:50:22 +11:00
Ryan Barry 72ab7cc180 various: resolve some new fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-11-12 09:39:16 +11:00
Corey Lewis f28ce0b310 lib: notify if crunch generates side-conditions
Signed-off-by: Corey Lewis <corey.lewis@unsw.edu.au>
2021-11-10 16:39:23 +11:00
Gerwin Klein 203af59e29 word_lib: make sure Word_Lib setup is not shadowed
The theory import order is important for name shadowing, including
default rules for induction and cases. This commit makes sure we
get the Word_Lib version by default, not the HOL.Word version.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein c5a3917a6d lib: retire OR syntax for monads
The syntax OR for nondeterministic choice between two executions now
conflicts with the OR bit operation from the Isabelle distribution.
Since it was almost unused anyway, we remove it entirely and use only
the \<sqinter> symbol instead.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein ac325266b8 Word_Lib: make word_and_max_simps 64bit clean
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein 414eb5ce3d Word_Lib: simplify numeral + Suc 0 expressions
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein be4d042525 isabelle-2021: add no_0_dvd bundle
Terms of the form "of_nat x = 0" get rewritten into
"~x dvd 2^LENGTH('a)", which is almost never what you want for
concrete word sizes. This bundle makes it easy to remove those rules
locally.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein c0294c5fa2 isabelle-2021: update EVTutorial
Isabelle2021 uses lualatex by default, which chokes on the pdfglyph
setup. On the upside, it seems to be supporting the correct code for
searchable ligatures already by default, so we can remove this setup.

Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein ade042b0bd isabelle-2021: update Sep_Algebra
Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 993eb87a4b isabelle-2021 arm: AInvs update
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 77b4881697 autolevity: avoid overlapping position info
The @{here} antiquotation position leads to overlapping position
information which confuses the Isabelle session manager.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 4bf1635b2f cleanup: reduce warnings
This mostly refactors ML code to avoid non-exhaustive matches, restore
the (op infix) syntax that got lost in a previous Isabelle update, and
removes some unused functions/parameters.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 42e174ce1f isabelle-2021: additional word lemmas
These were needed in the rest of the Isabelle2021 update.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein 0dba5d8331 word_lib: sync with AFP
This commit makes set_bit possible to instantiate for type nat.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 0bc533943b isabelle-2021: update CSpec
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein ee8dbcb09c isabelle-2021: AutoCorres update
includes Word_Lib tweaks

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 7f94f3d8cb isabelle-2021: clib update
Mostly related to Word_Lib changes.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 4afa4734a5 word_lib: remove unused theories
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 8715767431 word_lib: reduce warnings
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 84fc895f21 word_lib: Word_x shadow each other
Word_32 and Word_64 shouldn't be included at the same time, they
both define default word_size and other notions. This commit refactors
them to be usable independently and also makes the type names available
independently from all of the Word_x theories.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 9d7efd75e2 isabelle-2021: cparser+tests update
This includes a tweak to Word_Lib to simplify ucast(-1) which
is now a term that occurs more often.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein f2fc2345fe isabelle-2021: update Lib
This includes the removal of the theory Extend_Locale, which was an
(unused) experiment.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Florian Haftmann ea9a25950d isabelle-2021: ad-hoc adjustions to preview
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 83710a1d81 isabelle-2021: Lib update
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 28bc26c925 isabelle-2021: HOL-Word now in HOL-Library
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein dadb0b9f0a isabelle-2021: sync Word_Lib from AFP
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 81b95eb6bf READMEs: fix publication links
PDFs and abstracts have moved to trustworthy.systems/

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-25 11:22:05 +10:00
Ryan Barry a99a2bf739 various: resolve some existing fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 0d53d6909f lib+ainvs+access+refine: resolve most of the new fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00