author | haftmann |
Fri, 01 Aug 2025 20:01:55 +0200 | |
changeset 82912 | ad66fb23998a |
parent 82320 | 8d9b5289304c |
permissions | -rw-r--r-- |
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
1 |
# Isabelle system components # |
35610 | 2 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
3 |
## Multi-platform support of Isabelle ## |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
4 |
|
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
5 |
### Preamble ### |
35610 | 6 |
|
7 |
The general programming model is that of a stylized ML + Scala + POSIX |
|
79987 | 8 |
environment, with a minimum of system-specific code in user-space tools. |
35610 | 9 |
|
79987 | 10 |
The Isabelle system infrastructure provides some facilities to make this work, |
11 |
e.g. see the ML and Scala modules `File` and `Path`, or functions like |
|
12 |
`Isabelle_System.bash`. The settings environment also provides some means for |
|
13 |
portability, e.g. the `bash` function `platform_path` to keep the impression |
|
79988 | 14 |
that Windows/Cygwin adheres to Isabelle/POSIX standards, although most |
15 |
executables are running natively on Windows. |
|
35610 | 16 |
|
79987 | 17 |
When producing add-on tools, it is important to stay within this clean room of |
18 |
Isabelle, and refrain from non-portable access to operating system functions. |
|
79988 | 19 |
The Isabelle environment uses Isabelle/Scala as portable system |
20 |
infrastructure, and Isabelle/ML refers to that for anything non-trivial. |
|
35610 | 21 |
|
22 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
23 |
### Supported platforms ### |
35610 | 24 |
|
79987 | 25 |
A broad range of hardware and operating system platforms are supported by |
79990 | 26 |
building executables on base-line versions that are neither too old nor too |
27 |
new. Common OS families should work: Linux, macOS, Windows. Exotic platforms |
|
28 |
are unsupported: NixOS, BSD, Solaris etc. |
|
72366 | 29 |
|
79990 | 30 |
The official platforms, with **base-line operating systems**, and reference |
79988 | 31 |
machines are as follows: |
35610 | 32 |
|
80032 | 33 |
* `x86_64-linux` and `arm64-linux` |
79988 | 34 |
- **Ubuntu 18.04 LTS** (e.g. via `docker run -it ubuntu:18.04 bash`) |
72366 | 35 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
36 |
* `x86_64-darwin` |
82320 | 37 |
- **macOS 12 Monterey** (`mini1` Macmini8,1, 6 cores) (`aleppo` Macmini7,1, 2 cores) |
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
38 |
- macOS 13 Ventura (`mini3` Mac14,12 -- MacMini M2 Pro, 6+4 cores) |
82320 | 39 |
- macOS 14 Sonoma (`mini2` Macmini8,1, 6 cores) |
40 |
- macOS 15 Sequoia (`hattusa` Mac16,11 -- MacMini M4 Pro, 10+4 cores) |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
41 |
* `arm64-darwin` |
82320 | 42 |
- **macOS 12 Monterey** (`assur` Macmini9,1 -- MacMini M1, 4+4 cores) |
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
43 |
- macOS 13 Ventura (`mini3` Mac14,12 -- MacMini M2 Pro, 6+4 cores) |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
44 |
- macOS 14 Sonoma (`studio1` Mac13,2 M1 Ultra, 16+4 cores) |
82320 | 45 |
- macOS 15 Sequoia (`hattusa` Mac16,11 -- MacMini M4 Pro, 10+4 cores) |
73646 | 46 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
47 |
* `x86_64-windows` |
82309
1a4be2516f50
ZGC of Java 21 is enabled by default: now possible, because Windows Server 2012 (vmnipkow9) has been discontinued;
wenzelm
parents:
82066
diff
changeset
|
48 |
- Windows Server 2019 (minimum for Java ZGC) |
80150 | 49 |
- **Windows Server 2022** (`se0.proof.cit.tum.de`) |
79988 | 50 |
- **Windows 10** |
51 |
- Windows 11 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
52 |
* `x86_64-cygwin` |
79988 | 53 |
- **Cygwin 3.5.x** |
81755
1609254b74c5
update cygwin near 3.5.5-1, see also https://cygwin.com/pipermail/cygwin-announce/2024-December/012023.html
wenzelm
parents:
81109
diff
changeset
|
54 |
https://isabelle.sketis.net/cygwin_2025 (`x86_64/release`) |
72366 | 55 |
|
80030 | 56 |
Multi-platform tools require thorough testing on all platforms: base-line and |
57 |
latest versions. It "works for me on my system" is not sufficient for the |
|
58 |
general public. |
|
59 |
||
36204 | 60 |
|
79988 | 61 |
### Multiple platform personalities ### |
36204 | 62 |
|
79988 | 63 |
Isabelle works with current 64 bit hardware and 64 bit operating systems, |
64 |
which usually means Intel (`x86_64`) and very often ARM (`arm64`). Windows and |
|
65 |
macOS provide `x86_64` emulation on their ARM versions, so that is in theory |
|
66 |
sufficient, but native `arm64` is more efficient. Linux lacks proper |
|
67 |
emulation, so tools should be provided for `x86_64-linux` and `arm64-linux` |
|
68 |
whenever possible. Also note that `arm64-linux` is the standard platform for |
|
69 |
Docker on ARM hardware (e.g. Apple Silicon). |
|
70 |
||
71 |
For extra performance on macOS, Isabelle tools are usually included in both |
|
72 |
variants: `x86_64-darwin` and `arm64-darwin` (or as hybrid executable that |
|
73 |
pretends to be `x86_64-darwin`, the default platform). Windows support is only |
|
74 |
for Intel so far: this could mean `x86_64-windows` or `x86_64-cygwin`, but |
|
75 |
also `x86-windows` for old binary-only tools. |
|
65073 | 76 |
|
79987 | 77 |
The Isabelle settings environment provides variable `ISABELLE_PLATFORM64` to |
79988 | 78 |
refer to the standard POSIX platform personality (Linux/ARM, Linux/Intel, |
79 |
macOS/Intel, Windows/Cygwin64/Intel). Alternative settings are available for |
|
80 |
native platforms as show below. In summary, the symbolic platform names from |
|
81 |
the settings environment are as follows: |
|
82 |
||
83 |
* Linux (Intel) |
|
84 |
- `ISABELLE_PLATFORM64` is `x86_64-linux` |
|
85 |
||
86 |
* Linux (ARM) |
|
87 |
- `ISABELLE_PLATFORM64` is `arm64-linux` |
|
65073 | 88 |
|
79988 | 89 |
* Windows |
90 |
- `ISABELLE_PLATFORM64` is `x86_64-cygwin` |
|
91 |
- `ISABELLE_WINDOWS_PLATFORM64` is `x86_64-windows` |
|
92 |
- `ISABELLE_WINDOWS_PLATFORM32` is `x86-windows` |
|
93 |
||
94 |
* macOS (Intel) |
|
95 |
- `ISABELLE_PLATFORM64` is `x86_64-darwin` |
|
65073 | 96 |
|
79988 | 97 |
* macOS (ARM) |
98 |
- `ISABELLE_PLATFORM64` is `x86_64-darwin` |
|
99 |
- `ISABELLE_APPLE_PLATFORM64` is `arm64-darwin` |
|
100 |
||
101 |
When used outside their proper system context, platform settings remain empty. |
|
102 |
This allows to refer symbolically to various combinations, using conditional |
|
103 |
expressions in GNU `bash` like this: |
|
72895 | 104 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
105 |
* `"${ISABELLE_WINDOWS_PLATFORM64:-$ISABELLE_PLATFORM64}"` |
79988 | 106 |
-- native Windows, or default POSIX platform (always Intel on macOS) |
72895 | 107 |
|
79988 | 108 |
* `"${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_APPLE_PLATFORM64:-$ISABELLE_PLATFORM64}}"` |
109 |
-- native Windows platform, native Apple Silicon platform, or default/native Linux platform |
|
73646 | 110 |
|
65073 | 111 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
112 |
### Dependable system tools ### |
35610 | 113 |
|
114 |
The following portable system tools can be taken for granted: |
|
115 |
||
79987 | 116 |
* Scala on top of Java. Isabelle/Scala irons out many fine points of the Java |
117 |
platform to make it fully portable as described above. |
|
64339 | 118 |
|
79987 | 119 |
* GNU `bash` as uniform shell on all platforms. The POSIX "standard" shell |
120 |
`/bin/sh` does not work portably -- there are too many non-standard |
|
121 |
implementations of it. On Debian and Ubuntu `/bin/sh` is actually |
|
79988 | 122 |
`/bin/dash` and causes many problems. |
35610 | 123 |
|
124 |
||
79988 | 125 |
### Common problems ### |
126 |
||
127 |
* The traditional `uname` Unix tool only tells about its own executable |
|
128 |
format, not the underlying platform! There are special tricks to get |
|
129 |
underlying platform details, depending on OS versions: Isabelle/Scala and |
|
130 |
the Isabelle settings environment provide sanitized versions of that. |
|
81109 | 131 |
Isabelle tools should not attempt anything on their own account. |
79988 | 132 |
|
133 |
* Common Unix tools like `/bin/sh`, `/bin/kill`, `sed`, `ulimit` are |
|
134 |
notoriously non-portable an should be avoided. |
|
35610 | 135 |
|
79987 | 136 |
* macOS: If Homebrew or MacPorts is installed, there is some danger that |
137 |
accidental references to its shared libraries are created (e.g. `libgmp`). |
|
138 |
Use `otool -L` to check if compiled binaries also work without MacPorts. |
|
41668 | 139 |
|
79988 | 140 |
* macOS as SSH server: The target user shell needs to be set to `/bin/bash` |
141 |
instead of the default `/bin/zsh`, to make shell script escapes work |
|
142 |
reliably. |
|
79985 | 143 |
|
144 |
||
79988 | 145 |
## The Isabelle component repository at TUM and sketis.net ## |
146 |
||
147 |
Isabelle repository versions and administrative tools download components via |
|
148 |
HTTPS from `ISABELLE_COMPONENT_REPOSITORY`, the default is |
|
149 |
`https://isabelle.sketis.net/components`, and alternative is |
|
150 |
`https://isabelle.in.tum.de/components`. |
|
151 |
||
152 |
Isabelle releases have all required components bundled, but additional |
|
153 |
components may be included via suitable manual configuration. |
|
154 |
||
79985 | 155 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
156 |
### Quick reference ### |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
157 |
|
79988 | 158 |
The subsequent steps serve as a reminder of how to maintain components: |
79985 | 159 |
|
160 |
* local setup (and test) of component directory, e.g. in |
|
161 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
162 |
- `screwdriver-3.14/` |
79985 | 163 |
|
164 |
* packaging (with associated SHA1 digest), e.g. |
|
165 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
166 |
- `$ isabelle components_build screwdriver-3.14` |
79985 | 167 |
|
168 |
* publishing, e.g. |
|
169 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
170 |
- `$ isabelle components_build -P screwdriver-3.14.tar.gz` |
79985 | 171 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
172 |
* manual editing of `Admin/components/main`: `screwdriver-3.14` |
79985 | 173 |
|
174 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
175 |
### Unique names ### |
79985 | 176 |
|
79987 | 177 |
Component names are globally unique over time and space: names of published |
79988 | 178 |
components are never re-used! If some component needs to be re-packaged, extra |
79987 | 179 |
indices may be added to the official version number like this: |
79985 | 180 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
181 |
* `screwdriver-3.14` -- default packaging/publishing, no index |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
182 |
* `screwdriver-3.14-1` -- another refinement of the same |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
183 |
* `screwdriver-3.14-2` -- yet another refinement of the same |
79985 | 184 |
|
79987 | 185 |
There is no standard format for the structure of component names: they are |
79988 | 186 |
compared for equality only, without any guess at an ordering (notions of |
187 |
"older", "newer", "better" etc. are irrelevant). |
|
79985 | 188 |
|
79988 | 189 |
Components are registered in `Admin/components/main` (or similar) for use of |
79987 | 190 |
that particular Isabelle repository version, subject to regular Mercurial |
191 |
history. This allows to bisect Isabelle versions with full record of the |
|
192 |
required components for testing. |
|
79985 | 193 |
|
194 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
195 |
### Authentic archives ### |
79985 | 196 |
|
79988 | 197 |
TUM provides the shared administrative directory `/p/home/isabelle/components` |
198 |
where the single source of all components is located as authentic `.tar.gz` |
|
199 |
archives. The file `Admin/components/components.sha1` contains SHA1 |
|
200 |
identifiers within the Isabelle repository, for integrity checking of the |
|
201 |
archives that are exposed to the public file-system. The command-line tool |
|
202 |
`isabelle components_build` maintains these hash-keys automatically. |
|
79985 | 203 |
|
79988 | 204 |
Components are published on https://isabelle.sketis.net/components and |
205 |
https://isabelle.in.tum.de/components --- visibility on the web server depends |
|
206 |
on local Unix file permission: nonfree components should omit "read" mode for |
|
207 |
the Unix group/other; regular components should be world-readable. |
|
79985 | 208 |
|
209 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
210 |
### Unpacked copy ### |
79985 | 211 |
|
79988 | 212 |
A second unpacked copy is provided in `/p/home/isabelle/contrib/`. This allows |
79985 | 213 |
users and administrative services within the TUM network to activate arbitrary |
214 |
snapshots of the repository with all standard components being available, |
|
79988 | 215 |
without extra copying or unpacking of the authentic archives. |
79985 | 216 |
|
217 |
The command-line tool `isabelle components_build -P` takes care of uploading |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
218 |
the `.tar.gz` archive and unpacking it, unless it is a special component (e.g. |
79985 | 219 |
for multiplatform application bundling). |
79988 | 220 |
|
221 |
||
222 |
### Repeatable component builds ### |
|
223 |
||
81109 | 224 |
Historically, Isabelle components have often been assembled by hand, packaged |
79988 | 225 |
as `.tar.gz` and uploaded to the administrative directory. This model no |
226 |
longer fits the typical complexity of multi-platform tools. |
|
227 |
||
228 |
The current quality standard demands a separate tool in Isabelle/Scala, to |
|
229 |
build a component in a repeatable manner: e.g. see `isabelle component_jdk` or |
|
230 |
`isabelle component_e` with sources in `src/Pure/Admin`. Such tools often |
|
231 |
require a Unix platform (Linux or macOS), or the specific platform for which |
|
232 |
the target is built. In the latter case, the component build tool is run |
|
233 |
manually in each operating-system context, using the base-line versions |
|
234 |
specified above (e.g. via Docker); all results are assembled into one big |
|
235 |
`.tar.gz` archive. |
|
236 |
||
80030 | 237 |
|
238 |
### Dynamic setup of large components ### |
|
239 |
||
240 |
An alternative approach, especially for components that are very large and/or |
|
241 |
rarely used, is to provide an Isabelle setup tool that interested users may |
|
242 |
run for themselves. This works particularly well for software products that |
|
80031 | 243 |
have their own "store" of downloadable artifacts. For example, see |
244 |
`isabelle dotnet_setup` as defined in `src/Pure/Tools/dotnet_setup.scala`. |