author | wenzelm |
Mon, 25 Mar 2024 17:43:28 +0100 | |
changeset 79986 | 980cefd8ff9b |
parent 79985 | 5c50763f2999 |
child 79987 | 3b64d268e5b0 |
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 |
|
68002 | 8 |
environment, with a minimum of system-specific code in user-space |
9 |
tools. |
|
35610 | 10 |
|
67235 | 11 |
The Isabelle system infrastructure provides some facilities to make |
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
12 |
this work, e.g. see the ML and Scala modules `File` and `Path`, or |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
13 |
functions like `Isabelle_System.bash`. The settings environment also |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
14 |
provides some means for portability, e.g. the `bash` function |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
15 |
`platform_path` to keep the impression that Windows/Cygwin adheres to |
73646 | 16 |
Isabelle/POSIX standards, although many executables are native on |
17 |
Windows (notably Poly/ML and Java). |
|
35610 | 18 |
|
19 |
When producing add-on tools, it is important to stay within this clean |
|
67235 | 20 |
room of Isabelle, and refrain from non-portable access to operating |
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
21 |
system functions. The Isabelle environment uses GNU `bash` and |
73646 | 22 |
Isabelle/Scala as portable system infrastructure, using somewhat |
23 |
peculiar implementation techniques. |
|
35610 | 24 |
|
25 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
26 |
### Supported platforms ### |
35610 | 27 |
|
72366 | 28 |
A broad range of hardware and operating system platforms are supported |
29 |
by building executables on base-line versions that are neither too old |
|
73646 | 30 |
nor too new. Common OS families should work: Linux, macOS, |
31 |
Windows. More exotic platforms are unsupported: NixOS, BSD, Solaris. |
|
72366 | 32 |
|
73646 | 33 |
Official platforms: |
35610 | 34 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
35 |
* `x86_64-linux` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
36 |
- Ubuntu 18.04 LTS |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
37 |
* `arm64-linux` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
38 |
- Ubuntu 18.04 LTS (e.g. via `docker run -it ubuntu:18.04 bash`) |
72366 | 39 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
40 |
* `x86_64-darwin` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
41 |
- macOS 11 Big Sur (`mini1` Macmini8,1) |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
42 |
- macOS 12 Monterey (???) |
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 (`mini2` Macmini8,1) |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
45 |
* `arm64-darwin` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
46 |
- macOS 11 Big Sur (`assur` Macmini9,1 -- MacMini M1, 4+4 cores) |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
47 |
- macOS 12 Monterey (???) |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
48 |
- 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
|
49 |
- macOS 14 Sonoma (`studio1` Mac13,2 M1 Ultra, 16+4 cores) |
73646 | 50 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
51 |
* `x86_64-windows` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
52 |
- Windows 10 |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
53 |
* `x86_64-cygwin` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
54 |
- Cygwin 3.5.x https://isabelle.sketis.net/cygwin_2024 (`x86_64/release`) |
72366 | 55 |
|
36204 | 56 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
57 |
### 64 bit vs. 32 bit platform personality ### |
36204 | 58 |
|
67235 | 59 |
Isabelle requires 64 bit hardware running a 64 bit operating |
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
60 |
system. Only Windows still supports native `x86` executables, but the |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
61 |
POSIX emulation on Windows via Cygwin64 works exclusively for `x86_64`. |
65073 | 62 |
|
72895 | 63 |
The Isabelle settings environment provides variable |
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
64 |
`ISABELLE_PLATFORM64` to refer to the standard platform personality. On |
72895 | 65 |
Windows this is for Cygwin64, but the following native platform |
66 |
identifiers are available as well: |
|
65073 | 67 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
68 |
* `ISABELLE_WINDOWS_PLATFORM64` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
69 |
* `ISABELLE_WINDOWS_PLATFORM32` |
65073 | 70 |
|
72894
bd2269b6cd99
updated "macOS" terminology: current Big Sur is already version 11;
wenzelm
parents:
72526
diff
changeset
|
71 |
These are always empty on Linux and macOS, and non-empty on |
72895 | 72 |
Windows. For example, this is how to refer to native Windows and |
73 |
fall-back on Unix (always 64 bit): |
|
74 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
75 |
* `"${ISABELLE_WINDOWS_PLATFORM64:-$ISABELLE_PLATFORM64}"` |
65073 | 76 |
|
72895 | 77 |
And this is for old 32 bit executables on Windows, but still 64 bit on |
78 |
Unix: |
|
79 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
80 |
* `"${ISABELLE_WINDOWS_PLATFORM32:-$ISABELLE_PLATFORM64}"` |
65073 | 81 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
82 |
For Apple Silicon the native platform is `"$ISABELLE_APPLE_PLATFORM64"` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
83 |
(`arm64-darwin`), but thanks to Rosetta 2 `"$ISABELLE_PLATFORM64"` |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
84 |
(`x64_64-darwin`) works routinely with fairly good performance. |
73646 | 85 |
|
65073 | 86 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
87 |
### Dependable system tools ### |
35610 | 88 |
|
89 |
The following portable system tools can be taken for granted: |
|
90 |
||
73646 | 91 |
* Scala on top of Java. Isabelle/Scala irons out many fine points of |
92 |
the Java platform to make it fully portable as described above. |
|
64339 | 93 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
94 |
* GNU `bash` as uniform shell on all platforms. The POSIX "standard" |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
95 |
shell `/bin/sh` does not work portably -- there are too many |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
96 |
non-standard implementations of it. On Debian and Ubuntu `/bin/sh` is |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
97 |
actually `/bin/dash` and introduces many oddities. |
35610 | 98 |
|
99 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
100 |
### Known problems ### |
35610 | 101 |
|
73646 | 102 |
* macOS: If Homebrew or MacPorts is installed, there is some danger |
103 |
that accidental references to its shared libraries are created |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
104 |
(e.g. `libgmp`). Use `otool -L` to check if compiled binaries also work |
41668 | 105 |
without MacPorts. |
106 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
107 |
* Common Unix tools like `/bin/sh`, `/bin/kill`, `sed`, `ulimit` are |
64339 | 108 |
notoriously non-portable an should be avoided. |
66911 | 109 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
110 |
* The traditional `uname` Unix tool only tells about its own |
73646 | 111 |
executable format, not the underlying platform! |
79985 | 112 |
|
113 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
114 |
## Notes on maintaining the Isabelle component repository at TUM ## |
79985 | 115 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
116 |
### Quick reference ### |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
117 |
|
79985 | 118 |
|
119 |
* local setup (and test) of component directory, e.g. in |
|
120 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
121 |
- `screwdriver-3.14/` |
79985 | 122 |
|
123 |
* packaging (with associated SHA1 digest), e.g. |
|
124 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
125 |
- `$ isabelle components_build screwdriver-3.14` |
79985 | 126 |
|
127 |
* publishing, e.g. |
|
128 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
129 |
- `$ isabelle components_build -P screwdriver-3.14.tar.gz` |
79985 | 130 |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
131 |
* manual editing of `Admin/components/main`: `screwdriver-3.14` |
79985 | 132 |
|
133 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
134 |
### Unique names ### |
79985 | 135 |
|
136 |
Component names are globally unique over time and space: names of |
|
137 |
published components are never re-used. If some component needs to be |
|
138 |
re-packaged, extra indices may be added to the official version number |
|
139 |
like this: |
|
140 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
141 |
* `screwdriver-3.14` -- default packaging/publishing, no index |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
142 |
* `screwdriver-3.14-1` -- another refinement of the same |
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
143 |
* `screwdriver-3.14-2` -- yet another refinement of the same |
79985 | 144 |
|
145 |
There is no standard format for the structure of component names: they |
|
146 |
are compared for equality only, without any guess at an ordering. |
|
147 |
||
148 |
Components are registered in Admin/components/main (or similar) for |
|
149 |
use of that particular Isabelle repository version, subject to regular |
|
150 |
Mercurial history. This allows to bisect Isabelle versions with full |
|
151 |
record of the required components for testing. |
|
152 |
||
153 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
154 |
### Authentic archives ### |
79985 | 155 |
|
156 |
Isabelle components are managed as authentic .tar.gz archives in |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
157 |
`/home/isabelle/components` from where they are made publicly available |
79985 | 158 |
on https://isabelle.in.tum.de/components/. |
159 |
||
160 |
Visibility on the HTTP server depends on local Unix file permission: |
|
161 |
nonfree components should omit "read" mode for the Unix group/other; |
|
162 |
regular components should be world-readable. |
|
163 |
||
164 |
The file `Admin/components/components.sha1` contains SHA1 identifiers |
|
165 |
within the Isabelle repository, for integrity checking of the archives |
|
166 |
that are exposed to the public file-system. The command-line tool |
|
167 |
`isabelle components_build` maintains these hash-keys automatically. |
|
168 |
||
169 |
||
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
170 |
### Unpacked copy ### |
79985 | 171 |
|
172 |
A second unpacked copy is provided in `/home/isabelle/contrib/`. This allows |
|
173 |
users and administrative services within the TUM network to activate arbitrary |
|
174 |
snapshots of the repository with all standard components being available, |
|
175 |
without extra copying or unpacking of the authentic archives. The |
|
79986
980cefd8ff9b
more accurate Markdown formatting, both for VSCode and Phabricator;
wenzelm
parents:
79985
diff
changeset
|
176 |
`isabelle_cronjob` does this routinely: it will break if the unpacked version is |
79985 | 177 |
omitted. |
178 |
||
179 |
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
|
180 |
the `.tar.gz` archive and unpacking it, unless it is a special component (e.g. |
79985 | 181 |
for multiplatform application bundling). |