src/Doc/System/Misc.thy
author wenzelm
Tue, 13 Sep 2022 10:44:47 +0200
changeset 76135 a144603170b4
parent 76131 8b695e59db3f
child 76136 1bb677cceea4
permissions -rw-r--r--
clarified command-line;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
61656
cfabbc083977 more uniform jEdit properties;
wenzelm
parents: 61575
diff changeset
     1
(*:maxLineLen=78:*)
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
     2
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     3
theory Misc
43564
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 41512
diff changeset
     4
imports Base
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     5
begin
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     6
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
     7
chapter \<open>Miscellaneous tools \label{ch:tools}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     8
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
     9
text \<open>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    10
  Subsequently we describe various Isabelle related utilities, given in
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    11
  alphabetical order.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    12
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
    13
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    14
section \<open>Building Isabelle docker images\<close>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    15
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    16
text \<open>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    17
  Docker\<^footnote>\<open>\<^url>\<open>https://docs.docker.com\<close>\<close> provides a self-contained environment
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    18
  for complex applications called \<^emph>\<open>container\<close>, although it does not fully
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    19
  contain the program in a strict sense of the word. This includes basic
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    20
  operating system services (usually based on Linux), shared libraries and
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    21
  other required packages. Thus Docker is a light-weight alternative to
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    22
  regular virtual machines, or a heavy-weight alternative to conventional
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    23
  self-contained applications.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    24
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    25
  Although Isabelle can be easily run on a variety of OS environments without
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    26
  extra containment, Docker images may occasionally be useful when a
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    27
  standardized Linux environment is required, even on
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    28
  Windows\<^footnote>\<open>\<^url>\<open>https://docs.docker.com/docker-for-windows\<close>\<close> and
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    29
  macOS\<^footnote>\<open>\<^url>\<open>https://docs.docker.com/docker-for-mac\<close>\<close>. Further uses are in
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    30
  common cloud computing environments, where applications need to be submitted
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    31
  as Docker images in the first place.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    32
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    33
  \<^medskip>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    34
  The @{tool_def build_docker} tool builds docker images from a standard
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    35
  Isabelle application archive for Linux:
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    36
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    37
  @{verbatim [display]
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    38
\<open>Usage: isabelle build_docker [OPTIONS] APP_ARCHIVE
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    39
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    40
  Options are:
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    41
    -B NAME      base image (default "ubuntu")
72525
8eb0b663fa20 tuned message;
wenzelm
parents: 72316
diff changeset
    42
    -E           set Isabelle/bin/isabelle as entrypoint
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    43
    -P NAME      additional Ubuntu package collection ("X11", "latex")
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    44
    -l NAME      default logic (default ISABELLE_LOGIC="HOL")
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    45
    -n           no docker build
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    46
    -o FILE      output generated Dockerfile
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    47
    -p NAME      additional Ubuntu package
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    48
    -t TAG       docker build tag
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    49
    -v           verbose
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    50
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    51
  Build Isabelle docker image with default logic image, using a standard
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    52
  Isabelle application archive for Linux (local file or remote URL).\<close>}
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    53
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    54
  Option \<^verbatim>\<open>-E\<close> sets \<^verbatim>\<open>bin/isabelle\<close> of the contained Isabelle distribution as
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    55
  the standard entry point of the Docker image. Thus \<^verbatim>\<open>docker run\<close> will
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    56
  imitate the \<^verbatim>\<open>isabelle\<close> command-line tool (\secref{sec:isabelle-tool}) of a
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    57
  regular local installation, but it lacks proper GUI support: \<^verbatim>\<open>isabelle jedit\<close>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    58
  will not work without further provisions. Note that the default entrypoint
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    59
  may be changed later via \<^verbatim>\<open>docker run --entrypoint="..."\<close>.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    60
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    61
  Option \<^verbatim>\<open>-t\<close> specifies the Docker image tag: this a symbolic name within the
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    62
  local Docker name space, but also relevant for Docker
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    63
  Hub\<^footnote>\<open>\<^url>\<open>https://hub.docker.com\<close>\<close>.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    64
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    65
  Option \<^verbatim>\<open>-l\<close> specifies the default logic image of the Isabelle distribution
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    66
  contained in the Docker environment: it will be produced by \<^verbatim>\<open>isabelle build -b\<close>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    67
  as usual (\secref{sec:tool-build}) and stored within the image.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    68
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    69
  \<^medskip>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    70
  Option \<^verbatim>\<open>-B\<close> specifies the Docker image taken as starting point for the
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    71
  Isabelle installation: it needs to be a suitable version of Ubuntu Linux.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    72
  The default \<^verbatim>\<open>ubuntu\<close> refers to the latest LTS version provided by Canonical
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    73
  as the official Ubuntu vendor\<^footnote>\<open>\<^url>\<open>https://hub.docker.com/_/ubuntu\<close>\<close>. For
