src/Doc/Implementation/Integration.thy
author wenzelm
Sun, 18 Oct 2015 22:57:09 +0200
changeset 61477 e467ae7aa808
parent 61458 987533262fc2
child 61493 0debd22f0c0e
permissions -rw-r--r--
more control symbols;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57341
wenzelm
parents: 56895
diff changeset
     1
(*:wrap=hard:maxLineLen=78:*)
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>
61477
e467ae7aa808 more control symbols;
wenzelm
parents: 61458
diff changeset
    12
  The Isar \<^emph>\<open>toplevel state\<close> represents the outermost configuration that
57343
wenzelm
parents: 57341
diff changeset
    13
  is transformed by a sequence of transitions (commands) within a theory body.
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>
57343
wenzelm
parents: 57341
diff changeset
    26
  The toplevel state is a disjoint sum of empty @{text toplevel}, or @{text
wenzelm
parents: 57341
diff changeset
    27
  theory}, or @{text proof}. The initial toplevel is empty; a theory is
wenzelm
parents: 57341
diff changeset
    28
  commenced by a @{command theory} header; within a theory we may use theory
wenzelm
parents: 57341
diff changeset
    29
  commands such as @{command definition}, or state a @{command theorem} to be
wenzelm
parents: 57341
diff changeset
    30
  proven. A proof state accepts a rich collection of Isar proof commands for
wenzelm
parents: 57341
diff changeset
    31
  structured proof composition, or unstructured proof scripts. When the proof
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    32
  is concluded we get back to the (local) theory, which is then updated by
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    33
  defining the resulting fact. Further theory declarations or theorem
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    34
  statements with proofs may follow, until we eventually conclude the theory
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    35
  development by 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
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
    47
  \<^descr> Type @{ML_type Toplevel.state} represents Isar toplevel
39864
wenzelm
parents: 39826
diff changeset
    48
  states, which are normally manipulated through the concept of
57343
wenzelm
parents: 57341
diff changeset
    49
  toplevel transitions only (\secref{sec:toplevel-transition}).
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    50
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
    51
  \<^descr> @{ML Toplevel.UNDEF} is raised for undefined toplevel
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
    52
  operations.  Many operations work only partially for certain cases,
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
    53
  since @{ML_type Toplevel.state} is a sum type.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    54
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
    55
  \<^descr> @{ML Toplevel.is_toplevel}~@{text "state"} checks for an empty
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
    56
  toplevel state.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    57
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
    58
  \<^descr> @{ML Toplevel.theory_of}~@{text "state"} selects the
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    59
  background theory of @{text "state"}, it raises @{ML Toplevel.UNDEF}
34931
fd90fb0903c0 minimal tuning of this slightly dated material;
wenzelm
parents: 34921
diff changeset
    60
  for an empty toplevel state.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    61
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
    62
  \<^descr> @{ML Toplevel.proof_of}~@{text "state"} selects the Isar proof
60094
96a4765ba7d1 explicit error for Toplevel.proof_of;
wenzelm
parents: 59090
diff changeset
    63
  state if available, otherwise it raises an error.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    64
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    65
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    66
text %mlantiq \<open>
39882
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    67
  \begin{matharray}{rcl}
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    68
  @{ML_antiquotation_def "Isar.state"} & : & @{text ML_antiquotation} \\
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    69
  \end{matharray}
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    70
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
    71
  \<^descr> @{text "@{Isar.state}"} refers to Isar toplevel state at that
39882
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    72
  point --- as abstract value.
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    73
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    74
  This only works for diagnostic ML commands, such as @{command
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    75
  ML_val} or @{command ML_command}.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    76
\<close>
39882
ab0afd03a042 cover @{Isar.state};
wenzelm
parents: 39864
diff changeset
    77
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    78
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    79
subsection \<open>Toplevel transitions \label{sec:toplevel-transition}\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    80
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    81
text \<open>
57421
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
    82
  An Isar toplevel transition consists of a partial function on the toplevel
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
    83
  state, with additional information for diagnostics and error reporting:
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
    84
  there are fields for command name, source position, and other meta-data.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    85
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
    86
  The operational part is represented as the sequential union of a
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
    87
  list of partial functions, which are tried in turn until the first
