Admin/PLATFORMS
changeset 36204 16c371c6ff86
parent 35610 a5b7a0903441
child 40789 301e91df039d
equal deleted inserted replaced
36203:398dd97e49a5 36204:16c371c6ff86
     1 Some notes on platform support of Isabelle
     1 Some notes on multi-platform support of Isabelle
     2 ==========================================
     2 ================================================
     3 
     3 
     4 Preamble
     4 Preamble
     5 --------
     5 --------
     6 
     6 
     7 The general programming model is that of a stylized ML + Scala + POSIX
     7 The general programming model is that of a stylized ML + Scala + POSIX
     9 and packages.
     9 and packages.
    10 
    10 
    11 The basic Isabelle system infrastructure provides some facilities to
    11 The basic Isabelle system infrastructure provides some facilities to
    12 make this work, e.g. see the ML structures File and Path, or functions
    12 make this work, e.g. see the ML structures File and Path, or functions
    13 like bash_output.  The settings environment also provides some means
    13 like bash_output.  The settings environment also provides some means
    14 for portability, e.g. jvm_path to hold up the impression that even
    14 for portability, e.g. jvm_path to hold up the impression that Java on
    15 Java on Windows/Cygwin adheres to Isabelle/POSIX standards.
    15 Windows/Cygwin adheres to Isabelle/POSIX standards.
    16 
    16 
    17 When producing add-on tools, it is important to stay within this clean
    17 When producing add-on tools, it is important to stay within this clean
    18 room of Isabelle, and refrain from overly ambitious system hacking.
    18 room of Isabelle, and refrain from overly ambitious system hacking.
       
    19 The existing Isabelle scripts follow a certain style that might look
       
    20 odd at first sight, but reflects long years of experience in getting
       
    21 system plumbing right (which is quite hard).
    19 
    22 
    20 
    23 
    21 Supported platforms
    24 Supported platforms
    22 -------------------
    25 -------------------
    23 
    26 
    24 The following hardware and operating system platforms are officially
    27 The following hardware and operating system platforms are officially
    25 supported by the Isabelle distribution (and bundled tools):
    28 supported by the Isabelle distribution (and bundled tools), with the
       
    29 following reference versions (which have been selected to be neither
       
    30 too old nor too new):
    26 
    31 
    27   x86-linux
    32   x86-linux         Ubuntu 8.04 LTS Server
    28   x86-darwin
    33   x86-darwin        Mac OS Leopard
    29   x86-cygwin
    34   x86-cygwin        Cygwin 1.7
    30   x86_64-linux
       
    31   x86_64-darwin
       
    32 
    35 
    33 As of Cygwin 1.7 there is only a 32 bit version of that platform.  The
    36   x86_64-linux      Ubuntu 8.04 LTS Server (64)
    34 other 64 bit platforms become more and more important for power users
    37   x86_64-darwin     Mac OS Leopard
    35 and always need to be taken into account when testing tools.
       
    36 
    38 
    37 All of the above platforms are 100% supported -- end-users should not
    39 All of the above platforms are 100% supported by Isabelle -- end-users
    38 have to care about the differences at all.  There are also some
    40 should not have to care about the differences at all.  There are also
    39 secondary platforms where Poly/ML also happens to work:
    41 some secondary platforms where Poly/ML also happens to work:
    40 
    42 
    41   ppc-darwin
    43   ppc-darwin
    42   sparc-solaris
    44   sparc-solaris
    43   x86-solaris
    45   x86-solaris
    44   x86-bsd
    46   x86-bsd
    45 
    47 
    46 There is no guarantee that Isabelle add-ons work on these fringe
    48 There is no guarantee that Isabelle add-ons work on these fringe
    47 platforms.  Even Isabelle/Scala already fails on ppc-darwin due to
    49 platforms.  Even Isabelle/Scala already fails on ppc-darwin due to
    48 lack of JVM 1.6 support on that platform.
    50 lack of JVM 1.6 support by Apple.
       
    51 
       
    52 
       
    53 32 bit vs. 64 bit platforms
       
    54 ---------------------------
       
    55 
       
    56 64 bit hardware becomes more and more important for power users.
       
    57 Add-on tools need to work seamlessly without manual user
       
    58 configuration, although it is often sufficient to fall back on 32 bit
       
    59 executables.
       
    60 
       
    61 The ISABELLE_PLATFORM setting variable refers to the 32 bit version of
       
    62 the platform, even on 64 bit hardware.  Power-tools need to indicate
       
    63 64 bit support explicitly, via the (optional) ISABELLE_PLATFORM64
       
    64 setting.  The following bash expressions prefers the 64 bit platform,
       
    65 if that is available:
       
    66 
       
    67   "${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM}"
       
    68 
       
    69 Note that ML and JVM may have a different idea of the platform,
       
    70 depending the the respective binaries that are actually run.
    49 
    71 
    50 
    72 
    51 Dependable system tools
    73 Dependable system tools
    52 -----------------------
    74 -----------------------
    53 
    75 
    54 The following portable system tools can be taken for granted:
    76 The following portable system tools can be taken for granted:
    55 
    77 
    56   * GNU bash as uniform shell on all platforms.  Note that the POSIX
    78 * GNU bash as uniform shell on all platforms.  The POSIX "standard"
    57     "standard" shell /bin/sh is *not* appropriate, because there are
    79   shell /bin/sh is *not* appropriate, because there are too many
    58     too many different implementations of it.
    80   different implementations of it.
    59 
    81 
    60   * Perl as largely portable system programming language.  In some
    82 * Perl as largely portable system programming language.  In some
    61     situations Python may as an alternative, but it usually performs
    83   situations Python may serve as an alternative, but it usually
    62     not as well in addressing various delicate details of basic
    84   performs not as well in addressing various delicate details of
    63     operating system concepts (processes, signals, sockets etc.).
    85   operating system concepts (processes, signals, sockets etc.).
    64 
    86 
    65   * Scala with Java Runtime 1.6.  The Isabelle/Pure.jar library irons
    87 * Scala with Java Runtime 1.6.  The Isabelle/Pure.jar library irons
    66     out many oddities and portability problems of the Java platform.
    88   out many oddities and portability problems of the Java platform.
    67 
    89 
    68 
    90 
    69 Known problems
    91 Known problems
    70 --------------
    92 --------------
    71 
    93 
    72 * Mac OS: If MacPorts is installed and its version of Perl takes
    94 * Mac OS: If MacPorts is installed and its version of Perl takes
    73   precedence over /usr/bin/perl in the PATH, then the end-user needs
    95   precedence over /usr/bin/perl in the PATH, then the end-user needs
    74   to take care of installing add-on modules, e.g. HTTP support.  Such
    96   to take care of installing extra modules, e.g. for HTTP support.
    75   add-ons are usually included in Apple's /usr/bin/perl by default.
    97   Such add-ons are usually included in Apple's /usr/bin/perl by
       
    98   default.
    76 
    99 
    77 * The Java runtime has its own idea about the underlying platform,
   100 * The Java runtime has its own idea about the underlying platform,
    78   e.g. on 64 bit machine Isabelle/ML could be x86-linux, but the JVM
   101   e.g. on a 64 bit machine Isabelle/ML could be x86-linux, but the JVM
    79   could be x86_64-linux.  This affects Java native libraries in
   102   could be x86_64-linux.  This affects Java native libraries in
    80   particular -- which are very hard to support in a platform
   103   particular -- which cause extra portability problems and can make
    81   independent manner, and should be avoided in the first place.
   104   the JVM crash anyway.
       
   105 
       
   106   In Isabelle/Scala isabelle.Platform.jvm_platform identifies the JVM
       
   107   platform.  Since there can be many different Java installations on
       
   108   the same machine, which can also be run with different options,
       
   109   reliable JVM platform identification works from inside the running
       
   110   JVM only.