76105
7ce11c135dad update to Isabelle2022 and Ubuntu 22.04;
wenzelm
parents: 75559
diff changeset
    74
  Isabelle2022 this is normally Ubuntu 22.04 LTS.
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    75
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    76
  Option \<^verbatim>\<open>-p\<close> includes additional Ubuntu packages, using the terminology
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    77
  of \<^verbatim>\<open>apt-get install\<close> within the underlying Linux distribution.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    78
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    79
  Option \<^verbatim>\<open>-P\<close> refers to high-level package collections: \<^verbatim>\<open>X11\<close> or \<^verbatim>\<open>latex\<close> as
73534
e7fb17bca374 discontinue old Ubuntu 18.04 LTS, e.g. it cannot build documentation "prog-prove";
wenzelm
parents: 73484
diff changeset
    80
  provided by \<^verbatim>\<open>isabelle build_docker\<close> (assuming Ubuntu 20.04 LTS). This
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    81
  imposes extra weight on the resulting Docker images. Note that \<^verbatim>\<open>X11\<close> will
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    82
  only provide remote X11 support according to the modest GUI quality
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    83
  standards of the late 1990-ies.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    84
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    85
  \<^medskip>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    86
  Option \<^verbatim>\<open>-n\<close> suppresses the actual \<^verbatim>\<open>docker build\<close> process. Option \<^verbatim>\<open>-o\<close>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    87
  outputs the generated \<^verbatim>\<open>Dockerfile\<close>. Both options together produce a
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    88
  Dockerfile only, which might be useful for informative purposes or other
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    89
  tools.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    90
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    91
  Option \<^verbatim>\<open>-v\<close> disables quiet-mode of the underlying \<^verbatim>\<open>docker build\<close> process.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    92
