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