author | wenzelm |
Wed, 31 Jan 2018 21:05:47 +0100 | |
changeset 67558 | c46910a6bfce |
parent 67235 | 759d4fb30bfc |
child 68002 | 13d5b2fc9b02 |
permissions | -rw-r--r-- |
64339 | 1 |
Multi-platform support of Isabelle |
2 |
================================== |
|
35610 | 3 |
|
4 |
Preamble |
|
5 |
-------- |
|
6 |
||
7 |
The general programming model is that of a stylized ML + Scala + POSIX |
|
48833 | 8 |
environment, with as little system-specific code in user-space tools |
9 |
as possible. |
|
35610 | 10 |
|
67235 | 11 |
The Isabelle system infrastructure provides some facilities to make |
12 |
this work, e.g. see the ML and Scala modules File and Path, or |
|
48833 | 13 |
functions like Isabelle_System.bash. The settings environment also |
61294 | 14 |
provides some means for portability, e.g. the bash function |
15 |
"platform_path" to keep the impression that Windows/Cygwin adheres to |
|
64339 | 16 |
Isabelle/POSIX standards, although Poly/ML and the JVM are native on |
17 |
Windows. |
|
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 |
21 |
system functions. The Isabelle environment uses peculiar scripts for |
|
22 |
GNU bash and perl to get the plumbing right. This style should be |
|
23 |
imitated as far as possible. |
|
35610 | 24 |
|
25 |
||
26 |
Supported platforms |
|
27 |
------------------- |
|
28 |
||
29 |
The following hardware and operating system platforms are officially |
|
36204 | 30 |
supported by the Isabelle distribution (and bundled tools), with the |
64339 | 31 |
following base-line versions (which have been selected to be neither |
36204 | 32 |
too old nor too new): |
35610 | 33 |
|
63520 | 34 |
x86_64-linux Ubuntu 12.04 LTS |
35610 | 35 |
|
67088 | 36 |
x86_64-darwin Mac OS X 10.10 Yosemite (macbroy31 MacBookPro6,2) |
37 |
Mac OS X 10.11 El Capitan (macbroy2 MacPro4,1) |
|
65369
27c1b5e952bd
macbroy30 is on 10.12 Sierra (already since 04-Mar-2017) -- discontinued support for 10.8 Mountain Lion;
wenzelm
parents:
65073
diff
changeset
|
38 |
macOS 10.12 Sierra (macbroy30 MacBookPro6,2) |
48833 | 39 |
|
64339 | 40 |
x86_64-windows Windows 7 |
66691 | 41 |
x86_64-cygwin Cygwin 2.8 http://isabelle.in.tum.de/cygwin_2017 (x86_64/release) |
36204 | 42 |
|
43 |
All of the above platforms are 100% supported by Isabelle -- end-users |
|
44876 | 44 |
should not have to care about the differences (at least in theory). |
35610 | 45 |
|
64339 | 46 |
Fringe platforms like BSD or Solaris are not supported. |
36204 | 47 |
|
48 |
||
66911 | 49 |
64 bit vs. 32 bit platform personality |
50 |
-------------------------------------- |
|
36204 | 51 |
|
67235 | 52 |
Isabelle requires 64 bit hardware running a 64 bit operating |
53 |
system. Windows and Mac OS X allow x86 executables as well, but for |
|
54 |
Linux this requires separate installation of 32 bit shared |
|
55 |
libraries. The POSIX emulation on Windows via Cygwin64 is exclusively |
|
56 |
for x86_64. |
|
66911 | 57 |
|
58 |
ML works both for x86_64 and x86, and the latter is preferred for space |
|
59 |
and performance reasons. Java is always for x86_64 on all platforms. |
|
48833 | 60 |
|
49144 | 61 |
Add-on executables are expected to work without manual user |
66911 | 62 |
configuration. Each component settings script needs to determine the |
49144 | 63 |
platform details appropriately. |
48833 | 64 |
|
65073 | 65 |
|
48833 | 66 |
The Isabelle settings environment provides the following variables to |
67 |
help configuring platform-dependent tools: |
|
68 |
||
69 |
ISABELLE_PLATFORM64 (potentially empty) |
|
66691 | 70 |
ISABELLE_PLATFORM32 (potentially empty) |
48833 | 71 |
ISABELLE_PLATFORM |
36204 | 72 |
|
66911 | 73 |
The ISABELLE_PLATFORM setting variable prefers the 32 bit personality of |
74 |
the platform, if possible. Using regular bash notation, tools may |
|
75 |
express their preference for 64 bit with a fall-back for 32 bit as |
|
76 |
follows: |
|
48833 | 77 |
|
78 |
"${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}" |
|
36204 | 79 |
|
65073 | 80 |
|
81 |
There is a second set of settings for native Windows (instead of the |
|
82 |
POSIX emulation of Cygwin used before): |
|
83 |
||
66732 | 84 |
ISABELLE_WINDOWS_PLATFORM64 |
65073 | 85 |
ISABELLE_WINDOWS_PLATFORM32 |
86 |
ISABELLE_WINDOWS_PLATFORM |
|
87 |
||
88 |
It can be used like this: |
|
89 |
||
90 |
"${ISABELLE_WINDOWS_PLATFORM:-$ISABELLE_PLATFORM}" |
|
91 |
||
92 |
"${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_WINDOWS_PLATFORM32:-${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}}}" |
|
93 |
||
94 |
||
35610 | 95 |
Dependable system tools |
96 |
----------------------- |
|
97 |
||
98 |
The following portable system tools can be taken for granted: |
|
99 |
||
64339 | 100 |
* Scala on top of Java 8. Isabelle/Scala irons out many oddities and |
101 |
portability issues of the Java platform. |
|
102 |
||
66911 | 103 |
* GNU bash as uniform shell on all platforms. The POSIX "standard" shell |
104 |
/bin/sh does *not* work -- there are too many non-standard |
|
105 |
implementations of it. On Debian and Ubuntu /bin/sh is actually |
|
106 |
/bin/dash and thus introduces many oddities. |
|
35610 | 107 |
|
58780
1f8c0da85664
discontinued python from standard system environment;
wenzelm
parents:
55438
diff
changeset
|
108 |
* Perl as largely portable system programming language, with its |
1f8c0da85664
discontinued python from standard system environment;
wenzelm
parents:
55438
diff
changeset
|
109 |
fairly robust support for processes, signals, sockets etc. |
35610 | 110 |
|
111 |
||
112 |
Known problems |
|
113 |
-------------- |
|
114 |
||
55391
eae296b5ef33
Mac OS X Lion (macbroy6) is baseline for portable executables;
wenzelm
parents:
49144
diff
changeset
|
115 |
* Mac OS X: If MacPorts is installed there is some danger that |
41668 | 116 |
accidental references to its shared libraries are created |
117 |
(e.g. libgmp). Use otool -L to check if compiled binaries also work |
|
118 |
without MacPorts. |
|
119 |
||
55391
eae296b5ef33
Mac OS X Lion (macbroy6) is baseline for portable executables;
wenzelm
parents:
49144
diff
changeset
|
120 |
* Mac OS X: If MacPorts is installed and its version of Perl takes |
35610 | 121 |
precedence over /usr/bin/perl in the PATH, then the end-user needs |
36204 | 122 |
to take care of installing extra modules, e.g. for HTTP support. |
123 |
Such add-ons are usually included in Apple's /usr/bin/perl by |
|
124 |
default. |
|
35610 | 125 |
|
66911 | 126 |
* The Java runtime has its own idea about the underlying platform, which |
127 |
affects Java native libraries in particular. In Isabelle/Scala the |
|
128 |
function isabelle.Platform.jvm_platform identifies the JVM platform. |
|
129 |
In the settings environment, ISABELLE_JAVA_PLATFORM provides the same |
|
130 |
information without running the JVM. |
|
55438 | 131 |
|
132 |
* Common Unix tools like /bin/sh, /bin/kill, sed, ulimit are |
|
64339 | 133 |
notoriously non-portable an should be avoided. |
66911 | 134 |
|
135 |
* The traditional "uname" Unix tool only tells about its own executable |
|
136 |
format, not the underlying platform! |