\<close>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    93
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    94
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    95
subsubsection \<open>Examples\<close>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    96
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    97
text \<open>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    98
  Produce a Dockerfile (without image) from a remote Isabelle distribution:
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
    99
  @{verbatim [display]
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   100
\<open>  isabelle build_docker -E -n -o Dockerfile
76105
7ce11c135dad update to Isabelle2022 and Ubuntu 22.04;
wenzelm
parents: 75559
diff changeset
   101
    https://isabelle.in.tum.de/website-Isabelle2022/dist/Isabelle2022_linux.tar.gz\<close>}
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   102
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   103
  Build a standard Isabelle Docker image from a local Isabelle distribution,
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   104
  with \<^verbatim>\<open>bin/isabelle\<close> as executable entry point:
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   105
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   106
  @{verbatim [display]
76105
7ce11c135dad update to Isabelle2022 and Ubuntu 22.04;
wenzelm
parents: 75559
diff changeset
   107
\<open>  isabelle build_docker -E -t test/isabelle:Isabelle2022 Isabelle2022_linux.tar.gz\<close>}
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   108
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   109
  Invoke the raw Isabelle/ML process within that image:
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   110
  @{verbatim [display]
76105
7ce11c135dad update to Isabelle2022 and Ubuntu 22.04;
wenzelm
parents: 75559
diff changeset
   111
\<open>  docker run test/isabelle:Isabelle2022 process -e "Session.welcome ()"\<close>}
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   112
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   113
  Invoke a Linux command-line tool within the contained Isabelle system
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   114
  environment:
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   115
  @{verbatim [display]
76105
7ce11c135dad update to Isabelle2022 and Ubuntu 22.04;
wenzelm
parents: 75559
diff changeset
   116
\<open>  docker run test/isabelle:Isabelle2022 env uname -a\<close>}
71579
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   117
  The latter should always report a Linux operating system, even when running
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   118
  on Windows or macOS.
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   119
\<close>
9b49538845cc documentation for "isabelle build_docker";
wenzelm
parents: 71578
diff changeset
   120
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   121
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   122
section \<open>Managing Isabelle components \label{sec:tool-components}\<close>
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   123
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   124
text \<open>
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   125
  The @{tool_def components} tool manages Isabelle components:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   126
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   127
\<open>Usage: isabelle components [OPTIONS] [COMPONENTS ...]
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   128
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   129
  Options are:
50653
5c85f8b80b95 simplified quick start via "isabelle components -I";
wenzelm
parents: 50132
diff changeset
   130
    -I           init user settings
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   131
    -R URL       component repository (default $ISABELLE_COMPONENT_REPOSITORY)
53435
wenzelm
parents: 52550
diff changeset
   132
    -a           resolve all missing components
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   133
    -l           list status
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   134
    -u DIR       update $ISABELLE_HOME_USER/components: add directory
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   135
    -x DIR       update $ISABELLE_HOME_USER/components: remove directory
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   136
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   137
  Resolve Isabelle components via download and installation: given COMPONENTS
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   138
  are identified via base name. Further operations manage etc/settings and
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   139
  etc/components in $ISABELLE_HOME_USER.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   140
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   141
  ISABELLE_COMPONENT_REPOSITORY="..."
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   142
  ISABELLE_HOME_USER="..."
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   143
\<close>}
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   144
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   145
  Components are initialized as described in \secref{sec:components} in a
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   146
  permissive manner, which can mark components as ``missing''. This state is
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   147
  amended by letting @{tool "components"} download and unpack components that
63680
6e1e8b5abbfa more symbols;
wenzelm
parents: 62588
diff changeset
   148
  are published on the default component repository
68224
1f7308050349 prefer HTTPS;
wenzelm
parents: 68219
diff changeset
   149
  \<^url>\<open>https://isabelle.in.tum.de/components\<close> in particular.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   150
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   151
  Option \<^verbatim>\<open>-R\<close> specifies an alternative component repository. Note that
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   152
  \<^verbatim>\<open>file:///\<close> URLs can be used for local directories.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   153
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   154
  Option \<^verbatim>\<open>-a\<close> selects all missing components to be resolved. Explicit
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   155
  components may be named as command line-arguments as well. Note that
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   156
  components are uniquely identified by their base name, while the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   157
  installation takes place in the location that was specified in the attempt
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   158
  to initialize the component before.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   159
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   160
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   161
  Option \<^verbatim>\<open>-l\<close> lists the current state of available and missing components
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   162
  with their location (full name) within the file-system.
50653
5c85f8b80b95 simplified quick start via "isabelle components -I";
wenzelm
parents: 50132
diff changeset
   163
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   164
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   165
  Option \<^verbatim>\<open>-I\<close> initializes the user settings file to subscribe to the standard
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   166
  components specified in the Isabelle repository clone --- this does not make
73484
4f8849357ba7 more robust: idempotent;
wenzelm
parents: 73481
diff changeset
   167
  any sense for regular Isabelle releases. An existing file that does not
4f8849357ba7 more robust: idempotent;
wenzelm
parents: 73481
diff changeset
   168
  contain a suitable line ``\<^verbatim>\<open>init_components\<close>\<open>\<dots>\<close>\<^verbatim>\<open>components/main\<close>'' needs
4f8849357ba7 more robust: idempotent;
wenzelm
parents: 73481
diff changeset
   169
  to be edited according to the printed explanation.
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   170
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   171
  \<^medskip>
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   172
  Options \<^verbatim>\<open>-u\<close> and \<^verbatim>\<open>-x\<close> operate on user components listed in
75161
95612f330c93 misc tuning based on comments by Heiko Eißfeldt;
wenzelm
parents: 75116
diff changeset
   173
  \<^path>\<open>$ISABELLE_HOME_USER/etc/components\<close>: this avoids manual editing of
