src/Doc/System/Basics.thy
author wenzelm
Mon, 12 Oct 2015 18:18:48 +0200
changeset 61407 7ba7b8103565
parent 61406 eb2463fc4d7b
child 61412 bbe9ae2c9289
permissions -rw-r--r--
@{verbatim [display]} supersedes old alltt/ttbox;
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
43564
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 41955
diff changeset
     2
imports Base
28215
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
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
     5
chapter \<open>The Isabelle system environment\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
     6
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
     7
text \<open>This manual describes Isabelle together with related tools and
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
     8
  user interfaces as seen from a system oriented view.  See also the
58553
3876a1a9ee42 prefer @{cite} antiquotation;
wenzelm
parents: 58413
diff changeset
     9
  \emph{Isabelle/Isar Reference Manual} @{cite "isabelle-isar-ref"} for
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    10
  the actual Isabelle input language and related concepts, and
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    11
  \emph{The Isabelle/Isar Implementation
58553
3876a1a9ee42 prefer @{cite} antiquotation;
wenzelm
parents: 58413
diff changeset
    12
  Manual} @{cite "isabelle-implementation"} for the main concepts of the
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    13
  underlying implementation in Isabelle/ML.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    14
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    15
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    16
  The Isabelle system environment provides the following
28916
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    17
  basic infrastructure to integrate tools smoothly.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    18
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    19
  \begin{enumerate}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    20
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    21
  \<^enum> The \emph{Isabelle settings} mechanism provides process
28916
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    22
  environment variables to all Isabelle executables (including tools
0a802cdda340 removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents: 28914
diff changeset
    23
  and user interfaces).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    24
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    25
  \<^enum> The raw \emph{Isabelle process} (@{executable_ref
56439
95e2656b3b23 renamed "isabelle-process" to "isabelle_process", with shell function to avoid dynamic path lookups;
wenzelm
parents: 54937
diff changeset
    26
  "isabelle_process"}) runs logic sessions either interactively or in
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
    27
  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
    28
  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
    29
  care about the low-level process.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    30
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    31
  \<^enum> The main \emph{Isabelle tool wrapper} (@{executable_ref
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    32
  isabelle}) provides a generic startup environment Isabelle related
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    33
  utilities, user interfaces etc.  Such tools automatically benefit
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    34
  from the settings mechanism.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    35
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    36
  \end{enumerate}
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
    37
\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    38
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    39
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
    40
section \<open>Isabelle settings \label{sec:settings}\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    41
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
    42
text \<open>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    43
  The Isabelle system heavily depends on the \emph{settings
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    44
  mechanism}\indexbold{settings}.  Essentially, this is a statically
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    45
  scoped collection of environment variables, such as @{setting
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    46
  ISABELLE_HOME}, @{setting ML_SYSTEM}, @{setting ML_HOME}.  These
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    47
  variables are \emph{not} intended to be set directly from the shell,
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    48
  though.  Isabelle employs a somewhat more sophisticated scheme of
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    49
  \emph{settings files} --- one for site-wide defaults, another for
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    50
  additional user-specific modifications.  With all configuration
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    51
  variables in clearly defined places, this scheme is more
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    52
  maintainable and user-friendly than global shell environment
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
    53
  variables.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    54
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    55
  In particular, we avoid the typical situation where prospective
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    56
  users of a software package are told to put several things into
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    57
  their shell startup scripts, before being able to actually run the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    58
  program. Isabelle requires none such administrative chores of its
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    59
  end-users --- the executables can be invoked straight away.
40800
330eb65c9469 Parse.liberal_name for document antiquotations and attributes;
wenzelm
parents: 40569
diff changeset
    60
  Occasionally, users would still want to put the @{file
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    61
  "$ISABELLE_HOME/bin"} directory into their shell's search path, but
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    62
  this is not required.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
    63
\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    64
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    65
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
    66
subsection \<open>Bootstrapping the environment \label{sec:boot}\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    67
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
    68
text \<open>Isabelle executables need to be run within a proper settings
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    69
  environment.  This is bootstrapped as described below, on the first
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    70
  invocation of one of the outer wrapper scripts (such as
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    71
  @{executable_ref isabelle}).  This happens only once for each
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    72
  process tree, i.e.\ the environment is passed to subprocesses
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
    73
  according to regular Unix conventions.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    74
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    75
  \begin{enumerate}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    76
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    77
  \<^enum> The special variable @{setting_def ISABELLE_HOME} is
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    78
  determined automatically from the location of the binary that has
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    79
  been run.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    80
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    81
  You should not try to set @{setting ISABELLE_HOME} manually. Also
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    82
  note that the Isabelle executables either have to be run from their
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    83
  original location in the distribution directory, or via the
