doc-src/System/Thy/Interfaces.thy
author wenzelm
Sun, 30 Nov 2008 14:03:46 +0100
changeset 28916 0a802cdda340
child 32088 2110fcd86efb
permissions -rw-r--r--
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
separate chapter on interfaces as Isabelle tools;
wenzelm@28916
     1
(* $Id$ *)
wenzelm@28916
     2
wenzelm@28916
     3
theory Interfaces
wenzelm@28916
     4
imports Pure
wenzelm@28916
     5
begin
wenzelm@28916
     6
wenzelm@28916
     7
chapter {* User interfaces *}
wenzelm@28916
     8
wenzelm@28916
     9
section {* Plain TTY interaction \label{sec:tool-tty} *}
wenzelm@28916
    10
wenzelm@28916
    11
text {*
wenzelm@28916
    12
  The @{tool_def tty} tool runs the Isabelle process interactively
wenzelm@28916
    13
  within a plain terminal session:
wenzelm@28916
    14
\begin{ttbox}
wenzelm@28916
    15
Usage: tty [OPTIONS]
wenzelm@28916
    16
wenzelm@28916
    17
  Options are:
wenzelm@28916
    18
    -l NAME      logic image name (default ISABELLE_LOGIC)
wenzelm@28916
    19
    -m MODE      add print mode for output
wenzelm@28916
    20
    -p NAME      line editor program name (default ISABELLE_LINE_EDITOR)
wenzelm@28916
    21
wenzelm@28916
    22
  Run Isabelle process with plain tty interaction, and optional line editor.
wenzelm@28916
    23
\end{ttbox}
wenzelm@28916
    24
wenzelm@28916
    25
  The @{verbatim "-l"} option specifies the logic image.  The
wenzelm@28916
    26
  @{verbatim "-m"} option specifies additional print modes.  The The
wenzelm@28916
    27
  @{verbatim "-p"} option specifies an alternative line editor (such
wenzelm@28916
    28
  as the @{executable_def rlwrap} wrapper for GNU readline); the
wenzelm@28916
    29
  fall-back is to use raw standard input.
wenzelm@28916
    30
wenzelm@28916
    31
  Regular interaction is via the standard Isabelle/Isar toplevel loop.
wenzelm@28916
    32
  The Isar command @{command exit} drops out into the raw ML system,
wenzelm@28916
    33
  which is occasionally useful for low-level debugging.  Invoking @{ML
wenzelm@28916
    34
  Isar.loop}~@{verbatim "();"} in ML will return to the Isar toplevel.
wenzelm@28916
    35
*}
wenzelm@28916
    36
wenzelm@28916
    37
wenzelm@28916
    38
section {* Proof General / Emacs *}
wenzelm@28916
    39
wenzelm@28916
    40
text {*
wenzelm@28916
    41
  The @{tool_def emacs} tool invokes a version of Emacs and Proof
wenzelm@28916
    42
  General within the regular Isabelle settings environment
wenzelm@28916
    43
  (\secref{sec:settings}).  This is more robust than starting Emacs
wenzelm@28916
    44
  separately, loading the Proof General lisp files, and then
wenzelm@28916
    45
  attempting to start Isabelle with dynamic @{setting PATH} lookup
wenzelm@28916
    46
  etc.
wenzelm@28916
    47
wenzelm@28916
    48
  The actual interface script is part of the Proof General
wenzelm@28916
    49
  distribution~\cite{proofgeneral}; its usage depends on the
wenzelm@28916
    50
  particular version.  There are some options available, such as
wenzelm@28916
    51
  @{verbatim "-l"} for passing the logic image to be used by default,
wenzelm@28916
    52
  or @{verbatim "-m"} to tune the standard print mode.  The following
wenzelm@28916
    53
  Isabelle settings are particularly important for Proof General:
wenzelm@28916
    54
wenzelm@28916
    55
  \begin{description}
wenzelm@28916
    56
wenzelm@28916
    57
  \item[@{setting_def PROOFGENERAL_HOME}] points to the main
wenzelm@28916
    58
  installation directory of the Proof General distribution.  The
wenzelm@28916
    59
  default settings try to locate this in a number of standard places,
wenzelm@28916
    60
  notably @{verbatim "$ISABELLE_HOME/contrib/ProofGeneral"}.
wenzelm@28916
    61
wenzelm@28916
    62
  \item[@{setting_def PROOFGENERAL_OPTIONS}] is implicitly prefixed to
wenzelm@28916
    63
  the command line of any invocation of the Proof General @{verbatim
wenzelm@28916
    64
  interface} script.
wenzelm@28916
    65
wenzelm@28916
    66
  \item[@{setting_def XSYMBOL_INSTALLFONTS}] may contain a small shell
wenzelm@28916
    67
  script to install the X11 fonts required for the X-Symbols mode of
wenzelm@28916
    68
  Proof General.  This is only relevant if the X11 display server runs
wenzelm@28916
    69
  on a different machine than the Emacs application, with a different
wenzelm@28916
    70
  file-system view on the Proof General installation.  Under most
wenzelm@28916
    71
  circumstances Proof General is able to refer to the font files that
wenzelm@28916
    72
  are part of its distribution.
wenzelm@28916
    73
wenzelm@28916
    74
  \end{description}
wenzelm@28916
    75
*}
wenzelm@28916
    76
wenzelm@28916
    77
end