73172
fc828f64da5b support isabelle components -u and -x;
wenzelm
parents: 73150
diff changeset
   174
  Isabelle configuration files.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   175
\<close>
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   176
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   177
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   178
section \<open>Viewing documentation \label{sec:tool-doc}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   179
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   180
text \<open>
52444
2cfe6656d6d6 slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents: 52052
diff changeset
   181
  The @{tool_def doc} tool displays Isabelle documentation:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   182
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   183
\<open>Usage: isabelle doc [DOC ...]
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   184
75116
001b74439ad4 tuned message;
wenzelm
parents: 74427
diff changeset
   185
  View Isabelle PDF documentation.\<close>}
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   186
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   187
  If called without arguments, it lists all available documents. Each line
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   188
  starts with an identifier, followed by a short description. Any of these
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   189
  identifiers may be specified as arguments, in order to display the
72309
564012e31db1 discontinued obsolete DVI document format and related settings/tools;
wenzelm
parents: 71579
diff changeset
   190
  corresponding document.
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   191
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   192
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   193
  The @{setting ISABELLE_DOCS} setting specifies the list of directories
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   194
  (separated by colons) to be scanned for documentations.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   195
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   196
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   197
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   198
section \<open>Shell commands within the settings environment \label{sec:tool-env}\<close>
47828
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   199
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   200
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   201
  The @{tool_def env} tool is a direct wrapper for the standard
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   202
  \<^verbatim>\<open>/usr/bin/env\<close> command on POSIX systems, running within the Isabelle
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   203
  settings environment (\secref{sec:settings}).
47828
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   204
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   205
  The command-line arguments are that of the underlying version of \<^verbatim>\<open>env\<close>. For
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   206
  example, the following invokes an instance of the GNU Bash shell within the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   207
  Isabelle environment:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   208
  @{verbatim [display] \<open>isabelle env bash\<close>}
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   209
\<close>
47828
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   210
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   211
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   212
section \<open>Inspecting the settings environment \label{sec:tool-getenv}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   213
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   214
text \<open>The Isabelle settings environment --- as provided by the
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   215
  site-default and user-specific settings files --- can be inspected
48602
342ca8f3197b more uniform usage of "isabelle tool";
wenzelm
parents: 48577
diff changeset
   216
  with the @{tool_def getenv} tool:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   217
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   218
\<open>Usage: isabelle getenv [OPTIONS] [VARNAMES ...]
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   219
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   220
  Options are:
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   221
    -a           display complete environment
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   222
    -b           print values only (doesn't work for -a)
73581
cd84e58aed26 eliminated perl: prefer elementary GNU printenv;
wenzelm
parents: 73534
diff changeset
   223
    -d FILE      dump complete environment to file (NUL terminated entries)
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   224
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   225
  Get value of VARNAMES from the Isabelle settings.\<close>}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   226
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   227
  With the \<^verbatim>\<open>-a\<close> option, one may inspect the full process environment that
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   228
  Isabelle related programs are run in. This usually contains much more
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   229
  variables than are actually Isabelle settings. Normally, output is a list of
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   230
  lines of the form \<open>name\<close>\<^verbatim>\<open>=\<close>\<open>value\<close>. The \<^verbatim>\<open>-b\<close> option causes only the values
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   231
  to be printed.
31497
5333aa739082 isabelle getenv: option -d;
wenzelm
parents: 28916
diff changeset
   232
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   233
  Option \<^verbatim>\<open>-d\<close> produces a dump of the complete environment to the specified
73581
cd84e58aed26 eliminated perl: prefer elementary GNU printenv;
wenzelm
parents: 73534
diff changeset
   234
  file. Entries are terminated by the ASCII NUL character, i.e.\ the string
cd84e58aed26 eliminated perl: prefer elementary GNU printenv;
wenzelm
parents: 73534
diff changeset
   235
  terminator in C. Thus the Isabelle/Scala operation
cd84e58aed26 eliminated perl: prefer elementary GNU printenv;
wenzelm
parents: 73534
diff changeset
   236
  \<^scala_method>\<open>isabelle.Isabelle_System.init\<close> can import the settings