48602
342ca8f3197b more uniform usage of "isabelle tool";
wenzelm
parents: 47823
diff changeset
    84
  executable objects created by the @{tool install} tool.  Symbolic
40800
330eb65c9469 Parse.liberal_name for document antiquotations and attributes;
wenzelm
parents: 40569
diff changeset
    85
  links are admissible, but a plain copy of the @{file
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    86
  "$ISABELLE_HOME/bin"} files will not work!
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    87
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    88
  \<^enum> The file @{file "$ISABELLE_HOME/etc/settings"} is run as a
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    89
  @{executable_ref bash} shell script with the auto-export option for
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
    90
  variables enabled.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    91
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    92
  This file holds a rather long list of shell variable assigments,
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    93
  thus providing the site-wide default settings.  The Isabelle
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    94
  distribution already contains a global settings file with sensible
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    95
  defaults for most variables.  When installing the system, only a few
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    96
  of these may have to be adapted (probably @{setting ML_SYSTEM}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    97
  etc.).
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
    98
  
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
    99
  \<^enum> The file @{file_unchecked "$ISABELLE_HOME_USER/etc/settings"} (if it
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   100
  exists) is run in the same way as the site default settings. Note
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   101
  that the variable @{setting ISABELLE_HOME_USER} has already been set
40387
e4c9e0dad473 moved ISABELLE_IDENTIFIER from ISABELLE_OUTPUT further up to ISABELLE_HOME_USER;
wenzelm
parents: 38253
diff changeset
   102
  before --- usually to something like @{verbatim
47661
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   103
  "$USER_HOME/.isabelle/IsabelleXXXX"}.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   104
  
54937
ce4bf91331e7 misc tuning and clarification;
wenzelm
parents: 54705
diff changeset
   105
  Thus individual users may override the site-wide defaults.
ce4bf91331e7 misc tuning and clarification;
wenzelm
parents: 54705
diff changeset
   106
  Typically, a user settings file contains only a few lines, with some
ce4bf91331e7 misc tuning and clarification;
wenzelm
parents: 54705
diff changeset
   107
  assignments that are actually changed.  Never copy the central
ce4bf91331e7 misc tuning and clarification;
wenzelm
parents: 54705
diff changeset
   108
  @{file "$ISABELLE_HOME/etc/settings"} file!
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   109
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   110
  \end{enumerate}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   111
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   112
  Since settings files are regular GNU @{executable_def bash} scripts,
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   113
  one may use complex shell commands, such as @{verbatim "if"} or
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   114
  @{verbatim "case"} statements to set variables depending on the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   115
  system architecture or other environment variables.  Such advanced
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   116
  features should be added only with great care, though. In
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   117
  particular, external environment references should be kept at a
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   118
  minimum.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   119
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   120
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   121
  A few variables are somewhat special:
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   122
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   123
  \begin{itemize}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   124
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   125
  \<^item> @{setting_def ISABELLE_PROCESS} and @{setting_def ISABELLE_TOOL} are set
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   126
  automatically to the absolute path names of the @{executable
56439
95e2656b3b23 renamed "isabelle-process" to "isabelle_process", with shell function to avoid dynamic path lookups;
wenzelm
parents: 54937
diff changeset
   127
  "isabelle_process"} and @{executable isabelle} executables,
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   128
  respectively.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   129
  
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   130
  \<^item> @{setting_ref ISABELLE_OUTPUT} will have the identifiers of
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   131
  the Isabelle distribution (cf.\ @{setting ISABELLE_IDENTIFIER}) and
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   132
  the ML system (cf.\ @{setting ML_IDENTIFIER}) appended automatically
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   133
  to its value.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   134
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   135
  \end{itemize}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   136
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   137
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   138
  Note that the settings environment may be inspected with
