doc-src/System/Thy/Basics.thy
author haftmann
Wed, 14 Jul 2010 16:45:30 +0200
changeset 37828 9e1758c7ff06
parent 36196 cbb9ee265cdd
child 38253 3d4e521014f7
permissions -rw-r--r--
avoid ambiguities; tuned
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     1
theory Basics
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     2
imports Pure
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     3
begin
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     4
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     5
chapter {* The Isabelle system environment *}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     6
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     7
text {*
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     8
  This manual describes Isabelle together with related tools and user
28916
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
     9
  interfaces as seen from a system oriented view.  See also the
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    10
  \emph{Isabelle/Isar Reference Manual}~\cite{isabelle-isar-ref} for
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    11
  the actual Isabelle input language and related concepts.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    12
28916
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    13
  \medskip The Isabelle system environment provides the following
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    14
  basic infrastructure to integrate tools smoothly.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    15
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    16
  \begin{enumerate}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    17
28916
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    18
  \item The \emph{Isabelle settings} mechanism provides process
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    19
  environment variables to all Isabelle executables (including tools
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    20
  and user interfaces).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    21
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
    22
  \item The \emph{raw Isabelle process} (@{executable_ref
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
    23
  "isabelle-process"}) runs logic sessions either interactively or in
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
    24
  batch mode.  In particular, this view abstracts over the invocation
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
    25
  of the actual ML system to be used.  Regular users rarely need to
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
    26
  care about the low-level process.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    27
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
    28
  \item The \emph{Isabelle tools wrapper} (@{executable_ref isabelle})
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    29
  provides a generic startup environment Isabelle related utilities,
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    30
  user interfaces etc.  Such tools automatically benefit from the
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    31
  settings mechanism.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    32
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    33
  \end{enumerate}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    34
*}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    35
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    36
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    37
section {* Isabelle settings \label{sec:settings} *}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    38
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    39
text {*
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    40
  The Isabelle system heavily depends on the \emph{settings
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    41
  mechanism}\indexbold{settings}.  Essentially, this is a statically
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    42
  scoped collection of environment variables, such as @{setting
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    43
  ISABELLE_HOME}, @{setting ML_SYSTEM}, @{setting ML_HOME}.  These
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    44
  variables are \emph{not} intended to be set directly from the shell,
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    45
  though.  Isabelle employs a somewhat more sophisticated scheme of
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    46
  \emph{settings files} --- one for site-wide defaults, another for
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    47
  additional user-specific modifications.  With all configuration
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    48
  variables in at most two places, this scheme is more maintainable
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    49
  and user-friendly than global shell environment variables.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    50
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    51
  In particular, we avoid the typical situation where prospective
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    52
  users of a software package are told to put several things into
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    53
  their shell startup scripts, before being able to actually run the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    54
  program. Isabelle requires none such administrative chores of its
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    55
  end-users --- the executables can be invoked straight away.
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    56
  Occasionally, users would still want to put the @{"file"
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    57
  "$ISABELLE_HOME/bin"} directory into their shell's search path, but
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    58
  this is not required.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    59
*}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    60
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    61
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    62
subsection {* Bootstrapping the environment \label{sec:boot} *}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    63
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    64
text {* Isabelle executables need to be run within a proper settings
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    65
  environment.  This is bootstrapped as described below, on the first
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    66
  invocation of one of the outer wrapper scripts (such as
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    67
  @{executable_ref isabelle}).  This happens only once for each
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    68
  process tree, i.e.\ the environment is passed to subprocesses
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    69
  according to regular Unix conventions.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    70
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    71
  \begin{enumerate}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    72
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    73
  \item The special variable @{setting_def ISABELLE_HOME} is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    74
  determined automatically from the location of the binary that has
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    75
  been run.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    76
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    77
  You should not try to set @{setting ISABELLE_HOME} manually. Also
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    78
  note that the Isabelle executables either have to be run from their
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    79
  original location in the distribution directory, or via the
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    80
  executable objects created by the @{tool install} utility.  Symbolic
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    81
  links are admissible, but a plain copy of the @{"file"
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    82
  "$ISABELLE_HOME/bin"} files will not work!
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    83
32324
a99e58e043ee spelling;
wenzelm
parents: 32323
diff changeset
    84
  \item The file @{"file" "$ISABELLE_HOME/etc/settings"} is run as a
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    85
  @{executable_ref bash} shell script with the auto-export option for
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    86
  variables enabled.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    87
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    88
  This file holds a rather long list of shell variable assigments,
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    89
  thus providing the site-wide default settings.  The Isabelle
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    90
  distribution already contains a global settings file with sensible
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    91
  defaults for most variables.  When installing the system, only a few
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    92
  of these may have to be adapted (probably @{setting ML_SYSTEM}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    93
  etc.).
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    94
  
28285
91cd65eabd7f unchecked $ISABELLE_HOME_USER/etc/settings;
wenzelm
parents: 28250
diff changeset
    95
  \item The file @{verbatim "$ISABELLE_HOME_USER/etc/settings"} (if it
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    96
  exists) is run in the same way as the site default settings. Note
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    97
  that the variable @{setting ISABELLE_HOME_USER} has already been set
28914
f993cbffc42a default for ISABELLE_HOME_USER is now ~/.isabelle instead of ~/isabelle;
wenzelm
parents: 28506
diff changeset
    98
  before --- usually to @{verbatim "~/.isabelle"}.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    99
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   100
  Thus individual users may override the site-wide defaults.  See also
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   101
  file @{"file" "$ISABELLE_HOME/etc/user-settings.sample"} in the
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   102
  distribution.  Typically, a user settings file would contain only a
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   103
  few lines, just the assigments that are really changed.  One should
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   104
  definitely \emph{not} start with a full copy the basic @{"file"
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   105
  "$ISABELLE_HOME/etc/settings"}. This could cause very annoying
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   106
  maintainance problems later, when the Isabelle installation is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   107
  updated or changed otherwise.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   108
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   109
  \end{enumerate}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   110
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   111
  Since settings files are regular GNU @{executable_def bash} scripts,
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   112
  one may use complex shell commands, such as @{verbatim "if"} or
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   113
  @{verbatim "case"} statements to set variables depending on the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   114
  system architecture or other environment variables.  Such advanced
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   115
  features should be added only with great care, though. In
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   116
  particular, external environment references should be kept at a
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   117
  minimum.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   118
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   119
  \medskip A few variables are somewhat special:
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   120
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   121
  \begin{itemize}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   122
28502
6b0e3e4e1891 replaced ISABELLE by ISABELLE_PROCESS;
wenzelm
parents: 28500
diff changeset
   123
  \item @{setting_def ISABELLE_PROCESS} and @{setting_def ISABELLE_TOOL} are set
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   124
  automatically to the absolute path names of the @{executable
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   125
  "isabelle-process"} and @{executable isabelle} executables,
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   126
  respectively.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   127
  
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   128
  \item @{setting_ref ISABELLE_OUTPUT} will have the identifiers of
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   129
  the Isabelle distribution (cf.\ @{setting ISABELLE_IDENTIFIER}) and
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   130
  the ML system (cf.\ @{setting ML_IDENTIFIER}) appended automatically
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   131
  to its value.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   132
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   133
  \end{itemize}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   134
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   135
  \medskip Note that the settings environment may be inspected with
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   136
  the Isabelle tool @{tool getenv}.  This might help to figure out the
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   137
  effect of complex settings scripts.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   138
*}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   139
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   140
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   141
subsection{* Common variables *}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   142
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   143
text {*
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   144
  This is a reference of common Isabelle settings variables. Note that
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   145
  the list is somewhat open-ended. Third-party utilities or interfaces
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   146
  may add their own selection. Variables that are special in some
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   147
  sense are marked with @{text "\<^sup>*"}.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   148
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   149
  \begin{description}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   150
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   151
  \item[@{setting_def ISABELLE_HOME}@{text "\<^sup>*"}] is the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   152
  location of the top-level Isabelle distribution directory. This is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   153
  automatically determined from the Isabelle executable that has been
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   154
  invoked.  Do not attempt to set @{setting ISABELLE_HOME} yourself
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   155
  from the shell!
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   156
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   157
  \item[@{setting_def ISABELLE_HOME_USER}] is the user-specific
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   158
  counterpart of @{setting ISABELLE_HOME}. The default value is
28914
f993cbffc42a default for ISABELLE_HOME_USER is now ~/.isabelle instead of ~/isabelle;
wenzelm
parents: 28506
diff changeset
   159
  @{verbatim "~/.isabelle"}, under rare circumstances this may be
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   160
  changed in the global setting file.  Typically, the @{setting
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   161
  ISABELLE_HOME_USER} directory mimics @{setting ISABELLE_HOME} to
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   162
  some extend. In particular, site-wide defaults may be overridden by
28285
91cd65eabd7f unchecked $ISABELLE_HOME_USER/etc/settings;
wenzelm
parents: 28250
diff changeset
   163
  a private @{verbatim "$ISABELLE_HOME_USER/etc/settings"}.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   164
  
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   165
  \item[@{setting_def ISABELLE_PLATFORM}@{text "\<^sup>*"}] is automatically
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   166
  set to a symbolic identifier for the underlying hardware and
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   167
  operating system.  The Isabelle platform identification always
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   168
  refers to the 32 bit variant, even this is a 64 bit machine.  Note
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   169
  that the ML or Java runtime may have a different idea, depending on
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   170
  which binaries are actually run.
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   171
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   172
  \item[@{setting_def ISABELLE_PLATFORM64}@{text "\<^sup>*"}] is similar to
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   173
  @{setting ISABELLE_PLATFORM} but refers to the proper 64 bit variant
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   174
  on a platform that supports this; the value is empty for 32 bit.
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   175
28502
6b0e3e4e1891 replaced ISABELLE by ISABELLE_PROCESS;
wenzelm
parents: 28500
diff changeset
   176
  \item[@{setting_def ISABELLE_PROCESS}@{text "\<^sup>*"}, @{setting
28500
4b79e5d3d0aa replaced ISATOOL by ISABELLE_TOOL;
wenzelm
parents: 28285
diff changeset
   177
  ISABELLE_TOOL}@{text "\<^sup>*"}] are automatically set to the full path
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   178
  names of the @{executable "isabelle-process"} and @{executable
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   179
  isabelle} executables, respectively.  Thus other tools and scripts
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   180
  need not assume that the @{"file" "$ISABELLE_HOME/bin"} directory is
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   181
  on the current search path of the shell.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   182
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   183
  \item[@{setting_def ISABELLE_IDENTIFIER}@{text "\<^sup>*"}] refers
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   184
  to the name of this Isabelle distribution, e.g.\ ``@{verbatim
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   185
  Isabelle2008}''.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   186
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   187
  \item[@{setting_def ML_SYSTEM}, @{setting_def ML_HOME},
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   188
  @{setting_def ML_OPTIONS}, @{setting_def ML_PLATFORM}, @{setting_def
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   189
  ML_IDENTIFIER}@{text "\<^sup>*"}] specify the underlying ML system
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   190
  to be used for Isabelle.  There is only a fixed set of admissable
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   191
  @{setting ML_SYSTEM} names (see the @{"file"
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   192
  "$ISABELLE_HOME/etc/settings"} file of the distribution).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   193
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   194
  The actual compiler binary will be run from the directory @{setting
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   195
  ML_HOME}, with @{setting ML_OPTIONS} as first arguments on the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   196
  command line.  The optional @{setting ML_PLATFORM} may specify the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   197
  binary format of ML heap images, which is useful for cross-platform
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   198
  installations.  The value of @{setting ML_IDENTIFIER} is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   199
  automatically obtained by composing the values of @{setting
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   200
  ML_SYSTEM}, @{setting ML_PLATFORM} and the Isabelle version values.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   201
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   202
  \item[@{setting_def ISABELLE_PATH}] is a list of directories
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   203
  (separated by colons) where Isabelle logic images may reside.  When
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   204
  looking up heaps files, the value of @{setting ML_IDENTIFIER} is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   205
  appended to each component internally.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   206
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   207
  \item[@{setting_def ISABELLE_OUTPUT}@{text "\<^sup>*"}] is a
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   208
  directory where output heap files should be stored by default. The
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   209
  ML system and Isabelle version identifier is appended here, too.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   210
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   211
  \item[@{setting_def ISABELLE_BROWSER_INFO}] is the directory where
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   212
  theory browser information (HTML text, graph data, and printable
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   213
  documents) is stored (see also \secref{sec:info}).  The default
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   214
  value is @{verbatim "$ISABELLE_HOME_USER/browser_info"}.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   215
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   216
  \item[@{setting_def ISABELLE_LOGIC}] specifies the default logic to
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   217
  load if none is given explicitely by the user.  The default value is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   218
  @{verbatim HOL}.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   219
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   220
  \item[@{setting_def ISABELLE_LINE_EDITOR}] specifies the default
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   221
  line editor for the @{tool_ref tty} interface.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   222
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   223
  \item[@{setting_def ISABELLE_USEDIR_OPTIONS}] is implicitly prefixed
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   224
  to the command line of any @{tool_ref usedir} invocation. This
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   225
  typically contains compilation options for object-logics --- @{tool
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   226
  usedir} is the basic utility for managing logic sessions (cf.\ the
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   227
  @{verbatim IsaMakefile}s in the distribution).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   228
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   229
  \item[@{setting_def ISABELLE_FILE_IDENT}] specifies a shell command
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   230
  for producing a source file identification, based on the actual
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   231
  content instead of the full physical path and date stamp (which is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   232
  the default). A typical identification would produce a ``digest'' of
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   233
  the text, using a cryptographic hash function like SHA-1, for
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   234
  example.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   235
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   236
  \item[@{setting_def ISABELLE_LATEX}, @{setting_def
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   237
  ISABELLE_PDFLATEX}, @{setting_def ISABELLE_BIBTEX}, @{setting_def
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   238
  ISABELLE_DVIPS}] refer to {\LaTeX} related tools for Isabelle
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   239
  document preparation (see also \secref{sec:tool-latex}).
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   240
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   241
  \item[@{setting_def ISABELLE_TOOLS}] is a colon separated list of
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   242
  directories that are scanned by @{executable isabelle} for external
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   243
  utility programs (see also \secref{sec:isabelle-tool}).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   244
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   245
  \item[@{setting_def ISABELLE_DOCS}] is a colon separated list of
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   246
  directories with documentation files.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   247
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   248
  \item[@{setting_def ISABELLE_DOC_FORMAT}] specifies the preferred
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   249
  document format, typically @{verbatim dvi} or @{verbatim pdf}.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   250
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   251
  \item[@{setting_def DVI_VIEWER}] specifies the command to be used
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   252
  for displaying @{verbatim dvi} files.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   253
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   254
  \item[@{setting_def PDF_VIEWER}] specifies the command to be used
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   255
  for displaying @{verbatim pdf} files.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   256
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   257
  \item[@{setting_def PRINT_COMMAND}] specifies the standard printer
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   258
  spool command, which is expected to accept @{verbatim ps} files.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   259
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   260
  \item[@{setting_def ISABELLE_TMP_PREFIX}@{text "\<^sup>*"}] is the
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   261
  prefix from which any running @{executable "isabelle-process"}
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   262
  derives an individual directory for temporary files.  The default is
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   263
  somewhere in @{verbatim "/tmp"}.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   264
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   265
  \end{description}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   266
*}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   267
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   268
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   269
subsection {* Additional components \label{sec:components} *}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   270
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   271
text {* Any directory may be registered as an explicit \emph{Isabelle
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   272
  component}.  The general layout conventions are that of the main
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   273
  Isabelle distribution itself, and the following two files (both
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   274
  optional) have a special meaning:
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   275
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   276
  \begin{itemize}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   277
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   278
  \item @{verbatim "etc/settings"} holds additional settings that are
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   279
  initialized when bootstrapping the overall Isabelle environment,
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   280
  cf.\ \secref{sec:boot}.  As usual, the content is interpreted as a
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   281
  @{verbatim bash} script.  It may refer to the component's enclosing
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   282
  directory via the @{verbatim "COMPONENT"} shell variable.
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   283
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   284
  For example, the following setting allows to refer to files within
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   285
  the component later on, without having to hardwire absolute paths:
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   286
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   287
  \begin{ttbox}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   288
  MY_COMPONENT_HOME="$COMPONENT"
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   289
  \end{ttbox}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   290
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   291
  Components can also add to existing Isabelle settings such as
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   292
  @{setting_def ISABELLE_TOOLS}, in order to provide
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   293
  component-specific tools that can be invoked by end-users.  For
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   294
  example:
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   295
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   296
  \begin{ttbox}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   297
  ISABELLE_TOOLS="$ISABELLE_TOOLS:$COMPONENT/lib/Tools"
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   298
  \end{ttbox}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   299
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   300
  \item @{verbatim "etc/components"} holds a list of further
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   301
  sub-components of the same structure.  The directory specifications
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   302
  given here can be either absolute (with leading @{verbatim "/"}) or
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   303
  relative to the component's main directory.
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   304
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   305
  \end{itemize}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   306
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   307
  The root of component initialization is @{setting ISABELLE_HOME}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   308
  itself.  After initializing all of its sub-components recursively,
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   309
  @{setting ISABELLE_HOME_USER} is included in the same manner (if
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   310
  that directory exists).  Thus users can easily add private
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   311
  components to @{verbatim "$ISABELLE_HOME_USER/etc/components"}.
33952
5e9ddf000d97 document init_component shell function;
wenzelm
parents: 32324
diff changeset
   312
5e9ddf000d97 document init_component shell function;
wenzelm
parents: 32324
diff changeset
   313
  It is also possible to initialize components programmatically via
5e9ddf000d97 document init_component shell function;
wenzelm
parents: 32324
diff changeset
   314
  the \verb,init_component, shell function, say within the
5e9ddf000d97 document init_component shell function;
wenzelm
parents: 32324
diff changeset
   315
  \verb,settings, script of another component.
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   316
*}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   317
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   318
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   319
section {* The raw Isabelle process *}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   320
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   321
text {*
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   322
  The @{executable_def "isabelle-process"} executable runs bare-bones
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   323
  Isabelle logic sessions --- either interactively or in batch mode.
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   324
  It provides an abstraction over the underlying ML system, and over
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   325
  the actual heap file locations.  Its usage is:
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   326
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   327
\begin{ttbox}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   328
Usage: isabelle-process [OPTIONS] [INPUT] [OUTPUT]
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   329
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   330
  Options are:
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   331
    -I           startup Isar interaction mode
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   332
    -P           startup Proof General interaction mode
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   333
    -S           secure mode -- disallow critical operations
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   334
    -W OUTPUT    startup process wrapper, with messages going to OUTPUT stream
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   335
    -X           startup PGIP interaction mode
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   336
    -e MLTEXT    pass MLTEXT to the ML session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   337
    -f           pass 'Session.finish();' to the ML session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   338
    -m MODE      add print mode for output
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   339
    -q           non-interactive session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   340
    -r           open heap file read-only
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   341
    -u           pass 'use"ROOT.ML";' to the ML session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   342
    -w           reset write permissions on OUTPUT
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   343
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   344
  INPUT (default "\$ISABELLE_LOGIC") and OUTPUT specify in/out heaps.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   345
  These are either names to be searched in the Isabelle path, or
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   346
  actual file names (containing at least one /).
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   347
  If INPUT is "RAW_ML_SYSTEM", just start the bare bones ML system.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   348
\end{ttbox}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   349
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   350
  Input files without path specifications are looked up in the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   351
  @{setting ISABELLE_PATH} setting, which may consist of multiple
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   352
  components separated by colons --- these are tried in the given
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   353
  order with the value of @{setting ML_IDENTIFIER} appended
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   354
  internally.  In a similar way, base names are relative to the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   355
  directory specified by @{setting ISABELLE_OUTPUT}.  In any case,
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   356
  actual file locations may also be given by including at least one
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   357
  slash (@{verbatim "/"}) in the name (hint: use @{verbatim "./"} to
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   358
  refer to the current directory).
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   359
*}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   360
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   361
28223
wenzelm
parents: 28215
diff changeset
   362
