src/Doc/Implementation/Integration.thy
author wenzelm
Sun, 24 Mar 2019 17:45:00 +0100
changeset 69967 8a9d0d894ec0
parent 69597 ff784d5a5bfb
child 72029 83456d9f0ed5
permissions -rw-r--r--
more accurate markup;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
61656
cfabbc083977 more uniform jEdit properties;
wenzelm
parents: 61503
diff changeset
     1
(*:maxLineLen=78:*)
57341
wenzelm
parents: 56895
diff changeset
     2
29755
d66b34e46bdf observe usual theory naming conventions;
wenzelm
parents: 27597
diff changeset
     3
theory Integration
d66b34e46bdf observe usual theory naming conventions;
wenzelm
parents: 27597
diff changeset
     4
imports Base
d66b34e46bdf observe usual theory naming conventions;
wenzelm
parents: 27597
diff changeset
     5
begin
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     6
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
     7
chapter \<open>System integration\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
     8
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
     9
section \<open>Isar toplevel \label{sec:isar-toplevel}\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    10
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    11
text \<open>
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    12
  The Isar \<^emph>\<open>toplevel state\<close> represents the outermost configuration that is
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    13
  transformed by a sequence of transitions (commands) within a theory body.
57343
wenzelm
parents: 57341
diff changeset
    14
  This is a pure value with pure functions acting on it in a timeless and
wenzelm
parents: 57341
diff changeset
    15
  stateless manner. Historically, the sequence of transitions was wrapped up
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    16
  as sequential command loop, such that commands are applied one-by-one. In
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    17
  contemporary Isabelle/Isar, processing toplevel commands usually works in