48602
342ca8f3197b more uniform usage of "isabelle tool";
wenzelm
parents: 47823
diff changeset
   139
  the @{tool getenv} tool.  This might help to figure out the effect
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   140
  of complex settings scripts.\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   141
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   142
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   143
subsection \<open>Common variables\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   144
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   145
text \<open>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   146
  This is a reference of common Isabelle settings variables. Note that
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   147
  the list is somewhat open-ended. Third-party utilities or interfaces
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   148
  may add their own selection. Variables that are special in some
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   149
  sense are marked with @{text "\<^sup>*"}.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   150
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   151
  \begin{description}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   152
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   153
  \item[@{setting_def USER_HOME}@{text "\<^sup>*"}] Is the cross-platform
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   154
  user home directory.  On Unix systems this is usually the same as
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   155
  @{setting HOME}, but on Windows it is the regular home directory of
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   156
  the user, not the one of within the Cygwin root
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   157
  file-system.\footnote{Cygwin itself offers another choice whether
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   158
  its HOME should point to the \texttt{/home} directory tree or the
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   159
  Windows user home.}
47661
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   160
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   161
  \item[@{setting_def ISABELLE_HOME}@{text "\<^sup>*"}] is the location of the
47661
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   162
  top-level Isabelle distribution directory. This is automatically
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   163
  determined from the Isabelle executable that has been invoked.  Do
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   164
  not attempt to set @{setting ISABELLE_HOME} yourself from the shell!
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   165
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   166
  \item[@{setting_def ISABELLE_HOME_USER}] is the user-specific
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   167
  counterpart of @{setting ISABELLE_HOME}. The default value is
54705
0dff3326d12a provide @{file_unchecked} in Isabelle/Pure;
wenzelm
parents: 54683
diff changeset
   168
  relative to @{file_unchecked "$USER_HOME/.isabelle"}, under rare
47661
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   169
  circumstances this may be changed in the global setting file.
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   170
  Typically, the @{setting ISABELLE_HOME_USER} directory mimics
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   171
  @{setting ISABELLE_HOME} to some extend. In particular, site-wide
012a887997f3 USER_HOME settings variable points to cross-platform user home directory;
wenzelm
parents: 45028
diff changeset
   172
  defaults may be overridden by a private @{verbatim
40387
e4c9e0dad473 moved ISABELLE_IDENTIFIER from ISABELLE_OUTPUT further up to ISABELLE_HOME_USER;
wenzelm
parents: 38253
diff changeset
   173
  "$ISABELLE_HOME_USER/etc/settings"}.
50182
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   174
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   175
  \item[@{setting_def ISABELLE_PLATFORM_FAMILY}@{text "\<^sup>*"}] is
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   176
  automatically set to the general platform family: @{verbatim linux},
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   177
  @{verbatim macos}, @{verbatim windows}.  Note that
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   178
  platform-dependent tools usually need to refer to the more specific
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   179
  identification according to @{setting ISABELLE_PLATFORM}, @{setting
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   180
  ISABELLE_PLATFORM32}, @{setting ISABELLE_PLATFORM64}.
30177ec0be36 added ISABELLE_PLATFORM_FAMILY;
wenzelm
parents: 49173
diff changeset
   181
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   182
  \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
   183
  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
   184
  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
   185
  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
   186
  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
   187
  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
   188
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   189
  \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
   190
  @{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
   191
  on a platform that supports this; the value is empty for 32 bit.
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   192
  Note that the following bash expression (including the quotes)
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   193
  prefers the 64 bit platform, if that is available:
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   194
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   195
  @{verbatim [display] \<open>"${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM}"\<close>}
36196
cbb9ee265cdd added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents: 33952
diff changeset
   196
28502
6b0e3e4e1891 replaced ISABELLE by ISABELLE_PROCESS;
wenzelm
parents: 28500
diff changeset
   197
  \item[@{setting_def ISABELLE_PROCESS}@{text "\<^sup>*"}, @{setting
28500
4b79e5d3d0aa replaced ISATOOL by ISABELLE_TOOL;
wenzelm
parents: 28285
diff changeset
   198
  ISABELLE_TOOL}@{text "\<^sup>*"}] are automatically set to the full path
56439
95e2656b3b23 renamed "isabelle-process" to "isabelle_process", with shell function to avoid dynamic path lookups;
wenzelm
parents: 54937
diff changeset
   199
  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
   200
  isabelle} executables, respectively.  Thus other tools and scripts