subsubsection {* Options *}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   363
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   364
text {*
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   365
  If the input heap file does not have write permission bits set, or
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   366
  the @{verbatim "-r"} option is given explicitely, then the session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   367
  started will be read-only.  That is, the ML world cannot be
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   368
  committed back into the image file.  Otherwise, a writable session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   369
  enables commits into either the input file, or into another output
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   370
  heap file (if that is given as the second argument on the command
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   371
  line).
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   372
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   373
  The read-write state of sessions is determined at startup only, it
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   374
  cannot be changed intermediately. Also note that heap images may
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   375
  require considerable amounts of disk space (approximately
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   376
  50--200~MB). Users are responsible for themselves to dispose their
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   377
  heap files when they are no longer needed.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   378
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   379
  \medskip The @{verbatim "-w"} option makes the output heap file
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   380
  read-only after terminating.  Thus subsequent invocations cause the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   381
  logic image to be read-only automatically.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   382
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   383
  \medskip Using the @{verbatim "-e"} option, arbitrary ML code may be
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   384
  passed to the Isabelle session from the command line. Multiple
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   385
  @{verbatim "-e"}'s are evaluated in the given order. Strange things
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   386
  may happen when errorneous ML code is provided. Also make sure that
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   387
  the ML commands are terminated properly by semicolon.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   388
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   389
  \medskip The @{verbatim "-u"} option is a shortcut for @{verbatim
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   390
  "-e"} passing ``@{verbatim "use \"ROOT.ML\";"}'' to the ML session.
28223
wenzelm
parents: 28215
diff changeset
   391
  The @{verbatim "-f"} option passes ``@{verbatim
wenzelm
parents: 28215
diff changeset
   392
  "Session.finish();"}'', which is intended mainly for administrative
wenzelm
parents: 28215
diff changeset
   393
  purposes.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   394
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   395
  \medskip The @{verbatim "-m"} option adds identifiers of print modes
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   396
  to be made active for this session. Typically, this is used by some
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   397
  user interface, e.g.\ to enable output of proper mathematical
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   398
  symbols.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   399
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   400
  \medskip Isabelle normally enters an interactive top-level loop
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   401
  (after processing the @{verbatim "-e"} texts). The @{verbatim "-q"}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   402
  option inhibits interaction, thus providing a pure batch mode
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   403
  facility.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   404
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   405
  \medskip The @{verbatim "-I"} option makes Isabelle enter Isar
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   406
  interaction mode on startup, instead of the primitive ML top-level.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   407
  The @{verbatim "-P"} option configures the top-level loop for
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   408
  interaction with the Proof General user interface, and the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   409
  @{verbatim "-X"} option enables XML-based PGIP communication.  The
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   410
  @{verbatim "-W"} option makes Isabelle enter a special process
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   411
  wrapper for interaction via an external program; the protocol is a
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   412
  stripped-down version of Proof General the interaction mode, see
30195
9152fc3af67f fixed broken @{file} refs;
wenzelm
parents: 28916
diff changeset
   413
  also @{"file" "~~/src/Pure/System/isabelle_process.ML"} and @{"file"
9152fc3af67f fixed broken @{file} refs;
wenzelm
parents: 28916
diff changeset
   414
  "~~/src/Pure/System/isabelle_process.scala"}.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   415
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   416
  \medskip The @{verbatim "-S"} option makes the Isabelle process more
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   417
  secure by disabling some critical operations, notably runtime
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   418
  compilation and evaluation of ML source code.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   419
*}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   420
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   421
28223
wenzelm
parents: 28215
diff changeset
   422
