discontinued support for Poly/ML 5.0 and 5.1 versions;
authorwenzelm
Tue, 17 Aug 2010 18:41:55 +0200
changeset 38470 484e483eb606
parent 38469 5c6c5d63f3c3
child 38471 0924654b8163
discontinued support for Poly/ML 5.0 and 5.1 versions;
NEWS
README
lib/scripts/run-polyml-5.0
src/Pure/IsaMakefile
src/Pure/ML-Systems/compiler_polyml-5.0.ML
src/Pure/ML-Systems/compiler_polyml-5.3.ML
src/Pure/ML-Systems/polyml-5.0.ML
src/Pure/ML-Systems/polyml-5.1.ML
src/Pure/ML-Systems/polyml.ML
src/Pure/ROOT.ML
src/Pure/pure_setup.ML
--- a/NEWS	Tue Aug 17 18:04:08 2010 +0200
+++ b/NEWS	Tue Aug 17 18:41:55 2010 +0200
@@ -139,6 +139,11 @@
 change in semantics.
 
 
+*** System ***
+
+* Discontinued support for Poly/ML 5.0 and 5.1 versions.
+
+
 
 New in Isabelle2009-2 (June 2010)
 ---------------------------------
--- a/README	Tue Aug 17 18:04:08 2010 +0200
+++ b/README	Tue Aug 17 18:41:55 2010 +0200
@@ -13,7 +13,7 @@
    Windows with Cygwin, Mac OS) and depends on the following main
    add-on tools:
 
-     * The Poly/ML compiler and runtime system (version 5.x).
+     * The Poly/ML compiler and runtime system (version 5.2.1 or later).
      * The GNU bash shell (version 3.x or 2.x).
      * Perl (version 5.x).
      * GNU Emacs (version 22) -- for the Proof General interface.
--- a/lib/scripts/run-polyml-5.0	Tue Aug 17 18:04:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-#!/usr/bin/env bash
-#
-# Author: Makarius
-#
-# Poly/ML 5.0 startup script.
-
-export -n INFILE OUTFILE MLTEXT TERMINATE NOWRITE
-
-
-## diagnostics
-
-function fail_out()
-{
-  echo "Unable to create output heap file: \"$OUTFILE\"" >&2
-  exit 2
-}
-
-function check_file()
-{
-  if [ ! -f "$1" ]; then
-    echo "Unable to locate $1" >&2
-    echo "Please check your ML system settings!" >&2
-    exit 2
-  fi
-}
-
-
-## compiler executables and libraries
-
-POLY="$ML_HOME/poly"
-check_file "$POLY"
-
-if [ "$(basename "$ML_HOME")" = bin ]; then
-  POLYLIB="$(cd "$ML_HOME"; cd "$(pwd -P)"; cd ../lib; pwd)"
-else
-  POLYLIB="$ML_HOME"
-fi
-
-export LD_LIBRARY_PATH="$POLYLIB:$LD_LIBRARY_PATH"
-export DYLD_LIBRARY_PATH="$POLYLIB:$DYLD_LIBRARY_PATH"
-
-
-## prepare databases
-
-if [ -z "$INFILE" ]; then
-  PRG="$POLY"
-  EXIT="fun exit 0 = (OS.Process.exit OS.Process.success): unit | exit _ = OS.Process.exit OS.Process.failure;"
-else
-  check_file "$INFILE"
-  PRG="$INFILE"
-  EXIT=""
-fi
-
-if [ -z "$OUTFILE" ]; then
-  COMMIT='fun commit () = (TextIO.output (TextIO.stdErr, "Error - Database is not opened for writing.\n"); false);'
-else
-  COMMIT="fun commit () = (PolyML.shareCommonData PolyML.rootFunction; TextIO.output (TextIO.stdOut, \"Exporting $OUTFILE\n\"); PolyML.export (\"$OUTFILE\", PolyML.rootFunction); true);"
-  [ -f "$OUTFILE" ] && { chmod +w "$OUTFILE" || fail_out; }
-  rm -f "${OUTFILE}.o" || fail_out
-fi
-
-
-## run it!
-
-MLTEXT="$EXIT $COMMIT $MLTEXT"
-MLEXIT="commit();"
-
-if [ -z "$TERMINATE" ]; then
-  FEEDER_OPTS=""
-else
-  FEEDER_OPTS="-q"
-fi
-
-"$ISABELLE_HOME/lib/scripts/feeder" -p -h "$MLTEXT" -t "$MLEXIT" $FEEDER_OPTS | \
-  { read FPID; "$PRG" -q $ML_OPTIONS; RC="$?"; kill -HUP "$FPID"; exit "$RC"; }
-RC="$?"
-
-if [ -n "$OUTFILE" ]; then
-  if [ -e "${OUTFILE}.o" ]; then
-    cc -o "$OUTFILE" "${OUTFILE}.o" -L"$POLYLIB" -lpolymain -lpolyml $POLY_LINK_OPTIONS || fail_out
-    rm -f "${OUTFILE}.o"
-    [ -e "${OUTFILE}.exe" ] && mv "${OUTFILE}.exe" "$OUTFILE"
-  fi
-  [ -f "$OUTFILE" -a -n "$NOWRITE" ] && chmod -w "$OUTFILE"
-fi
-
-exit "$RC"
--- a/src/Pure/IsaMakefile	Tue Aug 17 18:04:08 2010 +0200
+++ b/src/Pure/IsaMakefile	Tue Aug 17 18:41:55 2010 +0200
@@ -21,7 +21,6 @@
 
 BOOTSTRAP_FILES = 					\
   ML-Systems/bash.ML 					\