40800
330eb65c9469 Parse.liberal_name for document antiquotations and attributes;
wenzelm
parents: 40569
diff changeset
   201
  need not assume that the @{file "$ISABELLE_HOME/bin"} directory is
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   202
  on the current search path of the shell.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   203
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   204
  \item[@{setting_def ISABELLE_IDENTIFIER}@{text "\<^sup>*"}] refers
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   205
  to the name of this Isabelle distribution, e.g.\ ``@{verbatim
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   206
  Isabelle2012}''.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   207
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   208
  \item[@{setting_def ML_SYSTEM}, @{setting_def ML_HOME},
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   209
  @{setting_def ML_OPTIONS}, @{setting_def ML_PLATFORM}, @{setting_def
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   210
  ML_IDENTIFIER}@{text "\<^sup>*"}] specify the underlying ML system
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   211
  to be used for Isabelle.  There is only a fixed set of admissable
40800
330eb65c9469 Parse.liberal_name for document antiquotations and attributes;
wenzelm
parents: 40569
diff changeset
   212
  @{setting ML_SYSTEM} names (see the @{file
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   213
  "$ISABELLE_HOME/etc/settings"} file of the distribution).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   214
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   215
  The actual compiler binary will be run from the directory @{setting
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   216
  ML_HOME}, with @{setting ML_OPTIONS} as first arguments on the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   217
  command line.  The optional @{setting ML_PLATFORM} may specify the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   218
  binary format of ML heap images, which is useful for cross-platform
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   219
  installations.  The value of @{setting ML_IDENTIFIER} is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   220
  automatically obtained by composing the values of @{setting
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   221
  ML_SYSTEM}, @{setting ML_PLATFORM} and the Isabelle version values.
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   222
58413
22dd971f6938 renamed ISABELLE_POLYML to ML_SYSTEM_POLYML, to avoid overlap with ISABELLE_POLYML_PATH;
wenzelm
parents: 57581
diff changeset
   223
  \item[@{setting_def ML_SYSTEM_POLYML}@{text "\<^sup>*"}] is @{verbatim true}
51434
e19a22974c72 document ISABELLE_POLYML;
wenzelm
parents: 51057
diff changeset
   224
  for @{setting ML_SYSTEM} values derived from Poly/ML, as opposed to
e19a22974c72 document ISABELLE_POLYML;
wenzelm
parents: 51057
diff changeset
   225
  SML/NJ where it is empty.  This is particularly useful with the
e19a22974c72 document ISABELLE_POLYML;
wenzelm
parents: 51057
diff changeset
   226
  build option @{system_option condition}
e19a22974c72 document ISABELLE_POLYML;
wenzelm
parents: 51057
diff changeset
   227
  (\secref{sec:system-options}) to restrict big sessions to something
e19a22974c72 document ISABELLE_POLYML;
wenzelm
parents: 51057
diff changeset
   228
  that SML/NJ can still handle.
e19a22974c72 document ISABELLE_POLYML;
wenzelm
parents: 51057
diff changeset
   229
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   230
  \item[@{setting_def ISABELLE_JDK_HOME}] needs to point to a full JDK
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   231
  (Java Development Kit) installation with @{verbatim javac} and
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   232
  @{verbatim jar} executables.  This is essential for Isabelle/Scala
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   233
  and other JVM-based tools to work properly.  Note that conventional
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   234
  @{verbatim JAVA_HOME} usually points to the JRE (Java Runtime
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   235
  Environment), not JDK.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   236
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   237
  \item[@{setting_def ISABELLE_PATH}] is a list of directories
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   238
  (separated by colons) where Isabelle logic images may reside.  When
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   239
  looking up heaps files, the value of @{setting ML_IDENTIFIER} is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   240
  appended to each component internally.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   241
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   242
  \item[@{setting_def ISABELLE_OUTPUT}@{text "\<^sup>*"}] is a
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   243
  directory where output heap files should be stored by default. The
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   244
  ML system and Isabelle version identifier is appended here, too.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   245
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   246
  \item[@{setting_def ISABELLE_BROWSER_INFO}] is the directory where
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   247
  theory browser information (HTML text, graph data, and printable
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   248
  documents) is stored (see also \secref{sec:info}).  The default
54705
0dff3326d12a provide @{file_unchecked} in Isabelle/Pure;
wenzelm
parents: 54683
diff changeset
   249
  value is @{file_unchecked "$ISABELLE_HOME_USER/browser_info"}.
