1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573
|
\chapter{Getting and Installing HOL}
\label{install}
This chapter describes how to get the \HOL\ system and how to install it.
There is also a discussion of the optional Licence Agreement. It is assumed
that a Sun workstation running Unix is being used, but the instructions that
follow should apply {\it mutatis mutandis\/} to other platforms. Unix is not,
however, a pre-requisite for using the system. \HOL\ may be run an Apple
Macintosh, where the system
exhibits acceptable performance, and we are always interested in ports
to other platforms. See Section~\ref{performance} for details
of \HOL's performance on various systems.
\section{Getting HOL}
The \HOL\ system can either be obtained on tape from:
\vspace*{6pt plus1pt minus1pt}
\begin{tabular}{@{\qquad}l@{\qquad}l}
Mike Gordon & \verb|hol-support%cam.sri.com|\\
University of Cambridge & \verb|hol-support@cl.cam.ac.uk|\\
Computer Laboratory & \mbox{} \\
New Museums Site & \mbox{} \\
Pembroke Street & \mbox {} \\
Cambridge CB2 3QG, UK. & \mbox {}\\
\end{tabular}
\vspace*{6pt plus1pt minus1pt}
\noindent or on tape or by anonymous FTP from:
\vspace*{6pt plus1pt minus1pt}
\begin{tabular}{@{\qquad}l@{\qquad}l}
Phil Windley & \verb|windley@cs.uidaho.edu|\\
Department of Computer Science & \mbox{}\\
University of Idaho & \mbox{} \\
Moscow, ID 83843, USA. & \mbox{} \\
\end{tabular}
\vspace*{6pt plus1pt minus1pt}
\noindent To obtain \HOL\ sources on tape, send a 450 foot Sun cassette or a
600 foot standard magnetic tape to one of the above contacts, {\it together
with sufficient funds to pay the cost of return postage\/}.
\HOL\ is available via anonymous FTP at \verb|ted.cs.uidaho.edu| (129.101.100.20)
in the directory \verb|~ftp/pub/hol|.
\section{The {\tt info-hol} mailing list}
Phil Windley has started a mailing list:
{\small\verb%info-hol@iris.eecs.ucdavis.edu%} which he set up to serve as a
forum
for discussing \HOL\ and disseminating news about it. If you wish to be on
this list (which is recommended for all users of \HOL), or know of other
people who should be included, email to:
{\small\verb%info-hol-request@iris.eecs.ucdavis.edu%}.
\section{Installing HOL}
It is assumed that the \HOL\ sources have been obtained and placed on a
directory \ml{hol}. The contents of this directory are likely to change
over time, but it should contain the following:
\begin{center}
\begin{tabular}{|l|l|l|} \hline
\multicolumn{3}{|c|}{ } \\
\multicolumn{3}{|c|}{\bf Principal Files on the HOL Distribution Directory} \\
\multicolumn{3}{|c|}{ } \\
{\it File name} & {\it Description} & {\it File type} \\ \hline
{\tt READ-ME} & Description of directory {\tt hol} & Text\\
{\tt Licence}& \LaTeX\ source for optional \HOL\ licence & Directory\\
{\tt Versions.2.01} & Changes file since {\tt HOL88.2.0} & Text\\
{\tt Versions} & Previous changes files since {\tt HOL88.1.0} & Directory\\
{\tt Makefile} & Unix makefile for {\tt hol} & Text\\
{\tt lisp} & Lisp sources of \HOL & Directory\\
{\tt ml} & \ML\ sources of \HOL & Directory\\
{\tt theories} & Built-in theories and files to construct them& Directory\\
{\tt Library} & \HOL\ system library & Directory\\
{\tt Manual} & Files for \HOL\ system documentation & Directory\\
{\tt Training} & Course material and exercises & Directory\\
{\tt help} & Help files for \HOL\ system & Directory\\
{\tt contrib} & Misc. contributed \HOL\ software & Directory\\
{\tt hol} & Executable {\tt hol} system (may be absent) & Executable\\
{\tt LOG} & Log of a successful make (may be absent)& Text\\ \hline
\end{tabular}
\end{center}
The session in the box below shows a typical distribution directory. The \HOL\
distribution has been mounted on a Sun running Unix on the directory {\small\tt
/usr/groups/hol/sun3\_sos}.
All sessions in this documentation will be displayed in boxes with a number in
the top right hand corner. This number indicates whether the session is a new
one (when the number will be {\small\sl 1}) or the continuation of a session
started in an earlier box. Consecutively numbered boxes are assumed to be part
of a single continuous session. The Unix prompt for the sessions is
{\small\verb+%+}, so lines beginning with this prompt were typed by the user.
After entering the \HOL\ system (see below), the user is prompted with
{\small\verb%#%} for an expression or command of the \HOL\ meta-language \ML;
lines beginning with this are thus \ML\ expressions or declarations. Lines not
beginning with {\small\verb+%+} or {\small\verb%#%} are system output. The
meta-language \ML\ is introduced in Chapter~\ref{ML}.
\setcounter{sessioncount}{1}
\begin{session}\begin{verbatim}
% pwd
/usr/groups/hol/sun3_sos
% ls -F
LOG Manual/ Versions/ hol* theories/
Library/ READ-ME basic-hol* hol-lcf*
Licence/ Training/ contrib/ lisp/
Makefile Version.2.01 help/ ml/
% ls -lF hol
-rwxrwxr-x 1 tfm 3555997 May 18 20:18 hol*
\end{verbatim}\end{session}
If there is a suitable executable file {\small\tt hol} in your
distribution directory (as there is in the directory shown above),
then it should be tried to see if it works. This is illustrated by
continuing the session started above. The executable files
{\small\verb%hol-lcf%} and {\small\verb%basic-hol%} are intermediate
states in the construction of {\small\verb%hol%} and can be deleted
(see {\small\verb%Makefile%} for more information).
\begin{session}\begin{verbatim}
% hol
__ _ _ __ __ _ __ _ _ __ _
|___ | | /_\ |__ |__ | | |__| | | |
| |__ |__ / \ __| __| | |__ | | |__| |__
HOL88 Version 2.01 (Sun3/Franz), built on May 18 1992
#
\end{verbatim}\end{session}
\noindent Note the \ML\ prompt symbol {\small\verb%#%}. Simple experiments with
\HOL\ can now be done directly, but for various theorem proving activities the
system needs to be configured so that it knows where to find theory files and
libraries. If the location of {\small\tt hol} on your machine is, say:
\begin{hol}\begin{verbatim}
/usr/users/fred/dir1/dir2/hol
\end{verbatim}\end{hol}
\noindent then \HOL\ can be configured to know about this directory by
typing:
\begin{hol}\begin{verbatim}
install `/usr/users/fred/dir1/dir2/hol`;;
\end{verbatim}\end{hol}
\noindent to the running system. This is illustrated by continuing
the session started above:
\begin{session}\begin{verbatim}
#install `/usr/users/fred/dir1/dir2/hol`;;
HOL installed (`/usr/users/fred/dir1/dir2/hol`)
() : void
#
\end{verbatim}\end{session}
\noindent An alternative to using the \ml{install} command is
to set the environment variable {\small\verb%HOLPATH% in the shell.
This variable contains the name of the directory in which the system
is installed in much the same form as that expected by {\small\tt install}.
So, if this alternative method was being used to tell our existing system
where its new installation area was, the following command would be
required before invoking the system (C-shell is assumed):
\begin{hol}\begin{verbatim}
% setenv HOLPATH /usr/users/fred/dir1/dir2/hol
\end{verbatim}\end{hol}
\noindent To eliminate the need to install the {\small\tt hol}
directory every time the system is used, an executable image can be
saved with the installation already done. This is done by executing:
{\small\begin{alltt}
save `\(name\)`;;
\end{alltt}}
\noindent which will create a (large) executable file called
{\small $name$} containing
a saved state of the \HOL\ system.
\begin{session}\begin{verbatim}
#save `my-hol`;;
() : void
#quit();;
% ls -l my-hol
-rwxr-xr-x 1 hol 3601861 May 19 20:36 my-hol*
%
\end{verbatim}\end{session}
\noindent This session also shows how to get out of \HOL\ by typing:
\begin{hol}\begin{verbatim}
quit();;
\end{verbatim}\end{hol}
\noindent After saving a copy of \HOL, the new system ({\small\tt my-hol} in the
session above) can be used to run \HOL\ without having to install local path
names.
\setcounter{sessioncount}{1}
\begin{session}\begin{verbatim}
% my-hol
__ _ _ __ __ _ __ _ _ __ _
|___ | | /_\ |__ |__ | | |__| | | |
| |__ |__ / \ __| __| | |__ | | |__| |__
HOL88 Version 2.01 (Sun3/Franz), built on May 18 1992
#
\end{verbatim}\end{session}
Alas, the scenario sketched above does not always work:
\begin{enumerate}
\item There may not be a file {\small\tt hol} on
your distribution.
\item There may be a file {\small\tt hol}, but it is not executable on your machine.
\item The file {\small\tt hol} might execute, but the attempt to save a new version
with local path names may fail (this is usually due to incompatibility between
different versions of Unix).
\end{enumerate}
In case 1 or 2 you will need to rebuild \HOL\ from sources
(see Section~\ref{build}). In case 3, it is probably best to eventually
rebuild \HOL, but you can survive for a while without doing this
by always setting {\small\verb%HOLPATH%} or by typing:
{\small\verb%install `%}{\small$path$}{\small\verb%/hol`;;%}
whenever you start (for a suitable string {\small $path$}), \eg\
{\small\tt /usr/users/fred/dir1/dir2}. If \ml{install} is
being used, as an alternative to this is to create a file
called {\small\tt hol-init.ml} in your home directory
that contains the above \ml{install} command. When \HOL\ is run, the first thing it
does is to look for a file called {\small\tt hol-init.ml} and if one is found
any commands in it are executed.
\setcounter{sessioncount}{1}
\begin{session}\begin{verbatim}
% echo 'install `/usr/users/fred/dir1/dir2/hol`;;' > ~/hol-init.ml
% cat ~/hol-init.ml
install `/usr/users/fred/dir1/dir2/hol`;;
% hol
__ _ _ __ __ _ __ _ _ __ _
|___ | | /_\ |__ |__ | | |__| | | |
| |__ |__ / \ __| __| | |__ | | |__| |__
HOL88 Version 2.01 (Sun3/Franz), built on May 18 1992
HOL installed (`/usr/users/fred/dir1/dir2/hol`)
() : void
File hol-init loaded
() : void
#
\end{verbatim}\end{session}
\noindent Note that {\small\tt hol} not {\small\tt my-hol} was used, and the
installation was done automatically.
\begin{itemize}
\item{\bf N.B.} In order to be able to
{\it compile\/} \ML\ files (see the section
`Compiling \ML\ files' in \DESCRIPTION) it is also necessary
to install a suitable Lisp system and compiler (called `Liszt' for Franz Lisp).
This is unlikely to be necessary for normal users of \HOL. How to do this
installation
is described in Section~\ref{build} below.
\end{itemize}
\section{Building HOL from sources}
\label{build}
Under Unix, the \HOL\ system is normally built using a makefile
({\small\tt hol/Makefile} in the distribution).
If you are not using a Unix machine, then see the directory
{\small\tt hol/contrib/non-unix} for instructions on proceeding.
The rest of this section explains how to build the \HOL\ system under Unix
using the {\small\tt make} program. It is suggested that if you are familiar
with this program then you should read {\small\tt hol/Makefile}. If you are
not familiar with {\small\tt make}, then the instructions that follow should be
sufficient (unless something unexpected goes wrong).
\subsection{Steps to make HOL under Unix}
Perform the following steps in the order given:
\begin{enumerate}
\item Delete the old system and object files by changing to
the directory {\small\tt hol} and then typing (C-shell is assumed):
{\small\tt setenv HOLdir .; make -e clobber; unsetenv HOLdir}
\item Edit the following definitions in {\small\tt hol/Makefile}.
{\small\tt LispType} is the first uncommented line in the file
(lines begining with
{\small\verb%#%} are comments;
\ml{Makefile} starts with a large number
of comments):
{\small\begin{alltt}
LispType=\(\mbox{\it the type of Lisp used}\)
Obj=\(\mbox{\it the file extension of compiled object files}\)
Lisp=\(\mbox{\it the path name of the Lisp executable file}\)
HOLdir=\(\mbox{\it the absolute path name of the directory {\small\verb!hol!}}\)
\end{alltt}}
The value of \ml{LispType} should be \ml{franz} for Franz Lisp and
\ml{cl} for Common Lisp (CL). The value of \ml{Obj} should be \ml{o} for Franz Lisp,
Kyoto CL or
Austin Kyoto CL, it should be \ml{lbin} for Lucid CL
and \ml{fasl} for Allegro CL.
For example, if Austin Kyoto CL is used and its
executable image is {\small\tt /usr/bin/akcl}, and the
{\small\tt hol} directory is
{\small\tt /usr/users/fred/dir1/dir2/hol}
then {\small\tt Makefile} should
contain:
{\small\begin{verbatim}
LispType=cl
Obj=o
Lisp=/usr/bin/akcl
HOLdir=/usr/users/fred/dir1/dir2/hol
\end{verbatim}}
\item If you are using Franz Lisp, the following two definitions will also
have to be changed. They are concerned with the location of the lisp compiler,
{\small\tt liszt}.
{\small\begin{alltt}
Liszt=\(\mbox{\it the path name of the {\small\verb!liszt!} executable}\)
LisztComm=\(\mbox{\it the command to be issued by {\small\verb!hol!} to call {\small\verb!liszt!}}\)
\end{alltt}}
In general, {\small\tt LisztComm} will be the same as {\small\tt Liszt}.
For example, if the compiler is {\small\tt /usr/bin/liszt} then the
definitions would look like:
{\small\begin{alltt}
Liszt=/usr/bin/liszt
LisztComm=/usr/bin/liszt
\end{alltt}}
Ignore this step if you are not using Franz Lisp.
\item Commence the rebuilding of {\small\tt hol} by typing (in the directory
{\small\tt hol}) the following command:
{\small\begin{verbatim}
make all >& NEW-LOG&
\end{verbatim}}
This should be done overnight as, assuming all goes well, it will take many hours.
The result will be a new executable file {\small\tt hol} in the directory
{\small\tt hol}. The two files {\small\tt hol-lcf} and {\small\tt basic-hol}
created during the build may be deleted after it has completed.
\end{enumerate}
If these steps do not work, then you will need to get a hacker who understands the
{\small\tt make} program to look at {\small\tt Makefile}. The file {\small\tt LOG}
on the distribution tape is a record of the execution of {\small\tt make} used
to build the system ({\bf warning:} this file may not be present, or may be
incomplete).
\section{Other HOL users}
Users interested in research projects that make use of \HOL\ are directed
to the directory {\small\tt hol/contrib/hol\_users}. The \LaTeX\ source for a list
of short project descriptions is located there. The list does not represent
all ongoing research, but only those projects for which users of the system
have supplied us with a {\it pr\'{e}cis}. We encourage new users of the
system to inform us regarding its application so that we may update this list.
\section{HOL performance} \label{performance}
The following table contains the results of running the \HOL\ benchmark found
in the directory {\small\tt hol/contrib/benchmark} on a variety of platforms
using different lisps.
\begin{center}
\begin{tabular}{|l|l|c|c|r|}
\hline
\multicolumn{5}{|c|}{\bf Benchmark Results} \\
\multicolumn{1}{|c}{\sf Machine} &
\multicolumn{1}{c}{\sf Lisp} &
\multicolumn{1}{c}{\sf Memory} &
\multicolumn{1}{c}{\sf Window System} &
\multicolumn{1}{c|}{\sf Run Time} \\
\hline
Sun3/260 & Franz Lisp (38.92) & 16Mb & NONE & 147.6 sec \\
Sun3/80 & Franz Lisp (38.92) & 12Mb & X (R4) & 256.4 sec \\
Sun3/260 & AKCL & 16Mb & NONE & 538.6 sec \\
Sun3/80 & AKCL & 12Mb & X (R4) & 830.5 sec \\
Sparc SLC & Allegro & 16Mb & X (R4) & 214.4 sec \\
Sparc SLC & AKCL & 16Mb & X (R4) & 278.2 sec \\
Sparc IPC & Allegro & 16Mb & X (R4) & 174.9 sec \\
Sparc IPC & AKCL & 16Mb & X (R4) & 235.2 sec \\
Sparc1 & Allegro & 16Mb & SunView & 223.5 sec \\
Sparc1 & Allegro & 16Mb & X (R4) & 229.6 sec \\
Sparc1 & AKCL & 16Mb & SunView & 280.4 sec \\
Sparc1+ & Allegro & 28Mb & NONE & 182.4 sec \\
Sparc1+ & AKCL & 28Mb & NONE & 233.1 sec \\
SparcServ & Lucid & 64Mb & NONE & 102.7 sec \\
SparcServ & AKCL & 64Mb & NONE & 238.4 sec \\
Sparc2 & Allegro & 32Mb & SunView & 124.1 sec \\
Sparc2 & AKCL & 32Mb & SunView & 148.0 sec \\
HP9000/750 & AKCL & 32Mb & HP VUE & 83.2 sec \\
DS5000/200 & KCL & 48Mb & NONE & 287.6 sec \\
33MHz 486 PC & Procyon 3.0 & 8Mb & Windows 3.0 & 151.9 sec \\
Macintosh IIfx & Procyon 2.1 & 8Mb & Mac OS & 302.5 sec \\
Macintosh IIci & Procyon 2.1 & 8Mb & Mac OS & 371.6 sec \\
\hline
\end{tabular}
\end{center}
\section{The HOL licence}
\HOL\ is a public domain system and is available free. The bulk of the system
is based on code written, in alphabetical order, by Mike Gordon,
Gerard Huet (and others at Inria), Tom Melham, Robin Milner, Lockwood
Morris, Malcolm Newey, Larry Paulson and Chris Wadsworth. Many others
have supplied parts of the system, bugfixes etc.
Some users have asked to be issued with a \HOL\ licence. This is to
legitimate their use of the system for commercial purposes and to
guarantee continued access. After consultation with Robin Milner and
the Cambridge University computing service (who have experience with
software licencing), the licence agreement given below was produced
(the \LaTeX\ source for a typeset version is in the directory {\tt
Licence} at the top of the \HOL\ distribution tape). The primary aims
of the licence are:
\begin{myenumerate}
\item to prevent us being `ripped off' or sued;
\item to prevent people claiming to have done a proof using \HOL\ when
in fact they used their own insecure modifications of it
(in this case the licence merely requires the system to be called
something else, it does not prevent such modifications being made).
\end{myenumerate}
The signing of the licence is optional, but encouraged. Users of \HOL\ are
free to redistribute the system to others provided they let Mike Gordon know
in writing. The simplest way to do this is to ask the party to whom \HOL\ is
given to sign the licence and send it to Mike.
\section{The REFERENCE browser}
There is an X-windows documentation browser available with \HOL, written by
Sara Kalvala. This is not part of the \HOL{} system,
but is distributed with the sources in {\small\verb+hol/contrib/Xhelp+}; it
provides convenient access to the reference manual \REFERENCE{} and is
likely to be very useful to new users.
\newpage
\begin{footnotesize}
\begin{center}\normalsize\bf
\mbox{}\\
\mbox{}\\
Distribution Agreement
for the
HOL System
\end{center}
\bigskip
\bigskip
\noindent The University of Cambridge Computer Laboratory
is prepared
to make available to:
\begin{flushleft}
\begin{tabular}{@{}|c@{}|@{}}\hline
\begin{minipage}{\hsbw}
{\small\baselineskip\HOLSpacing\begin{alltt}
\( \)
\end{alltt}}
\end{minipage}\\ \hline
\end{tabular}
\end{flushleft}
\noindent hereafter referred to as `the User',
the HOL proof assistant system, hereafter referred to as
`the Software', subject to the following terms:
\begin{enumerate}
\item
The University of Edinburgh, the
University of Cambridge and Inria, hereafter referred to as `the Developers',
retain the copyright and all other legal
rights to those parts of the software that they respectively
developed, and they confirm that the sum of such parts constitute the whole.
The User will ensure that the software in all its derivations
carries a copyright notice of the form:
\begin{center}
\copyright\ University of Edinburgh,
\copyright\ University of Cambridge,
\copyright\ Inria
\end{center}
\item The User may employ the Software for any personal or internal purpose,
but not as part or whole of any system to be distributed for commercial gain.
The User shall be entitled to develop derivations of the Software and to make
the Software and its derivations available to others, without charge, for
research and for evaluating products developed by the User.
\item The User shall not declare theorems to have been proved using HOL unless
they were proved with an authorized version of the HOL system. An executable
binary file supplied by the Developers, or built using a Makefile supplied by
them, constitutes an authorized version of HOL. Versions of HOL developed by
the User are not authorized unless so designated, in writing, by the
Developers.
\item The User will notify the University of Cambridge Computer
Laboratory, in writing, of any significant derivations of
the Software made by
the User. The User will also notify the University of Cambridge Computer
Laboratory, in writing, of all persons or organizations to whom such
derivations are distributed.
\item The Software is made available on an {\it as is\/} basis; no guarantee
of maintenance or reliability is provided by the Developers.
\item The User shall not hold the Developers
liable for any consequences arising from use of the
Software whether by himself or by any other party.
The User shall indemnify the Developers and their staff against any claim by
any third party arising from or in connection with the use of the Software,
other than a claim for copyright infringement.
\end{enumerate}
\bigskip
\noindent{\bf Signed:}\dotfill\mbox{}
\bigskip
\noindent{\bf Position:}\dotfill\mbox{}
\bigskip
\noindent{\bf Date:}\dotfill\mbox{}
\end{footnotesize}
|