doc-src/IsarRef/Thy/Inner_Syntax.thy
author wenzelm
Thu, 13 Nov 2008 21:49:46 +0100
changeset 28763 b5e6122ff575
parent 28762 f5d79aeffd81
child 28765 da8f6f4a74be
permissions -rw-r--r--
added pretty printing options (from old ref manual);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     1
(* $Id$ *)
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     2
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     3
theory Inner_Syntax
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     4
imports Main
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     5
begin
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     6
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     7
chapter {* Inner syntax --- the term language *}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     8
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     9
section {* Printing logical entities *}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    10
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    11
subsection {* Diagnostic commands *}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    12
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    13
text {*
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    14
  \begin{matharray}{rcl}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    15
    @{command_def "pr"}@{text "\<^sup>*"} & : & @{text "any \<rightarrow>"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    16
    @{command_def "thm"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    17
    @{command_def "term"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    18
    @{command_def "prop"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    19
    @{command_def "typ"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    20
    @{command_def "prf"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    21
    @{command_def "full_prf"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    22
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    23
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    24
  These diagnostic commands assist interactive development by printing
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    25
  internal logical entities in a human-readable fashion.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    26
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    27
  \begin{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    28
    'pr' modes? nat? (',' nat)?
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    29
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    30
    'thm' modes? thmrefs
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    31
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    32
    'term' modes? term
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    33
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    34
    'prop' modes? prop
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    35
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    36
    'typ' modes? type
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    37
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    38
    'prf' modes? thmrefs?
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    39
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    40
    'full\_prf' modes? thmrefs?
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    41
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    42
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    43
    modes: '(' (name + ) ')'
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    44
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    45
  \end{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    46
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    47
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    48
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    49
  \item @{command "pr"}~@{text "goals, prems"} prints the current
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    50
  proof state (if present), including the proof context, current facts
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    51
  and goals.  The optional limit arguments affect the number of goals
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    52
  and premises to be displayed, which is initially 10 for both.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    53
  Omitting limit values leaves the current setting unchanged.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    54
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    55
  \item @{command "thm"}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} retrieves
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    56
  theorems from the current theory or proof context.  Note that any
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    57
  attributes included in the theorem specifications are applied to a
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    58
  temporary context derived from the current theory or proof; the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    59
  result is discarded, i.e.\ attributes involved in @{text "a\<^sub>1,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    60
  \<dots>, a\<^sub>n"} do not have any permanent effect.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    61
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    62
  \item @{command "term"}~@{text t} and @{command "prop"}~@{text \<phi>}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    63
  read, type-check and print terms or propositions according to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    64
  current theory or proof context; the inferred type of @{text t} is
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    65
  output as well.  Note that these commands are also useful in
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    66
  inspecting the current environment of term abbreviations.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    67
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    68
  \item @{command "typ"}~@{text \<tau>} reads and prints types of the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    69
  meta-logic according to the current theory or proof context.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    70
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    71
  \item @{command "prf"} displays the (compact) proof term of the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    72
  current proof state (if present), or of the given theorems. Note
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    73
  that this requires proof terms to be switched on for the current
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    74
  object logic (see the ``Proof terms'' section of the Isabelle
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    75
  reference manual for information on how to do this).
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    76
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    77
  \item @{command "full_prf"} is like @{command "prf"}, but displays
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    78
  the full proof term, i.e.\ also displays information omitted in the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    79
  compact proof term, which is denoted by ``@{text _}'' placeholders
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    80
  there.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    81
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    82
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    83
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    84
  All of the diagnostic commands above admit a list of @{text modes}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    85
  to be specified, which is appended to the current print mode (see
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    86
  also \cite{isabelle-ref}).  Thus the output behavior may be modified
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    87
  according particular print mode features.  For example, @{command
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    88
  "pr"}~@{text "(latex xsymbols)"} would print the current proof state
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    89
  with mathematical symbols and special characters represented in
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    90
  {\LaTeX} source, according to the Isabelle style
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    91
  \cite{isabelle-sys}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    92
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    93
  Note that antiquotations (cf.\ \secref{sec:antiq}) provide a more
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    94
  systematic way to include formal items into the printed text
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    95
  document.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    96
*}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    97
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    98
28763
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
    99
subsection {* Printing limits *}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   100
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   101
text {*
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   102
  \begin{mldecls}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   103
    @{index_ML Pretty.setdepth: "int -> unit"} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   104
    @{index_ML Pretty.setmargin: "int -> unit"} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   105
    @{index_ML print_depth: "int -> unit"} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   106
  \end{mldecls}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   107
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   108
  These ML functions set limits for pretty printed text output.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   109
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   110
  \begin{description}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   111
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   112
  \item @{ML Pretty.setdepth}~@{text d} tells the pretty printer to
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   113
  limit the printing depth to @{text d}.  This affects the display of
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   114
  types, terms, theorems etc.  The default value is 0, which permits
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   115
  printing to an arbitrary depth.  Useful values for @{text d} are 10
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   116
  and 20.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   117
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   118
  \item @{ML Pretty.setmargin}~@{text m} tells the pretty printer to
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   119
  assume a right margin (page width) of @{text m}.  The initial margin
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   120
  is 76.  User interfaces may adapt this default automatically, when
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   121
  resizing windows etc.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   122
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   123
  \item @{ML print_depth}~@{text n} limits the printing depth of the
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   124
  ML toplevel pretty printer; the precise effect depends on the ML
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   125
  compiler and run-time system.  Typically @{text n} should be less
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   126
  than 10.  Bigger values such as 100--1000 are useful for debugging.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   127
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   128
  \end{description}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   129
*}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   130
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   131
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   132
subsection {* Details of printed content *}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   133
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   134
text {*
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   135
  \begin{mldecls} 
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   136
    @{index_ML show_types: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   137
    @{index_ML show_sorts: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   138
    @{index_ML show_consts: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   139
    @{index_ML long_names: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   140
    @{index_ML short_names: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   141
    @{index_ML unique_names: "bool ref"} & default @{ML true} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   142
    @{index_ML show_brackets: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   143
    @{index_ML eta_contract: "bool ref"} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   144
    @{index_ML goals_limit: "int ref"} & default @{ML 10} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   145
    @{index_ML Proof.show_main_goal: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   146
    @{index_ML show_hyps: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   147
    @{index_ML show_tags: "bool ref"} & default @{ML false} \\
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   148
  \end{mldecls}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   149
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   150
  These global ML variables control the detail of information that is
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   151
  displayed for types, terms, theorems, goals etc.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   152
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   153
  \begin{description}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   154
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   155
  \item @{ML show_types} and @{ML show_sorts} control printing of type
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   156
  constraints for term variables, and sort constraints for type
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   157
  variables.  By default, neither of these are shown in output.  If
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   158
  @{ML show_sorts} is set to @{ML true}, types are always shown as
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   159
  well.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   160
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   161
  Note that displaying types and sorts may explain why a polymorphic
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   162
  inference rule fails to resolve with some goal, or why a rewrite
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   163
  rule does not apply as expected.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   164
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   165
  \item @{ML show_consts} controls printing of types of constants when
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   166
  printing proof states.  Note that the output can be enormous as
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   167
  polymorphic constants often occur at several different type
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   168
  instances.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   169
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   170
  \item @{ML long_names}, @{ML short_names}, and @{ML unique_names}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   171
  modify the way of printing qualified names in external form.  See
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   172
  also the description of document antiquotation options in
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   173
  \secref{sec:antiq}.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   174
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   175
  \item @{ML show_brackets} controls insertion of bracketing in pretty
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   176
  printed output.  If set to @{ML true}, all sub-expressions of the
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   177
  pretty printing tree will be parenthesized, even if this produces
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   178
  malformed term syntax!  This crude way of showing the full structure
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   179
  of pretty printed entities might help to diagnose problems with
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   180
  operator priorities, for example.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   181
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   182
  \item @{ML eta_contract} controls @{text "\<eta>"}-contracted printing of
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   183
  terms.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   184
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   185
  The @{text \<eta>}-contraction law asserts @{prop "(\<lambda>x. f x) \<equiv> f"},
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   186
  provided @{text x} is not free in @{text f}.  It asserts
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   187
  \emph{extensionality} of functions: @{prop "f \<equiv> g"} if @{prop "f x \<equiv>
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   188
  g x"} for all @{text x}.  Higher-order unification frequently puts
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   189
  terms into a fully @{text \<eta>}-expanded form.  For example, if @{text
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   190
  F} has type @{text "(\<tau> \<Rightarrow> \<tau>) \<Rightarrow> \<tau>"} then its expanded form is @{term
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   191
  "\<lambda>h. F (\<lambda>x. h x)"}.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   192
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   193
  Setting @{ML eta_contract} makes Isabelle perform @{text
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   194
  \<eta>}-contractions before printing, so that @{term "\<lambda>h. F (\<lambda>x. h x)"}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   195
  appears simply as @{text F}.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   196
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   197
  Note that the distinction between a term and its @{text \<eta>}-expanded
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   198
  form occasionally matters.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   199
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   200
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   201
  \item @{ML goals_limit} controls the maximum number of subgoals to
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   202
  be shown in proof state output.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   203
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   204
  \item @{ML Proof.show_main_goal} controls whether the main result to
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   205
  be proven should be displayed.  This information might be relevant
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   206
  for schematic goals, to see the current claim being synthesized.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   207
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   208
  \item @{ML show_hyps} controls printing of implicit hypotheses of
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   209
  local facts.  Normally, only those hypotheses are displayed that are
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   210
  \emph{not} covered by the assumptions of the current context: this
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   211
  situation indicates a fault in some tool being used.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   212
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   213
  By setting @{ML show_hyps} to @{ML true}, output of all hypotheses
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   214
  can be enforced.  Which is occasionally usefule for diagnostic
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   215
  purposes.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   216
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   217
  \item @{ML show_tags} controls printing of extra annotations within
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   218
  theorems, such as the case names being attached by the attribute
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   219
  @{attribute case_names}.
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   220
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   221
  \end{description}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   222
*}
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   223
b5e6122ff575 added pretty printing options (from old ref manual);
wenzelm
parents: 28762
diff changeset
   224
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   225
section {* Mixfix annotations *}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   226
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   227
text {* Mixfix annotations specify concrete \emph{inner syntax} of
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   228
  Isabelle types and terms.  Some commands such as @{command "types"}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   229
  (see \secref{sec:types-pure}) admit infixes only, while @{command
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   230
  "consts"} (see \secref{sec:consts}) and @{command "syntax"} (see
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   231
  \secref{sec:syn-trans}) support the full range of general mixfixes
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   232
  and binders.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   233
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   234
  \indexouternonterm{infix}\indexouternonterm{mixfix}\indexouternonterm{structmixfix}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   235
  \begin{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   236
    infix: '(' ('infix' | 'infixl' | 'infixr') string nat ')'
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   237
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   238
    mixfix: infix | '(' string prios? nat? ')' | '(' 'binder' string prios? nat ')'
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   239
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   240
    structmixfix: mixfix | '(' 'structure' ')'
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   241
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   242
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   243
    prios: '[' (nat + ',') ']'
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   244
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   245
  \end{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   246
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   247
  Here the \railtok{string} specifications refer to the actual mixfix
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   248
  template, which may include literal text, spacing, blocks, and
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   249
  arguments (denoted by ``@{text _}''); the special symbol
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   250
  ``@{verbatim "\<index>"}'' (printed as ``@{text "\<index>"}'') represents an index
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   251
  argument that specifies an implicit structure reference (see also
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   252
  \secref{sec:locale}).  Infix and binder declarations provide common
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   253
  abbreviations for particular mixfix declarations.  So in practice,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   254
  mixfix templates mostly degenerate to literal text for concrete
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   255
  syntax, such as ``@{verbatim "++"}'' for an infix symbol.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   256
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   257
  \medskip In full generality, mixfix declarations work as follows.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   258
  Suppose a constant @{text "c :: \<tau>\<^sub>1 \<Rightarrow> \<dots> \<tau>\<^sub>n \<Rightarrow> \<tau>"} is
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   259
  annotated by @{text "(mixfix [p\<^sub>1, \<dots>, p\<^sub>n] p)"}, where @{text
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   260
  "mixfix"} is a string @{text "d\<^sub>0 _ d\<^sub>1 _ \<dots> _ d\<^sub>n"} consisting of
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   261
  delimiters that surround argument positions as indicated by
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   262
  underscores.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   263
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   264
  Altogether this determines a production for a context-free priority
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   265
  grammar, where for each argument @{text "i"} the syntactic category
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   266
  is determined by @{text "\<tau>\<^sub>i"} (with priority @{text "p\<^sub>i"}), and
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   267
  the result category is determined from @{text "\<tau>"} (with
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   268
  priority @{text "p"}).  Priority specifications are optional, with
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   269
  default 0 for arguments and 1000 for the result.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   270
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   271
  Since @{text "\<tau>"} may be again a function type, the constant
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   272
  type scheme may have more argument positions than the mixfix
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   273
  pattern.  Printing a nested application @{text "c t\<^sub>1 \<dots> t\<^sub>m"} for
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   274
  @{text "m > n"} works by attaching concrete notation only to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   275
  innermost part, essentially by printing @{text "(c t\<^sub>1 \<dots> t\<^sub>n) \<dots> t\<^sub>m"}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   276
  instead.  If a term has fewer arguments than specified in the mixfix
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   277
  template, the concrete syntax is ignored.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   278
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   279
  \medskip A mixfix template may also contain additional directives
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   280
  for pretty printing, notably spaces, blocks, and breaks.  The
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   281
  general template format is a sequence over any of the following
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   282
  entities.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   283
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   284
  \begin{itemize}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   285
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   286
  \item @{text "\<^bold>d"} is a delimiter, namely a non-empty
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   287
  sequence of characters other than the special characters @{text "'"}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   288
  (single quote), @{text "_"} (underscore), @{text "\<index>"} (index
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   289
  symbol), @{text "/"} (slash), @{text "("} and @{text ")"}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   290
  (parentheses).
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   291
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   292
  A single quote escapes the special meaning of these meta-characters,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   293
  producing a literal version of the following character, unless that
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   294
  is a blank.  A single quote followed by a blank separates
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   295
  delimiters, without affecting printing, but input tokens may have
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   296
  additional white space here.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   297
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   298
  \item @{text "_"} is an argument position, which stands for a
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   299
  certain syntactic category in the underlying grammar.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   300
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   301
  \item @{text "\<index>"} is an indexed argument position; this is
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   302
  the place where implicit structure arguments can be attached.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   303
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   304
  \item @{text "\<^bold>s"} is a non-empty sequence of spaces for
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   305
  printing.  This and the following specifications do not affect
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   306
  parsing at all.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   307
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   308
  \item @{text "(\<^bold>n"} opens a pretty printing block.  The
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   309
  optional number specifies how much indentation to add when a line
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   310
  break occurs within the block.  If the parenthesis is not followed
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   311
  by digits, the indentation defaults to 0.  A block specified via
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   312
  @{text "(00"} is unbreakable.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   313
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   314
  \item @{text ")"} closes a pretty printing block.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   315
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   316
  \item @{text "//"} forces a line break.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   317
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   318
  \item @{text "/\<^bold>s"} allows a line break.  Here @{text
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   319
  "\<^bold>s"} stands for the string of spaces (zero or more) right
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   320
  after the slash.  These spaces are printed if the break is
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   321
  \emph{not} taken.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   322
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   323
  \end{itemize}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   324
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   325
  For example, the template @{text "(_ +/ _)"} specifies an infix
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   326
  operator.  There are two argument positions; the delimiter @{text
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   327
  "+"} is preceded by a space and followed by a space or line break;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   328
  the entire phrase is a pretty printing block.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   329
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   330
  The general idea of pretty printing with blocks and breaks is also
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   331
  described in \cite{paulson-ml2}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   332
*}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   333
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   334
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   335
section {* Additional term notation *}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   336
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   337
text {*
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   338
  \begin{matharray}{rcll}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   339
    @{command_def "notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   340
    @{command_def "no_notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   341
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   342
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   343
  \begin{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   344
    ('notation' | 'no\_notation') target? mode? (nameref structmixfix + 'and')
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   345
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   346
  \end{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   347
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   348
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   349
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   350
  \item @{command "notation"}~@{text "c (mx)"} associates mixfix
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   351
  syntax with an existing constant or fixed variable.  This is a
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   352
  robust interface to the underlying @{command "syntax"} primitive
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   353
  (\secref{sec:syn-trans}).  Type declaration and internal syntactic
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   354
  representation of the given entity is retrieved from the context.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   355
  
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   356
  \item @{command "no_notation"} is similar to @{command "notation"},
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   357
  but removes the specified syntax annotation from the present
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   358
  context.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   359
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   360
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   361
*}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   362
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   363
section {* Syntax and translations \label{sec:syn-trans} *}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   364
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   365
text {*
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   366
  \begin{matharray}{rcl}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   367
    @{command_def "nonterminals"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   368
    @{command_def "syntax"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   369
    @{command_def "no_syntax"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   370
    @{command_def "translations"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   371
    @{command_def "no_translations"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   372
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   373
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   374
  \begin{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   375
    'nonterminals' (name +)
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   376
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   377
    ('syntax' | 'no\_syntax') mode? (constdecl +)
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   378
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   379
    ('translations' | 'no\_translations') (transpat ('==' | '=>' | '<=' | rightleftharpoons | rightharpoonup | leftharpoondown) transpat +)
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   380
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   381
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   382
    mode: ('(' ( name | 'output' | name 'output' ) ')')
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   383
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   384
    transpat: ('(' nameref ')')? string
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   385
    ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   386
  \end{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   387
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   388
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   389
  
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   390
  \item @{command "nonterminals"}~@{text c} declares a type
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   391
  constructor @{text c} (without arguments) to act as purely syntactic
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   392
  type: a nonterminal symbol of the inner syntax.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   393
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   394
  \item @{command "syntax"}~@{text "(mode) decls"} is similar to
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   395
  @{command "consts"}~@{text decls}, except that the actual logical
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   396
  signature extension is omitted.  Thus the context free grammar of
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   397
  Isabelle's inner syntax may be augmented in arbitrary ways,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   398
  independently of the logic.  The @{text mode} argument refers to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   399
  print mode that the grammar rules belong; unless the @{keyword_ref
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   400
  "output"} indicator is given, all productions are added both to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   401
  input and output grammar.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   402
  
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   403
  \item @{command "no_syntax"}~@{text "(mode) decls"} removes grammar
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   404
  declarations (and translations) resulting from @{text decls}, which
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   405
  are interpreted in the same manner as for @{command "syntax"} above.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   406
  
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   407
  \item @{command "translations"}~@{text rules} specifies syntactic
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   408
  translation rules (i.e.\ macros): parse~/ print rules (@{text "\<rightleftharpoons>"}),
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   409
  parse rules (@{text "\<rightharpoonup>"}), or print rules (@{text "\<leftharpoondown>"}).
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   410
  Translation patterns may be prefixed by the syntactic category to be
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   411
  used for parsing; the default is @{text logic}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   412
  
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   413
  \item @{command "no_translations"}~@{text rules} removes syntactic
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   414
  translation rules, which are interpreted in the same manner as for
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   415
  @{command "translations"} above.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   416
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   417
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   418
*}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   419
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   420
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   421
section {* Syntax translation functions *}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   422
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   423
text {*
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   424
  \begin{matharray}{rcl}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   425
    @{command_def "parse_ast_translation"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   426
    @{command_def "parse_translation"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   427
    @{command_def "print_translation"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   428
    @{command_def "typed_print_translation"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   429
    @{command_def "print_ast_translation"} & : & @{text "theory \<rightarrow> theory"} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   430
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   431
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   432
  \begin{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   433
  ( 'parse\_ast\_translation' | 'parse\_translation' | 'print\_translation' |
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   434
    'typed\_print\_translation' | 'print\_ast\_translation' ) ('(advanced)')? text
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   435
  ;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   436
  \end{rail}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   437
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   438
  Syntax translation functions written in ML admit almost arbitrary
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   439
  manipulations of Isabelle's inner syntax.  Any of the above commands
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   440
  have a single \railqtok{text} argument that refers to an ML
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   441
  expression of appropriate type, which are as follows by default:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   442
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   443
%FIXME proper antiquotations
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   444
\begin{ttbox}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   445
val parse_ast_translation   : (string * (ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   446
val parse_translation       : (string * (term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   447
val print_translation       : (string * (term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   448
val typed_print_translation :
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   449
  (string * (bool -> typ -> term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   450
val print_ast_translation   : (string * (ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   451
\end{ttbox}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   452
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   453
  If the @{text "(advanced)"} option is given, the corresponding
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   454
  translation functions may depend on the current theory or proof
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   455
  context.  This allows to implement advanced syntax mechanisms, as
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   456
  translations functions may refer to specific theory declarations or
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   457
  auxiliary proof data.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   458
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   459
  See also \cite[\S8]{isabelle-ref} for more information on the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   460
  general concept of syntax transformations in Isabelle.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   461
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   462
%FIXME proper antiquotations
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   463
\begin{ttbox}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   464
val parse_ast_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   465
  (string * (Proof.context -> ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   466
val parse_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   467
  (string * (Proof.context -> term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   468
val print_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   469
  (string * (Proof.context -> term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   470
val typed_print_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   471
  (string * (Proof.context -> bool -> typ -> term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   472
val print_ast_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   473
  (string * (Proof.context -> ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   474
\end{ttbox}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   475
*}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   476
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   477
end