28215
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 ISABELLE_LOGIC}] specifies the default logic to
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   252
  load if none is given explicitely by the user.  The default value is
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   253
  @{verbatim HOL}.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   254
  
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 56604
diff changeset
   255
  \item[@{setting_def ISABELLE_LINE_EDITOR}] specifies the
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 56604
diff changeset
   256
  line editor for the @{tool_ref console} interface.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   257
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   258
  \item[@{setting_def ISABELLE_LATEX}, @{setting_def
52746
eec610972763 discontinued historic document formats;
wenzelm
parents: 52743
diff changeset
   259
  ISABELLE_PDFLATEX}, @{setting_def ISABELLE_BIBTEX}] refer to {\LaTeX}
eec610972763 discontinued historic document formats;
wenzelm
parents: 52743
diff changeset
   260
  related tools for Isabelle document preparation (see also
eec610972763 discontinued historic document formats;
wenzelm
parents: 52743
diff changeset
   261
  \secref{sec:tool-latex}).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   262
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   263
  \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
   264
  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
   265
  utility programs (see also \secref{sec:isabelle-tool}).
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   266
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   267
  \item[@{setting_def ISABELLE_DOCS}] is a colon separated list of
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   268
  directories with documentation files.
50197
b385d134926d eval PDF_VIEWER/DVI_VIEWER command line, which allows additional quotes for program name, for example;
wenzelm
parents: 50182
diff changeset
   269
54683
cf48ddc266e5 clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents: 52746
diff changeset
   270
  \item[@{setting_def PDF_VIEWER}] specifies the program to be used
cf48ddc266e5 clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents: 52746
diff changeset
   271
  for displaying @{verbatim pdf} files.
cf48ddc266e5 clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents: 52746
diff changeset
   272
cf48ddc266e5 clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents: 52746
diff changeset
   273
  \item[@{setting_def DVI_VIEWER}] specifies the program to be used
cf48ddc266e5 clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents: 52746
diff changeset
   274
  for displaying @{verbatim dvi} files.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   275
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   276
  \item[@{setting_def ISABELLE_TMP_PREFIX}@{text "\<^sup>*"}] is the
56439
95e2656b3b23 renamed "isabelle-process" to "isabelle_process", with shell function to avoid dynamic path lookups;
wenzelm
parents: 54937
diff changeset
   277
  prefix from which any running @{executable "isabelle_process"}
58639
1df53737c59b prefer Unix standard-conformant $TMPDIR over hard-wired /tmp;
wenzelm
parents: 58618
diff changeset
   278
  derives an individual directory for temporary files.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   279
  
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   280
  \end{description}
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   281
\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   282
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   283
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   284
subsection \<open>Additional components \label{sec:components}\<close>
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   285
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   286
text \<open>Any directory may be registered as an explicit \emph{Isabelle
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   287
  component}.  The general layout conventions are that of the main
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   288
  Isabelle distribution itself, and the following two files (both
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   289
  optional) have a special meaning:
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   290
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   291
  \begin{itemize}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   292
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   293
  \<^item> @{verbatim "etc/settings"} holds additional settings that are
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   294
  initialized when bootstrapping the overall Isabelle environment,
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   295
  cf.\ \secref{sec:boot}.  As usual, the content is interpreted as a
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   296
  @{verbatim bash} script.  It may refer to the component's enclosing
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   297
  directory via the @{verbatim "COMPONENT"} shell variable.
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   298
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   299
  For example, the following setting allows to refer to files within
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   300
  the component later on, without having to hardwire absolute paths:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   301
  @{verbatim [display] \<open>MY_COMPONENT_HOME="$COMPONENT"\<close>}
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   302
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   303
  Components can also add to existing Isabelle settings such as
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   304
  @{setting_def ISABELLE_TOOLS}, in order to provide
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   305
  component-specific tools that can be invoked by end-users.  For
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   306
  example:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   307
  @{verbatim [display] \<open>ISABELLE_TOOLS="$ISABELLE_TOOLS:$COMPONENT/lib/Tools"\<close>}
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   308
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   309
  \<^item> @{verbatim "etc/components"} holds a list of further
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   310
  sub-components of the same structure.  The directory specifications
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   311
  given here can be either absolute (with leading @{verbatim "/"}) or
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   312
  relative to the component's main directory.
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   313
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   314
  \end{itemize}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   315
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   316
  The root of component initialization is @{setting ISABELLE_HOME}
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   317
  itself.  After initializing all of its sub-components recursively,
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   318
  @{setting ISABELLE_HOME_USER} is included in the same manner (if
40569
ffcff7509a49 more explicit explanation of init_component shell function;
wenzelm
parents: 40387
diff changeset
   319
  that directory exists).  This allows to install private components
