15 "platform_path" to keep the impression that Windows/Cygwin adheres to |
15 "platform_path" to keep the impression that Windows/Cygwin adheres to |
16 Isabelle/POSIX standards, although Poly/ML and the JVM are native on |
16 Isabelle/POSIX standards, although Poly/ML and the JVM are native on |
17 Windows. |
17 Windows. |
18 |
18 |
19 When producing add-on tools, it is important to stay within this clean |
19 When producing add-on tools, it is important to stay within this clean |
20 room of Isabelle, and refrain from overly ambitious system hacking. |
20 room of Isabelle, and refrain from low-level access to the operating |
21 The existing Isabelle bash scripts follow a peculiar style that |
21 system. The Isabelle environment uses peculiar scripts for GNU bash and |
22 reflects long years of experience in getting system plumbing right. |
22 perl to get the plumbing right. This style should be imitated as far as |
|
23 possible. |
23 |
24 |
24 |
25 |
25 Supported platforms |
26 Supported platforms |
26 ------------------- |
27 ------------------- |
27 |
28 |
44 should not have to care about the differences (at least in theory). |
45 should not have to care about the differences (at least in theory). |
45 |
46 |
46 Fringe platforms like BSD or Solaris are not supported. |
47 Fringe platforms like BSD or Solaris are not supported. |
47 |
48 |
48 |
49 |
49 32 bit vs. 64 bit platforms |
50 64 bit vs. 32 bit platform personality |
50 --------------------------- |
51 -------------------------------------- |
51 |
52 |
52 Most users have 64 bit hardware and are running a 64 bit operating |
53 Isabelle requires 64 bit hardware running a 64 bit operating. Windows |
53 system by default. For Linux this usually means missing 32 bit shared |
54 and Mac OS X allow x86 executables as well, but for Linux this requires |
54 libraries, so native x86_64-linux needs to be used by default, despite |
55 separate installation of 32 bit shared libraries. The POSIX emulation on |
55 its doubled space requirements for Poly/ML heaps. For Mac OS X, the |
56 Windows via Cygwin64 is exclusively for x86_64. |
56 x86-darwin personality usually works seamlessly for C/C++ programs, |
57 |
57 but the Java platform is always for x86_64-darwin. |
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. |
58 |
60 |
59 Add-on executables are expected to work without manual user |
61 Add-on executables are expected to work without manual user |
60 configuration. Each component settings script needs to determine the |
62 configuration. Each component settings script needs to determine the |
61 platform details appropriately. |
63 platform details appropriately. |
62 |
64 |
63 |
65 |
64 The Isabelle settings environment provides the following variables to |
66 The Isabelle settings environment provides the following variables to |
65 help configuring platform-dependent tools: |
67 help configuring platform-dependent tools: |
66 |
68 |
67 ISABELLE_PLATFORM64 (potentially empty) |
69 ISABELLE_PLATFORM64 (potentially empty) |
68 ISABELLE_PLATFORM32 (potentially empty) |
70 ISABELLE_PLATFORM32 (potentially empty) |
69 ISABELLE_PLATFORM |
71 ISABELLE_PLATFORM |
70 |
72 |
71 The ISABELLE_PLATFORM setting variable prefers the 32 bit version of the |
73 The ISABELLE_PLATFORM setting variable prefers the 32 bit personality of |
72 platform, if possible. Using regular bash notation, tools may express their |
74 the platform, if possible. Using regular bash notation, tools may |
73 preference for 64 bit with a fall-back for 32 bit as follows: |
75 express their preference for 64 bit with a fall-back for 32 bit as |
|
76 follows: |
74 |
77 |
75 "${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}" |
78 "${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}" |
76 |
79 |
77 |
80 |
78 There is a second set of settings for native Windows (instead of the |
81 There is a second set of settings for native Windows (instead of the |
87 "${ISABELLE_WINDOWS_PLATFORM:-$ISABELLE_PLATFORM}" |
90 "${ISABELLE_WINDOWS_PLATFORM:-$ISABELLE_PLATFORM}" |
88 |
91 |
89 "${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_WINDOWS_PLATFORM32:-${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}}}" |
92 "${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_WINDOWS_PLATFORM32:-${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}}}" |
90 |
93 |
91 |
94 |
92 Moreover note that ML and JVM usually have a different idea of the |
|
93 platform, depending on the respective binaries that are actually run. |
|
94 Poly/ML 5.6.x performs best in 32 bit mode, even for large |
|
95 applications, thanks to its sophisticated heap management. The JVM |
|
96 usually works better in 64 bit mode, which allows its heap to grow |
|
97 beyond 2 GB. |
|
98 |
|
99 The traditional "uname" Unix tool only tells about its own executable |
|
100 format, not the underlying platform! |
|
101 |
|
102 |
|
103 Dependable system tools |
95 Dependable system tools |
104 ----------------------- |
96 ----------------------- |
105 |
97 |
106 The following portable system tools can be taken for granted: |
98 The following portable system tools can be taken for granted: |
107 |
99 |
108 * Scala on top of Java 8. Isabelle/Scala irons out many oddities and |
100 * Scala on top of Java 8. Isabelle/Scala irons out many oddities and |
109 portability issues of the Java platform. |
101 portability issues of the Java platform. |
110 |
102 |
111 * GNU bash as uniform shell on all platforms. The POSIX "standard" |
103 * GNU bash as uniform shell on all platforms. The POSIX "standard" shell |
112 shell /bin/sh does *not* work -- there are too many non-standard |
104 /bin/sh does *not* work -- there are too many non-standard |
113 implementations of it. |
105 implementations of it. On Debian and Ubuntu /bin/sh is actually |
|
106 /bin/dash and thus introduces many oddities. |
114 |
107 |
115 * Perl as largely portable system programming language, with its |
108 * Perl as largely portable system programming language, with its |
116 fairly robust support for processes, signals, sockets etc. |
109 fairly robust support for processes, signals, sockets etc. |
117 |
110 |
118 |
111 |
128 precedence over /usr/bin/perl in the PATH, then the end-user needs |
121 precedence over /usr/bin/perl in the PATH, then the end-user needs |
129 to take care of installing extra modules, e.g. for HTTP support. |
122 to take care of installing extra modules, e.g. for HTTP support. |
130 Such add-ons are usually included in Apple's /usr/bin/perl by |
123 Such add-ons are usually included in Apple's /usr/bin/perl by |
131 default. |
124 default. |
132 |
125 |
133 * The Java runtime has its own idea about the underlying platform, |
126 * The Java runtime has its own idea about the underlying platform, which |
134 which affects Java native libraries in particular. In |
127 affects Java native libraries in particular. In Isabelle/Scala the |
135 Isabelle/Scala the function isabelle.Platform.jvm_platform |
128 function isabelle.Platform.jvm_platform identifies the JVM platform. |
136 identifies the JVM platform. Since a particular Java version is |
129 In the settings environment, ISABELLE_JAVA_PLATFORM provides the same |
137 always bundled with Isabelle, the resulting settings also provide |
130 information without running the JVM. |
138 some clues about its platform, without running it. |
|
139 |
131 |
140 * Common Unix tools like /bin/sh, /bin/kill, sed, ulimit are |
132 * Common Unix tools like /bin/sh, /bin/kill, sed, ulimit are |
141 notoriously non-portable an should be avoided. |
133 notoriously non-portable an should be avoided. |
|
134 |
|
135 * The traditional "uname" Unix tool only tells about its own executable |
|
136 format, not the underlying platform! |