cd84e58aed26 eliminated perl: prefer elementary GNU printenv;
wenzelm
parents: 73534
diff changeset
   237
  environment robustly, and provide its own
cd84e58aed26 eliminated perl: prefer elementary GNU printenv;
wenzelm
parents: 73534
diff changeset
   238
  \<^scala_method>\<open>isabelle.Isabelle_System.getenv\<close> function.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   239
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   240
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   241
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   242
subsubsection \<open>Examples\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   243
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   244
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   245
  Get the location of @{setting ISABELLE_HOME_USER} where user-specific
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   246
  information is stored:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   247
  @{verbatim [display] \<open>isabelle getenv ISABELLE_HOME_USER\<close>}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   248
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   249
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   250
  Get the value only of the same settings variable, which is particularly
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   251
  useful in shell scripts:
68219
c0341c0080e2 clarified store directories;
wenzelm
parents: 67399
diff changeset
   252
  @{verbatim [display] \<open>isabelle getenv -b ISABELLE_HOME_USER\<close>}
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   253
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   254
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   255
71322
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   256
section \<open>Mercurial repository setup \label{sec:hg-setup}\<close>
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   257
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   258
text \<open>
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   259
  The @{tool_def hg_setup} tool simplifies the setup of Mercurial
71325
wenzelm
parents: 71324
diff changeset
   260
  repositories, with hosting via Phabricator (\chref{ch:phabricator}) or SSH
wenzelm
parents: 71324
diff changeset
   261
  file server access.
71322
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   262
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   263
  @{verbatim [display]
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   264
\<open>Usage: isabelle hg_setup [OPTIONS] REMOTE LOCAL_DIR
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   265
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   266
  Options are:
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   267
    -n NAME      remote repository name (default: base name of LOCAL_DIR)
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   268
    -p PATH      Mercurial path name (default: "default")
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   269
    -r           assume that remote repository already exists
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   270
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   271
  Setup a remote vs. local Mercurial repository: REMOTE either refers to a
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   272
  Phabricator server "user@host" or SSH file server "ssh://user@host/path".\<close>}
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   273
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   274
  The \<^verbatim>\<open>REMOTE\<close> repository specification \<^emph>\<open>excludes\<close> the actual repository
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   275
  name: that is given by the base name of \<^verbatim>\<open>LOCAL_DIR\<close>, or via option \<^verbatim>\<open>-n\<close>.
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   276
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   277
  By default, both sides of the repository are created on demand by default.
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   278
  In contrast, option \<^verbatim>\<open>-r\<close> assumes that the remote repository already exists:
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   279
  it avoids accidental creation of a persistent repository with unintended
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   280
  name.
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   281
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   282
  The local \<^verbatim>\<open>.hg/hgrc\<close> file is changed to refer to the remote repository,
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   283
  usually via the symbolic path name ``\<^verbatim>\<open>default\<close>''; option \<^verbatim>\<open>-p\<close> allows to
75161
95612f330c93 misc tuning based on comments by Heiko Eißfeldt;
wenzelm
parents: 75116
diff changeset
   284
  provide a different name.
