author | wenzelm |
Tue, 05 Oct 1999 15:33:35 +0200 | |
changeset 7726 | 2c7fc0ba1e12 |
parent 7258 | b228e54a02c5 |
child 7849 | 29a2a1d71128 |
permissions | -rw-r--r-- |
4540 | 1 |
|
3753 | 2 |
%% $Id$ |
3188 | 3 |
|
4 |
\chapter{Presenting theories} |
|
5 |
||
3753 | 6 |
\section{Generating theory browsing information} \label{sec:info} |
4540 | 7 |
\index{theory browsing information|bold} |
3188 | 8 |
|
7258 | 9 |
Isabelle is able to generate theory browsing information, including HTML |
10 |
documents that show a theory's definition, the theorems proved in its ML file |
|
11 |
and the relationship with its ancestors and descendants. Besides the HTML |
|
12 |
file that is generated for every theory, Isabelle stores links to all theories |
|
13 |
in an index file. These indexes are linked with other indexes to represent the |
|
14 |
hierarchic structure of Isabelle's logics. |
|
3188 | 15 |
|
7258 | 16 |
Isabelle also generates graph files that represent the theory hierarchy of a |
17 |
logic. There is a graph browser Java applet embedded in the generated HTML |
|
18 |
pages, and also a stand-alone application that allows browsing theory graphs |
|
19 |
without having to start a WWW browser first. The latter version also includes |
|
20 |
features such as generating {\sc PostScript} files, which are not available in |
|
21 |
the applet version. See \S\ref{sec:browse} for further information. |
|
3753 | 22 |
|
7258 | 23 |
\medskip |
24 |
||
25 |
To generate theory browsing information for logics that are part of the |
|
26 |
Isabelle distribution, simply append ``\texttt{-i true}'' to the |
|
27 |
\settdx{ISABELLE_USEDIR_OPTIONS} setting before making a logic. For example, |
|
28 |
in order to do this for {\FOL}, first add something like this to your Isabelle |
|
29 |
settings file |
|
3188 | 30 |
\begin{ttbox} |
3753 | 31 |
ISABELLE_USEDIR_OPTIONS="-i true" |
3188 | 32 |
\end{ttbox} |
7258 | 33 |
and then change into the \texttt{src/FOL} directory of the Isabelle |
34 |
distribution and run \texttt{isatool make}, or even \texttt{isatool make all}. |
|
35 |
||
36 |
\medskip |
|
3753 | 37 |
|
7258 | 38 |
The theory browsing information is stored within the directory determined by |
39 |
the \settdx{ISABELLE_BROWSER_INFO} setting. The \texttt{index.html} file |
|
40 |
located there provides an entry point to all standard Isabelle logics. A |
|
41 |
complete HTML version of all object-logics and examples of the Isabelle |
|
42 |
distribution is available at |
|
6623 | 43 |
\begin{center}\small |
44 |
\begin{tabular}{l} |
|
45 |
\url{http://www.cl.cam.ac.uk/Research/HVG/Isabelle/library/} \\ |
|
46 |
\url{http://isabelle.in.tum.de/library/} \\ |
|
47 |
\end{tabular} |
|
48 |
\end{center} |
|
49 |
||
7258 | 50 |
\medskip |
3188 | 51 |
|
7258 | 52 |
The generated HTML document of any theory includes all theorems proved in the |
53 |
corresponding {\ML} file, provided these have been stored properly via |
|
54 |
\ttindex{qed}, \ttindex{qed_goal}, \ttindex{qed_goalw}, \ttindex{bind_thm}, or |
|
55 |
\ttindex{store_thm}. Section headings may be included in the presentation via |
|
56 |
the {\ML} function |
|
57 |
\begin{ttbox}\index{*section} |
|
3188 | 58 |
section: string -> unit |
59 |
\end{ttbox} |
|
60 |
||
7258 | 61 |
\medskip |
3188 | 62 |
|
7258 | 63 |
In order to present your own theories on the web, simply copy the whole |
64 |
\texttt{ISABELLE_BROWSER_INFO} directory to your WWW server, after generating |
|
65 |
browser info like this: |
|
7251
35de2117b5dd
Modified section about generation of theory browsing information.
berghofe
parents:
6623
diff
changeset
|
66 |
\begin{ttbox} |
7258 | 67 |
isatool usedir -i true HOL Foobar |
7251
35de2117b5dd
Modified section about generation of theory browsing information.
berghofe
parents:
6623
diff
changeset
|
68 |
\end{ttbox} |
7258 | 69 |
This assumes that directory \texttt{Foobar} contains some \texttt{ROOT.ML} |
70 |
file to load all your theories, and {\HOL} is your parent logic image. |
|
71 |
Ideally, theory browser information would have been generated for {\HOL} |
|
72 |
already. |
|
73 |
||
74 |
Alternatively, one may specify an external link to an existing body of HTML |
|
75 |
data by giving \texttt{usedir} a \texttt{-P} option like this: |
|
76 |
\begin{ttbox} |
|
77 |
isatool usedir -i true -P http://isabelle.in.tum.de/library/ HOL Foobar |
|
78 |
\end{ttbox} |
|
79 |
||
3753 | 80 |
|
81 |
\section{Browsing theory graphs} \label{sec:browse} |
|
82 |
\index{theory graph browser|bold} |
|
83 |
||
4540 | 84 |
The graph browser is a tool for visualizing dependency graphs of |
85 |
Isabelle theories. Certain nodes of the graph (i.e.~theories) can be |
|
86 |
grouped together in ``directories'', whose contents may be hidden, |
|
87 |
thus enabling the user to filter out irrelevant information. The |
|
88 |
browser is written in Java, it can be used both as a stand-alone |
|
89 |
application and as an applet. |
|
90 |
||
3188 | 91 |
|
3753 | 92 |
\subsection{Invoking the graph browser} |
4540 | 93 |
|
94 |
The stand-alone version of the graph browser is wrapped up as an |
|
95 |
Isabelle tool called \tooldx{browser}: |
|
3753 | 96 |
\begin{ttbox} |
4540 | 97 |
Usage: browser [GRAPHFILE] |
3753 | 98 |
\end{ttbox} |
4540 | 99 |
When no filename is specified, the browser automatically changes to |
100 |
the directory \texttt{ISABELLE_BROWSER_INFO/graph/data}. |
|
3753 | 101 |
|
4540 | 102 |
\medskip The applet version of the browser can be invoked by opening |
103 |
the {\tt index.html} file in the directory |
|
104 |
\texttt{ISABELLE_BROWSER_INFO} from your Web browser and selecting |
|
105 |
``version for Java capable browsers''. There is also a link to the |
|
106 |
corresponding theory graph in every logic's {\tt index.html} file. |
|
107 |
||
3188 | 108 |
|
3753 | 109 |
\subsection{Using the graph browser} |
4540 | 110 |
|
111 |
The browser's main window, which is shown in figure |
|
112 |
\ref{browserwindow}, consists of two subwindows: In the left |
|
113 |
subwindow, the directory tree is displayed. The graph itself is |
|
114 |
displayed in the right subwindow. |
|
3753 | 115 |
\begin{figure}[h] |
6623 | 116 |
\includegraphics[width=\textwidth]{browser_screenshot} |
4540 | 117 |
\caption{\label{browserwindow} Browser main window} |
3753 | 118 |
\end{figure} |
119 |
||
4540 | 120 |
|
3753 | 121 |
\subsubsection*{The directory tree window} |
4540 | 122 |
|
3753 | 123 |
This section describes the usage of the directory browser and the |
124 |
meaning of the different items in the browser window. |
|
125 |
\begin{itemize} |
|
4540 | 126 |
|
127 |
\item A red arrow before a directory name indicates that the directory |
|
128 |
is currently ``folded'', i.e.~the nodes in this directory are |
|
129 |
collapsed to one single node. In the right subwindow, the names of |
|
130 |
nodes corresponding to folded directories are enclosed in square |
|
131 |
brackets and displayed in red colour. |
|
132 |
||
133 |
\item A green downward arrow before a directory name indicates that |
|
134 |
the directory is currently ``unfolded''. It can be folded by |
|
135 |
clicking on the directory name. Clicking on the name for a second |
|
136 |
time unfolds the directory again. Alternatively, a directory can |
|
137 |
also be unfolded by clicking on the corresponding node in the right |
|
138 |
subwindow. |
|
139 |
||
3753 | 140 |
\item Blue arrows stand before ordinary node (i.e.~theory) names. When |
4540 | 141 |
clicking on such a name, the graph display window focuses to the |
142 |
corresponding node. Double clicking invokes a text viewer window in |
|
143 |
which the contents of the theory file are displayed. |
|
144 |
||
3753 | 145 |
\end{itemize} |
3188 | 146 |
|
4540 | 147 |
|
3753 | 148 |
\subsubsection*{The graph display window} |
4540 | 149 |
|
150 |
When pointing on an ordinary node, an upward and a downward arrow is |
|
151 |
shown. Initially, both of these arrows are green. Clicking on the |
|
3753 | 152 |
upward or downward arrow collapses all predecessor or successor nodes, |
153 |
respectively. The arrow's colour then changes to red, indicating that |
|
154 |
the predecessor or successor nodes are currently collapsed. The node |
|
4540 | 155 |
corresponding to the collapsed nodes has the name ``{\tt [....]}''. To |
156 |
uncollapse the nodes again, simply click on the red arrow or on the |
|
157 |
node with the name ``{\tt [....]}''. Similar to the directory browser, |
|
158 |
the contents of theory files can be displayed by double clicking on |
|
159 |
the corresponding node. |
|
3188 | 160 |
|
4540 | 161 |
|
162 |
\subsubsection*{The ``File'' menu} |
|
163 |
||
4555 | 164 |
Please note that due to Java security restrictions this menu is not |
4540 | 165 |
available in the applet version. The meaning of the menu items is as |
166 |
follows: |
|
3753 | 167 |
\begin{description} |
4540 | 168 |
|
3753 | 169 |
\item[Open$\ldots$] Open a new graph file. |
4540 | 170 |
|
171 |
\item[Export to PostScript] Outputs the current graph in {\sc |
|
172 |
PostScript} format, appropriately scaled to fit on one single |
|
173 |
sheet of paper. The resulting file can printed directly. |
|
174 |
||
175 |
\item[Export to EPS] Outputs the current graph in Encapsulated {\sc |
|
176 |
PostScript} format. The resulting file can be included in other |
|
177 |
documents. |
|
178 |
||
3753 | 179 |
\item[Quit] Quit the graph browser. |
4540 | 180 |
|
3753 | 181 |
\end{description} |
182 |
||
4540 | 183 |
|
3753 | 184 |
\subsection*{*Syntax of graph definition files} |
4540 | 185 |
|
3753 | 186 |
A graph definition file has the following syntax: |
187 |
\begin{eqnarray*} |
|
4540 | 188 |
\mbox{\it graph} & = & \{ \: \mbox{\it vertex \tt ;} \: \} ^ + \\ |
189 |
vertex & = & \mbox{\it vertexname} \: \mbox{\it vertexID} \: \mbox{\it dirname} \: [ \mbox{\tt +} ] |
|
190 |
\: \mbox{\it path} \: [ \mbox{\tt <} | \mbox{\tt >} ] \: \{ \: \mbox{\it vertexID} \: \} ^ * |
|
3753 | 191 |
\end{eqnarray*} |
4540 | 192 |
|
3753 | 193 |
The meaning of the items in a vertex description is as follows: |
194 |
\begin{description} |
|
4540 | 195 |
|
3753 | 196 |
\item[vertexname] The name of the vertex. |
4540 | 197 |
|
198 |
\item[vertexID] The vertex identifier. Note that there may be two |
|
199 |
vertices with equal names, whereas identifiers must be unique. |
|
200 |
||
201 |
\item[dirname] The name of the ``directory'' the vertex should be |
|
202 |
placed in. A ``{\tt +}'' sign after {\it dirname} indicates that |
|
203 |
the nodes in the directory are initially visible. Directories are |
|
204 |
initially invisible by default. |
|
205 |
||
206 |
\item[path] The path of the corresponding theory file. This is |
|
207 |
specified relatively to the path of the graph definition file. |
|
208 |
||
209 |
\item[List of successor/predecessor nodes] A ``{\tt <}'' sign before |
|
210 |
the list means that successor nodes are listed, a ``{\tt >}'' sign |
|
211 |
means that predecessor nodes are listed. If neither ``{\tt <}'' nor |
|
212 |
``{\tt >}'' is found, the browser assumes that successor nodes are |
|
213 |
listed. |
|
214 |
||
3753 | 215 |
\end{description} |
5364 | 216 |
|
217 |
||
218 |
%%% Local Variables: |
|
219 |
%%% mode: latex |
|
220 |
%%% TeX-master: "system" |
|
221 |
%%% End: |