54705
0dff3326d12a provide @{file_unchecked} in Isabelle/Pure;
wenzelm
parents: 54683
diff changeset
   320
  via @{file_unchecked "$ISABELLE_HOME_USER/etc/components"}, although it is
40569
ffcff7509a49 more explicit explanation of init_component shell function;
wenzelm
parents: 40387
diff changeset
   321
  often more convenient to do that programmatically via the
58723
33be43d70147 more antiquotations;
wenzelm
parents: 58639
diff changeset
   322
  @{verbatim init_component} shell function in the @{verbatim "etc/settings"}
33be43d70147 more antiquotations;
wenzelm
parents: 58639
diff changeset
   323
  script of @{verbatim "$ISABELLE_HOME_USER"} (or any other component
40569
ffcff7509a49 more explicit explanation of init_component shell function;
wenzelm
parents: 40387
diff changeset
   324
  directory).  For example:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   325
  @{verbatim [display] \<open>init_component "$HOME/screwdriver-2.0"\<close>}
48838
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   326
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   327
  This is tolerant wrt.\ missing component directories, but might
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   328
  produce a warning.
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   329
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   330
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   331
  More complex situations may be addressed by initializing
48838
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   332
  components listed in a given catalog file, relatively to some base
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   333
  directory:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   334
  @{verbatim [display] \<open>init_components "$HOME/my_component_store" "some_catalog_file"\<close>}
48838
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   335
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   336
  The component directories listed in the catalog file are treated as
623ba165d059 direct support for component forests via init_components;
wenzelm
parents: 48813
diff changeset
   337
  relative to the given base directory.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48838
diff changeset
   338
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48838
diff changeset
   339
  See also \secref{sec:tool-components} for some tool-support for
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48838
diff changeset
   340
  resolving components that are formally initialized but not installed
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48838
diff changeset
   341
  yet.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   342
\<close>
32323
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   343
8185d3bfcbf1 tuned "Bootstrapping the environment";
wenzelm
parents: 32088
diff changeset
   344
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   345
section \<open>The raw Isabelle process \label{sec:isabelle-process}\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   346
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   347
text \<open>
56439
95e2656b3b23 renamed "isabelle-process" to "isabelle_process", with shell function to avoid dynamic path lookups;
wenzelm
parents: 54937
diff changeset
   348
  The @{executable_def "isabelle_process"} executable runs bare-bones
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28502
diff changeset
   349
  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
   350
  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
   351
  the actual heap file locations.  Its usage is:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   352
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   353
\<open>Usage: isabelle_process [OPTIONS] [INPUT] [OUTPUT]
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   354
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   355
  Options are:
57581
74bbe9317aa4 provide explicit options file -- avoid multiple Scala/JVM invocation;
wenzelm
parents: 57439
diff changeset
   356
    -O           system options from given YXML file
59350
acba5d6fdb2f discontinued fifo channel, always use portable socket;
wenzelm
parents: 58846
diff changeset
   357
    -P SOCKET    startup process wrapper via TCP socket
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   358
    -S           secure mode -- disallow critical operations
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   359
    -e MLTEXT    pass MLTEXT to the ML session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   360
    -m MODE      add print mode for output
52056
fc458f304f93 added isabelle-process option -o;
wenzelm
parents: 52054
diff changeset
   361
    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   362
    -q           non-interactive session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   363
    -r           open heap file read-only
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   364
    -w           reset write permissions on OUTPUT
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   365
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   366
  INPUT (default "$ISABELLE_LOGIC") and OUTPUT specify in/out heaps.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   367
  These are either names to be searched in the Isabelle path, or
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   368
  actual file names (containing at least one /).
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   369
  If INPUT is "RAW_ML_SYSTEM", just start the bare bones ML system.\<close>}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   370
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   371
  Input files without path specifications are looked up in the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   372
  @{setting ISABELLE_PATH} setting, which may consist of multiple
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   373
  components separated by colons --- these are tried in the given
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   374
  order with the value of @{setting ML_IDENTIFIER} appended
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   375
  internally.  In a similar way, base names are relative to the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   376
  directory specified by @{setting ISABELLE_OUTPUT}.  In any case,
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   377
  actual file locations may also be given by including at least one
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   378
  slash (@{verbatim "/"}) in the name (hint: use @{verbatim "./"} to
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   379
  refer to the current directory).
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   380
\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   381
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   382
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   383
subsubsection \<open>Options\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   384
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   385
text \<open>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   386
  If the input heap file does not have write permission bits set, or