20475
wenzelm
parents: 20451
diff changeset
    88
  one succeeds.  This acts like an outer case-expression for various
34931
fd90fb0903c0 minimal tuning of this slightly dated material;
wenzelm
parents: 34921
diff changeset
    89
  alternative state transitions.  For example, \isakeyword{qed} works
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    90
  differently for a local proofs vs.\ the global ending of an outermost
20475
wenzelm
parents: 20451
diff changeset
    91
  proof.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    92
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    93
  Transitions are composed via transition transformers. Internally, Isar
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    94
  commands are put together from an empty transition extended by name and
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    95
  source position. It is then left to the individual command parser to turn
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    96
  the given concrete syntax into a suitable transition transformer that
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
    97
  adjoins actual operations on a theory or proof state.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
    98
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
    99
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   100
text %mlref \<open>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   101
  \begin{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   102
  @{index_ML Toplevel.keep: "(Toplevel.state -> unit) ->
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.theory: "(theory -> theory) ->
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   105
  Toplevel.transition -> Toplevel.transition"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   106
  @{index_ML Toplevel.theory_to_proof: "(theory -> Proof.state) ->
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   107
  Toplevel.transition -> Toplevel.transition"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   108
  @{index_ML Toplevel.proof: "(Proof.state -> Proof.state) ->
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   109
  Toplevel.transition -> Toplevel.transition"} \\
49864
34437e7245cc updated Toplevel.proofs;
wenzelm
parents: 48985
diff changeset
   110
  @{index_ML Toplevel.proofs: "(Proof.state -> Proof.state Seq.result Seq.seq) ->
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   111
  Toplevel.transition -> Toplevel.transition"} \\
21168
0f869edd6cc1 replaced Toplevel.proof_to_theory by Toplevel.end_proof;
wenzelm
parents: 20491
diff changeset
   112
  @{index_ML Toplevel.end_proof: "(bool -> Proof.state -> Proof.context) ->
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   113
  Toplevel.transition -> Toplevel.transition"} \\
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   114
  \end{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   115
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   116
  \<^descr> @{ML Toplevel.keep}~@{text "tr"} adjoins a diagnostic
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
   117
  function.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   118
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   119
  \<^descr> @{ML Toplevel.theory}~@{text "tr"} adjoins a theory
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
   120
  transformer.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   121
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   122
  \<^descr> @{ML Toplevel.theory_to_proof}~@{text "tr"} adjoins a global
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
   123
  goal function, which turns a theory into a proof state.  The theory
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
   124
  may be changed before entering the proof; the generic Isar goal
57421
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
   125
  setup includes an @{verbatim after_qed} argument that specifies how to
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
   126
  apply the proven result to the enclosing context, when the proof
94081154306d misc tuning;
wenzelm
parents: 57343
diff changeset
   127
  is finished.
18558
48d5419fd191 more stuff;
wenzelm
parents: 18554
diff changeset
   128
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   129
  \<^descr> @{ML Toplevel.proof}~@{text "tr"} adjoins a deterministic
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
   130
  proof command, with a singleton result.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   131
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   132
  \<^descr> @{ML Toplevel.proofs}~@{text "tr"} adjoins a general proof
20451
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
   133
  command, with zero or more result states (represented as a lazy
27ea2ba48fa3 misc cleanup;
wenzelm
parents: 20447
diff changeset
   134
  list).
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   135
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   136
  \<^descr> @{ML Toplevel.end_proof}~@{text "tr"} adjoins a concluding
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
   137
  proof command, that returns the resulting theory, after applying the
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
   138
  resulting facts to the target context.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   139
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   140
59090
a0a05a4edb36 more examples;
wenzelm
parents: 58618
diff changeset
   141
text %mlex \<open>The file @{"file" "~~/src/HOL/ex/Commands.thy"} shows some example
a0a05a4edb36 more examples;
wenzelm
parents: 58618
diff changeset
   142
Isar command definitions, with the all-important theory header declarations
a0a05a4edb36 more examples;
wenzelm
parents: 58618
diff changeset
   143
for outer syntax keywords.\<close>
a0a05a4edb36 more examples;
wenzelm
parents: 58618
diff changeset
   144
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   145
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   146
section \<open>Theory loader database\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   147
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   148
text \<open>
57341
wenzelm
parents: 56895
diff changeset
   149
  In batch mode and within dumped logic images, the theory database maintains
wenzelm
parents: 56895
diff changeset
   150
  a collection of theories as a directed acyclic graph. A theory may refer to
wenzelm
parents: 56895
diff changeset
   151
  other theories as @{keyword "imports"}, or to auxiliary files via special
61477
e467ae7aa808 more control symbols;
wenzelm
parents: 61458
diff changeset
   152
  \<^emph>\<open>load commands\<close> (e.g.\ @{command ML_file}). For each theory, the base
e467ae7aa808 more control symbols;
wenzelm
parents: 61458
diff changeset
   153
  directory of its own theory file is called \<^emph>\<open>master directory\<close>: this is
57341
wenzelm
parents: 56895
diff changeset
   154
  used as the relative location to refer to other files from that theory.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   155
\<close>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   156
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   157
text %mlref \<open>
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   158
  \begin{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   159
  @{index_ML use_thy: "string -> unit"} \\
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
   160
  @{index_ML use_thys: "string list -> unit"} \\[0.5ex]
37864
814b1bca7f35 qualified Thy_Info.get_theory;
wenzelm
parents: 37306
diff changeset
   161
  @{index_ML Thy_Info.get_theory: "string -> theory"} \\
57341
wenzelm
parents: 56895
diff changeset
   162
  @{index_ML Thy_Info.remove_thy: "string -> unit"} \\
wenzelm
parents: 56895
diff changeset
   163
  @{index_ML Thy_Info.register_thy: "theory -> unit"} \\
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   164
  \end{mldecls}
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   165
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   166
  \<^descr> @{ML use_thy}~@{text A} ensures that theory @{text A} is fully
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
   167
  up-to-date wrt.\ the external file store; outdated ancestors are reloaded on
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
   168
  demand.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   169
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   170
  \<^descr> @{ML use_thys} is similar to @{ML use_thy}, but handles several
57341
wenzelm
parents: 56895
diff changeset
   171
  theories simultaneously. Thus it acts like processing the import header of a
wenzelm
parents: 56895
diff changeset
   172
  theory, without performing the merge of the result. By loading a whole
wenzelm
parents: 56895
diff changeset
   173
  sub-graph of theories, the intrinsic parallelism can be exploited by the
wenzelm
parents: 56895
diff changeset
   174
  system to speedup loading.
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   175
60270
wenzelm
parents: 60094
diff changeset
   176
  This variant is used by default in @{tool build} @{cite "isabelle-system"}.
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
   177
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   178
  \<^descr> @{ML Thy_Info.get_theory}~@{text A} retrieves the theory value
57341
wenzelm
parents: 56895
diff changeset
   179
  presently associated with name @{text A}. Note that the result might be
wenzelm
parents: 56895
diff changeset
   180
  outdated wrt.\ the file-system content.
37864
814b1bca7f35 qualified Thy_Info.get_theory;
wenzelm
parents: 37306
diff changeset
   181
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   182
  \<^descr> @{ML Thy_Info.remove_thy}~@{text A} deletes theory @{text A} and all
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   183
  descendants from the theory database.
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   184
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 60270
diff changeset
   185
  \<^descr> @{ML Thy_Info.register_thy}~@{text "text thy"} registers an existing
57341
wenzelm
parents: 56895
diff changeset
   186
  theory value with the theory loader database and updates source version
57496
94596c573b38 misc tuning;
wenzelm
parents: 57421
diff changeset
   187
  information according to the file store.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58555
diff changeset
   188
\<close>
30272
2d612824e642 regenerated document;
wenzelm
parents: 30270
diff changeset
   189
18537
2681f9e34390 "The Isabelle/Isar Implementation" manual;
wenzelm
parents:
diff changeset
   190
end