NEWS
changeset 17408 551c9a4dd693
parent 17402 41f1249bce37
child 17423 de6b33a4efda
equal deleted inserted replaced
17407:38e0219ec022 17408:551c9a4dd693
    22 non-Isar theories now, but these will disappear soon.
    22 non-Isar theories now, but these will disappear soon.
    23 
    23 
    24 * Theory loader: parent theories can now also be referred to via
    24 * Theory loader: parent theories can now also be referred to via
    25 relative and absolute paths.
    25 relative and absolute paths.
    26 
    26 
    27 * Improved version of thms_containing searches for a list of criteria
    27 * Command 'find_theorems' searches for a list of criteria instead of a
    28 instead of a list of constants. Known criteria are: intro, elim, dest,
    28 list of constants. Known criteria are: intro, elim, dest, name:string,
    29 name:string, simp:term, and any term. Criteria can be preceded by '-'
    29 simp:term, and any term. Criteria can be preceded by '-' to select
    30 to select theorems that do not match. Intro, elim, dest select
    30 theorems that do not match. Intro, elim, dest select theorems that
    31 theorems that match the current goal, name:s selects theorems whose
    31 match the current goal, name:s selects theorems whose fully qualified
    32 fully qualified name contain s, and simp:term selects all
    32 name contain s, and simp:term selects all simplification rules whose
    33 simplification rules whose lhs match term.  Any other term is
    33 lhs match term.  Any other term is interpreted as pattern and selects
    34 interpreted as pattern and selects all theorems matching the
    34 all theorems matching the pattern. Available in ProofGeneral under
    35 pattern. Available in ProofGeneral under 'ProofGeneral -> Find
    35 'ProofGeneral -> Find Theorems' or C-c C-f.  Example:
    36 Theorems' or C-c C-f.  Example:
       
    37 
    36 
    38   C-c C-f (100) "(_::nat) + _ + _" intro -name: "HOL."
    37   C-c C-f (100) "(_::nat) + _ + _" intro -name: "HOL."
    39 
    38 
    40 prints the last 100 theorems matching the pattern "(_::nat) + _ + _",
    39 prints the last 100 theorems matching the pattern "(_::nat) + _ + _",
    41 matching the current goal as introduction rule and not having "HOL."
    40 matching the current goal as introduction rule and not having "HOL."
    42 in their name (i.e. not being defined in theory HOL).
    41 in their name (i.e. not being defined in theory HOL).
    43 
    42 
       
    43 * Command 'thms_containing' has been discontinued in favour of
       
    44 'find_theorems'; INCOMPATIBILITY.
       
    45 
    44 * Communication with Proof General is now 8bit clean, which means that
    46 * Communication with Proof General is now 8bit clean, which means that
    45 Unicode text in UTF-8 encoding may be used within theory texts (both
    47 Unicode text in UTF-8 encoding may be used within theory texts (both
    46 formal and informal parts).  See option -U of the Isabelle Proof
    48 formal and informal parts).  Cf. option -U of the Isabelle Proof
    47 General interface.
    49 General interface; HOL/ex/Hebrew.thy provides a simple example.
    48 
    50 
    49 
    51 
    50 *** Document preparation ***
    52 *** Document preparation ***
    51 
    53 
    52 * Commands 'display_drafts' and 'print_drafts' perform simple output
    54 * Commands 'display_drafts' and 'print_drafts' perform simple output
   522 transformations, notably reverse application and composition:
   524 transformations, notably reverse application and composition:
   523 
   525 
   524   x |> f                f #> g
   526   x |> f                f #> g
   525   (x, y) |-> f          f #-> g
   527   (x, y) |-> f          f #-> g
   526 
   528 
   527 * Pure/library.ML: canonical list combinators fold, fold_rev, and
   529 * Pure/library.ML: natural list combinators fold, fold_rev, and
   528 fold_map support linear functional transformations and nesting.  For
   530 fold_map support linear functional transformations and nesting.  For
   529 example:
   531 example:
   530 
   532 
   531   fold f [x1, ..., xN] y =
   533   fold f [x1, ..., xN] y =
   532     y |> f x1 |> ... |> f xN
   534     y |> f x1 |> ... |> f xN
   538     f x1 #> ... #> f xN
   540     f x1 #> ... #> f xN
   539 
   541 
   540   (fold o fold) f [xs1, ..., xsN] =
   542   (fold o fold) f [xs1, ..., xsN] =
   541     fold f xs1 #> ... #> fold f xsN
   543     fold f xs1 #> ... #> fold f xsN
   542 
   544 
   543 * Pure/term.ML: combinators fold_atyps, fold_aterms, fold_term_types,
   545 * Pure/library.ML: the following selectors on type 'a option are
   544 fold_types traverse types/terms from left to right, observing
   546 available:
   545 canonical argument order.  Supercedes previous foldl_XXX versions,
   547 
   546 add_frees, add_vars etc. have been adapted as well: INCOMPATIBILITY.
   548   the:               'a option -> 'a  (*partial*)
   547 
   549   these:             'a option -> 'a  where 'a = 'b list
   548 * Pure: output via the Isabelle channels of writeln/warning/error
       
   549 etc. is now passed through Output.output, with a hook for arbitrary
       
   550 transformations depending on the print_mode (cf. Output.add_mode --
       
   551 the first active mode that provides a output function wins).  Already
       
   552 formatted output may be embedded into further text via Output.raw; the
       
   553 result of Pretty.string_of/str_of and derived functions
       
   554 (string_of_term/cterm/thm etc.) is already marked raw to accommodate
       
   555 easy composition of diagnostic messages etc.  Programmers rarely need
       
   556 to care about Output.output or Output.raw at all, with some notable
       
   557 exceptions: Output.output is required when bypassing the standard
       
   558 channels (writeln etc.), or in token translations to produce properly
       
   559 formatted results; Output.raw is required when capturing already
       
   560 output material that will eventually be presented to the user a second
       
   561 time.  For the default print mode, both Output.output and Output.raw
       
   562 have no effect.
       
   563 
       
   564 * Pure: Output.time_accumulator NAME creates an operator ('a -> 'b) ->
       
   565 'a -> 'b to measure runtime and count invocations; the cumulative
       
   566 results are displayed at the end of a batch session.
       
   567 
       
   568 * Isar toplevel: improved diagnostics, mostly for Poly/ML only.
       
   569 Reference Toplevel.debug (default false) controls detailed printing
       
   570 and tracing of low-level exceptions; Toplevel.profiling (default 0)
       
   571 controls execution profiling -- set to 1 for time and 2 for space
       
   572 (both increase the runtime).
       
   573 
       
   574 * Isar session: The initial use of ROOT.ML is now always timed,
       
   575 i.e. the log will show the actual process times, in contrast to the
       
   576 elapsed wall-clock time that the outer shell wrapper produces.
       
   577 
       
   578 * Pure: structure OrdList (cf. Pure/General/ord_list.ML) provides a
       
   579 reasonably efficient light-weight implementation of sets as lists.
       
   580 
       
   581 * Pure: structure AList (cf. Pure/General/alist.ML) superseedes the
       
   582 former associaton list functions in library. INCOMPATIBILITY.
       
   583 Naive rewrites:
       
   584 
       
   585   assoc == uncurry (AList.lookup (op =))
       
   586   assocs == these oo AList.lookup (op =)
       
   587   overwrite == uncurry (AList.update (op =)) o swap
       
   588 
       
   589 * Pure: new functions in the family of normalisators for the option type:
       
   590 
       
   591   the:               'a option -> 'a
       
   592   these:             'a option -> 'a where 'a = 'b list
       
   593   the_default: 'a -> 'a option -> 'a
   550   the_default: 'a -> 'a option -> 'a
   594   the_list:          'a option -> 'a list
   551   the_list:          'a option -> 'a list
       
   552 
       
   553 * Pure/General: structure AList (cf. Pure/General/alist.ML) provides
       
   554 basic operations for association lists, following natural argument
       
   555 order.  The old functions may be expressed as follows:
       
   556 
       
   557   assoc = uncurry (AList.lookup (op =))
       
   558   assocs = these oo AList.lookup (op =)
       
   559   overwrite = uncurry (AList.update (op =)) o swap
       
   560 
       
   561 * Pure/General: structure AList (cf. Pure/General/alist.ML) provides
       
   562 basic operations for association lists, following natural argument
       
   563 order; moreover the explicit equality predicate passed here avoids
       
   564 potentially expensive polymorphic runtime equality checks.
       
   565 
       
   566 * Pure/General: structure OrdList (cf. Pure/General/ord_list.ML)
       
   567 provides a reasonably efficient light-weight implementation of sets as
       
   568 lists.
       
   569 
       
   570 * Pure/General: generic tables (cf. Pure/General/table.ML) provide a
       
   571 few new operations; existing lookup and update are now curried to
       
   572 follow natural argument order (for use with fold etc.);
       
   573 INCOMPATIBILITY, use (uncurry Symtab.lookup) etc. as last resort.
       
   574 
       
   575 * Pure/General: output via the Isabelle channels of
       
   576 writeln/warning/error etc. is now passed through Output.output, with a
       
   577 hook for arbitrary transformations depending on the print_mode
       
   578 (cf. Output.add_mode -- the first active mode that provides a output
       
   579 function wins).  Already formatted output may be embedded into further
       
   580 text via Output.raw; the result of Pretty.string_of/str_of and derived
       
   581 functions (string_of_term/cterm/thm etc.) is already marked raw to
       
   582 accommodate easy composition of diagnostic messages etc.  Programmers
       
   583 rarely need to care about Output.output or Output.raw at all, with
       
   584 some notable exceptions: Output.output is required when bypassing the
       
   585 standard channels (writeln etc.), or in token translations to produce
       
   586 properly formatted results; Output.raw is required when capturing
       
   587 already output material that will eventually be presented to the user
       
   588 a second time.  For the default print mode, both Output.output and
       
   589 Output.raw have no effect.
       
   590 
       
   591 * Pure/General: Output.time_accumulator NAME creates an operator ('a
       
   592 -> 'b) -> 'a -> 'b to measure runtime and count invocations; the
       
   593 cumulative results are displayed at the end of a batch session.
       
   594 
       
   595 * Pure/General: File.sysify_path and File.quote_sysify path have been
       
   596 replaced by File.platform_path and File.shell_path (with appropriate
       
   597 hooks).  This provides a clean interface for unusual systems where the
       
   598 internal and external process view of file names are different.
   595 
   599 
   596 * Pure: more efficient orders for basic syntactic entities: added
   600 * Pure: more efficient orders for basic syntactic entities: added
   597 fast_string_ord, fast_indexname_ord, fast_term_ord; changed sort_ord
   601 fast_string_ord, fast_indexname_ord, fast_term_ord; changed sort_ord
   598 and typ_ord to use fast_string_ord and fast_indexname_ord (term_ord is
   602 and typ_ord to use fast_string_ord and fast_indexname_ord (term_ord is
   599 NOT affected); structures Symtab, Vartab, Typtab, Termtab use the fast
   603 NOT affected); structures Symtab, Vartab, Typtab, Termtab use the fast
   600 orders now -- potential INCOMPATIBILITY for code that depends on a
   604 orders now -- potential INCOMPATIBILITY for code that depends on a
   601 particular order for Symtab.keys, Symtab.dest, etc. (consider using
   605 particular order for Symtab.keys, Symtab.dest, etc. (consider using
   602 Library.sort_strings on result).
   606 Library.sort_strings on result).
       
   607 
       
   608 * Pure/term.ML: combinators fold_atyps, fold_aterms, fold_term_types,
       
   609 fold_types traverse types/terms from left to right, observing natural
       
   610 argument order.  Supercedes previous foldl_XXX versions, add_frees,
       
   611 add_vars etc. have been adapted as well: INCOMPATIBILITY.
   603 
   612 
   604 * Pure: name spaces have been refined, with significant changes of the
   613 * Pure: name spaces have been refined, with significant changes of the
   605 internal interfaces -- INCOMPATIBILITY.  Renamed cond_extern(_table)
   614 internal interfaces -- INCOMPATIBILITY.  Renamed cond_extern(_table)
   606 to extern(_table).  The plain name entry path is superceded by a
   615 to extern(_table).  The plain name entry path is superceded by a
   607 general 'naming' context, which also includes the 'policy' to produce
   616 general 'naming' context, which also includes the 'policy' to produce
   678   PureThy.thms_of: theory -> (string * thm) list
   687   PureThy.thms_of: theory -> (string * thm) list
   679   PureThy.all_thms_of: theory -> (string * thm) list
   688   PureThy.all_thms_of: theory -> (string * thm) list
   680 
   689 
   681 * Pure: print_tac now outputs the goal through the trace channel.
   690 * Pure: print_tac now outputs the goal through the trace channel.
   682 
   691 
   683 * Pure/Simplifier: improved handling of bound variables (nameless
   692 * Isar toplevel: improved diagnostics, mostly for Poly/ML only.
       
   693 Reference Toplevel.debug (default false) controls detailed printing
       
   694 and tracing of low-level exceptions; Toplevel.profiling (default 0)
       
   695 controls execution profiling -- set to 1 for time and 2 for space
       
   696 (both increase the runtime).
       
   697 
       
   698 * Isar session: The initial use of ROOT.ML is now always timed,
       
   699 i.e. the log will show the actual process times, in contrast to the
       
   700 elapsed wall-clock time that the outer shell wrapper produces.
       
   701 
       
   702 * Simplifier: improved handling of bound variables (nameless
   684 representation, avoid allocating new strings).  Simprocs that invoke
   703 representation, avoid allocating new strings).  Simprocs that invoke
   685 the Simplifier recursively should use Simplifier.inherit_bounds to
   704 the Simplifier recursively should use Simplifier.inherit_bounds to
   686 avoid local name clashes.
   705 avoid local name clashes.
   687 
   706 
   688 * Pure/Provers: Simplifier and Classical Reasoner now support proof
   707 * Provers: Simplifier and Classical Reasoner now support proof context
   689 context dependent plug-ins (simprocs, solvers, wrappers etc.).  These
   708 dependent plug-ins (simprocs, solvers, wrappers etc.).  These extra
   690 extra components are stored in the theory and patched into the
   709 components are stored in the theory and patched into the
   691 simpset/claset when used in an Isar proof context.  Context dependent
   710 simpset/claset when used in an Isar proof context.  Context dependent
   692 components are maintained by the following theory operations:
   711 components are maintained by the following theory operations:
   693 
   712 
   694   Simplifier.add_context_simprocs
   713   Simplifier.add_context_simprocs
   695   Simplifier.del_context_simprocs
   714   Simplifier.del_context_simprocs
   707 
   726 
   708 IMPORTANT NOTE: proof tools (methods etc.) need to use
   727 IMPORTANT NOTE: proof tools (methods etc.) need to use
   709 local_simpset_of and local_claset_of to instead of the primitive
   728 local_simpset_of and local_claset_of to instead of the primitive
   710 Simplifier.get_local_simpset and Classical.get_local_claset,
   729 Simplifier.get_local_simpset and Classical.get_local_claset,
   711 respectively, in order to see the context dependent fields!
   730 respectively, in order to see the context dependent fields!
   712 
       
   713 * File.sysify_path and File.quote_sysify path have been replaced by
       
   714 File.platform_path and File.shell_path (with appropriate hooks).  This
       
   715 provides a clean interface for unusual systems where the internal and
       
   716 external process view of file names are different.
       
   717 
   731 
   718 * ML functions legacy_bindings and use_legacy_bindings produce ML fact
   732 * ML functions legacy_bindings and use_legacy_bindings produce ML fact
   719 bindings for all theorems stored within a given theory; this may help
   733 bindings for all theorems stored within a given theory; this may help
   720 in porting non-Isar theories to Isar ones, while keeping ML proof
   734 in porting non-Isar theories to Isar ones, while keeping ML proof
   721 scripts for the time being.
   735 scripts for the time being.