57581
74bbe9317aa4 provide explicit options file -- avoid multiple Scala/JVM invocation;
wenzelm
parents: 57439
diff changeset
   387
  the @{verbatim "-r"} option is given explicitly, then the session
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   388
  started will be read-only.  That is, the ML world cannot be
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   389
  committed back into the image file.  Otherwise, a writable session
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   390
  enables commits into either the input file, or into another output
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   391
  heap file (if that is given as the second argument on the command
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   392
  line).
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   393
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   394
  The read-write state of sessions is determined at startup only, it
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   395
  cannot be changed intermediately. Also note that heap images may
59904
wenzelm
parents: 59350
diff changeset
   396
  require considerable amounts of disk space (hundreds of MB or some GB).
wenzelm
parents: 59350
diff changeset
   397
  Users are responsible for themselves to dispose their heap files
wenzelm
parents: 59350
diff changeset
   398
  when they are no longer needed.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   399
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   400
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   401
  The @{verbatim "-w"} option makes the output heap file
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   402
  read-only after terminating.  Thus subsequent invocations cause the
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   403
  logic image to be read-only automatically.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   404
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   405
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   406
  Using the @{verbatim "-e"} option, arbitrary ML code may be
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   407
  passed to the Isabelle session from the command line. Multiple
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   408
  @{verbatim "-e"}'s are evaluated in the given order. Strange things
56604
1b153b989860 tuned spelling;
wenzelm
parents: 56439
diff changeset
   409
  may happen when erroneous ML code is provided. Also make sure that
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   410
  the ML commands are terminated properly by semicolon.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   411
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   412
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   413
  The @{verbatim "-m"} option adds identifiers of print modes
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   414
  to be made active for this session. Typically, this is used by some
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   415
  user interface, e.g.\ to enable output of proper mathematical
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   416
  symbols.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   417
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   418
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   419
  Isabelle normally enters an interactive top-level loop
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   420
  (after processing the @{verbatim "-e"} texts). The @{verbatim "-q"}
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   421
  option inhibits interaction, thus providing a pure batch mode
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   422
  facility.
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   423
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   424
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   425
  Option @{verbatim "-o"} allows to override Isabelle system
52056
fc458f304f93 added isabelle-process option -o;
wenzelm
parents: 52054
diff changeset
   426
  options for this process, see also \secref{sec:system-options}.
57581
74bbe9317aa4 provide explicit options file -- avoid multiple Scala/JVM invocation;
wenzelm
parents: 57439
diff changeset
   427
  Alternatively, option @{verbatim "-O"} specifies the full environment of
74bbe9317aa4 provide explicit options file -- avoid multiple Scala/JVM invocation;
wenzelm
parents: 57439
diff changeset
   428
  system options as a file in YXML format (according to the Isabelle/Scala
74bbe9317aa4 provide explicit options file -- avoid multiple Scala/JVM invocation;
wenzelm
parents: 57439
diff changeset
   429
  function @{verbatim isabelle.Options.encode}).
52056
fc458f304f93 added isabelle-process option -o;
wenzelm
parents: 52054
diff changeset
   430
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   431
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   432
  The @{verbatim "-P"} option starts the Isabelle process wrapper
59350
acba5d6fdb2f discontinued fifo channel, always use portable socket;
wenzelm
parents: 58846
diff changeset
   433
  for Isabelle/Scala, with a private protocol running over the specified TCP
acba5d6fdb2f discontinued fifo channel, always use portable socket;
wenzelm
parents: 58846
diff changeset
   434
  socket. Isabelle/ML and Isabelle/Scala provide various programming
acba5d6fdb2f discontinued fifo channel, always use portable socket;
wenzelm
parents: 58846
diff changeset
   435
  interfaces to invoke protocol functions over untyped strings and XML
acba5d6fdb2f discontinued fifo channel, always use portable socket;
wenzelm
parents: 58846
diff changeset
   436
  trees.
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   437
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   438
  \<^medskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   439
  The @{verbatim "-S"} option makes the Isabelle process more
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   440
  secure by disabling some critical operations, notably runtime
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   441
  compilation and evaluation of ML source code.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   442