71322
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   285
\<close>
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   286
71324
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   287
subsubsection \<open>Examples\<close>
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   288
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   289
text \<open>
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   290
  Setup the current directory as a repository with Phabricator server hosting:
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   291
  @{verbatim [display] \<open>  isabelle hg_setup vcs@vcs.example.org .\<close>}
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   292
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   293
  \<^medskip>
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   294
  Setup the current directory as a repository with plain SSH server hosting:
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   295
  @{verbatim [display] \<open>  isabelle hg_setup ssh://files.example.org/data/repositories .\<close>}
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   296
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   297
  \<^medskip>
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   298
  Both variants require SSH access to the target server, via public key
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   299
  without password.
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   300
\<close>
d0e14780b278 more documentation;
wenzelm
parents: 71322
diff changeset
   301
71322
0256ce61f405 more documentation;
wenzelm
parents: 68394
diff changeset
   302
75555
197a5b3a1ea2 promote "isabelle sync" to regular user-space tool, with proper documentation;
wenzelm
parents: 75511
diff changeset
   303
section \<open>Mercurial repository synchronization \label{sec:tool-hg-sync}\<close>
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   304
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   305
text \<open>
75479
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   306
  The @{tool_def hg_sync} tool synchronizes a local Mercurial repository with
75511
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   307
  a target directory.
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   308
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   309
  @{verbatim [display]
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   310
\<open>Usage: isabelle hg_sync [OPTIONS] TARGET
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   311
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   312
  Options are:
75511
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   313
    -F RULE      add rsync filter RULE
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   314
                 (e.g. "protect /foo" to avoid deletion)
76135
a144603170b4 clarified command-line;
wenzelm
parents: 76131
diff changeset
   315
    -P           protect spaces in target file names: more robust, less portable
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   316
    -R ROOT      explicit repository root directory
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   317
                 (default: implicit from current directory)
75493
f775dfb55655 clarified option -T;
wenzelm
parents: 75490
diff changeset
   318
    -T           thorough treatment of file content and directory times
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   319
    -n           no changes: dry-run
75479
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   320
    -r REV       explicit revision (default: state of working directory)
76131
8b695e59db3f clarified default: do not override port from ssh_config, which could be different from 22;
wenzelm
parents: 76105
diff changeset
   321
    -p PORT      explicit SSH port
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   322
    -v           verbose
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   323
75479
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   324
  Synchronize Mercurial repository with TARGET directory,
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   325
  which can be local or remote (using notation of rsync).\<close>}
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   326
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   327
  The \<^verbatim>\<open>TARGET\<close> specification can be a local or remote directory (via ssh),
75511
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   328
  using \<^verbatim>\<open>rsync\<close>\<^footnote>\<open>\<^url>\<open>https://linux.die.net/man/1/rsync\<close>\<close> notation for
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   329
  destinations; see also examples below. The content is written directly into
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   330
  the target, \<^emph>\<open>without\<close> creating a separate sub-directory. The special
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   331
  sub-directory \<^verbatim>\<open>.hg_sync\<close> within the target contains meta data from the
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   332
  original Mercurial repository. Repeated synchronization is guarded by the
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   333
  presence of a \<^verbatim>\<open>.hg_sync\<close> sub-directory: this sanity check prevents
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   334
  accidental changes (or deletion!) of targets that were not created by @{tool
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   335
  hg_sync}.
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   336
75479
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   337
  \<^medskip> Option \<^verbatim>\<open>-r\<close> specifies an explicit revision of the repository; the default
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   338
  is the current state of the working directory (which might be uncommitted).
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   339
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   340
  \<^medskip> Option \<^verbatim>\<open>-v\<close> enables verbose mode. Option \<^verbatim>\<open>-n\<close> enables ``dry-run'' mode:
75511
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   341
  operations are only simulated; use it with option \<^verbatim>\<open>-v\<close> to actually see
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   342
  results.
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   343
75489
f08fd5048df3 clarified command-line options;
wenzelm
parents: 75487
diff changeset
   344
  \<^medskip> Option \<^verbatim>\<open>-F\<close> adds a filter rule to the underlying \<^verbatim>\<open>rsync\<close> command;
f08fd5048df3 clarified command-line options;
wenzelm
parents: 75487
diff changeset
   345
  multiple \<^verbatim>\<open>-F\<close> options may be given to accumulate a list of rules.
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   346
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   347
  \<^medskip> Option \<^verbatim>\<open>-R\<close> specifies an explicit repository root directory. The default
75479
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   348
  is to derive it from the current directory, searching upwards until a
4363ad65ad36 support option -r;
wenzelm
parents: 75476
diff changeset
   349
  suitable \<^verbatim>\<open>.hg\<close> directory is found.
75487
167660a8f99e support thorough check of file content;
wenzelm
parents: 75479
diff changeset
   350
75493
f775dfb55655 clarified option -T;
wenzelm
parents: 75490
diff changeset
   351
  \<^medskip> Option \<^verbatim>\<open>-T\<close> indicates thorough treatment of file content and directory
f775dfb55655 clarified option -T;
wenzelm
parents: 75490
diff changeset
   352
  times. The default is to consider files with equal time and size already as
f775dfb55655 clarified option -T;
wenzelm
parents: 75490
diff changeset
   353
  equal, and to ignore time stamps on directories.
75499
c635368021b6 support explicit SSH port;
wenzelm
parents: 75493
diff changeset
   354
c635368021b6 support explicit SSH port;
wenzelm
parents: 75493
diff changeset
   355
  \<^medskip> Option \<^verbatim>\<open>-p\<close> specifies an explicit port for the SSH connection underlying
76131
8b695e59db3f clarified default: do not override port from ssh_config, which could be different from 22;
wenzelm
parents: 76105
diff changeset
   356
  \<^verbatim>\<open>rsync\<close>; the default is taken from the user's \<^path>\<open>ssh_config\<close> file.
75559
5340239ff468 clarified options of "isabelle hg_sync" vs. "isabelle sync";
wenzelm
parents: 75556
diff changeset
   357
76135
a144603170b4 clarified command-line;
wenzelm
parents: 76131
diff changeset
   358
  \<^medskip> Option \<^verbatim>\<open>-P\<close> uses \<^verbatim>\<open>rsync --protect-args\<close> to work robustly with spaces or
75559
5340239ff468 clarified options of "isabelle hg_sync" vs. "isabelle sync";
wenzelm
parents: 75556
diff changeset
   359
  special characters of the shell. This requires at least \<^verbatim>\<open>rsync 3.0.0\<close>,
5340239ff468 clarified options of "isabelle hg_sync" vs. "isabelle sync";
wenzelm
parents: 75556
diff changeset
   360
  which is not always available --- notably on macOS. Assuming traditional
5340239ff468 clarified options of "isabelle hg_sync" vs. "isabelle sync";
wenzelm
parents: 75556
diff changeset
   361
  Unix-style naming of files and directories, it is safe to omit this option
5340239ff468 clarified options of "isabelle hg_sync" vs. "isabelle sync";
wenzelm
parents: 75556
diff changeset
   362
  for the sake of portability.
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   363
\<close>
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   364
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   365
subsubsection \<open>Examples\<close>
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   366
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   367
text \<open>
75490
5e37ea93759d clarified documentation: $ISABELLE_HOME is not a repository for regular releases;
wenzelm
parents: 75489
diff changeset
   368
  Synchronize the current repository onto a remote host, with accurate
75493
f775dfb55655 clarified option -T;
wenzelm
parents: 75490
diff changeset
   369
  treatment of all content:
75511
b32fdb67f851 provide .hg_sync meta data;
wenzelm
parents: 75499
diff changeset
   370
  @{verbatim [display] \<open>  isabelle hg_sync -T remotename:test/repos\<close>}
75476
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   371
\<close>
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   372
1148c190eb9b more documentation;
wenzelm
parents: 75161
diff changeset
   373
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   374
section \<open>Installing standalone Isabelle executables \label{sec:tool-install}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   375
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   376
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   377
  By default, the main Isabelle binaries (@{executable "isabelle"} etc.) are
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   378
  just run from their location within the distribution directory, probably
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   379
  indirectly by the shell through its @{setting PATH}. Other schemes of
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   380
  installation are supported by the @{tool_def install} tool:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   381
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   382
\<open>Usage: isabelle install [OPTIONS] BINDIR
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   383
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   384
  Options are:
50132
180d086c30dd simplified command line of "isabelle install";
wenzelm
parents: 49072
diff changeset
   385
    -d DISTDIR   refer to DISTDIR as Isabelle distribution
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   386
                 (default ISABELLE_HOME)
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   387
50132
180d086c30dd simplified command line of "isabelle install";
wenzelm
parents: 49072
diff changeset
   388
  Install Isabelle executables with absolute references to the
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   389
  distribution directory.\<close>}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   390
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   391
  The \<^verbatim>\<open>-d\<close> option overrides the current Isabelle distribution directory as
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   392
  determined by @{setting ISABELLE_HOME}.
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   393
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   394
  The \<open>BINDIR\<close> argument tells where executable wrapper scripts for