subsubsection {* Examples *}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   423
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   424
text {*
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   425
  Run an interactive session of the default object-logic (as specified
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   426
  by the @{setting ISABELLE_LOGIC} setting) like this:
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   427
\begin{ttbox}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   428
isabelle-process
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   429
\end{ttbox}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   430
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   431
  Usually @{setting ISABELLE_LOGIC} refers to one of the standard
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   432
  logic images, which are read-only by default.  A writable session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   433
  --- based on @{verbatim FOL}, but output to @{verbatim Foo} (in the
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   434
  directory specified by the @{setting ISABELLE_OUTPUT} setting) ---
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   435
  may be invoked as follows:
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   436
\begin{ttbox}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   437
isabelle-process FOL Foo
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   438
\end{ttbox}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   439
  Ending this session normally (e.g.\ by typing control-D) dumps the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   440
  whole ML system state into @{verbatim Foo}. Be prepared for several
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   441
  tens of megabytes.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   442
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   443
  The @{verbatim Foo} session may be continued later (still in
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   444
  writable state) by:
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   445
\begin{ttbox}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   446
isabelle-process Foo
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   447
\end{ttbox}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   448
  A read-only @{verbatim Foo} session may be started by:
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   449
\begin{ttbox}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   450
isabelle-process -r Foo
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   451
\end{ttbox}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   452
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   453
  \medskip Note that manual session management like this does
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   454
  \emph{not} provide proper setup for theory presentation.  This would
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   455
  require the @{tool usedir} utility.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   456
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   457
  \bigskip The next example demonstrates batch execution of Isabelle.
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   458
  We retrieve the @{verbatim FOL} theory value from the theory loader
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   459
  within ML:
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   460
\begin{ttbox}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   461
isabelle-process -e 'theory "FOL";' -q -r FOL
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   462
\end{ttbox}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   463
  Note that the output text will be interspersed with additional junk
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   464
  messages by the ML runtime environment.  The @{verbatim "-W"} option
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   465
  allows to communicate with the Isabelle process via an external
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   466
  program in a more robust fashion.
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   467
*}
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   468
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   469
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   470
section {* The Isabelle tools wrapper \label{sec:isabelle-tool} *}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   471
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   472
text {*
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   473
  All Isabelle related tools and interfaces are called via a common
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   474
  wrapper --- @{executable isabelle}:
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   475
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   476
\begin{ttbox}
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   477
Usage: isabelle TOOL [ARGS ...]
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   478
28506
3ab515ee4e6f tuned isabelle usage;
wenzelm
parents: 28504
diff changeset
   479
  Start Isabelle tool NAME with ARGS; pass "-?" for tool specific help.
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   480
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   481
  Available tools are:
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   482
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   483
    browser - Isabelle graph browser
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   484
    \dots
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   485
\end{ttbox}
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   486
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   487
  In principle, Isabelle tools are ordinary executable scripts that
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   488
  are run within the Isabelle settings environment, see
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   489
  \secref{sec:settings}.  The set of available tools is collected by
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   490
  @{executable isabelle} from the directories listed in the @{setting
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   491
  ISABELLE_TOOLS} setting.  Do not try to call the scripts directly
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   492
  from the shell.  Neither should you add the tool directories to your
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   493
  shell's search path!
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   494
*}
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   495
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   496
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   497
subsubsection {* Examples *}
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   498
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   499
text {*
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   500
  Show the list of available documentation of the current Isabelle
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   501
  installation like this:
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   502
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   503
\begin{ttbox}
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   504
  isabelle doc
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   505
\end{ttbox}
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   506
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   507
  View a certain document as follows:
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   508
\begin{ttbox}
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   509
  isabelle doc isar-ref
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   510
\end{ttbox}
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   511
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   512
  Create an Isabelle session derived from HOL (see also
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   513
  \secref{sec:tool-mkdir} and \secref{sec:tool-make}):
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   514
\begin{ttbox}
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   515
  isabelle mkdir HOL Test && isabelle make
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   516
\end{ttbox}
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   517
  Note that @{verbatim "isabelle mkdir"} is usually only invoked once;
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   518
  existing sessions (including document output etc.) are then updated
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   519
  by @{verbatim "isabelle make"} alone.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   520
*}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   521
28223
wenzelm
parents: 28215
diff changeset
   522
end