\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   443
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   444
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   445
subsubsection \<open>Examples\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   446
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   447
text \<open>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   448
  Run an interactive session of the default object-logic (as specified
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   449
  by the @{setting ISABELLE_LOGIC} setting) like this:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   450
  @{verbatim [display] \<open>isabelle_process\<close>}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   451
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   452
  Usually @{setting ISABELLE_LOGIC} refers to one of the standard
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   453
  logic images, which are read-only by default.  A writable session
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   454
  --- based on @{verbatim HOL}, but output to @{verbatim Test} (in the
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   455
  directory specified by the @{setting ISABELLE_OUTPUT} setting) ---
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   456
  may be invoked as follows:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   457
  @{verbatim [display] \<open>isabelle_process HOL Test\<close>}
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   458
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   459
  Ending this session normally (e.g.\ by typing control-D) dumps the
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   460
  whole ML system state into @{verbatim Test} (be prepared for more
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   461
  than 100\,MB):
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   462
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   463
  The @{verbatim Test} session may be continued later (still in
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   464
  writable state) by: @{verbatim [display] \<open>isabelle_process Test\<close>}
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   465
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   466
  A read-only @{verbatim Test} session may be started by:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   467
  @{verbatim [display] \<open>isabelle_process -r Test\<close>}
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   468
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   469
  \<^bigskip>
eb2463fc4d7b more symbols;
wenzelm
parents: 59904
diff changeset
   470
  The next example demonstrates batch execution of Isabelle.
47823
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   471
  We retrieve the @{verbatim Main} theory value from the theory loader
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   472
  within ML (observe the delicate quoting rules for the Bash shell
4fad76e6f4ba some manual updates;
wenzelm
parents: 47661
diff changeset
   473
  vs.\ ML):
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   474
  @{verbatim [display] \<open>isabelle_process -e 'Thy_Info.get_theory "Main";' -q -r HOL\<close>}
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   475
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   476
  Note that the output text will be interspersed with additional junk
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   477
  messages by the ML runtime environment.  The @{verbatim "-W"} option
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   478
  allows to communicate with the Isabelle process via an external
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   479
  program in a more robust fashion.
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   480
\<close>
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   481
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   482
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   483
section \<open>The Isabelle tool wrapper \label{sec:isabelle-tool}\<close>
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   484
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   485
text \<open>
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   486
  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
   487
  wrapper --- @{executable isabelle}:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   488
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   489
\<open>Usage: isabelle TOOL [ARGS ...]
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   490
28506
3ab515ee4e6f tuned isabelle usage;
wenzelm
parents: 28504
diff changeset
   491
  Start Isabelle tool NAME with ARGS; pass "-?" for tool specific help.
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   492
48858
86816c61b5ca tuned message;
wenzelm
parents: 48844
diff changeset
   493
Available tools:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   494
  ...\<close>}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   495
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   496
  In principle, Isabelle tools are ordinary executable scripts that
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   497
  are run within the Isabelle settings environment, see
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   498
  \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
   499
  @{executable isabelle} from the directories listed in the @{setting
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   500
  ISABELLE_TOOLS} setting.  Do not try to call the scripts directly
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   501
  from the shell.  Neither should you add the tool directories to your
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   502
  shell's search path!
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   503
\<close>
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   504
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   505
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   506
subsubsection \<open>Examples\<close>
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   507
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   508
text \<open>Show the list of available documentation of the Isabelle
48813
wenzelm
parents: 48602
diff changeset
   509
  distribution:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   510
  @{verbatim [display] \<open>isabelle doc\<close>}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   511
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   512
  View a certain document as follows:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   513
  @{verbatim [display] \<open>isabelle doc system\<close>}
28238
398bf960d3d4 misc tuning and modernization;
wenzelm
parents: 28223
diff changeset
   514
48813
wenzelm
parents: 48602
diff changeset
   515
  Query the Isabelle settings environment:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   516
  @{verbatim [display] \<open>isabelle getenv ISABELLE_HOME_USER\<close>}
58618
782f0b662cae more cartouches;
wenzelm
parents: 58553
diff changeset
   517
\<close>
28215
a1cfc43ac47d converted basics.tex to theory file;
wenzelm
parents:
diff changeset
   518
28223
wenzelm
parents: 28215
diff changeset
   519
end