author | blanchet |
Tue, 10 Sep 2013 15:56:51 +0200 | |
changeset 53500 | 53b9326196fe |
parent 52735 | 842b5e7dcac8 |
child 53519 | 3c977c570e20 |
permissions | -rw-r--r-- |
48578 | 1 |
theory Sessions |
2 |
imports Base |
|
3 |
begin |
|
4 |
||
48584 | 5 |
chapter {* Isabelle sessions and build management \label{ch:session} *} |
6 |
||
7 |
text {* An Isabelle \emph{session} consists of a collection of related |
|
51055 | 8 |
theories that may be associated with formal documents |
9 |
(\chref{ch:present}). There is also a notion of \emph{persistent |
|
48604 | 10 |
heap} image to capture the state of a session, similar to |
11 |
object-code in compiled programming languages. Thus the concept of |
|
12 |
session resembles that of a ``project'' in common IDE environments, |
|
13 |
but the specific name emphasizes the connection to interactive |
|
14 |
theorem proving: the session wraps-up the results of |
|
15 |
user-interaction with the prover in a persistent form. |
|
48584 | 16 |
|
48604 | 17 |
Application sessions are built on a given parent session, which may |
18 |
be built recursively on other parents. Following this path in the |
|
19 |
hierarchy eventually leads to some major object-logic session like |
|
20 |
@{text "HOL"}, which itself is based on @{text "Pure"} as the common |
|
21 |
root of all sessions. |
|
48584 | 22 |
|
48604 | 23 |
Processing sessions may take considerable time. Isabelle build |
24 |
management helps to organize this efficiently. This includes |
|
25 |
support for parallel build jobs, in addition to the multithreaded |
|
26 |
theory and proof checking that is already provided by the prover |
|
27 |
process itself. *} |
|
28 |
||
48578 | 29 |
|
30 |
section {* Session ROOT specifications \label{sec:session-root} *} |
|
31 |
||
48579 | 32 |
text {* Session specifications reside in files called @{verbatim ROOT} |
33 |
within certain directories, such as the home locations of registered |
|
34 |
Isabelle components or additional project directories given by the |
|
35 |
user. |
|
36 |
||
37 |
The ROOT file format follows the lexical conventions of the |
|
38 |
\emph{outer syntax} of Isabelle/Isar, see also |
|
39 |
\cite{isabelle-isar-ref}. This defines common forms like |
|
40 |
identifiers, names, quoted strings, verbatim text, nested comments |
|
51417 | 41 |
etc. The grammar for @{syntax session_chapter} and @{syntax |
42 |
session_entry} is given as syntax diagram below; each ROOT file may |
|
43 |
contain multiple specifications like this. Chapters help to |
|
44 |
organize browser info (\secref{sec:info}), but have no formal |
|
45 |
meaning. The default chapter is ``@{text "Unsorted"}''. |
|
48579 | 46 |
|
48582 | 47 |
Isabelle/jEdit (\secref{sec:tool-jedit}) includes a simple editing |
51055 | 48 |
mode @{verbatim "isabelle-root"} for session ROOT files, which is |
49 |
enabled by default for any file of that name. |
|
48579 | 50 |
|
51 |
@{rail " |
|
51417 | 52 |
@{syntax_def session_chapter}: @'chapter' @{syntax name} |
53 |
; |
|
54 |
||
48579 | 55 |
@{syntax_def session_entry}: @'session' spec '=' (@{syntax name} '+')? body |
56 |
; |
|
48916 | 57 |
body: description? options? ( theories + ) files? |
48579 | 58 |
; |
48738
f8c1a5b9488f
simplified session specifications: names are taken verbatim and current directory is default;
wenzelm
parents:
48737
diff
changeset
|
59 |
spec: @{syntax name} groups? dir? |
48579 | 60 |
; |
61 |
groups: '(' (@{syntax name} +) ')' |
|
62 |
; |
|
63 |
dir: @'in' @{syntax name} |
|
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 |
; |
48739 | 73 |
theories: @'theories' opts? ( @{syntax name} * ) |
48579 | 74 |
; |
75 |
files: @'files' ( @{syntax name} + ) |
|
76 |
"} |
|
77 |
||
78 |
\begin{description} |
|
79 |
||
80 |
\item \isakeyword{session}~@{text "A = B + body"} defines a new |
|
81 |
session @{text "A"} based on parent session @{text "B"}, with its |
|
82 |
content given in @{text body} (theories and auxiliary source files). |
|
83 |
Note that a parent (like @{text "HOL"}) is mandatory in practical |
|
84 |
applications: only Isabelle/Pure can bootstrap itself from nothing. |
|
85 |
||
86 |
All such session specifications together describe a hierarchy (tree) |
|
48738
f8c1a5b9488f
simplified session specifications: names are taken verbatim and current directory is default;
wenzelm
parents:
48737
diff
changeset
|
87 |
of sessions, with globally unique names. The new session name |
51055 | 88 |
@{text "A"} should be sufficiently long and descriptive to stand on |
89 |
its own in a potentially large library. |
|
48579 | 90 |
|
91 |
\item \isakeyword{session}~@{text "A (groups)"} indicates a |
|
92 |
collection of groups where the new session is a member. Group names |
|
93 |
are uninterpreted and merely follow certain conventions. For |
|
94 |
example, the Isabelle distribution tags some important sessions by |
|
48604 | 95 |
the group name called ``@{text "main"}''. Other projects may invent |
96 |
their own conventions, but this requires some care to avoid clashes |
|
97 |
within this unchecked name space. |
|
48579 | 98 |
|
99 |
\item \isakeyword{session}~@{text "A"}~\isakeyword{in}~@{text "dir"} |
|
48738
f8c1a5b9488f
simplified session specifications: names are taken verbatim and current directory is default;
wenzelm
parents:
48737
diff
changeset
|
100 |
specifies an explicit directory for this session; by default this is |
f8c1a5b9488f
simplified session specifications: names are taken verbatim and current directory is default;
wenzelm
parents:
48737
diff
changeset
|
101 |
the current directory of the @{verbatim ROOT} file. |
48579 | 102 |
|
103 |
All theories and auxiliary source files are located relatively to |
|
104 |
the session directory. The prover process is run within the same as |
|
105 |
its current working directory. |
|
106 |
||
107 |
\item \isakeyword{description}~@{text "text"} is a free-form |
|
108 |
annotation for this session. |
|
109 |
||
110 |
\item \isakeyword{options}~@{text "[x = a, y = b, z]"} defines |
|
48604 | 111 |
separate options (\secref{sec:system-options}) that are used when |
112 |
processing this session, but \emph{without} propagation to child |
|
113 |
sessions. Note that @{text "z"} abbreviates @{text "z = true"} for |
|
114 |
Boolean options. |
|
48579 | 115 |
|
116 |
\item \isakeyword{theories}~@{text "options names"} specifies a |
|
117 |
block of theories that are processed within an environment that is |
|
48604 | 118 |
augmented by the given options, in addition to the global session |
119 |
options given before. Any number of blocks of \isakeyword{theories} |
|
120 |
may be given. Options are only active for each |
|
121 |
\isakeyword{theories} block separately. |
|
48579 | 122 |
|
123 |
\item \isakeyword{files}~@{text "files"} lists additional source |
|
48604 | 124 |
files that are involved in the processing of this session. This |
125 |
should cover anything outside the formal content of the theory |
|
48579 | 126 |
sources, say some auxiliary {\TeX} files that are required for |
51055 | 127 |
document processing. In contrast, files that are loaded formally |
128 |
within a theory, e.g.\ via @{keyword "ML_file"}, need not be |
|
129 |
declared again. |
|
48579 | 130 |
|
131 |
\end{description} |
|
48580 | 132 |
*} |
48579 | 133 |
|
51055 | 134 |
|
48580 | 135 |
subsubsection {* Examples *} |
136 |
||
137 |
text {* See @{file "~~/src/HOL/ROOT"} for a diversity of practically |
|
51055 | 138 |
relevant situations, although it uses relatively complex |
139 |
quasi-hierarchic naming conventions like @{text "HOL\<dash>SPARK"}, |
|
140 |
@{text "HOL\<dash>SPARK\<dash>Examples"}. An alternative is to use |
|
48738
f8c1a5b9488f
simplified session specifications: names are taken verbatim and current directory is default;
wenzelm
parents:
48737
diff
changeset
|
141 |
unqualified names that are relatively long and descriptive, as in |
f8c1a5b9488f
simplified session specifications: names are taken verbatim and current directory is default;
wenzelm
parents:
48737
diff
changeset
|
142 |
the Archive of Formal Proofs (\url{http://afp.sf.net}), for |
f8c1a5b9488f
simplified session specifications: names are taken verbatim and current directory is default;
wenzelm
parents:
48737
diff
changeset
|
143 |
example. *} |
48578 | 144 |
|
145 |
||
146 |
section {* System build options \label{sec:system-options} *} |
|
147 |
||
48580 | 148 |
text {* See @{file "~~/etc/options"} for the main defaults provided by |
48582 | 149 |
the Isabelle distribution. Isabelle/jEdit (\secref{sec:tool-jedit}) |
150 |
includes a simple editing mode @{verbatim "isabelle-options"} for |
|
151 |
this file-format. |
|
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
152 |
|
51055 | 153 |
The following options are particulary relevant to build Isabelle |
154 |
sessions, in particular with document preparation |
|
155 |
(\chref{ch:present}). |
|
156 |
||
157 |
\begin{itemize} |
|
158 |
||
159 |
\item @{system_option_def "browser_info"} controls output of HTML |
|
160 |
browser info, see also \secref{sec:info}. |
|
161 |
||
162 |
\item @{system_option_def "document"} specifies the document output |
|
163 |
format, see @{tool document} option @{verbatim "-o"} in |
|
164 |
\secref{sec:tool-document}. In practice, the most relevant values |
|
165 |
are @{verbatim "document=false"} or @{verbatim "document=pdf"}. |
|
166 |
||
167 |
\item @{system_option_def "document_output"} specifies an |
|
168 |
alternative directory for generated output of the document |
|
169 |
preparation system; the default is within the @{setting |
|
170 |
"ISABELLE_BROWSER_INFO"} hierarchy as explained in |
|
171 |
\secref{sec:info}. See also @{tool mkroot}, which generates a |
|
172 |
default configuration with output readily available to the author of |
|
173 |
the document. |
|
174 |
||
175 |
\item @{system_option_def "document_variants"} specifies document |
|
176 |
variants as a colon-separated list of @{text "name=tags"} entries, |
|
177 |
corresponding to @{tool document} options @{verbatim "-n"} and |
|
178 |
@{verbatim "-t"}. |
|
179 |
||
180 |
For example, @{verbatim |
|
181 |
"document_variants=document:outline=/proof,/ML"} indicates two |
|
182 |
documents: the one called @{verbatim document} with default tags, |
|
183 |
and the other called @{verbatim outline} where proofs and ML |
|
184 |
sections are folded. |
|
185 |
||
186 |
Document variant names are just a matter of conventions. It is also |
|
187 |
possible to use different document variant names (without tags) for |
|
188 |
different document root entries, see also |
|
189 |
\secref{sec:tool-document}. |
|
190 |
||
191 |
\item @{system_option_def "document_graph"} tells whether the |
|
192 |
generated document files should include a theory graph (cf.\ |
|
193 |
\secref{sec:browse} and \secref{sec:info}). The resulting EPS or |
|
194 |
PDF file can be included as graphics in {\LaTeX}. |
|
195 |
||
196 |
Note that this option is usually determined as static parameter of |
|
197 |
some session (e.g.\ within its @{verbatim ROOT} file) and \emph{not} |
|
198 |
given globally or on the command line of @{tool build}. |
|
199 |
||
200 |
\item @{system_option_def "threads"} determines the number of worker |
|
201 |
threads for parallel checking of theories and proofs. The default |
|
202 |
@{text "0"} means that a sensible maximum value is determined by the |
|
203 |
underlying hardware. For machines with many cores or with |
|
204 |
hyperthreading, this is often requires manual adjustment (on the |
|
205 |
command-line or within personal settings or preferences, not within |
|
206 |
a session @{verbatim ROOT}). |
|
207 |
||
208 |
\item @{system_option_def "condition"} specifies a comma-separated |
|
209 |
list of process environment variables (or Isabelle settings) that |
|
210 |
are required for the subsequent theories to be processed. |
|
211 |
Conditions are considered ``true'' if the corresponding environment |
|
212 |
value is defined and non-empty. |
|
213 |
||
214 |
For example, the @{verbatim "condition=ISABELLE_FULL_TEST"} may be |
|
215 |
used to guard extraordinary theories, which are meant to be enabled |
|
216 |
explicitly via some shell prefix @{verbatim "env ISABELLE_FULL_TEST=true"} |
|
217 |
before invoking @{tool build}. |
|
218 |
||
219 |
\item @{system_option_def "timeout"} specifies a real wall-clock |
|
220 |
timeout (in seconds) for the session as a whole. The timer is |
|
221 |
controlled outside the ML process by the JVM that runs |
|
222 |
Isabelle/Scala. Thus it is relatively reliable in canceling |
|
223 |
processes that get out of control, even if there is a deadlock |
|
224 |
without CPU time usage. |
|
225 |
||
226 |
\end{itemize} |
|
227 |
||
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
228 |
The @{tool_def options} tool prints Isabelle system options. Its |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
229 |
command-line usage is: |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
230 |
\begin{ttbox} |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
231 |
Usage: isabelle options [OPTIONS] [MORE_OPTIONS ...] |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
232 |
|
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
233 |
Options are: |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
234 |
-b include $ISABELLE_BUILD_OPTIONS |
52735 | 235 |
-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
|
236 |
-l list options |
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
237 |
-x FILE export to FILE in YXML format |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
238 |
|
50531
f841ac0cb757
clarified "isabelle options" command line, to make it more close to "isabelle components";
wenzelm
parents:
50406
diff
changeset
|
239 |
Report Isabelle system options, augmented by MORE_OPTIONS given as |
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
240 |
arguments NAME=VAL or NAME. |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
241 |
\end{ttbox} |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
242 |
|
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
243 |
The command line arguments provide additional system options of the |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
244 |
form @{text "name"}@{verbatim "="}@{text "value"} or @{text name} |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
245 |
for Boolean options. |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
246 |
|
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
247 |
Option @{verbatim "-b"} augments the implicit environment of system |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
248 |
options by the ones of @{setting ISABELLE_BUILD_OPTIONS}, cf.\ |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
249 |
\secref{sec:tool-build}. |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
250 |
|
52735 | 251 |
Option @{verbatim "-g"} prints the value of the given option. |
252 |
||
48693
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
253 |
Option @{verbatim "-x"} specifies a file to export the result in |
ceeea46bdeba
"isabelle options" prints Isabelle system options;
wenzelm
parents:
48684
diff
changeset
|
254 |
YXML format, instead of printing it in human-readable form. |
48580 | 255 |
*} |
48578 | 256 |
|
257 |
||
258 |
section {* Invoking the build process \label{sec:tool-build} *} |
|
259 |
||
48602 | 260 |
text {* The @{tool_def build} tool invokes the build process for |
48578 | 261 |
Isabelle sessions. It manages dependencies between sessions, |
262 |
related sources of theories and auxiliary files, and target heap |
|
263 |
images. Accordingly, it runs instances of the prover process with |
|
264 |
optional document preparation. Its command-line usage |
|
265 |
is:\footnote{Isabelle/Scala provides the same functionality via |
|
266 |
\texttt{isabelle.Build.build}.} |
|
48602 | 267 |
\begin{ttbox} |
268 |
Usage: isabelle build [OPTIONS] [SESSIONS ...] |
|
48578 | 269 |
|
270 |
Options are: |
|
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
271 |
-D DIR include session directory and select its sessions |
49131 | 272 |
-R operate on requirements of selected sessions |
48578 | 273 |
-a select all sessions |
274 |
-b build heap images |
|
48595 | 275 |
-c clean build |
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
276 |
-d DIR include session directory |
48578 | 277 |
-g NAME select session group NAME |
278 |
-j INT maximum number of parallel jobs (default 1) |
|
48903 | 279 |
-l list session source files |
48578 | 280 |
-n no build -- test dependencies only |
52056 | 281 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
48578 | 282 |
-s system build mode: produce output in ISABELLE_HOME |
283 |
-v verbose |
|
284 |
||
285 |
Build and manage Isabelle sessions, depending on implicit |
|
286 |
ISABELLE_BUILD_OPTIONS="..." |
|
287 |
||
288 |
ML_PLATFORM="..." |
|
289 |
ML_HOME="..." |
|
290 |
ML_SYSTEM="..." |
|
291 |
ML_OPTIONS="..." |
|
292 |
\end{ttbox} |
|
293 |
||
294 |
\medskip Isabelle sessions are defined via session ROOT files as |
|
295 |
described in (\secref{sec:session-root}). The totality of sessions |
|
296 |
is determined by collecting such specifications from all Isabelle |
|
297 |
component directories (\secref{sec:components}), augmented by more |
|
298 |
directories given via options @{verbatim "-d"}~@{text "DIR"} on the |
|
299 |
command line. Each such directory may contain a session |
|
48650 | 300 |
\texttt{ROOT} file with several session specifications. |
48578 | 301 |
|
48684
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
302 |
Any session root directory may refer recursively to further |
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
303 |
directories of the same kind, by listing them in a catalog file |
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
304 |
@{verbatim "ROOTS"} line-by-line. This helps to organize large |
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
305 |
collections of session specifications, or to make @{verbatim "-d"} |
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
306 |
command line options persistent (say within @{verbatim |
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
307 |
"$ISABELLE_HOME_USER/ROOTS"}). |
9170e10c651e
re-introduced ROOTS catalog files (cf. 47330b712f8f) which help to organize AFP or make -d options persistent;
wenzelm
parents:
48683
diff
changeset
|
308 |
|
48604 | 309 |
\medskip The subset of sessions to be managed is determined via |
48578 | 310 |
individual @{text "SESSIONS"} given as command-line arguments, or |
48604 | 311 |
session groups that are given via one or more options @{verbatim |
48578 | 312 |
"-g"}~@{text "NAME"}. Option @{verbatim "-a"} selects all sessions. |
48604 | 313 |
The build tool takes session dependencies into account: the set of |
314 |
selected sessions is completed by including all ancestors. |
|
48578 | 315 |
|
49131 | 316 |
\medskip Option @{verbatim "-R"} reverses the selection in the sense |
317 |
that it refers to its requirements: all ancestor sessions excluding |
|
318 |
the original selection. This allows to prepare the stage for some |
|
319 |
build process with different options, before running the main build |
|
320 |
itself (without option @{verbatim "-R"}). |
|
321 |
||
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
322 |
\medskip Option @{verbatim "-D"} is similar to @{verbatim "-d"}, but |
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
323 |
selects all sessions that are defined in the given directories. |
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
324 |
|
48604 | 325 |
\medskip The build process depends on additional options |
326 |
(\secref{sec:system-options}) that are passed to the prover |
|
327 |
eventually. The settings variable @{setting_ref |
|
328 |
ISABELLE_BUILD_OPTIONS} allows to provide additional defaults, e.g.\ |
|
329 |
\texttt{ISABELLE_BUILD_OPTIONS="document=pdf threads=4"}. Moreover, |
|
330 |
the environment of system build options may be augmented on the |
|
331 |
command line via @{verbatim "-o"}~@{text "name"}@{verbatim |
|
332 |
"="}@{text "value"} or @{verbatim "-o"}~@{text "name"}, which |
|
333 |
abbreviates @{verbatim "-o"}~@{text "name"}@{verbatim"=true"} for |
|
334 |
Boolean options. Multiple occurrences of @{verbatim "-o"} on the |
|
335 |
command-line are applied in the given order. |
|
48578 | 336 |
|
337 |
\medskip Option @{verbatim "-b"} ensures that heap images are |
|
338 |
produced for all selected sessions. By default, images are only |
|
339 |
saved for inner nodes of the hierarchy of sessions, as required for |
|
340 |
other sessions to continue later on. |
|
341 |
||
48595 | 342 |
\medskip Option @{verbatim "-c"} cleans all descendants of the |
343 |
selected sessions before performing the specified build operation. |
|
344 |
||
345 |
\medskip Option @{verbatim "-n"} omits the actual build process |
|
346 |
after the preparatory stage (including optional cleanup). Note that |
|
347 |
the return code always indicates the status of the set of selected |
|
348 |
sessions. |
|
349 |
||
48578 | 350 |
\medskip Option @{verbatim "-j"} specifies the maximum number of |
48604 | 351 |
parallel build jobs (prover processes). Each prover process is |
352 |
subject to a separate limit of parallel worker threads, cf.\ system |
|
353 |
option @{system_option_ref threads}. |
|
48578 | 354 |
|
355 |
\medskip Option @{verbatim "-s"} enables \emph{system mode}, which |
|
356 |
means that resulting heap images and log files are stored in |
|
357 |
@{verbatim "$ISABELLE_HOME/heaps"} instead of the default location |
|
358 |
@{setting ISABELLE_OUTPUT} (which is normally in @{setting |
|
359 |
ISABELLE_HOME_USER}, i.e.\ the user's home directory). |
|
360 |
||
48903 | 361 |
\medskip Option @{verbatim "-v"} increases the general level of |
362 |
verbosity. Option @{verbatim "-l"} lists the source files that |
|
363 |
contribute to a session. |
|
48578 | 364 |
*} |
365 |
||
366 |
subsubsection {* Examples *} |
|
367 |
||
368 |
text {* |
|
369 |
Build a specific logic image: |
|
370 |
\begin{ttbox} |
|
371 |
isabelle build -b HOLCF |
|
372 |
\end{ttbox} |
|
373 |
||
48604 | 374 |
\smallskip Build the main group of logic images: |
48578 | 375 |
\begin{ttbox} |
376 |
isabelle build -b -g main |
|
377 |
\end{ttbox} |
|
378 |
||
48595 | 379 |
\smallskip Provide a general overview of the status of all Isabelle |
380 |
sessions, without building anything: |
|
48578 | 381 |
\begin{ttbox} |
382 |
isabelle build -a -n -v |
|
383 |
\end{ttbox} |
|
384 |
||
48595 | 385 |
\smallskip Build all sessions with HTML browser info and PDF |
386 |
document preparation: |
|
48578 | 387 |
\begin{ttbox} |
388 |
isabelle build -a -o browser_info -o document=pdf |
|
389 |
\end{ttbox} |
|
390 |
||
48604 | 391 |
\smallskip Build all sessions with a maximum of 8 parallel prover |
392 |
processes and 4 worker threads each (on a machine with many cores): |
|
48578 | 393 |
\begin{ttbox} |
394 |
isabelle build -a -j8 -o threads=4 |
|
395 |
\end{ttbox} |
|
48595 | 396 |
|
397 |
\smallskip Build some session images with cleanup of their |
|
398 |
descendants, while retaining their ancestry: |
|
399 |
\begin{ttbox} |
|
400 |
isabelle build -b -c HOL-Boogie HOL-SPARK |
|
401 |
\end{ttbox} |
|
402 |
||
403 |
\smallskip Clean all sessions without building anything: |
|
404 |
\begin{ttbox} |
|
405 |
isabelle build -a -n -c |
|
406 |
\end{ttbox} |
|
48737
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
407 |
|
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
408 |
\smallskip Build all sessions from some other directory hierarchy, |
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
409 |
according to the settings variable @{verbatim "AFP"} that happens to |
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
410 |
be defined inside the Isabelle environment: |
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
411 |
\begin{ttbox} |
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
412 |
isabelle build -D '$AFP' |
f3bbb9ca57d6
added build option -D: include session directory and select its sessions;
wenzelm
parents:
48693
diff
changeset
|
413 |
\end{ttbox} |
49131 | 414 |
|
415 |
\smallskip Inform about the status of all sessions required for AFP, |
|
416 |
without building anything yet: |
|
417 |
\begin{ttbox} |
|
418 |
isabelle build -D '$AFP' -R -v -n |
|
419 |
\end{ttbox} |
|
48578 | 420 |
*} |
421 |
||
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
422 |
|
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
423 |
section {* Build dialog *} |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
424 |
|
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
425 |
text {* The @{tool_def build_dialog} provides a simple GUI wrapper to |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
426 |
the tool Isabelle @{tool build} tool. This enables user interfaces |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
427 |
like Isabelle/jEdit \secref{sec:tool-jedit} to provide read-made |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
428 |
logic image on startup. Its command-line usage is: |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
429 |
\begin{ttbox} |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
430 |
Usage: isabelle build_dialog [OPTIONS] LOGIC |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
431 |
|
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
432 |
Options are: |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
433 |
-L OPTION default logic via system option |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
434 |
-d DIR include session directory |
50546 | 435 |
-l NAME logic session name |
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
436 |
-s system build mode: produce output in ISABELLE_HOME |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
437 |
|
50546 | 438 |
Build Isabelle logic session image via GUI dialog (default: \$ISABELLE_LOGIC). |
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
439 |
\end{ttbox} |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
440 |
|
50546 | 441 |
\medskip Option @{verbatim "-l"} specifies an explicit logic session |
442 |
name. Option @{verbatim "-L"} specifies a system option name as |
|
443 |
fall-back to determine the logic session name. If both are omitted |
|
444 |
or have empty value, @{setting ISABELLE_LOGIC} is used as default. |
|
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
445 |
|
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
446 |
\medskip Options @{verbatim "-d"} and @{verbatim "-s"} have the same |
50546 | 447 |
meaning as for the command-line @{tool build} tool itself. *} |
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
49131
diff
changeset
|
448 |
|
48578 | 449 |
end |