62588
cd266473b81b isabelle_process is superseded by "isabelle process" tool;
wenzelm
parents: 62562
diff changeset
   395
  @{executable "isabelle"} and @{executable isabelle_scala_script} should be
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   396
  placed, which is typically a directory in the shell's @{setting PATH}, such
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   397
  as \<^verbatim>\<open>$HOME/bin\<close>.
48815
wenzelm
parents: 48814
diff changeset
   398
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   399
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   400
  It is also possible to make symbolic links of the main Isabelle executables
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   401
  manually, but making separate copies outside the Isabelle distribution
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   402
  directory will not work!
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   403
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   404
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   405
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   406
section \<open>Creating instances of the Isabelle logo\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   407
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   408
text \<open>
73399
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   409
  The @{tool_def logo} tool creates variants of the Isabelle logo, for
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   410
  inclusion in PDF{\LaTeX} documents.
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   411
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   412
  @{verbatim [display]
73399
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   413
\<open>Usage: isabelle logo [OPTIONS] [NAME]
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   414
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   415
  Options are:
73399
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   416
    -o FILE      alternative output file
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   417
    -q           quiet mode
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   418
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   419
  Create variant NAME of the Isabelle logo as "isabelle_name.pdf".\<close>}
48936
e6d9e46ff7bc clarified "isabelle logo";
wenzelm
parents: 48844
diff changeset
   420
