20 identifiers may be specified as the first argument in order to have |
20 identifiers may be specified as the first argument in order to have |
21 the corresponding document displayed. |
21 the corresponding document displayed. |
22 |
22 |
23 \medskip The \texttt{ISABELLE_DOCS} setting specifies the list of |
23 \medskip The \texttt{ISABELLE_DOCS} setting specifies the list of |
24 directories (separated by colons) to be scanned for documentations. |
24 directories (separated by colons) to be scanned for documentations. |
25 The program for viewing \texttt{dvi} files is set in |
25 The program for viewing \texttt{dvi} files is determined by the |
26 \texttt{DVI_VIEWER}. |
26 \texttt{DVI_VIEWER} setting. |
27 |
27 |
28 |
28 |
29 \section{Tuning proof scripts --- \texttt{isatool expandshort}} |
29 \section{Tuning proof scripts --- \texttt{isatool expandshort}} |
30 |
30 |
31 The \tooldx{expandshort} utility tunes {\ML} proof scripts to enhance |
31 The \tooldx{expandshort} utility tunes {\ML} proof scripts to enhance |
32 readability a bit: |
32 readability: |
33 \begin{ttbox} |
33 \begin{ttbox} |
34 Usage: isatool expandshort [FILES ...] |
34 Usage: expandshort [FILES|DIRS...] |
35 |
35 |
36 Expand shorthand goal commands in FILES. Also contracts uses of |
36 Recursively find .ML files, expand shorthand goal commands. |
37 resolve_tac, dresolve_tac, eresolve_tac, rewrite_goals_tac on |
37 Also contracts uses of resolve_tac, dresolve_tac, eresolve_tac, |
38 1-element lists; furthermore expands tabs, since they are now |
38 rewrite_goals_tac on 1-element lists; furthermore expands tabs, |
39 forbidden in ML string constants. |
39 since they are now forbidden in ML string constants. |
40 |
40 |
41 Renames old versions of FILES by appending "~~". |
41 Renames old versions of files by appending "~~". |
42 \end{ttbox} |
42 \end{ttbox} |
43 In the files supplied as arguments, all occurrences of the shorthand |
43 In the files or directories supplied as arguments, all occurrences of |
44 commands \texttt{br}, \texttt{be} etc.\ are replaced with the |
44 the shorthand commands \texttt{br}, \texttt{be} etc.\ in proof scripts |
45 corresponding full commands. Shorthand commands should appear one per |
45 are replaced with the corresponding full commands. The old versions |
46 line. The old versions of the files are renamed to have the |
46 of the files are renamed to have the suffix~\verb'~~'. |
47 suffix~\verb'~~'. |
47 |
48 |
48 |
49 \section{Get logic images --- \texttt{isatool findlogics}} |
49 \section{Get logic images --- \texttt{isatool findlogics}} |
50 |
50 |
51 The \tooldx{findlogics} utility traverses all directories specified in |
51 The \tooldx{findlogics} utility traverses all directories specified in |
52 \texttt{ISABELLE_PATH}, looking for Isabelle logic images. Its usage |
52 \texttt{ISABELLE_PATH}, looking for Isabelle logic images. Its usage |
79 \end{ttbox} |
79 \end{ttbox} |
80 |
80 |
81 With the \texttt{-a} option, one may inspect the full process |
81 With the \texttt{-a} option, one may inspect the full process |
82 environment that Isabelle related programs are run in. This usually |
82 environment that Isabelle related programs are run in. This usually |
83 contains much more variables than are actually Isabelle settings. |
83 contains much more variables than are actually Isabelle settings. |
84 Normally output is a list of lines of the form |
84 Normally, output is a list of lines of the form |
85 \mbox{$varname$\texttt{=}$value$}. The \texttt{-b} option causes only |
85 \mbox{$varname$\texttt{=}$value$}. The \texttt{-b} option causes only |
86 the values to be printed. |
86 the values to be printed. |
87 |
87 |
88 |
88 |
89 \subsection*{Examples} |
89 \subsection*{Examples} |
90 |
90 |
91 Get the {\ML} system identifier and the location where the compiler |
91 Get the {\ML} system identifier and the location where the compiler |
92 binaries are supposed to reside as follows: |
92 binaries are supposed to reside as follows: |
93 \begin{ttbox} |
93 \begin{ttbox} |
94 isatool getenv ML_SYSTEM ML_HOME |
94 isatool getenv ML_SYSTEM ML_HOME |
95 {\out ML_SYSTEM=smlnj-1.09} |
95 {\out ML_SYSTEM=smlnj-110} |
96 {\out ML_HOME=/usr/local/sml109.27/bin} |
96 {\out ML_HOME=/usr/local/smlnj-110/bin} |
97 \end{ttbox} |
97 \end{ttbox} |
98 |
98 |
99 The next one peeks at the search path that \texttt{isabelle} uses to |
99 The next one peeks at the search path that \texttt{isabelle} uses to |
100 locate logic images: |
100 locate logic images: |
101 \begin{ttbox} |
101 \begin{ttbox} |
102 isatool getenv -b ISABELLE_PATH |
102 isatool getenv -b ISABELLE_PATH |
103 {\out /home/me/isabelle/heaps/smlnj-1.09:/proj/isabelle/heaps/smlnj-1.09} |
103 {\out /home/me/isabelle/heaps/smlnj-110:/usr/local/isabelle/heaps/smlnj-110} |
104 \end{ttbox} |
104 \end{ttbox} |
105 We used the \texttt{-b} option to suppress the \texttt{ISABELLE_PATH=} |
105 We used the \texttt{-b} option to suppress the \texttt{ISABELLE_PATH=} |
106 prefix. The value above is what became of the following assignment in |
106 prefix. The value above is what became of the following assignment in |
107 the default settings file: |
107 the default settings file: |
108 \begin{ttbox} |
108 \begin{ttbox} |
129 make file also inherit this environment. Typically, |
129 make file also inherit this environment. Typically, |
130 \texttt{IsaMakefile}s defer the real work to the \texttt{usedir} |
130 \texttt{IsaMakefile}s defer the real work to the \texttt{usedir} |
131 utility, see \S\ref{sec:tool-usedir}. |
131 utility, see \S\ref{sec:tool-usedir}. |
132 |
132 |
133 \medskip The basic \texttt{IsaMakefile} convention is that the default |
133 \medskip The basic \texttt{IsaMakefile} convention is that the default |
134 target builds the actual logic, including its parents if absent (but |
134 target builds the actual logic, including its parents if appropriate. |
135 not if just out of date). Furthermore, the \texttt{test} target shall |
135 The \texttt{images} target is intended to build all logic images, |
136 build the logic \emph{and} run it on all distributed examples. |
136 while the \texttt{test} target shall build all related examples. The |
|
137 \texttt{all} target shall build the images and run the examples. |
|
138 |
|
139 |
|
140 \subsection*{Examples} |
|
141 |
|
142 Refer to the \texttt{IsaMakefile}s of the Isabelle distribution's |
|
143 object-logics as a model for your own developements. |
|
144 |
|
145 |
|
146 \section{Make all logics -- \texttt{isatool makeall}} |
|
147 |
|
148 The \tooldx{makeall} utility applies Isabelle make to all logic |
|
149 directories of the Isabelle distribution: |
|
150 \begin{ttbox} |
|
151 Usage: makeall [ARGS ...] |
|
152 |
|
153 Apply isatool make to all logics (passing ARGS). |
|
154 \end{ttbox} |
|
155 The arguments \texttt{ARGS} are just passed verbatim to any |
|
156 \texttt{make} invocation. |
137 |
157 |
138 |
158 |
139 \section{Running complete logics --- \texttt{isatool usedir}} \label{sec:tool-usedir} |
159 \section{Running complete logics --- \texttt{isatool usedir}} \label{sec:tool-usedir} |
140 |
160 |
141 The \tooldx{usedir} utility builds object-logic images, or runs |
161 The \tooldx{usedir} utility builds object-logic images, or runs |
164 |
184 |
165 \subsection*{Options} |
185 \subsection*{Options} |
166 |
186 |
167 Basically, there are two different modes of operation: \emph{build |
187 Basically, there are two different modes of operation: \emph{build |
168 mode} (enabled through the \texttt{-b} option) and \emph{example |
188 mode} (enabled through the \texttt{-b} option) and \emph{example |
169 mode}. |
189 mode} (default). |
170 |
190 |
171 Calling \texttt{usedir} with \texttt{-b} runs \texttt{isabelle} with |
191 Calling \texttt{usedir} with \texttt{-b} runs \texttt{isabelle} with |
172 input image \texttt{LOGIC} and output to \texttt{NAME}, as provided on |
192 input image \texttt{LOGIC} and output to \texttt{NAME}, as provided on |
173 the command line. This will be a batch session, executing just |
193 the command line. This will be a batch session, running |
174 \texttt{use_dir".";}\index{*use_dir} and then quitting. It is assumed |
194 \texttt{ROOT.ML} from the current directory and then quitting. It is |
175 that there is a file \texttt{ROOT.ML} in the current directory |
195 assumed that \texttt{ROOT.ML} contains all {\ML} commands required to |
176 containing all {\ML} commands required to build the logic. |
196 build the logic. |
177 |
197 |
178 In example mode, on the other hand, \texttt{usedir} runs a read-only |
198 In example mode, on the other hand, \texttt{usedir} runs a read-only |
179 session of \texttt{LOGIC} (typically just built before) and does an |
199 session of \texttt{LOGIC} (typically just built before) and |
180 automatic \texttt{use_dir"NAME";} I.e.\ it assumes that some file |
200 automatically runs \texttt{ROOT.ML} from within directory |
181 \texttt{ROOT.ML} in directory \texttt{NAME} contains appropriate {\ML} |
201 \texttt{NAME}. I.e.\ it assumes that some file \texttt{ROOT.ML} in |
182 commands to run the desired examples. |
202 directory \texttt{NAME} contains appropriate {\ML} commands to run the |
|
203 desired examples. |
183 |
204 |
184 \medskip The \texttt{-i} option controls theory browsing data |
205 \medskip The \texttt{-i} option controls theory browsing data |
185 generation. It may be explicitely turned on or off --- the last |
206 generation. It may be explicitely turned on or off --- the last |
186 occurrence of some \texttt{-i} on the command line wins. |
207 occurrence of some \texttt{-i} on the command line wins. |
187 |
208 |