Admin/PLATFORMS
author huffman
Sun, 13 Nov 2011 19:26:53 +0100
changeset 45480 a39bb6d42ace
parent 44977 1b2ce8d0f8e3
child 46006 36cd232b18bb
permissions -rw-r--r--
remove unnecessary number-representation-specific rules from metis calls; speed up another proof
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
     1
Some notes on multi-platform support of Isabelle
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
     2
================================================
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     3
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     4
Preamble
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     5
--------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     6
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     7
The general programming model is that of a stylized ML + Scala + POSIX
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     8
environment, with hardly any system specific code in user-space tools
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
     9
and packages.
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    10
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    11
The basic Isabelle system infrastructure provides some facilities to
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    12
make this work, e.g. see the ML structures File and Path, or functions
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    13
like Isabelle_System.bash.  The settings environment also provides
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    14
some means for portability, e.g. jvm_path to keep the impression that
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    15
Java on Windows/Cygwin adheres to Isabelle/POSIX standards (inside the
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    16
JVM itself there are many Windows-specific things, though).
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    17
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    18
When producing add-on tools, it is important to stay within this clean
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    19
room of Isabelle, and refrain from overly ambitious system hacking.
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    20
The existing Isabelle scripts follow a certain style that might look
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    21
odd at first sight, but it reflects long years of experience in
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    22
getting system plumbing right (which is quite hard).
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    23
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    24
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    25
Supported platforms
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    26
-------------------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    27
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    28
The following hardware and operating system platforms are officially
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    29
supported by the Isabelle distribution (and bundled tools), with the
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    30
following reference versions (which have been selected to be neither
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    31
too old nor too new):
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    32
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    33
  x86-linux         Ubuntu 10.04 LTS
42424
e94350a2ed20 updated reference machines;
wenzelm
parents: 41668
diff changeset
    34
  x86-darwin        Mac OS Leopard (macbroy30)
44977
1b2ce8d0f8e3 more Mac OS reference hardware;
wenzelm
parents: 44876
diff changeset
    35
                    Mac OS Snow Leopard (macbroy2)
1b2ce8d0f8e3 more Mac OS reference hardware;
wenzelm
parents: 44876
diff changeset
    36
                    Mac OS Lion (macbroy6)
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    37
  x86-cygwin        Cygwin 1.7 (vmbroy9)
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    38
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    39
  x86_64-linux      Ubuntu 10.04 LTS
42424
e94350a2ed20 updated reference machines;
wenzelm
parents: 41668
diff changeset
    40
  x86_64-darwin     Mac OS Leopard (macbroy30)
44977
1b2ce8d0f8e3 more Mac OS reference hardware;
wenzelm
parents: 44876
diff changeset
    41
                    Mac OS Snow Leopard (macbroy2)
1b2ce8d0f8e3 more Mac OS reference hardware;
wenzelm
parents: 44876
diff changeset
    42
                    Mac OS Lion (macbroy6)
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    43
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    44
All of the above platforms are 100% supported by Isabelle -- end-users
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    45
should not have to care about the differences (at least in theory).
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    46
There are also some additional platforms where Poly/ML also happens to
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    47
work, but they are *not* covered by the official Isabelle
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    48
distribution:
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    49
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    50
  ppc-darwin
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    51
  sparc-solaris
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    52
  x86-solaris
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    53
  x86-bsd
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    54
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    55
There are increasing problems to make contributing components of
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    56
Isabelle work on such fringe platforms.  Note that x86-bsd is silently
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    57
treated like x86-linux -- this works if certain Linux compatibility
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    58
packages are installed on BSD.
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    59
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    60
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    61
32 bit vs. 64 bit platforms
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    62
---------------------------
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    63
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    64
64 bit hardware becomes more and more important for many users.
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    65
Add-on tools need to work seamlessly without manual user
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    66
configuration, although it is often sufficient to fall back on 32 bit
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    67
executables.
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    68
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    69
The ISABELLE_PLATFORM setting variable refers to the 32 bit version of
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    70
the platform, even on 64 bit hardware.  Power-tools need to indicate
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    71
64 bit support explicitly, via the (optional) ISABELLE_PLATFORM64
41458
boehmes
parents: 40789
diff changeset
    72
setting.  The following bash expression prefers the 64 bit platform,
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    73
if that is available:
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    74
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    75
  "${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM}"
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    76
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    77
Note that ML and JVM may have a different idea of the platform,
41458
boehmes
parents: 40789
diff changeset
    78
depending on the respective binaries that are actually run.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    79
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    80
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    81
Dependable system tools
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    82
-----------------------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    83
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    84
The following portable system tools can be taken for granted:
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    85
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    86
* GNU bash as uniform shell on all platforms.  The POSIX "standard"
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    87
  shell /bin/sh is *not* appropriate, because there are too many
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    88
  non-standard implementations of it.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    89
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    90
* Perl as largely portable system programming language.  In some
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    91
  situations Python may serve as an alternative, but it usually
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    92
  performs not as well in addressing various delicate details of
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
    93
  operating system concepts (processes, signals, sockets etc.).
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    94
44876
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    95
* Scala with Java Runtime 1.6.  The Isabelle/Scala layer irons out
243e2a413787 some updates of PLATFORMS;
wenzelm
parents: 42424
diff changeset
    96
  many oddities and portability issues of the Java platform.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    97
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    98
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
    99
Known problems
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   100
--------------
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   101
41668
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   102
* Mac OS: If MacPorts is installed there is some danger that
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   103
  accidental references to its shared libraries are created
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   104
  (e.g. libgmp).  Use otool -L to check if compiled binaries also work
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   105
  without MacPorts.
62ed9f31ea90 more platform hints;
wenzelm
parents: 41458
diff changeset
   106
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   107
* Mac OS: If MacPorts is installed and its version of Perl takes
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   108
  precedence over /usr/bin/perl in the PATH, then the end-user needs
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   109
  to take care of installing extra modules, e.g. for HTTP support.
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   110
  Such add-ons are usually included in Apple's /usr/bin/perl by
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   111
  default.
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   112
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   113
* The Java runtime has its own idea about the underlying platform,
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   114
  e.g. on a 64 bit machine Isabelle/ML could be x86-linux, but the JVM
35610
a5b7a0903441 Some notes on platform support of Isabelle.
wenzelm
parents:
diff changeset
   115
  could be x86_64-linux.  This affects Java native libraries in
36204
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   116
  particular -- which cause extra portability problems and can make
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   117
  the JVM crash anyway.
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   118
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   119
  In Isabelle/Scala isabelle.Platform.jvm_platform identifies the JVM
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   120
  platform.  Since there can be many different Java installations on
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   121
  the same machine, which can also be run with different options,
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   122
  reliable JVM platform identification works from inside the running
16c371c6ff86 some updates on multi-platform support;
wenzelm
parents: 35610
diff changeset
   123
  JVM only.