73399
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   421
  Option \<^verbatim>\<open>-o\<close> provides an alternative output file, instead of the default in
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   422
  the current directory: \<^verbatim>\<open>isabelle_\<close>\<open>name\<close>\<^verbatim>\<open>.pdf\<close> with the lower-case version
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   423
  of the given name.
48936
e6d9e46ff7bc clarified "isabelle logo";
wenzelm
parents: 48844
diff changeset
   424
73399
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   425
  \<^medskip>
72316
3cc6aa405858 clarified "isabelle logo", after discontinuation of DVI output (see 564012e31db1);
wenzelm
parents: 72309
diff changeset
   426
  Option \<^verbatim>\<open>-q\<close> omits printing of the resulting output file name.
48936
e6d9e46ff7bc clarified "isabelle logo";
wenzelm
parents: 48844
diff changeset
   427
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   428
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   429
  Implementors of Isabelle tools and applications are encouraged to make
73399
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   430
  derived Isabelle logos for their own projects using this template. The
48569c862eb8 proper Isabelle/Scala tool --- avoid perl;
wenzelm
parents: 73172
diff changeset
   431
  license is the same as for the regular Isabelle distribution (BSD).
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   432
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   433
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   434
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   435
section \<open>Output the version identifier of the Isabelle distribution\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   436
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   437
text \<open>
48602
342ca8f3197b more uniform usage of "isabelle tool";
wenzelm
parents: 48577
diff changeset
   438
  The @{tool_def version} tool displays Isabelle version information:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   439
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   440
\<open>Usage: isabelle version [OPTIONS]
41511
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   441
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   442
  Options are:
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   443
    -i           short identification (derived from Mercurial id)
73481
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   444
    -t           symbolic tags (derived from Mercurial id)
41511
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   445
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   446
  Display Isabelle version information.\<close>}
41511
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   447
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   448
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   449
  The default is to output the full version string of the Isabelle
76105
7ce11c135dad update to Isabelle2022 and Ubuntu 22.04;
wenzelm
parents: 75559
diff changeset
   450
  distribution, e.g.\ ``\<^verbatim>\<open>Isabelle2022: October 2022\<close>.
41511
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   451
73481
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   452
  \<^medskip>
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   453
  Option \<^verbatim>\<open>-i\<close> produces a short identification derived from the Mercurial id
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   454
  of the @{setting ISABELLE_HOME} directory; option \<^verbatim>\<open>-t\<close> prints version tags
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   455
  (if available).
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   456
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   457
  These options require either a repository clone or a repository archive
92db3e31fae3 clarified output;
wenzelm
parents: 73480
diff changeset
   458
  (e.g. download of
73480
0e880b793db1 support repository archives (without full .hg directory);
wenzelm
parents: 73399
diff changeset
   459
  \<^url>\<open>https://isabelle.sketis.net/repos/isabelle/archive/tip.tar.gz\<close>).
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   460
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   461
67399
eab6ce8368fa ran isabelle update_op on all sources
nipkow
parents: 66785
diff changeset
   462
end