-  ML-Systems/compiler_polyml-5.0.ML			\
   ML-Systems/compiler_polyml-5.2.ML			\
   ML-Systems/compiler_polyml-5.3.ML			\
   ML-Systems/ml_name_space.ML				\
@@ -29,8 +28,6 @@
   ML-Systems/multithreading.ML				\
   ML-Systems/multithreading_polyml.ML			\
   ML-Systems/overloading_smlnj.ML			\
-  ML-Systems/polyml-5.0.ML				\
-  ML-Systems/polyml-5.1.ML				\
   ML-Systems/polyml-5.2.1.ML				\
   ML-Systems/polyml-5.2.ML				\
   ML-Systems/polyml.ML					\
--- a/src/Pure/ML-Systems/compiler_polyml-5.0.ML	Tue Aug 17 18:04:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-(*  Title:      Pure/ML-Systems/compiler_polyml-5.0.ML
-
-Runtime compilation for Poly/ML 5.0 and 5.1.
-*)
-
-fun use_text ({tune_source, print, error, ...}: use_context) (line, name) verbose txt =
-  let
-    val in_buffer = Unsynchronized.ref (explode (tune_source txt));
-    val out_buffer = Unsynchronized.ref ([]: string list);
-    fun output () = implode (rev (case ! out_buffer of "\n" :: cs => cs | cs => cs));
-
-    val current_line = Unsynchronized.ref line;
-    fun get () =
-      (case ! in_buffer of
-        [] => ""
-      | c :: cs => (in_buffer := cs; if c = "\n" then current_line := ! current_line + 1 else (); c));
-    fun put s = out_buffer := s :: ! out_buffer;
-
-    fun exec () =
-      (case ! in_buffer of
-        [] => ()
-      | _ => (PolyML.compilerEx (get, put, fn () => ! current_line, name) (); exec ()));
-  in
-    exec () handle exn => (error (output ()); reraise exn);
-    if verbose then print (output ()) else ()
-  end;
-
-fun use_file context verbose name =
-  let
-    val instream = TextIO.openIn name;
-    val txt = Exn.release (Exn.capture TextIO.inputAll instream before TextIO.closeIn instream);
-  in use_text context (1, name) verbose txt end;
--- a/src/Pure/ML-Systems/compiler_polyml-5.3.ML	Tue Aug 17 18:04:08 2010 +0200
+++ b/src/Pure/ML-Systems/compiler_polyml-5.3.ML	Tue Aug 17 18:41:55 2010 +0200
@@ -1,6 +1,6 @@
 (*  Title:      Pure/ML-Systems/compiler_polyml-5.3.ML
 
-Runtime compilation for Poly/ML 5.3.0.
+Runtime compilation for Poly/ML 5.3 and 5.4.
 *)
 
 local