58555
7975676c08c0 prefer @{cite} antiquotation;
wenzelm
parents: 57496
diff changeset
    18
  parallel in multi-threaded Isabelle/ML @{cite "Wenzel:2009" and
7975676c08c0 prefer @{cite} antiquotation;
wenzelm
parents: 57496
diff changeset
    19
  "Wenzel:2013:ITP"}.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    20
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    21
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    22
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    23
subsection \<open>Toplevel state\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    24
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    25
text \<open>
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    26
  The toplevel state is a disjoint sum of empty \<open>toplevel\<close>, or \<open>theory\<close>, or
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    27
  \<open>proof\<close>. The initial toplevel is empty; a theory is commenced by a @{command
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    28
  theory} header; within a theory we may use theory commands such as @{command
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    29
  definition}, or state a @{command theorem} to be proven. A proof state
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    30
  accepts a rich collection of Isar proof commands for structured proof
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    31
  composition, or unstructured proof scripts. When the proof is concluded we
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    32
  get back to the (local) theory, which is then updated by defining the
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    33
  resulting fact. Further theory declarations or theorem statements with
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    34
  proofs may follow, until we eventually conclude the theory development by
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    35
  issuing @{command end} to get back to the empty toplevel.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    36
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    37
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    38
text %mlref \<open>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    39
  \begin{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    40
  @{index_ML_type Toplevel.state} \\
55838
e120a15b0ee6 more antiquotations;
wenzelm
parents: 53709
diff changeset
    41
  @{index_ML_exception Toplevel.UNDEF} \\
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    42
  @{index_ML Toplevel.is_toplevel: "Toplevel.state -> bool"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    43
  @{index_ML Toplevel.theory_of: "Toplevel.state -> theory"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    44
  @{index_ML Toplevel.proof_of: "Toplevel.state -> Proof.state"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    45
  \end{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    46
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    47
  \<^descr> Type \<^ML_type>\<open>Toplevel.state\<close> represents Isar toplevel states, which are
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    48
  normally manipulated through the concept of toplevel transitions only
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    49
  (\secref{sec:toplevel-transition}).
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    50
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    51
  \<^descr> \<^ML>\<open>Toplevel.UNDEF\<close> is raised for undefined toplevel operations. Many
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    52
  operations work only partially for certain cases, since \<^ML_type>\<open>Toplevel.state\<close> is a sum type.
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    53
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    54
  \<^descr> \<^ML>\<open>Toplevel.is_toplevel\<close>~\<open>state\<close> checks for an empty toplevel state.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    55
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    56
  \<^descr> \<^ML>\<open>Toplevel.theory_of\<close>~\<open>state\<close> selects the background theory of \<open>state\<close>,
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    57
  it raises \<^ML>\<open>Toplevel.UNDEF\<close> for an empty toplevel state.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    58
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
    59
  \<^descr> \<^ML>\<open>Toplevel.proof_of\<close>~\<open>state\<close> selects the Isar proof state if available,
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    60
  otherwise it raises an error.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    61
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    62
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    63
text %mlantiq \<open>
39882
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    64
  \begin{matharray}{rcl}
61493
0debd22f0c0e isabelle update_cartouches -t;
wenzelm
parents: 61477
diff changeset
    65
  @{ML_antiquotation_def "Isar.state"} & : & \<open>ML_antiquotation\<close> \\
39882
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    66
  \end{matharray}
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    67
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    68
  \<^descr> \<open>@{Isar.state}\<close> refers to Isar toplevel state at that point --- as
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    69
  abstract value.
39882
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    70
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    71
  This only works for diagnostic ML commands, such as @{command ML_val} or
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    72
  @{command ML_command}.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    73
\<close>
39882
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    74
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    75
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    76
subsection \<open>Toplevel transitions \label{sec:toplevel-transition}\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    77
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    78
text \<open>
57421
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
    79
  An Isar toplevel transition consists of a partial function on the toplevel
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
    80
  state, with additional information for diagnostics and error reporting:
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
    81
  there are fields for command name, source position, and other meta-data.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    82
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    83
  The operational part is represented as the sequential union of a list of
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    84
  partial functions, which are tried in turn until the first one succeeds.
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
    85
  This acts like an outer case-expression for various alternative state
62947
wenzelm
parents: 62847
diff changeset
    86
  transitions. For example, \<^theory_text>\<open>qed\<close> works differently for a local proofs vs.\
wenzelm
parents: 62847
diff changeset
    87
  the global ending of an outermost proof.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    88
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    89
  Transitions are composed via transition transformers. Internally, Isar
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    90
  commands are put together from an empty transition extended by name and
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    91
  source position. It is then left to the individual command parser to turn
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    92
  the given concrete syntax into a suitable transition transformer that
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    93
  adjoins actual operations on a theory or proof state.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    94
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    95
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    96
text %mlref \<open>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    97
  \begin{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    98
  @{index_ML Toplevel.keep: "(Toplevel.state -> unit) ->
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    99
  Toplevel.transition -> Toplevel.transition"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   100
  @{index_ML Toplevel.theory: "(theory -> theory) ->
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   101
  Toplevel.transition -> Toplevel.transition"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   102
  @{index_ML Toplevel.theory_to_proof: "(theory -> Proof.state) ->
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   103
  Toplevel.transition -> Toplevel.transition"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   104
  @{index_ML Toplevel.proof: "(Proof.state -> Proof.state) ->
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   105
  Toplevel.transition -> Toplevel.transition"} \\
49864
34437e7245cc updated Toplevel.proofs;
wenzelm
parents: 48985
diff changeset
   106
  @{index_ML Toplevel.proofs: "(Proof.state -> Proof.state Seq.result Seq.seq) ->
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   107
  Toplevel.transition -> Toplevel.transition"} \\
21168
0f869edd6cc1 replaced Toplevel.proof_to_theory by Toplevel.end_proof;
wenzelm
parents: 20491
diff changeset
   108
  @{index_ML Toplevel.end_proof: "(bool -> Proof.state -> Proof.context) ->
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   109
  Toplevel.transition -> Toplevel.transition"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   110
  \end{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   111
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   112
  \<^descr> \<^ML>\<open>Toplevel.keep\<close>~\<open>tr\<close> adjoins a diagnostic function.
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   113
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   114
  \<^descr> \<^ML>\<open>Toplevel.theory\<close>~\<open>tr\<close> adjoins a theory transformer.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   115
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   116
  \<^descr> \<^ML>\<open>Toplevel.theory_to_proof\<close>~\<open>tr\<close> adjoins a global goal function, which
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   117
  turns a theory into a proof state. The theory may be changed before entering
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   118
  the proof; the generic Isar goal setup includes an \<^verbatim>\<open>after_qed\<close> argument
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   119
  that specifies how to apply the proven result to the enclosing context, when
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   120
  the proof is finished.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   121
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   122
  \<^descr> \<^ML>\<open>Toplevel.proof\<close>~\<open>tr\<close> adjoins a deterministic proof command, with a
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   123
  singleton result.
18558
48d5419fd191 more stuff;
wenzelm
parents: 18554
diff changeset
   124
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   125
  \<^descr> \<^ML>\<open>Toplevel.proofs\<close>~\<open>tr\<close> adjoins a general proof command, with zero or
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   126
  more result states (represented as a lazy list).
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   127
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   128
  \<^descr> \<^ML>\<open>Toplevel.end_proof\<close>~\<open>tr\<close> adjoins a concluding proof command, that
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   129
  returns the resulting theory, after applying the resulting facts to the
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   130
  target context.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   131
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   132
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   133
text %mlex \<open>
63680
6e1e8b5abbfa more symbols;
wenzelm
parents: 63671
diff changeset
   134
  The file \<^file>\<open>~~/src/HOL/ex/Commands.thy\<close> shows some example Isar command
6e1e8b5abbfa more symbols;
wenzelm
parents: 63671
diff changeset
   135
  definitions, with the all-important theory header declarations for outer
6e1e8b5abbfa more symbols;
wenzelm
parents: 63671
diff changeset
   136
  syntax keywords.
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   137
\<close>
59090
a0a05a4edb36 more examples;
wenzelm
parents: 58618
diff changeset
   138
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   139
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   140
section \<open>Theory loader database\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   141
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   142
text \<open>
57341
wenzelm
parents: 56895
diff changeset
   143
  In batch mode and within dumped logic images, the theory database maintains
wenzelm
parents: 56895
diff changeset
   144
  a collection of theories as a directed acyclic graph. A theory may refer to
wenzelm
parents: 56895
diff changeset
   145
  other theories as @{keyword "imports"}, or to auxiliary files via special
61477
e467ae7aa808 more control symbols;
wenzelm
parents: 61458
diff changeset
   146
  \<^emph>\<open>load commands\<close> (e.g.\ @{command ML_file}). For each theory, the base
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   147
  directory of its own theory file is called \<^emph>\<open>master directory\<close>: this is used
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   148
  as the relative location to refer to other files from that theory.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   149
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   150
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   151
text %mlref \<open>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   152
  \begin{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   153
  @{index_ML use_thy: "string -> unit"} \\
37864
814b1bca7f35 qualified Thy_Info.get_theory;
wenzelm
parents: 37306
diff changeset
   154
  @{index_ML Thy_Info.get_theory: "string -> theory"} \\
57341
wenzelm
parents: 56895
diff changeset
   155
  @{index_ML Thy_Info.remove_thy: "string -> unit"} \\
wenzelm
parents: 56895
diff changeset
   156
  @{index_ML Thy_Info.register_thy: "theory -> unit"} \\
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   157
  \end{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   158
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   159
  \<^descr> \<^ML>\<open>use_thy\<close>~\<open>A\<close> ensures that theory \<open>A\<close> is fully up-to-date wrt.\ the
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   160
  external file store; outdated ancestors are reloaded on demand.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   161
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   162
  \<^descr> \<^ML>\<open>Thy_Info.get_theory\<close>~\<open>A\<close> retrieves the theory value presently
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   163
  associated with name \<open>A\<close>. Note that the result might be outdated wrt.\ the
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   164
  file-system content.
37864
814b1bca7f35 qualified Thy_Info.get_theory;
wenzelm
parents: 37306
diff changeset
   165
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   166
  \<^descr> \<^ML>\<open>Thy_Info.remove_thy\<close>~\<open>A\<close> deletes theory \<open>A\<close> and all descendants from
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   167
  the theory database.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   168
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 63680
diff changeset
   169
  \<^descr> \<^ML>\<open>Thy_Info.register_thy\<close>~\<open>text thy\<close> registers an existing theory value
61854
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   170
  with the theory loader database and updates source version information
38b049cd3aad tuned whitespace;
wenzelm
parents: 61656
diff changeset
   171
  according to the file store.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   172
\<close>
30272
2d612824e642 regenerated document;
wenzelm
parents: 30270
diff changeset
   173
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   174
end