Commit Graph

39 Commits

Author SHA1 Message Date
Corey Lewis a6ffe216e3 lib: improve crunch warning message
Refactor crunch to separately specify whether crunch_simps or
crunch_wps might be useful instead of printing one combined message.

Signed-off-by: Corey Lewis <Corey.Lewis@data61.csiro.au>
2020-07-24 11:55:50 +10:00
Corey Lewis dad926df45 lib: improve crunch warning message
Change crunch to only warn when crunch_simps or crunch_wps can make
progress on the first goal. Previously it would try on all remaining
subgoals, which led to spurious warnings when schematic postconditions
could be unified incorrectly.

Signed-off-by: Corey Lewis <Corey.Lewis@data61.csiro.au>
2020-07-23 17:35:52 +10:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Corey Lewis 170e8109ec lib: refactor crunch warning messages to handle functions with multiple patterns
Crunch would print spurious warning messages when using a rule with multiple
premises. By default, crunch generates a rule like that when applied to
functions with multiple non-trivial patterns.
2020-02-28 13:46:25 +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 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 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
Corey Lewis 95ddba3da5 lib: improve the parser for crunch.
The main benefit of this is that everything in crunch is now ctrl clickable.
As an added benefit, supplied rules can now be modified by attributes when
needed.
2019-04-16 15:18:49 +10:00
Thomas Sewell ea7c58bf13 lib/crunch: use induct package.
Discard some magic that was done to instantiate an induction rule,
and instead use the existing Induct_Tacs package to apply induction
rules, which seems to be successful more often.
2018-08-03 12:20:49 +10:00
Corey Lewis d77d31a77c lib: Refactor crunch so that it can be used for both the nondet monad and the trace monad 2018-06-26 14:45:28 +10:00
Corey Lewis c686d6e776 lib: Make Crunch more effective at applying supplied rules 2018-06-08 15:48:32 +10:00
Corey Lewis dceb2692e2 lib: Add a warning to crunch if it does not do anything 2018-06-06 10:41:17 +10:00
Corey Lewis 55d20591b4 lib: improved crunch
The main aim of this is for crunch to make consistent decisions about
whether to prove new rules. If any rules in the wp set can be used to
directly solve the goal crunch is working on, then crunch will just
use it.

Other changes include:
  - crunch_ignore works properly inside locales again.
  - if a rule already exists with the specific name crunch is going
    to use, but that rule does not solve the goal crunch is working on
    then crunch will now error.
  - if crunch fails to prove a goal it will now output a warning if
    adding crunch_simps or crunch_wps would allow it to make more
    progess.
2018-04-04 12:09:47 +10:00
Thomas Sewell a70aeda39b lib: Datatype_Schematic and WPFix.
Add two new tactics/methods which can fix common painful problems with
schematic variables.

Method datatype_schem improves unification outcomes, by making judicious use of
selectors like fst/snd/the/hd to bring variables into scope, and also using a
wrapper to avoid singleton constants like True being captured needlessly by
unification.

Method wpfix uses strengthen machinery to instantiate rogue postcondition
schematics to True and to split precondition schematics that are shared across
different sites.
2018-03-16 14:55:33 +11:00
Thomas Sewell d2f38a0a80 lib: Add multi-crunch command 'crunches'.
It's just a parser tweak for crunch, and runs multiple crunch commands
with the same sections (wps, ignores, etc).

Also update the comments a little, and move them closer to the anchor of
command clicks (the @{command_keyword} antiquotation).
2018-02-02 10:26:15 +11:00
Thomas Sewell 5152952abb lib: Cleanup in crunch-cmd.ML
Mostly syntactic. Ensure less debug messages are generated
unconditionally.
2018-02-02 10:26:09 +11:00
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
Matthew Brecknell 30122b5d80 Isabelle2016-1: update to new ML API
Update references to renamed ML constants; supply default arguments to
functions with additional parameters; etc.
2017-01-05 14:26:14 +11:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Thomas Sewell 9a1ec71a2d Refactor of crunch.
Substantial adjustments to crunch. Main user changes are:
  - 'lift' and 'unfold' mechanisms replaced by more general 'rule'.
  - some more 'ignores' standardised.
  - crunch has a more principled overall design:
    + discover crunch rule
      * provided or by definition extraction
    + recurse according to rule
    + prove goal based on rule, recursive discoveries, standard tactic
      * wp/simp adjustments tweak tactic
2016-08-24 15:53:53 +10:00
Daniel Matichuk 670d1c118d arch_split: added optional definition override for crunch. Reduced qualification commands to minimal required set. 2016-05-04 15:14:41 +10:00
Daniel Matichuk 0805d9f910 make crunch fork proofs 2016-01-22 16:25:11 +11:00
Daniel Matichuk b7563eb788 fix lib for isabelle 2016 2016-01-12 14:58:16 +11:00
Corey Lewis f0ce95aa11 Fix wp_del for crunch. 2015-11-23 17:46:50 +11:00
Corey Lewis a2cc6ab301 Added wp_del and simp_del arguments to crunch. 2015-11-12 12:23:04 +11:00
Gerwin Klein f2cfeb2a0c lib: fewer warnings in crunch and wps 2015-05-16 21:46:45 +10:00
Gerwin Klein 12fa86863a fewer warnings 2015-05-16 19:52:49 +10:00
Gerwin Klein 17826f9b49 more Isabelle2015 update; AInvs up to (excluding) Syscall_AI
also includes some global replacements
2015-04-18 21:51:26 +01:00
David Greenaway cf0d1abce6 Merge 'master' into 'isabelle-2014'.
Conflicts:
	proof/crefine/Fastpath_C.thy
	proof/drefine/KHeap_DR.thy
	proof/infoflow/Noninterference.thy
	spec/design/version
	sys-init/DuplicateCaps_SI.thy
	sys-init/InitTCB_SI.thy
	sys-init/Proof_SI.thy
	tools/asmrefine/SimplExport.thy
	tools/autocorres/tests/examples/SchorrWaite.thy
2014-09-17 14:21:13 +10:00
David Greenaway 0547cb707b crunch: Reduce tracing messages, use "writeln" instead of "tracing".
Excessinve tracing messages cause jEdit to pause, waiting for the user
to click "Show more tracing output. We eliminate the debugging tracing
messages by default, and use "writeln" instead for the remainder.
("writeln" doesn't cause jEdit to pause.)
2014-09-16 11:14:09 +10:00
Gerwin Klein e8d1ed6ded ported lib/* theories to Isabelle2014-RC0 2014-08-09 21:08:47 +10:00
Gerwin Klein 1af1d2b67b some of the global Isabelle2014 renames
option_case -> case_option
sum_case -> case_sum
prod_case -> case_prod
Option.set -> set_option
Option.map -> map_option
option_rel -> rel_option
list_all2_def -> list_all2_iff
map.simps -> list.map
tl.simps -> list.sel(2-3)
the.simps -> option.sel
2014-08-09 15:39:20 +10:00
Gerwin Klein 50dda7708c comment cleanup 2014-07-22 18:10:20 +02:00
Gerwin Klein 2a03e81df4 Import release snapshot. 2014-07-14 21:32:44 +02:00