--- a/src/Pure/ML-Systems/polyml-5.0.ML	Tue Aug 17 18:04:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-(*  Title:      Pure/ML-Systems/polyml-5.0.ML
-
-Compatibility wrapper for Poly/ML 5.0.
-*)
-
-fun reraise exn = raise exn;
-
-use "ML-Systems/unsynchronized.ML";
-use "ML-Systems/universal.ML";
-use "ML-Systems/thread_dummy.ML";
-use "ML-Systems/ml_name_space.ML";
-use "ML-Systems/polyml_common.ML";
-use "ML-Systems/compiler_polyml-5.0.ML";
-use "ML-Systems/pp_polyml.ML";
-
-val pointer_eq = PolyML.pointerEq;
-
-fun share_common_data () = PolyML.shareCommonData PolyML.rootFunction;
-
--- a/src/Pure/ML-Systems/polyml-5.1.ML	Tue Aug 17 18:04:08 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-(*  Title:      Pure/ML-Systems/polyml-5.1.ML
-
-Compatibility wrapper for Poly/ML 5.1.
-*)
-
-fun reraise exn = raise exn;
-
-use "ML-Systems/unsynchronized.ML";
-use "ML-Systems/thread_dummy.ML";
-use "ML-Systems/ml_name_space.ML";
-use "ML-Systems/polyml_common.ML";
-use "ML-Systems/compiler_polyml-5.0.ML";
-use "ML-Systems/pp_polyml.ML";
-
-val pointer_eq = PolyML.pointerEq;
-
-fun share_common_data () = PolyML.shareCommonData PolyML.rootFunction;
-
--- a/src/Pure/ML-Systems/polyml.ML	Tue Aug 17 18:04:08 2010 +0200
+++ b/src/Pure/ML-Systems/polyml.ML	Tue Aug 17 18:41:55 2010 +0200
@@ -1,6 +1,6 @@
 (*  Title:      Pure/ML-Systems/polyml.ML
 
-Compatibility wrapper for Poly/ML 5.3.0.
+Compatibility wrapper for Poly/ML 5.3 and 5.4.
 *)
 
 use "ML-Systems/unsynchronized.ML";
--- a/src/Pure/ROOT.ML	Tue Aug 17 18:04:08 2010 +0200
+++ b/src/Pure/ROOT.ML	Tue Aug 17 18:41:55 2010 +0200
@@ -179,9 +179,9 @@
 use "ML/ml_syntax.ML";
 use "ML/ml_env.ML";
 use "Isar/runtime.ML";
-if ml_system = "polyml-5.3.0"
-then use "ML/ml_compiler_polyml-5.3.ML"
-else use "ML/ml_compiler.ML";
+if member (op =) ["polyml-5.2", "polyml-5.2.1", "smlnj-110"] ml_system
+then use "ML/ml_compiler.ML"
+else use "ML/ml_compiler_polyml-5.3.ML";
 use "ML/ml_context.ML";
 
 (*theory sources*)
--- a/src/Pure/pure_setup.ML	Tue Aug 17 18:04:08 2010 +0200
+++ b/src/Pure/pure_setup.ML	Tue Aug 17 18:41:55 2010 +0200
@@ -18,8 +18,9 @@
 
 (* ML toplevel pretty printing *)
 
-if String.isPrefix "smlnj" ml_system then ()
-else toplevel_pp ["String", "string"] "ML_Syntax.pretty_string";
+if String.isPrefix "polyml" ml_system
+then toplevel_pp ["String", "string"] "ML_Syntax.pretty_string"
+else ();
 
 toplevel_pp ["Pretty", "T"] "(fn _: Pretty.T => Pretty.str \"<pretty>\")";
 toplevel_pp ["Task_Queue", "task"] "Pretty.str o Task_Queue.str_of_task";
@@ -39,15 +40,10 @@
 toplevel_pp ["Proof", "state"] "(fn _: Proof.state => Pretty.str \"<Proof.state>\")";
 toplevel_pp ["Toplevel", "state"] "Toplevel.pretty_abstract";
 
-if ml_system = "polyml-5.3.0"
-then use "ML/install_pp_polyml-5.3.ML"
-else if String.isPrefix "polyml" ml_system
+if ml_system = "polyml-5.2" orelse ml_system = "polyml-5.2.1"
 then use "ML/install_pp_polyml.ML"
-else ();
-
-if ml_system = "polyml-5.0" orelse ml_system = "polyml-5.1" then
-  Secure.use_text ML_Parse.global_context (0, "") false
-    "PolyML.Compiler.maxInlineSize := 20"
+else if String.isPrefix "polyml" ml_system
+then use "ML/install_pp_polyml-5.3.ML"
 else ();