| author | wenzelm |
| Fri, 15 Oct 2021 19:25:31 +0200 | |
| changeset 74525 | c960bfcb91db |
| parent 73837 | f72335f6a9ed |
| child 74733 | 255e651a4c5f |
| permissions | -rw-r--r-- |
| 61656 | 1 |
(*:maxLineLen=78:*) |
| 61575 | 2 |
|
| 48578 | 3 |
theory Sessions |
4 |
imports Base |
|
5 |
begin |
|
6 |
||
| 58618 | 7 |
chapter \<open>Isabelle sessions and build management \label{ch:session}\<close>
|
| 48584 | 8 |
|
| 61575 | 9 |
text \<open> |
10 |
An Isabelle \<^emph>\<open>session\<close> consists of a collection of related theories that may |
|
11 |
be associated with formal documents (\chref{ch:present}). There is also a
|
|
12 |
notion of \<^emph>\<open>persistent heap\<close> image to capture the state of a session, |
|
13 |
similar to object-code in compiled programming languages. Thus the concept |
|
14 |
of session resembles that of a ``project'' in common IDE environments, but |
|
15 |
the specific name emphasizes the connection to interactive theorem proving: |
|
16 |
the session wraps-up the results of user-interaction with the prover in a |
|
17 |
persistent form. |
|
| 48584 | 18 |
|
| 61575 | 19 |
Application sessions are built on a given parent session, which may be built |
20 |
recursively on other parents. Following this path in the hierarchy |
|
21 |
eventually leads to some major object-logic session like \<open>HOL\<close>, which itself |
|
22 |
is based on \<open>Pure\<close> as the common root of all sessions. |
|
| 48584 | 23 |
|
| 61575 | 24 |
Processing sessions may take considerable time. Isabelle build management |
25 |
helps to organize this efficiently. This includes support for parallel build |
|
26 |
jobs, in addition to the multithreaded theory and proof checking that is |
|
27 |
already provided by the prover process itself. |
|
28 |
\<close> |
|
| 48604 | 29 |
|
| 48578 | 30 |
|
| 58618 | 31 |
section \<open>Session ROOT specifications \label{sec:session-root}\<close>
|
| 48578 | 32 |
|
| 61575 | 33 |
text \<open> |
34 |
Session specifications reside in files called \<^verbatim>\<open>ROOT\<close> within certain |
|
35 |
directories, such as the home locations of registered Isabelle components or |
|
36 |
additional project directories given by the user. |
|
| 48579 | 37 |
|
| 61575 | 38 |
The ROOT file format follows the lexical conventions of the \<^emph>\<open>outer syntax\<close> |
39 |
of Isabelle/Isar, see also @{cite "isabelle-isar-ref"}. This defines common
|
|
40 |
forms like identifiers, names, quoted strings, verbatim text, nested |
|
41 |
comments etc. The grammar for @{syntax session_chapter} and @{syntax
|
|
42 |
session_entry} is given as syntax diagram below; each ROOT file may contain |
|
43 |
multiple specifications like this. Chapters help to organize browser info |
|
44 |
(\secref{sec:info}), but have no formal meaning. The default chapter is
|
|
45 |
``\<open>Unsorted\<close>''. |
|
| 48579 | 46 |
|
| 61575 | 47 |
Isabelle/jEdit @{cite "isabelle-jedit"} includes a simple editing mode
|
48 |
\<^verbatim>\<open>isabelle-root\<close> for session ROOT files, which is enabled by default for any |
|
49 |
file of that name. |
|
| 48579 | 50 |
|
| 69593 | 51 |
\<^rail>\<open> |
| 51417 | 52 |
@{syntax_def session_chapter}: @'chapter' @{syntax name}
|
53 |
; |
|
54 |
||
| 66971 | 55 |
@{syntax_def session_entry}: @'session' @{syntax system_name} groups? dir? '=' \<newline>
|
|
70678
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
56 |
(@{syntax system_name} '+')? description? options? \<newline>
|
|
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
57 |
sessions? directories? (theories*) \<newline> |
|
72600
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
58 |
(document_theories?) (document_files*) \<newline> |
|
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
59 |
(export_files*) |
| 48579 | 60 |
; |
61 |
groups: '(' (@{syntax name} +) ')'
|
|
62 |
; |
|
| 68808 | 63 |
dir: @'in' @{syntax embedded}
|
| 48579 | 64 |
; |
65 |
description: @'description' @{syntax text}
|
|
66 |
; |
|
67 |
options: @'options' opts |
|
68 |
; |
|
|
48605
e777363440d6
allow negative int values as well, according to real = int | float;
wenzelm
parents:
48604
diff
changeset
|
69 |
opts: '[' ( (@{syntax name} '=' value | @{syntax name}) + ',' ) ']'
|
|
e777363440d6
allow negative int values as well, according to real = int | float;
wenzelm
parents:
48604
diff
changeset
|
70 |
; |
|
e777363440d6
allow negative int values as well, according to real = int | float;
wenzelm
parents:
48604
diff
changeset
|
71 |
value: @{syntax name} | @{syntax real}
|
| 48579 | 72 |
; |
| 66916 | 73 |
sessions: @'sessions' (@{syntax system_name}+)
|
| 65374 | 74 |
; |
| 70681 | 75 |
directories: @'directories' (dir+) |
|
70678
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
76 |
; |
|
66970
13857f49d215
clarified ROOT syntax: 'sessions' and 'theories' are optional, but need to be non-empty;
wenzelm
parents:
66916
diff
changeset
|
77 |
theories: @'theories' opts? (theory_entry+) |
| 48579 | 78 |
; |
| 66916 | 79 |
theory_entry: @{syntax system_name} ('(' @'global' ')')?
|
| 65504 | 80 |
; |
|
72600
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
81 |
document_theories: @'document_theories' (@{syntax name}+)
|
|
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
82 |
; |
| 68808 | 83 |
document_files: @'document_files' ('(' dir ')')? (@{syntax embedded}+)
|
| 68292 | 84 |
; |
| 69671 | 85 |
export_files: @'export_files' ('(' dir ')')? ('[' nat ']')? \<newline>
|
86 |
(@{syntax embedded}+)
|
|
| 69593 | 87 |
\<close> |
| 48579 | 88 |
|
| 61575 | 89 |
\<^descr> \isakeyword{session}~\<open>A = B + body\<close> defines a new session \<open>A\<close> based on
|
| 66759 | 90 |
parent session \<open>B\<close>, with its content given in \<open>body\<close> (imported sessions and |
91 |
theories). Note that a parent (like \<open>HOL\<close>) is mandatory in practical |
|
92 |
applications: only Isabelle/Pure can bootstrap itself from nothing. |
|
| 48579 | 93 |
|
| 65504 | 94 |
All such session specifications together describe a hierarchy (graph) of |
| 61575 | 95 |
sessions, with globally unique names. The new session name \<open>A\<close> should be |
96 |
sufficiently long and descriptive to stand on its own in a potentially large |
|
97 |
library. |
|
| 48579 | 98 |
|
| 61575 | 99 |
\<^descr> \isakeyword{session}~\<open>A (groups)\<close> indicates a collection of groups where
|
100 |
the new session is a member. Group names are uninterpreted and merely follow |
|
101 |
certain conventions. For example, the Isabelle distribution tags some |
|
102 |
important sessions by the group name called ``\<open>main\<close>''. Other projects may |
|
103 |
invent their own conventions, but this requires some care to avoid clashes |
|
| 48604 | 104 |
within this unchecked name space. |
| 48579 | 105 |
|
| 61575 | 106 |
\<^descr> \isakeyword{session}~\<open>A\<close>~\isakeyword{in}~\<open>dir\<close> specifies an explicit
|
107 |
directory for this session; by default this is the current directory of the |
|
108 |
\<^verbatim>\<open>ROOT\<close> file. |
|
| 48579 | 109 |
|
| 66759 | 110 |
All theory files are located relatively to the session directory. The prover |
111 |
process is run within the same as its current working directory. |
|
| 48579 | 112 |
|
| 61575 | 113 |
\<^descr> \isakeyword{description}~\<open>text\<close> is a free-form annotation for this
|
114 |
session. |
|
| 48579 | 115 |
|
| 61575 | 116 |
\<^descr> \isakeyword{options}~\<open>[x = a, y = b, z]\<close> defines separate options
|
117 |
(\secref{sec:system-options}) that are used when processing this session,
|
|
118 |
but \<^emph>\<open>without\<close> propagation to child sessions. Note that \<open>z\<close> abbreviates \<open>z = |
|
119 |
true\<close> for Boolean options. |
|
120 |
||
| 65504 | 121 |
\<^descr> \isakeyword{sessions}~\<open>names\<close> specifies sessions that are \<^emph>\<open>imported\<close> into
|
122 |
the current name space of theories. This allows to refer to a theory \<open>A\<close> |
|
123 |
from session \<open>B\<close> by the qualified name \<open>B.A\<close> --- although it is loaded again |
|
124 |
into the current ML process, which is in contrast to a theory that is |
|
125 |
already present in the \<^emph>\<open>parent\<close> session. |
|
126 |
||
| 65505 | 127 |
Theories that are imported from other sessions are excluded from the current |
128 |
session document. |
|
129 |
||
|
70678
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
130 |
\<^descr> \isakeyword{directories}~\<open>dirs\<close> specifies additional directories for
|
|
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
131 |
import of theory files via \isakeyword{theories} within \<^verbatim>\<open>ROOT\<close> or
|
|
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
132 |
\<^theory_text>\<open>imports\<close> within a theory; \<open>dirs\<close> are relative to the main session |
|
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
133 |
directory (cf.\ \isakeyword{session} \dots \isakeyword{in}~\<open>dir\<close>). These
|
| 70681 | 134 |
directories need to be exclusively assigned to a unique session, without |
135 |
implicit sharing of file-system locations. |
|
|
70678
36c8c32346cb
clarified syntax: 'directories' and 'theories' belong together;
wenzelm
parents:
70677
diff
changeset
|
136 |
|
| 61575 | 137 |
\<^descr> \isakeyword{theories}~\<open>options names\<close> specifies a block of theories that
|
138 |
are processed within an environment that is augmented by the given options, |
|
139 |
in addition to the global session options given before. Any number of blocks |
|
140 |
of \isakeyword{theories} may be given. Options are only active for each
|
|
| 48604 | 141 |
\isakeyword{theories} block separately.
|
| 48579 | 142 |
|
| 65374 | 143 |
A theory name that is followed by \<open>(\<close>\isakeyword{global}\<open>)\<close> is treated
|
| 66993 | 144 |
literally in other session specifications or theory imports --- the normal |
145 |
situation is to qualify theory names by the session name; this ensures |
|
146 |
globally unique names in big session graphs. Global theories are usually the |
|
147 |
entry points to major logic sessions: \<open>Pure\<close>, \<open>Main\<close>, \<open>Complex_Main\<close>, |
|
148 |
\<open>HOLCF\<close>, \<open>IFOL\<close>, \<open>FOL\<close>, \<open>ZF\<close>, \<open>ZFC\<close> etc. Regular Isabelle applications |
|
149 |
should not claim any global theory names. |
|
| 65374 | 150 |
|
|
72600
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
151 |
\<^descr> \isakeyword{document_theories}~\<open>names\<close> specifies theories from other
|
|
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
152 |
sessions that should be included in the generated document source directory. |
|
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
153 |
These theories need to be explicit imports in the current session, or |
| 72769 | 154 |
implicit imports from the underlying hierarchy of parent sessions. The |
|
72600
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
155 |
generated \<^verbatim>\<open>session.tex\<close> file is not affected: the session's {\LaTeX} setup
|
|
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
156 |
needs to \<^verbatim>\<open>\input{\<close>\<open>\<dots>\<close>\<^verbatim>\<open>}\<close> generated \<^verbatim>\<open>.tex\<close> files separately.
|
|
2fa4f25d9d07
official support for document theories from other sessions;
wenzelm
parents:
72574
diff
changeset
|
157 |
|
| 61575 | 158 |
\<^descr> \isakeyword{document_files}~\<open>(\<close>\isakeyword{in}~\<open>base_dir) files\<close> lists
|
159 |
source files for document preparation, typically \<^verbatim>\<open>.tex\<close> and \<^verbatim>\<open>.sty\<close> for |
|
160 |
{\LaTeX}. Only these explicitly given files are copied from the base
|
|
161 |
directory to the document output directory, before formal document |
|
162 |
processing is started (see also \secref{sec:tool-document}). The local path
|
|
163 |
structure of the \<open>files\<close> is preserved, which allows to reconstruct the |
|
| 68292 | 164 |
original directory hierarchy of \<open>base_dir\<close>. The default \<open>base_dir\<close> is |
165 |
\<^verbatim>\<open>document\<close> within the session root directory. |
|
|
56533
cd8b6d849b6a
explicit 'document_files' in session ROOT specifications;
wenzelm
parents:
55112
diff
changeset
|
166 |
|
| 69671 | 167 |
\<^descr> \isakeyword{export_files}~\<open>(\<close>\isakeyword{in}~\<open>target_dir) [number]
|
|
69811
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
168 |
patterns\<close> specifies theory exports that may get written to the file-system, |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
169 |
e.g. via @{tool_ref build} with option \<^verbatim>\<open>-e\<close> (\secref{sec:tool-build}). The
|
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
170 |
\<open>target_dir\<close> specification is relative to the session root directory; its |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
171 |
default is \<^verbatim>\<open>export\<close>. Exports are selected via \<open>patterns\<close> as in @{tool_ref
|
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
172 |
export} (\secref{sec:tool-export}). The number given in brackets (default:
|
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
173 |
0) specifies elements that should be pruned from each name: it allows to |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
174 |
reduce the resulting directory hierarchy at the danger of overwriting files |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
175 |
due to loss of uniqueness. |
| 58618 | 176 |
\<close> |
| 48579 | 177 |
|
| 51055 | 178 |
|
| 58618 | 179 |
subsubsection \<open>Examples\<close> |
| 48580 | 180 |
|
| 61575 | 181 |
text \<open> |
| 63680 | 182 |
See \<^file>\<open>~~/src/HOL/ROOT\<close> for a diversity of practically relevant situations, |
183 |
although it uses relatively complex quasi-hierarchic naming conventions like |
|
184 |
\<^verbatim>\<open>HOL-SPARK\<close>, \<^verbatim>\<open>HOL-SPARK-Examples\<close>. An alternative is to use unqualified |
|
185 |
names that are relatively long and descriptive, as in the Archive of Formal |
|
| 67605 | 186 |
Proofs (\<^url>\<open>https://isa-afp.org\<close>), for example. |
| 61575 | 187 |
\<close> |
| 48578 | 188 |
|
189 |
||
| 58618 | 190 |
section \<open>System build options \label{sec:system-options}\<close>
|
| 48578 | 191 |
|
| 61575 | 192 |
text \<open> |
| 63680 | 193 |
See \<^file>\<open>~~/etc/options\<close> for the main defaults provided by the Isabelle |
| 61575 | 194 |
distribution. Isabelle/jEdit @{cite "isabelle-jedit"} includes a simple
|
195 |
editing mode \<^verbatim>\<open>isabelle-options\<close> for this file-format. |
|
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
196 |
|
| 61575 | 197 |
The following options are particularly relevant to build Isabelle sessions, |
198 |
in particular with document preparation (\chref{ch:present}).
|
|
| 51055 | 199 |
|
| 61575 | 200 |
\<^item> @{system_option_def "browser_info"} controls output of HTML browser
|
201 |
info, see also \secref{sec:info}.
|
|
| 51055 | 202 |
|
|
72574
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
203 |
\<^item> @{system_option_def "document"} controls document output for a
|
|
73826
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
204 |
particular session or theory; \<^verbatim>\<open>document=pdf\<close> or \<^verbatim>\<open>document=true\<close> means |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
205 |
enabled, \<^verbatim>\<open>document=""\<close> or \<^verbatim>\<open>document=false\<close> means disabled (especially |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
206 |
for particular theories). |
| 51055 | 207 |
|
| 61575 | 208 |
\<^item> @{system_option_def "document_output"} specifies an alternative
|
209 |
directory for generated output of the document preparation system; the |
|
210 |
default is within the @{setting "ISABELLE_BROWSER_INFO"} hierarchy as
|
|
211 |
explained in \secref{sec:info}. See also @{tool mkroot}, which generates a
|
|
212 |
default configuration with output readily available to the author of the |
|
213 |
document. |
|
| 51055 | 214 |
|
| 61575 | 215 |
\<^item> @{system_option_def "document_variants"} specifies document variants as
|
|
72574
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
216 |
a colon-separated list of \<open>name=tags\<close> entries. The default name |
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
217 |
\<^verbatim>\<open>document\<close>, without additional tags. |
| 51055 | 218 |
|
|
72574
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
219 |
Tags are specified as a comma separated list of modifier/name pairs and |
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
220 |
tell {\LaTeX} how to interpret certain Isabelle command regions:
|
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
221 |
``\<^verbatim>\<open>+\<close>\<open>foo\<close>'' (or just ``\<open>foo\<close>'') means to keep, ``\<^verbatim>\<open>-\<close>\<open>foo\<close>'' to drop, |
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
222 |
and ``\<^verbatim>\<open>/\<close>\<open>foo\<close>'' to fold text tagged as \<open>foo\<close>. The builtin default is |
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
223 |
equivalent to the tag specification |
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
224 |
``\<^verbatim>\<open>+document,+theory,+proof,+ML,+visible,-invisible,+important,+unimportant\<close>''; |
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
225 |
see also the {\LaTeX} macros \<^verbatim>\<open>\isakeeptag\<close>, \<^verbatim>\<open>\isadroptag\<close>, and
|
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
226 |
\<^verbatim>\<open>\isafoldtag\<close>, in \<^file>\<open>~~/lib/texinputs/isabelle.sty\<close>. |
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
227 |
|
|
d892f6d66402
build documents in Isabelle/Scala, based on generated tex files as session exports;
wenzelm
parents:
72515
diff
changeset
|
228 |
In contrast, \<^verbatim>\<open>document_variants=document:outline=/proof,/ML\<close> indicates |
| 61575 | 229 |
two documents: the one called \<^verbatim>\<open>document\<close> with default tags, and the other |
230 |
called \<^verbatim>\<open>outline\<close> where proofs and ML sections are folded. |
|
| 51055 | 231 |
|
| 61575 | 232 |
Document variant names are just a matter of conventions. It is also |
233 |
possible to use different document variant names (without tags) for |
|
234 |
different document root entries, see also \secref{sec:tool-document}.
|
|
| 51055 | 235 |
|
| 68513 | 236 |
\<^item> @{system_option_def "document_tags"} specifies alternative command tags
|
237 |
as a comma-separated list of items: either ``\<open>command\<close>\<^verbatim>\<open>%\<close>\<open>tag\<close>'' for a |
|
238 |
specific command, or ``\<^verbatim>\<open>%\<close>\<open>tag\<close>'' as default for all other commands. This |
|
239 |
is occasionally useful to control the global visibility of commands via |
|
240 |
session options (e.g.\ in \<^verbatim>\<open>ROOT\<close>). |
|
| 67140 | 241 |
|
| 73743 | 242 |
\<^item> @{system_option_def "document_bibliography"} explicitly enables the use
|
243 |
of \<^verbatim>\<open>bibtex\<close>; the default is to check the presence of \<^verbatim>\<open>root.bib\<close>, but it |
|
244 |
could have a different name. |
|
245 |
||
| 73735 | 246 |
\<^item> @{system_option_def "document_preprocessor"} specifies the name of an
|
247 |
executable that is run within the document output directory, after |
|
248 |
preparing the document sources and before the actual build process. This |
|
249 |
allows to apply adhoc patches, without requiring a separate \<^verbatim>\<open>build\<close> |
|
250 |
script. |
|
251 |
||
| 61575 | 252 |
\<^item> @{system_option_def "threads"} determines the number of worker threads
|
253 |
for parallel checking of theories and proofs. The default \<open>0\<close> means that a |
|
254 |
sensible maximum value is determined by the underlying hardware. For |
|
255 |
machines with many cores or with hyperthreading, this is often requires |
|
256 |
manual adjustment (on the command-line or within personal settings or |
|
257 |
preferences, not within a session \<^verbatim>\<open>ROOT\<close>). |
|
| 51055 | 258 |
|
| 61575 | 259 |
\<^item> @{system_option_def "condition"} specifies a comma-separated list of
|
260 |
process environment variables (or Isabelle settings) that are required for |
|
261 |
the subsequent theories to be processed. Conditions are considered |
|
262 |
``true'' if the corresponding environment value is defined and non-empty. |
|
| 51055 | 263 |
|
| 61602 | 264 |
\<^item> @{system_option_def "timeout"} and @{system_option_def "timeout_scale"}
|
265 |
specify a real wall-clock timeout for the session as a whole: the two |
|
266 |
values are multiplied and taken as the number of seconds. Typically, |
|
267 |
@{system_option "timeout"} is given for individual sessions, and
|
|
268 |
@{system_option "timeout_scale"} as global adjustment to overall hardware
|
|
269 |
performance. |
|
270 |
||
271 |
The timer is controlled outside the ML process by the JVM that runs |
|
272 |
Isabelle/Scala. Thus it is relatively reliable in canceling processes that |
|
273 |
get out of control, even if there is a deadlock without CPU time usage. |
|
| 51055 | 274 |
|
| 64308 | 275 |
\<^item> @{system_option_def "profiling"} specifies a mode for global ML
|
276 |
profiling. Possible values are the empty string (disabled), \<^verbatim>\<open>time\<close> for |
|
| 69593 | 277 |
\<^ML>\<open>profile_time\<close> and \<^verbatim>\<open>allocations\<close> for \<^ML>\<open>profile_allocations\<close>. |
| 64308 | 278 |
Results appear near the bottom of the session log file. |
279 |
||
|
73777
52e43a93d51f
clarified system_log: make this work independently of the particular "isabelle build" command-line (e.g. "isabelle mirabelle");
wenzelm
parents:
73774
diff
changeset
|
280 |
\<^item> @{system_option_def system_log} specifies an optional log file for
|
|
52e43a93d51f
clarified system_log: make this work independently of the particular "isabelle build" command-line (e.g. "isabelle mirabelle");
wenzelm
parents:
73774
diff
changeset
|
281 |
low-level messages produced by \<^ML>\<open>Output.system_message\<close> in |
|
73826
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
282 |
Isabelle/ML; the value ``\<^verbatim>\<open>true\<close>'' refers to console progress of the build |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
283 |
job. |
|
73777
52e43a93d51f
clarified system_log: make this work independently of the particular "isabelle build" command-line (e.g. "isabelle mirabelle");
wenzelm
parents:
73774
diff
changeset
|
284 |
|
|
69854
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
285 |
\<^item> @{system_option_def "system_heaps"} determines the directories for
|
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
286 |
session heap images: \<^path>\<open>$ISABELLE_HEAPS\<close> is the user directory and |
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
287 |
\<^path>\<open>$ISABELLE_HEAPS_SYSTEM\<close> the system directory (usually within the |
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
288 |
Isabelle application). For \<^verbatim>\<open>system_heaps=false\<close>, heaps are stored in the |
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
289 |
user directory and may be loaded from both directories. For |
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
290 |
\<^verbatim>\<open>system_heaps=true\<close>, store and load happens only in the system directory. |
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
291 |
|
| 61575 | 292 |
The @{tool_def options} tool prints Isabelle system options. Its
|
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
293 |
command-line usage is: |
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
294 |
@{verbatim [display]
|
|
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
295 |
\<open>Usage: isabelle options [OPTIONS] [MORE_OPTIONS ...] |
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
296 |
|
|
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
297 |
Options are: |
|
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
298 |
-b include $ISABELLE_BUILD_OPTIONS |
| 52735 | 299 |
-g OPTION get value of OPTION |
|
50531
f841ac0cb757
clarified "isabelle options" command line, to make it more close to "isabelle components";
wenzelm
parents:
50406
diff
changeset
|
300 |
-l list options |
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
301 |
-x FILE export to FILE in YXML format |
|
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
302 |
|
|
50531
f841ac0cb757
clarified "isabelle options" command line, to make it more close to "isabelle components";
wenzelm
parents:
50406
diff
changeset
|
303 |
Report Isabelle system options, augmented by MORE_OPTIONS given as |
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
304 |
arguments NAME=VAL or NAME.\<close>} |
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
305 |
|
| 61575 | 306 |
The command line arguments provide additional system options of the form |
307 |
\<open>name\<close>\<^verbatim>\<open>=\<close>\<open>value\<close> or \<open>name\<close> for Boolean options. |
|
308 |
||
309 |
Option \<^verbatim>\<open>-b\<close> augments the implicit environment of system options by the ones |
|
310 |
of @{setting ISABELLE_BUILD_OPTIONS}, cf.\ \secref{sec:tool-build}.
|
|
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
311 |
|
| 61575 | 312 |
Option \<^verbatim>\<open>-g\<close> prints the value of the given option. Option \<^verbatim>\<open>-l\<close> lists all |
313 |
options with their declaration and current value. |
|
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
314 |
|
| 61575 | 315 |
Option \<^verbatim>\<open>-x\<close> specifies a file to export the result in YXML format, instead |
316 |
of printing it in human-readable form. |
|
| 58618 | 317 |
\<close> |
| 48578 | 318 |
|
319 |
||
| 58618 | 320 |
section \<open>Invoking the build process \label{sec:tool-build}\<close>
|
| 48578 | 321 |
|
| 61575 | 322 |
text \<open> |
323 |
The @{tool_def build} tool invokes the build process for Isabelle sessions.
|
|
324 |
It manages dependencies between sessions, related sources of theories and |
|
325 |
auxiliary files, and target heap images. Accordingly, it runs instances of |
|
326 |
the prover process with optional document preparation. Its command-line |
|
327 |
usage is:\<^footnote>\<open>Isabelle/Scala provides the same functionality via |
|
|
71896
ce06d6456cc8
clarified signature --- fit within limit of 22 arguments;
wenzelm
parents:
71893
diff
changeset
|
328 |
\<^scala_method>\<open>isabelle.Build.build\<close>.\<close> |
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
329 |
@{verbatim [display]
|
|
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
330 |
\<open>Usage: isabelle build [OPTIONS] [SESSIONS ...] |
| 48578 | 331 |
|
332 |
Options are: |
|
|
66737
2edc0c42c883
option -B for "isabelle build" and "isabelle imports";
wenzelm
parents:
66671
diff
changeset
|
333 |
-B NAME include session NAME and all descendants |
|
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
334 |
-D DIR include session directory and select its sessions |
| 64265 | 335 |
-N cyclic shuffling of NUMA CPU nodes (performance tuning) |
| 72648 | 336 |
-P DIR enable HTML/PDF presentation in directory (":" for default)
|
| 71807 | 337 |
-R refer to requirements of selected sessions |
| 66745 | 338 |
-S soft build: only observe changes of sources, not heap images |
| 60106 | 339 |
-X NAME exclude sessions from group NAME and all descendants |
| 48578 | 340 |
-a select all sessions |
341 |
-b build heap images |
|
| 48595 | 342 |
-c clean build |
|
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
343 |
-d DIR include session directory |
|
69811
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
344 |
-e export files from session specification into file-system |
| 66841 | 345 |
-f fresh build |
| 48578 | 346 |
-g NAME select session group NAME |
347 |
-j INT maximum number of parallel jobs (default 1) |
|
|
59891
9ce697050455
added isabelle build option -k, for fast off-line checking of theory sources;
wenzelm
parents:
59446
diff
changeset
|
348 |
-k KEYWORD check theory sources for conflicts with proposed keywords |
| 48903 | 349 |
-l list session source files |
| 48578 | 350 |
-n no build -- test dependencies only |
| 52056 | 351 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
| 48578 | 352 |
-v verbose |
| 60106 | 353 |
-x NAME exclude session NAME and all descendants |
| 48578 | 354 |
|
| 62596 | 355 |
Build and manage Isabelle sessions, depending on implicit settings: |
356 |
||
| 71982 | 357 |
ISABELLE_TOOL_JAVA_OPTIONS="..." |
| 48578 | 358 |
ISABELLE_BUILD_OPTIONS="..." |
359 |
||
360 |
ML_PLATFORM="..." |
|
361 |
ML_HOME="..." |
|
362 |
ML_SYSTEM="..." |
|
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
363 |
ML_OPTIONS="..."\<close>} |
| 48578 | 364 |
|
| 61406 | 365 |
\<^medskip> |
| 61575 | 366 |
Isabelle sessions are defined via session ROOT files as described in |
367 |
(\secref{sec:session-root}). The totality of sessions is determined by
|
|
368 |
collecting such specifications from all Isabelle component directories |
|
369 |
(\secref{sec:components}), augmented by more directories given via options
|
|
370 |
\<^verbatim>\<open>-d\<close>~\<open>DIR\<close> on the command line. Each such directory may contain a session |
|
| 61503 | 371 |
\<^verbatim>\<open>ROOT\<close> file with several session specifications. |
| 48578 | 372 |
|
| 61575 | 373 |
Any session root directory may refer recursively to further directories of |
374 |
the same kind, by listing them in a catalog file \<^verbatim>\<open>ROOTS\<close> line-by-line. This |
|
375 |
helps to organize large collections of session specifications, or to make |
|
| 66576 | 376 |
\<^verbatim>\<open>-d\<close> command line options persistent (e.g.\ in |
| 61503 | 377 |
\<^verbatim>\<open>$ISABELLE_HOME_USER/ROOTS\<close>). |
|
48684
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
378 |
|
| 61406 | 379 |
\<^medskip> |
| 61575 | 380 |
The subset of sessions to be managed is determined via individual \<open>SESSIONS\<close> |
381 |
given as command-line arguments, or session groups that are given via one or |
|
382 |
more options \<^verbatim>\<open>-g\<close>~\<open>NAME\<close>. Option \<^verbatim>\<open>-a\<close> selects all sessions. The build tool |
|
383 |
takes session dependencies into account: the set of selected sessions is |
|
384 |
completed by including all ancestors. |
|
| 48578 | 385 |
|
| 61406 | 386 |
\<^medskip> |
|
68734
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
387 |
One or more options \<^verbatim>\<open>-B\<close>~\<open>NAME\<close> specify base sessions to be included (all |
|
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
388 |
descendants wrt.\ the session parent or import graph). |
|
66737
2edc0c42c883
option -B for "isabelle build" and "isabelle imports";
wenzelm
parents:
66671
diff
changeset
|
389 |
|
|
2edc0c42c883
option -B for "isabelle build" and "isabelle imports";
wenzelm
parents:
66671
diff
changeset
|
390 |
\<^medskip> |
|
68734
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
391 |
One or more options \<^verbatim>\<open>-x\<close>~\<open>NAME\<close> specify sessions to be excluded (all |
|
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
392 |
descendants wrt.\ the session parent or import graph). Option \<^verbatim>\<open>-X\<close> is |
|
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
393 |
analogous to this, but excluded sessions are specified by session group |
|
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
394 |
membership. |
|
59892
2a616319c171
added isabelle build option -x, to exclude sessions;
wenzelm
parents:
59891
diff
changeset
|
395 |
|
| 61406 | 396 |
\<^medskip> |
| 61575 | 397 |
Option \<^verbatim>\<open>-R\<close> reverses the selection in the sense that it refers to its |
398 |
requirements: all ancestor sessions excluding the original selection. This |
|
399 |
allows to prepare the stage for some build process with different options, |
|
400 |
before running the main build itself (without option \<^verbatim>\<open>-R\<close>). |
|
| 49131 | 401 |
|
| 61406 | 402 |
\<^medskip> |
| 61575 | 403 |
Option \<^verbatim>\<open>-D\<close> is similar to \<^verbatim>\<open>-d\<close>, but selects all sessions that are defined |
404 |
in the given directories. |
|
|
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
405 |
|
| 61406 | 406 |
\<^medskip> |
| 66745 | 407 |
Option \<^verbatim>\<open>-S\<close> indicates a ``soft build'': the selection is restricted to |
408 |
those sessions that have changed sources (according to actually imported |
|
409 |
theories). The status of heap images is ignored. |
|
410 |
||
411 |
\<^medskip> |
|
| 61406 | 412 |
The build process depends on additional options |
| 61575 | 413 |
(\secref{sec:system-options}) that are passed to the prover eventually. The
|
414 |
settings variable @{setting_ref ISABELLE_BUILD_OPTIONS} allows to provide
|
|
|
73826
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
415 |
additional defaults, e.g.\ \<^verbatim>\<open>ISABELLE_BUILD_OPTIONS="document=pdf |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
416 |
threads=4"\<close>. Moreover, the environment of system build options may be |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
417 |
augmented on the command line via \<^verbatim>\<open>-o\<close>~\<open>name\<close>\<^verbatim>\<open>=\<close>\<open>value\<close> or \<^verbatim>\<open>-o\<close>~\<open>name\<close>, |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
418 |
which abbreviates \<^verbatim>\<open>-o\<close>~\<open>name\<close>\<^verbatim>\<open>=true\<close> for Boolean or string options. |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
419 |
Multiple occurrences of \<^verbatim>\<open>-o\<close> on the command-line are applied in the given |
|
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
420 |
order. |
| 48578 | 421 |
|
| 61406 | 422 |
\<^medskip> |
| 72648 | 423 |
Option \<^verbatim>\<open>-P\<close> enables PDF/HTML presentation in the given directory, where |
424 |
``\<^verbatim>\<open>-P:\<close>'' refers to the default @{setting_ref ISABELLE_BROWSER_INFO} (or
|
|
|
73012
238ddf525da4
clarified HTML presentation, e.g. avoid bulky jobs like HOL or HOL-Analysis in applications;
wenzelm
parents:
72878
diff
changeset
|
425 |
@{setting_ref ISABELLE_BROWSER_INFO_SYSTEM}). This applies only to
|
|
238ddf525da4
clarified HTML presentation, e.g. avoid bulky jobs like HOL or HOL-Analysis in applications;
wenzelm
parents:
72878
diff
changeset
|
426 |
explicitly selected sessions; note that option \<open>-R\<close> allows to select all |
|
238ddf525da4
clarified HTML presentation, e.g. avoid bulky jobs like HOL or HOL-Analysis in applications;
wenzelm
parents:
72878
diff
changeset
|
427 |
requirements separately. |
| 72648 | 428 |
|
429 |
\<^medskip> |
|
| 61575 | 430 |
Option \<^verbatim>\<open>-b\<close> ensures that heap images are produced for all selected |
431 |
sessions. By default, images are only saved for inner nodes of the hierarchy |
|
432 |
of sessions, as required for other sessions to continue later on. |
|
| 48578 | 433 |
|
| 61406 | 434 |
\<^medskip> |
|
68734
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
435 |
Option \<^verbatim>\<open>-c\<close> cleans the selected sessions (all descendants wrt.\ the session |
|
c14a2cc9b5ef
isabelle build options -c -x -B refer to imports_graph;
wenzelm
parents:
68523
diff
changeset
|
436 |
parent or import graph) before performing the specified build operation. |
| 48595 | 437 |
|
| 61406 | 438 |
\<^medskip> |
|
69811
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
439 |
Option \<^verbatim>\<open>-e\<close> executes the \isakeyword{export_files} directives from the ROOT
|
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
440 |
specification of all explicitly selected sessions: the status of the session |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
441 |
build database needs to be OK, but the session could have been built |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
442 |
earlier. Using \isakeyword{export_files}, a session may serve as abstract
|
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
443 |
interface for add-on build artefacts, but these are only materialized on |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
444 |
explicit request: without option \<^verbatim>\<open>-e\<close> there is no effect on the physical |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
445 |
file-system yet. |
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
446 |
|
|
18f61ce86425
clarified 'export_files' in session ROOT: require explicit "isabelle build -e";
wenzelm
parents:
69755
diff
changeset
|
447 |
\<^medskip> |
| 66841 | 448 |
Option \<^verbatim>\<open>-f\<close> forces a fresh build of all selected sessions and their |
449 |
requirements. |
|
450 |
||
451 |
\<^medskip> |
|
| 61575 | 452 |
Option \<^verbatim>\<open>-n\<close> omits the actual build process after the preparatory stage |
453 |
(including optional cleanup). Note that the return code always indicates the |
|
454 |
status of the set of selected sessions. |
|
| 48595 | 455 |
|
| 61406 | 456 |
\<^medskip> |
| 61575 | 457 |
Option \<^verbatim>\<open>-j\<close> specifies the maximum number of parallel build jobs (prover |
458 |
processes). Each prover process is subject to a separate limit of parallel |
|
459 |
worker threads, cf.\ system option @{system_option_ref threads}.
|
|
| 48578 | 460 |
|
| 61406 | 461 |
\<^medskip> |
| 64265 | 462 |
Option \<^verbatim>\<open>-N\<close> enables cyclic shuffling of NUMA CPU nodes. This may help |
463 |
performance tuning on Linux servers with separate CPU/memory modules. |
|
464 |
||
465 |
\<^medskip> |
|
| 61575 | 466 |
Option \<^verbatim>\<open>-v\<close> increases the general level of verbosity. Option \<^verbatim>\<open>-l\<close> lists |
467 |
the source files that contribute to a session. |
|
|
59891
9ce697050455
added isabelle build option -k, for fast off-line checking of theory sources;
wenzelm
parents:
59446
diff
changeset
|
468 |
|
| 61406 | 469 |
\<^medskip> |
| 61575 | 470 |
Option \<^verbatim>\<open>-k\<close> specifies a newly proposed keyword for outer syntax (multiple |
471 |
uses allowed). The theory sources are checked for conflicts wrt.\ this |
|
472 |
hypothetical change of syntax, e.g.\ to reveal occurrences of identifiers |
|
473 |
that need to be quoted. |
|
474 |
\<close> |
|
|
59891
9ce697050455
added isabelle build option -k, for fast off-line checking of theory sources;
wenzelm
parents:
59446
diff
changeset
|
475 |
|
| 48578 | 476 |
|
| 58618 | 477 |
subsubsection \<open>Examples\<close> |
| 48578 | 478 |
|
| 58618 | 479 |
text \<open> |
| 48578 | 480 |
Build a specific logic image: |
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
481 |
@{verbatim [display] \<open>isabelle build -b HOLCF\<close>}
|
| 48578 | 482 |
|
| 61406 | 483 |
\<^smallskip> |
484 |
Build the main group of logic images: |
|
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
485 |
@{verbatim [display] \<open>isabelle build -b -g main\<close>}
|
| 48578 | 486 |
|
| 61406 | 487 |
\<^smallskip> |
| 66748 | 488 |
Build all descendants (and requirements) of \<^verbatim>\<open>FOL\<close> and \<^verbatim>\<open>ZF\<close>: |
489 |
@{verbatim [display] \<open>isabelle build -B FOL -B ZF\<close>}
|
|
490 |
||
491 |
\<^smallskip> |
|
492 |
Build all sessions where sources have changed (ignoring heaps): |
|
493 |
@{verbatim [display] \<open>isabelle build -a -S\<close>}
|
|
494 |
||
495 |
\<^smallskip> |
|
| 61575 | 496 |
Provide a general overview of the status of all Isabelle sessions, without |
497 |
building anything: |
|
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
498 |
@{verbatim [display] \<open>isabelle build -a -n -v\<close>}
|
| 48578 | 499 |
|
| 61406 | 500 |
\<^smallskip> |
| 61575 | 501 |
Build all sessions with HTML browser info and PDF document preparation: |
|
73826
72900f34dbb3
allow system option short form NAME for NAME=true for type string, not just bool;
wenzelm
parents:
73777
diff
changeset
|
502 |
@{verbatim [display] \<open>isabelle build -a -o browser_info -o document\<close>}
|
| 48578 | 503 |
|
| 61406 | 504 |
\<^smallskip> |
| 61575 | 505 |
Build all sessions with a maximum of 8 parallel prover processes and 4 |
506 |
worker threads each (on a machine with many cores): |
|
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
507 |
@{verbatim [display] \<open>isabelle build -a -j8 -o threads=4\<close>}
|
| 48595 | 508 |
|
| 61406 | 509 |
\<^smallskip> |
| 61575 | 510 |
Build some session images with cleanup of their descendants, while retaining |
511 |
their ancestry: |
|
|
72515
c7038c397ae3
moved most material from session HOL-Word to Word_Lib in the AFP
haftmann
parents:
71982
diff
changeset
|
512 |
@{verbatim [display] \<open>isabelle build -b -c HOL-Library HOL-Algebra\<close>}
|
| 48595 | 513 |
|
| 61406 | 514 |
\<^smallskip> |
515 |
Clean all sessions without building anything: |
|
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
516 |
@{verbatim [display] \<open>isabelle build -a -n -c\<close>}
|
|
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
517 |
|
| 61406 | 518 |
\<^smallskip> |
| 61575 | 519 |
Build all sessions from some other directory hierarchy, according to the |
520 |
settings variable \<^verbatim>\<open>AFP\<close> that happens to be defined inside the Isabelle |
|
521 |
environment: |
|
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
522 |
@{verbatim [display] \<open>isabelle build -D '$AFP'\<close>}
|
| 49131 | 523 |
|
| 61406 | 524 |
\<^smallskip> |
| 61575 | 525 |
Inform about the status of all sessions required for AFP, without building |
526 |
anything yet: |
|
|
61407
7ba7b8103565
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61406
diff
changeset
|
527 |
@{verbatim [display] \<open>isabelle build -D '$AFP' -R -v -n\<close>}
|
| 58618 | 528 |
\<close> |
| 48578 | 529 |
|
| 66671 | 530 |
|
| 72876 | 531 |
section \<open>Print messages from build database \label{sec:tool-log}\<close>
|
532 |
||
533 |
text \<open> |
|
534 |
The @{tool_def "log"} tool prints prover messages from the build
|
|
535 |
database of the given session. Its command-line usage is: |
|
536 |
||
537 |
@{verbatim [display]
|
|
538 |
\<open>Usage: isabelle log [OPTIONS] SESSION |
|
539 |
||
540 |
Options are: |
|
541 |
-T NAME restrict to given theories (multiple options possible) |
|
542 |
-U output Unicode symbols |
|
543 |
-m MARGIN margin for pretty printing (default: 76.0) |
|
544 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
|
|
73837
f72335f6a9ed
clarified documentation: tracing messages are not shown here;
wenzelm
parents:
73826
diff
changeset
|
545 |
-v print all messages, including information etc. |
| 72876 | 546 |
|
547 |
Print messages from the build database of the given session, without any |
|
548 |
checks against current sources: results from a failed build can be |
|
549 |
printed as well.\<close>} |
|
550 |
||
551 |
The specified session database is taken as is, independently of the current |
|
552 |
session structure and theories sources. The order of messages follows the |
|
553 |
source positions of source files; thus the erratic evaluation of parallel |
|
554 |
processing rarely matters. There is \<^emph>\<open>no\<close> implicit build process involved, |
|
555 |
so it is possible to retrieve error messages from a failed session as well. |
|
556 |
||
557 |
\<^medskip> Option \<^verbatim>\<open>-o\<close> allows to change system options, as in @{tool build}
|
|
558 |
(\secref{sec:tool-build}). This may affect the storage space for the build
|
|
559 |
database, notably via @{system_option system_heaps}, or @{system_option
|
|
560 |
build_database_server} and its relatives. |
|
561 |
||
562 |
\<^medskip> Option \<^verbatim>\<open>-T\<close> restricts output to given theories: multiple entries are |
|
563 |
possible by repeating this option on the command-line. The default is to |
|
564 |
refer to \<^emph>\<open>all\<close> theories that were used in original session build process. |
|
565 |
||
566 |
\<^medskip> Options \<^verbatim>\<open>-m\<close> and \<^verbatim>\<open>-U\<close> modify pretty printing and output of Isabelle |
|
567 |
symbols. The default is for an old-fashioned ASCII terminal at 80 characters |
|
568 |
per line (76 + 4 characters to prefix warnings or errors). |
|
| 72878 | 569 |
|
|
73837
f72335f6a9ed
clarified documentation: tracing messages are not shown here;
wenzelm
parents:
73826
diff
changeset
|
570 |
\<^medskip> Option \<^verbatim>\<open>-v\<close> prints all messages from the session database that are |
|
f72335f6a9ed
clarified documentation: tracing messages are not shown here;
wenzelm
parents:
73826
diff
changeset
|
571 |
normally inlined into the source text, including information messages etc. |
| 72876 | 572 |
\<close> |
573 |
||
574 |
subsubsection \<open>Examples\<close> |
|
575 |
||
576 |
text \<open> |
|
577 |
Print messages from theory \<^verbatim>\<open>HOL.Nat\<close> of session \<^verbatim>\<open>HOL\<close>, using Unicode |
|
578 |
rendering of Isabelle symbols and a margin of 100 characters: |
|
579 |
@{verbatim [display] \<open>isabelle log -T HOL.Nat -U -m 100 HOL\<close>}
|
|
580 |
\<close> |
|
581 |
||
582 |
||
|
68152
619de043389f
guard result exports via export_pattern -- avoid bombing client via huge blobs;
wenzelm
parents:
68116
diff
changeset
|
583 |
section \<open>Retrieve theory exports \label{sec:tool-export}\<close>
|
| 68116 | 584 |
|
585 |
text \<open> |
|
586 |
The @{tool_def "export"} tool retrieves theory exports from the session
|
|
587 |
database. Its command-line usage is: @{verbatim [display]
|
|
588 |
\<open>Usage: isabelle export [OPTIONS] SESSION |
|
589 |
||
590 |
Options are: |
|
|
68314
2acbf8129d8b
clarified option -O: avoid conflict with build/dump option -D;
wenzelm
parents:
68292
diff
changeset
|
591 |
-O DIR output directory for exported files (default: "export") |
| 68116 | 592 |
-d DIR include session directory |
593 |
-l list exports |
|
594 |
-n no build of session |
|
595 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
|
| 69671 | 596 |
-p NUM prune path of exported files by NUM elements |
| 68514 | 597 |
-x PATTERN extract files matching pattern (e.g.\ "*:**" for all) |
| 68116 | 598 |
|
599 |
List or export theory exports for SESSION: named blobs produced by |
|
| 68290 | 600 |
isabelle build. Option -l or -x is required; option -x may be repeated. |
| 68116 | 601 |
|
602 |
The PATTERN language resembles glob patterns in the shell, with ? and * |
|
603 |
(both excluding ":" and "/"), ** (excluding ":"), and [abc] or [^abc], |
|
604 |
and variants {pattern1,pattern2,pattern3}.\<close>}
|
|
605 |
||
606 |
\<^medskip> |
|
607 |
The specified session is updated via @{tool build}
|
|
|
69854
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
608 |
(\secref{sec:tool-build}), with the same options \<^verbatim>\<open>-d\<close>, \<^verbatim>\<open>-o\<close>. The option
|
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
609 |
\<^verbatim>\<open>-n\<close> suppresses the implicit build process: it means that a potentially |
|
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69811
diff
changeset
|
610 |
outdated session database is used! |
| 68116 | 611 |
|
612 |
\<^medskip> |
|
613 |
Option \<^verbatim>\<open>-l\<close> lists all stored exports, with compound names |
|
614 |
\<open>theory\<close>\<^verbatim>\<open>:\<close>\<open>name\<close>. |
|
615 |
||
616 |
\<^medskip> |
|
617 |
Option \<^verbatim>\<open>-x\<close> extracts stored exports whose compound name matches the given |
|
618 |
pattern. Note that wild cards ``\<^verbatim>\<open>?\<close>'' and ``\<^verbatim>\<open>*\<close>'' do not match the |
|
619 |
separators ``\<^verbatim>\<open>:\<close>'' and ``\<^verbatim>\<open>/\<close>''; the wild card \<^verbatim>\<open>**\<close> matches over directory |
|
620 |
name hierarchies separated by ``\<^verbatim>\<open>/\<close>''. Thus the pattern ``\<^verbatim>\<open>*:**\<close>'' matches |
|
| 68290 | 621 |
\<^emph>\<open>all\<close> theory exports. Multiple options \<^verbatim>\<open>-x\<close> refer to the union of all |
622 |
specified patterns. |
|
| 68116 | 623 |
|
|
68314
2acbf8129d8b
clarified option -O: avoid conflict with build/dump option -D;
wenzelm
parents:
68292
diff
changeset
|
624 |
Option \<^verbatim>\<open>-O\<close> specifies an alternative output directory for option \<^verbatim>\<open>-x\<close>: the |
| 68116 | 625 |
default is \<^verbatim>\<open>export\<close> within the current directory. Each theory creates its |
626 |
own sub-directory hierarchy, using the session-qualified theory name. |
|
| 69671 | 627 |
|
628 |
Option \<^verbatim>\<open>-p\<close> specifies the number of elements that should be pruned from |
|
629 |
each name: it allows to reduce the resulting directory hierarchy at the |
|
630 |
danger of overwriting files due to loss of uniqueness. |
|
| 68116 | 631 |
\<close> |
632 |
||
| 68348 | 633 |
|
634 |
section \<open>Dump PIDE session database \label{sec:tool-dump}\<close>
|
|
635 |
||
636 |
text \<open> |
|
637 |
The @{tool_def "dump"} tool dumps information from the cumulative PIDE
|
|
638 |
session database (which is processed on the spot). Its command-line usage |
|
639 |
is: @{verbatim [display]
|
|
640 |
\<open>Usage: isabelle dump [OPTIONS] [SESSIONS ...] |
|
641 |
||
642 |
Options are: |
|
643 |
-A NAMES dump named aspects (default: ...) |
|
644 |
-B NAME include session NAME and all descendants |
|
645 |
-D DIR include session directory and select its sessions |
|
646 |
-O DIR output directory for dumped files (default: "dump") |
|
| 71807 | 647 |
-R refer to requirements of selected sessions |
| 68348 | 648 |
-X NAME exclude sessions from group NAME and all descendants |
649 |
-a select all sessions |
|
| 70862 | 650 |
-b NAME base logic image (default "Pure") |
| 68348 | 651 |
-d DIR include session directory |
652 |
-g NAME select session group NAME |
|
653 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
|
654 |
-v verbose |
|
655 |
-x NAME exclude session NAME and all descendants |
|
656 |
||
657 |
Dump cumulative PIDE session database, with the following aspects: |
|
658 |
...\<close>} |
|
659 |
||
660 |
\<^medskip> Options \<^verbatim>\<open>-B\<close>, \<^verbatim>\<open>-D\<close>, \<^verbatim>\<open>-R\<close>, \<^verbatim>\<open>-X\<close>, \<^verbatim>\<open>-a\<close>, \<^verbatim>\<open>-d\<close>, \<^verbatim>\<open>-g\<close>, \<^verbatim>\<open>-x\<close> and the |
|
661 |
remaining command-line arguments specify sessions as in @{tool build}
|
|
662 |
(\secref{sec:tool-build}): the cumulative PIDE database of all their loaded
|
|
663 |
theories is dumped to the output directory of option \<^verbatim>\<open>-O\<close> (default: \<^verbatim>\<open>dump\<close> |
|
664 |
in the current directory). |
|
665 |
||
|
70859
6e6254bbce1f
split into standard partitions, for improved scalability;
wenzelm
parents:
70858
diff
changeset
|
666 |
\<^medskip> Option \<^verbatim>\<open>-b\<close> specifies an optional base logic image, for improved |
| 70862 | 667 |
scalability of the PIDE session. Its theories are only processed if it is |
668 |
included in the overall session selection. |
|
|
70859
6e6254bbce1f
split into standard partitions, for improved scalability;
wenzelm
parents:
70858
diff
changeset
|
669 |
|
| 68348 | 670 |
\<^medskip> Option \<^verbatim>\<open>-o\<close> overrides Isabelle system options as for @{tool build}
|
671 |
(\secref{sec:tool-build}).
|
|
672 |
||
673 |
\<^medskip> Option \<^verbatim>\<open>-v\<close> increases the general level of verbosity. |
|
674 |
||
675 |
\<^medskip> Option \<^verbatim>\<open>-A\<close> specifies named aspects of the dump, as a comma-separated |
|
676 |
list. The default is to dump all known aspects, as given in the command-line |
|
| 71893 | 677 |
usage of the tool. The underlying Isabelle/Scala operation |
678 |
\<^scala_method>\<open>isabelle.Dump.dump\<close> takes aspects as user-defined |
|
679 |
operations on the final PIDE state and document version. This allows to |
|
680 |
imitate Prover IDE rendering under program control. |
|
| 68348 | 681 |
\<close> |
682 |
||
683 |
||
684 |
subsubsection \<open>Examples\<close> |
|
685 |
||
686 |
text \<open> |
|
687 |
Dump all Isabelle/ZF sessions (which are rather small): |
|
688 |
@{verbatim [display] \<open>isabelle dump -v -B ZF\<close>}
|
|
689 |
||
690 |
\<^smallskip> |
|
| 70862 | 691 |
Dump the quite substantial \<^verbatim>\<open>HOL-Analysis\<close> session, with full bootstrap |
692 |
from Isabelle/Pure: |
|
693 |
@{verbatim [display] \<open>isabelle dump -v HOL-Analysis\<close>}
|
|
| 68348 | 694 |
|
695 |
\<^smallskip> |
|
| 70862 | 696 |
Dump all sessions connected to HOL-Analysis, using main Isabelle/HOL as |
697 |
basis: |
|
698 |
@{verbatim [display] \<open>isabelle dump -v -b HOL -B HOL-Analysis\<close>}
|
|
| 68348 | 699 |
|
700 |
This results in uniform PIDE markup for everything, except for the |
|
701 |
Isabelle/Pure bootstrap process itself. Producing that on the spot requires |
|
702 |
several GB of heap space, both for the Isabelle/Scala and Isabelle/ML |
|
703 |
process (in 64bit mode). Here are some relevant settings (\secref{sec:boot})
|
|
704 |
for such ambitious applications: |
|
705 |
@{verbatim [display]
|
|
706 |
\<open>ISABELLE_TOOL_JAVA_OPTIONS="-Xms4g -Xmx32g -Xss16m" |
|
707 |
ML_OPTIONS="--minheap 4G --maxheap 32G" |
|
708 |
\<close>} |
|
| 69599 | 709 |
\<close> |
| 68348 | 710 |
|
| 69599 | 711 |
|
712 |
section \<open>Update theory sources based on PIDE markup \label{sec:tool-update}\<close>
|
|
713 |
||
714 |
text \<open> |
|
715 |
The @{tool_def "update"} tool updates theory sources based on markup that is
|
|
716 |
produced from a running PIDE session (similar to @{tool dump}
|
|
717 |
\secref{sec:tool-dump}). Its command-line usage is: @{verbatim [display]
|
|
718 |
\<open>Usage: isabelle update [OPTIONS] [SESSIONS ...] |
|
719 |
||
720 |
Options are: |
|
721 |
-B NAME include session NAME and all descendants |
|
722 |
-D DIR include session directory and select its sessions |
|
| 71807 | 723 |
-R refer to requirements of selected sessions |
| 69599 | 724 |
-X NAME exclude sessions from group NAME and all descendants |
725 |
-a select all sessions |
|
|
70863
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
726 |
-b NAME base logic image (default "Pure") |
| 69599 | 727 |
-d DIR include session directory |
728 |
-g NAME select session group NAME |
|
729 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
|
730 |
-u OPT overide update option: shortcut for "-o update_OPT" |
|
731 |
-v verbose |
|
732 |
-x NAME exclude session NAME and all descendants |
|
733 |
||
734 |
Update theory sources based on PIDE markup.\<close>} |
|
735 |
||
736 |
\<^medskip> Options \<^verbatim>\<open>-B\<close>, \<^verbatim>\<open>-D\<close>, \<^verbatim>\<open>-R\<close>, \<^verbatim>\<open>-X\<close>, \<^verbatim>\<open>-a\<close>, \<^verbatim>\<open>-d\<close>, \<^verbatim>\<open>-g\<close>, \<^verbatim>\<open>-x\<close> and the |
|
737 |
remaining command-line arguments specify sessions as in @{tool build}
|
|
738 |
(\secref{sec:tool-build}) or @{tool dump} (\secref{sec:tool-dump}).
|
|
739 |
||
|
70863
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
740 |
\<^medskip> Option \<^verbatim>\<open>-b\<close> specifies an optional base logic image, for improved |
|
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
741 |
scalability of the PIDE session. Its theories are only processed if it is |
|
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
742 |
included in the overall session selection. |
| 69599 | 743 |
|
744 |
\<^medskip> Option \<^verbatim>\<open>-v\<close> increases the general level of verbosity. |
|
745 |
||
746 |
\<^medskip> Option \<^verbatim>\<open>-o\<close> overrides Isabelle system options as for @{tool build}
|
|
747 |
(\secref{sec:tool-build}). Option \<^verbatim>\<open>-u\<close> refers to specific \<^verbatim>\<open>update\<close>
|
|
748 |
options, by relying on naming convention: ``\<^verbatim>\<open>-u\<close>~\<open>OPT\<close>'' is a shortcut for |
|
749 |
``\<^verbatim>\<open>-o\<close>~\<^verbatim>\<open>update_\<close>\<open>OPT\<close>''. |
|
750 |
||
751 |
\<^medskip> The following update options are supported: |
|
752 |
||
753 |
\<^item> @{system_option update_inner_syntax_cartouches} to update inner syntax
|
|
754 |
(types, terms, etc.)~to use cartouches, instead of double-quoted strings |
|
755 |
or atomic identifiers. For example, ``\<^theory_text>\<open>lemma \<doublequote>x = |
|
| 69610 | 756 |
x\<doublequote>\<close>'' is replaced by ``\<^theory_text>\<open>lemma \<open>x = x\<close>\<close>'', and ``\<^theory_text>\<open>assume |
757 |
A\<close>'' is replaced by ``\<^theory_text>\<open>assume \<open>A\<close>\<close>''. |
|
| 69599 | 758 |
|
759 |
\<^item> @{system_option update_mixfix_cartouches} to update mixfix templates to
|
|
760 |
use cartouches instead of double-quoted strings. For example, ``\<^theory_text>\<open>(infixl |
|
761 |
\<doublequote>+\<doublequote> 65)\<close>'' is replaced by ``\<^theory_text>\<open>(infixl \<open>+\<close> |
|
762 |
65)\<close>''. |
|
763 |
||
764 |
\<^item> @{system_option update_control_cartouches} to update antiquotations to
|
|
765 |
use the compact form with control symbol and cartouche argument. For |
|
766 |
example, ``\<open>@{term \<doublequote>x + y\<doublequote>}\<close>'' is replaced by
|
|
767 |
``\<open>\<^term>\<open>x + y\<close>\<close>'' (the control symbol is literally \<^verbatim>\<open>\<^term>\<close>.) |
|
768 |
||
| 69603 | 769 |
\<^item> @{system_option update_path_cartouches} to update file-system paths to
|
770 |
use cartouches: this depends on language markup provided by semantic |
|
771 |
processing of parsed input. |
|
772 |
||
| 69599 | 773 |
It is also possible to produce custom updates in Isabelle/ML, by reporting |
774 |
\<^ML>\<open>Markup.update\<close> with the precise source position and a replacement |
|
775 |
text. This operation should be made conditional on specific system options, |
|
776 |
similar to the ones above. Searching the above option names in ML sources of |
|
777 |
\<^dir>\<open>$ISABELLE_HOME/src/Pure\<close> provides some examples. |
|
778 |
||
| 69602 | 779 |
Updates can be in conflict by producing nested or overlapping edits: this |
780 |
may require to run @{tool update} multiple times.
|
|
| 69599 | 781 |
\<close> |
782 |
||
783 |
||
784 |
subsubsection \<open>Examples\<close> |
|
785 |
||
786 |
text \<open> |
|
787 |
Update some cartouche notation in all theory sources required for session |
|
|
70863
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
788 |
\<^verbatim>\<open>HOL-Analysis\<close> (and ancestors): |
| 69599 | 789 |
|
|
70863
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
790 |
@{verbatim [display] \<open>isabelle update -u mixfix_cartouches HOL-Analysis\<close>}
|
| 69599 | 791 |
|
792 |
\<^smallskip> Update the same for all application sessions based on \<^verbatim>\<open>HOL-Analysis\<close> --- |
|
|
70863
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
793 |
using its image is taken starting point (for reduced resource requirements): |
| 69599 | 794 |
|
|
70863
d1299774543d
clarified "isabelle update" options -- more like "isabelle dump";
wenzelm
parents:
70862
diff
changeset
|
795 |
@{verbatim [display] \<open>isabelle update -u mixfix_cartouches -b HOL-Analysis -B HOL-Analysis\<close>}
|
| 69599 | 796 |
|
797 |
\<^smallskip> Update sessions that build on \<^verbatim>\<open>HOL-Proofs\<close>, which need to be run |
|
798 |
separately with special options as follows: |
|
799 |
||
800 |
@{verbatim [display] \<open>isabelle update -u mixfix_cartouches -l HOL-Proofs -B HOL-Proofs
|
|
| 69601 | 801 |
-o record_proofs=2\<close>} |
| 69599 | 802 |
|
803 |
\<^smallskip> See also the end of \secref{sec:tool-dump} for hints on increasing
|
|
804 |
Isabelle/ML heap sizes for very big PIDE processes that include many |
|
805 |
sessions, notably from the Archive of Formal Proofs. |
|
| 68348 | 806 |
\<close> |
807 |
||
| 71808 | 808 |
|
809 |
section \<open>Explore sessions structure\<close> |
|
810 |
||
811 |
text \<open> |
|
812 |
The @{tool_def "sessions"} tool explores the sessions structure. Its
|
|
813 |
command-line usage is: |
|
814 |
@{verbatim [display]
|
|
815 |
\<open>Usage: isabelle sessions [OPTIONS] [SESSIONS ...] |
|
816 |
||
817 |
Options are: |
|
818 |
-B NAME include session NAME and all descendants |
|
819 |
-D DIR include session directory and select its sessions |
|
820 |
-R refer to requirements of selected sessions |
|
821 |
-X NAME exclude sessions from group NAME and all descendants |
|
822 |
-a select all sessions |
|
823 |
-d DIR include session directory |
|
824 |
-g NAME select session group NAME |
|
825 |
-x NAME exclude session NAME and all descendants |
|
826 |
||
827 |
Explore the structure of Isabelle sessions and print result names in |
|
828 |
topological order (on stdout).\<close>} |
|
829 |
||
830 |
Arguments and options for session selection resemble @{tool build}
|
|
831 |
(\secref{sec:tool-build}).
|
|
832 |
\<close> |
|
833 |
||
834 |
||
835 |
subsubsection \<open>Examples\<close> |
|
836 |
||
837 |
text \<open> |
|
838 |
All sessions of the Isabelle distribution: |
|
839 |
@{verbatim [display] \<open>isabelle sessions -a\<close>}
|
|
840 |
||
841 |
\<^medskip> |
|
842 |
Sessions that are based on \<^verbatim>\<open>ZF\<close> (and required by it): |
|
843 |
@{verbatim [display] \<open>isabelle sessions -B ZF\<close>}
|
|
844 |
||
845 |
\<^medskip> |
|
846 |
All sessions of Isabelle/AFP (based in directory \<^path>\<open>AFP\<close>): |
|
847 |
@{verbatim [display] \<open>isabelle sessions -D AFP/thys\<close>}
|
|
848 |
||
849 |
\<^medskip> |
|
850 |
Sessions required by Isabelle/AFP (based in directory \<^path>\<open>AFP\<close>): |
|
851 |
@{verbatim [display] \<open>isabelle sessions -R -D AFP/thys\<close>}
|
|
852 |
\<close> |
|
853 |
||
| 48578 | 854 |
end |