From: pat@cs.strath.ac.uk (Pat Prosser)
Newsgroups: alt.lang.ml
Subject: Re: SML & comp.lang.func FAQ
Keywords: Standard ML, gofer, miranda, etc...
Date: 12 Nov 92 11:50:56 GMT
Organization: Comp. Sci. Dept., Strathclyde Univ., Glasgow, Scotland.

CONTENTS:
 INTRODUCTION, THE DEFINITION, TEXTS, COURSES, MAILING LIST, LIBRARY,
 CURRENT IMPLEMENTATIONS, WORK IN PROGRESS, OBSOLETE IMPLEMENTATIONS.


INTRODUCTION

Standard ML is a statically scoped interactive functional language with a
polymorphic static type system, polymorphic references, polymorphic exceptions,
a sophisticated modules system and a formal semantics.   The ML project won
the British Computer Society's Technical Award for 1987.  It is a general
purpose programming language which is currently used for formal verification,
VLSI work, microprocessor design, graphical interfaces, and compilers.


THE DEFINITION.

Robin Milner, Mads Tofte and Robert Harper
The Definition of Standard ML
MIT, 1990.
ISBN: 0-262-63132-6

Robin Milner and Mads Tofte
Commentary on Standard ML
MIT, 1991
ISBN: 0-262-63137-7

The Commentary is a companion to the definition.  It explains some of
the design choices and some delicate parts of the Definition.  It also
presents some propertires of the language, with the associated proofs.


TEXTS.

The first book is quite slow-paced and is aimed at people learning to program.
It doesn't cover the modules system.

Ake Wikstrom
Functional Programming Using Standard ML
Prentice Hall 1987
ISBN: 0-13-331661-0


The second book goes at a faster pace, and includes an introduction to the
modules system.  It also includes sections on denotational semantics,
lambda calculus and implementation techniques.

Chris Reade
Elements of Functional Programming
Addison-Wesley 1989
ISBN: 0-201-12915-9


The next book is paced similarly to Reade's, and also includes an
introduction to the modules system.  It includes examples of writing
interpreters for the lambda calculus and of a tactical theroem prover.

Lawrence C Paulson
ML for the Working Programmer
Cambridge University Press 1991
ISBN: 0-521-39022-2


The last book is probably the most advanced.  It stresses the use of higher
order functions, and sets out to suggest possibilities that the reader
might not have considered.

Stefan Sokolowski
Applicative High Order Programming: The Standard ML perspective
Chapman & Hall 1991
ISBN: 0-412-39240-2     0-442-30838-8 (USA)


The following report is available from the LFCS (Dorothy McKie,
dam@ecsvax.ed.ac.uk) and costs 5 pounds or 10 US dollars.  It covers all of
Standard ML.

Robert Harper
Introduction to Standard ML
LFCS Report Series  ECS-LFCS-86-14
Laboratory for Foundations of Computer Science
Department of Computer Science
University of Edinburgh
Nov. 1986 (revised Jan. 1989 by Nick Rothwell and Kevin Mitchell)


The following report is available from the LFCS (Dorothy McKie,
dam@ecsvax.ed.ac.uk) and is free.  It includes an introduction to Standard ML
and three lectures on the modules system.

Mads Tofte
Four Lectures on Standard ML
LFCS Report Series  ECS-LFCS-89-73
Laboratory for Foundations of Computer Science
Department of Computer Science
University of Edinburgh
March 1989


The following report is available from the LFCS (Dorothy McKie,
dam@ecsvax.ed.ac.uk) and is free.  It introduces Extended ML, a language
for writing (non-executable) specifications of Standard ML programs and
for formally developing Standard ML programs from such specifications.
See also the WORK IN PROGRESS section, below.

Don Sannella
Formal program development in Extended ML for the working programmer.
LFCS Report Series  ECS-LFCS-89-102
Laboratory for Foundations of Computer Science
Department of Computer Science
University of Edinburgh
December 1989


Bernard Sufrin has a book on Standard ML in preparation.


COURSES

The LFCS runs week-long courses on Standard ML.  The courses cover both
the core language and the modules system.  They also give an introduction
to specification and refinement in the Extended ML algebraic specification
language.  Contact lfcs@ed.ac.uk for more information.


MAILING LIST

The worldwide sml mailing list covers all aspects of Standard ML.
Send subscription requests from Europe to sml-europe-request@lfcs.ed.ac.uk.
Send subscription requests from elsewhere to sml-list-request@cs.cmu.edu
Send contributions to sml-list@cs.cmu.edu.


LIBRARY

The Edinburgh SML Library provides a consistent set of functions on the
built-in types of the language and on vectors and arrays, and a few extras.
It includes a "make" system and a consistent set of parsing and unparsing
functions.  The library consists of a set of signatures with sample portable
implementations, full documentation, and implementations for Poly/ML,
Poplog ML and SML-NJ 0.66 that use some of the non-standard primitives
available in those systems.  It is distributed with Poly/ML, Poplog ML and
Standard ML of New Jersey.  It is also available from the LFCS.

The library documentation is available as a technical report from the LFCS
(Dorothy McKie, dam@ecsvax.ed.ac.uk) and costs 5 pounds or 10 US dollars.
The LaTeX source of the report is included with the library.

Dave Berry
The Edinburgh SML Library
LFCS Report Series  ECS-LFCS-91-148
Laboratory for Foundations of Computer Science
Department of Computer Science
University of Edinburgh
April 1991


CURRENT IMPLEMENTATIONS

There are 7 implementations of Standard ML available now, which are described
below.  There are another 4 being written, which are described in the next
section.  They are mostly interactive incremental compilers.  They all
implement most of the standard faithfully; at present they differ slightly
in some obscure corners.  I've tried to give some indication of their relative
performance on reasonably sized programs, but performance depends on many
factors, such as the amount of memory on your machine, the application you're
running, etc., and there aren't any definitive benchmarks, so take these
remarks with a pinch of salt.


Poly/ML.
	Poly/ML produces native code for SPARC, MIPS, Sun3, & HP9000 UNIX
systems.  Poly/ML is about the speed of a good compiled Common Lisp.  For
my uses it needs 3-6M of heap space.
	Poly/ML uses a persistent store and supports arbitrary precision
integer arithmetic.  It comes with a make system and an X11 interface.
Non-standard extensions include concurrent processes and an associated
message-passing scheme.
	Poly/ML is distributed by Abstract Hardware Ltd. (ahl@ahl.co.uk).
It costs 1000 pounds for an academic site licence and 3,000 pounds per machine
for industrial users with multiple and site licences by negotiation.


Standard ML of New Jersey.
        Standard ML of New Jersey was developed jointly at AT&T Bell
Laboratories and Princeton University.  It is an open system (source code is
freely available) implemented in Standard ML that emphasizes quality code
generation.  Version 0.66 of SML/NJ generates native code for Vax, 68020,
SPARC, and MIPS (big and little endian) architectures under various versions
of the Unix operating system.  Ports are underway to the Macintosh OS, the
RS/6000 and the HP9000/700.
	SML/NJ needs about 1.5 times as much heap space as Poly/ML, though this
varies with the application.  It produces code that runs slightly faster than
Poly/ML, the exact speedup varying with the application.  SML/NJ comes with ML
implementations of LEX and YACC.  It provides an interpretive mode with fast
compilation, it has profiling and separate compilation facilities, and it can
produce stand-alone executable applications.  An ML debugger and an
X-windows interface are in preparation.
	Non-standard extensions include typed first-class continuations and
Unix signal handling.  See also CML and SourceGroup in the WORK IN PROGRESS
SECTION.
        SML/NJ is copyrighted by AT&T but the system, including source
code, is freely distributable.  It is available by anonymous ftp from
research.att.com and princeton.edu.  Login as "anonymous" with your user
name as password.  Put ftp in binary mode and copy the (compressed tar)
files you need from the directory dist/ml (pub/ml on princeton.edu).  You
only need the mo.*.tar.Z files for your machines.  Alternatively mail
dbm@research.att.com.  In the UK, it is available from the LFCS (send e-mail
to lfcs@ed.ac.uk).


Poplog ML.
        Standard ML is supported as part of the Poplog system, which also
provides incremental compilers for Pop-11, Common Lisp and Prolog in a
common environment with shared data-structures, so that mixed language
programming is possible. The integrated editor and HELP mechanism
support online teaching aids.  Poplog comes with an X Windows interface.
Poplog ML compiles code faster than Poly/ML and SML-NJ, but the code produced
runs slightly slower.  Process size starts from about 1.5M (including Editor)
on Sun3.
	Poplog is available for VAX+VMS, VAX+Ultrix, VAX+Bsd 4.2/3,
Sun-2,3,4, Sun386i, SPARCstation, Solbourne, Sequent Symmetry (with Dynix),
HP M680?0+Unix workstations and Apollo+Unix. Versions for MAC-II with A/UX,
DECstation 3100 and MIPS will be available shortly.
        UK educational users should contact the School of Cognitive and
Computing Sciences, University of Sussex (alim@uk.ac.sussex.cogs).
People in the USA or Canada should contact Computable Functions Inc.
(pop@cs.umass.edu.  All others should contact Integral Solutions Ltd.
(isl@integ.uucp). Commercial prices start around 7,500 pounds.
Educational discount 85% . Special prices for UK academics.


Edinburgh ML 4.0.
	Edinburgh ML 4.0 is an implementation of the core language (without
the module system).  It uses a bytecode interpreter, which is written in C
and runs on any machine with 32 bit words, a continuous address space and
a correct C compiler.  Ports to various 16 bit machines are underway.  The
bytecode interpreter can be compiled with switches to avoid the buggy parts
of the C compilers that we've used it with (as far as I know none of them
worked correctly).  Ed. ML 4.0 typically uses 1-4M of heap space.  It is
about a quarter of the speed of Poly/ML.
	Ed. ML 4.0 is available from the LFCS.  People in the UK can get it
by e-mail; we also distribute it on Sun/Apollo cartridge or 1/4" tape (tar
or VMS format) for a small fee (50 pounds for academic sites and LFCS
affiliates, 100 pounds for other commercial organisations).  Mail
lfcs@ed.ac.uk for more information.


ANU ML
	ANU ML is descended from Cardelli's ML Pose 3.  It implements the
core language of the standard and an old version of modules.  It incrementally
compiles to native code on Sun-3, Vax/Ultrix, Pyramid and MacII/AUX.  (It
is intended to standardize modules and do the port to Sun-4 in the near
future.)
	ANU ML has a program development system with strong support for
debugging (tracing, automatic retesting etc.) and has been extended with
a built-in type complex.  The designers claim that it is as economical with
memory as Edinburgh ML but closer in speed to NJ ML.
	ANU ML is still considered to be in beta release since exceptions
have been standardized quite recently.  It is available from Malcolm Newey,
CS Dept., Australian National University (mcn@anucsd.anu.edu.au) by arrangement;
soon to be available by ftp.


MicroML
	MicroML is an interpreter for a subset of SML that runs on IBM PCs,
from the Institute of Information Processing at the University of Umea in
Sweden.  It implements the core language except for records.  A 80286
processor or better is recommended.
	MicroML is available as an alpha-release by anonymous ftp from
ftp.cs.umu.se /pub/umlexe01.uue.  There are several known bugs in the current
version.  For more information contact Olof Johansson (olof@cs.umu.se) or
Roger Mahler (mahler@cs.umu.se).

sml2c
	sml2c is a Standard ML to C compiler.  It is based on SML/NJ and
shares its front-end and most of the runtime system. sml2c is a batch
compiler and compiles only module-level declarations.  It does not support
SML/NJ style debugging and profiling.
	sml2c is easily portable and has been ported to IBM RT, Decstation 3100,
Decstation 5000, Omron Luna 88k, sun-3, sun-4 and a 486-based machine
(running Mach).  The generated code is highly portable and makes very few
assumptions about the target machine or the C compilers available on the
target machine. The runtime system, which it shares with the SML/NJ
has several machine and operating system dependencies. sml2c has eliminated
some of these dependencies by using portable schemes for garbage collection
and for freezing and restarting programs.
	sml2c is available by anonymous ftp from dravido.soar.cs.cmu.edu
(128.2.220.26). Log in as anonymous, send username@node as password.  The
compressed tar file sml2c.tar.Z can be found in /usr/nemo/sml2c.  The local
ftp software will allow you to change directory only to /usr/nemo/sml2c.
The size of the tar file is about 3 Meg. The size of the uncompressed
distribution is about 12 Meg.



WORK IN PROGRESS

There are 2 implementations of SML currently being developed.  There are also
some implementations of non-standard extensions available.  These are all
described here.  In addition to these extensions, several people are working
on extensions to the theory underlying SML.  For example, the LFCS has a
research team working on the semantics of a concurrent extension to SML.


ML Kit.
	The LFCS is developing an implementation to serve as a base for
experiments in language design.  The code reflects the semantics as directly
as possible.
	At present the ML Kit can only be run on another implementation
of Standard ML.  Run like this it is slow and needs at least 16M of heap
space to run and 3 times that to compile.
	The Kit Compiler is not available yet.


Harlequin MLWorks.
	Harlequin limited are currently developing MLWorks to support
programming in Standard ML.  This product will provide an integrated
design and development environment supporting programming in the small
and in the large.  The environment will also support the specification
of ML programs using Extended ML.  Harlequin's product is being
developed with both the industrial and academic user in mind.  MLWorks
will be available for use on a large number of hardware platforms.
	Integrated within MLWorks will be an industrial-strength compiler
for Standard ML. Harlequin plans to launch the compiler separately during
the first quarter of 1992.


Extended ML

	The LFCS has implemented a parser and type checker for Extended ML,
based upon the Kit Compiler.  They are currently undergoing some tests.
In the near future we hope to have this connected to a theorem prover,
either Larry Paulson's Isabelle system or Randy Pollack's LEGO system.
Support tools for program development are still in the design stage and
are closely linked with the semantics of Standard ML.  These tools are
not available yet.


CML (Concurrent ML)
	CML is a concurrent extension of SML/NJ, supporting dynamic thread
creation, synchronous message passing on synchronous channels, and first-class
synchronous operations.  First-class synchronous operations allow users to
tailor their synchronization abstractions for their application.  CML also
supports both stream I/O and low-level I/O in an integrated fashion.
	CML is available, with documentation, via anonymous ftp from
ftp.cs.cornell.edu.  Connect to cs.cornell.edu (128.84.254.1), use the login
id "anonymous" and your name as the password and go to the directory "/pub."
The file CML-0.9.tar.Z contains the complete distribution, including the
manual, and the file CMLDOC-0.9.ps contains just the manual.  Mail
cml-bugs@cs.cornell.edu for more information.

	
LCS (a Language for Communicating Systems)
	LCS implements the core language (without modules), extended with
Higher Order CCS behaviours.  Behaviours are "first-class" and are defined
as Standard ML values of specific types that may be turned into processes.
Agent constructs include all those of CCS, with some extensions.  LCS is
implemented as a byte-code interpreter, written in C; it runs on virtually
all Unix machines and on Apple Macintoshes.  Core images are portable.
	Two interactive user interfaces are provided: an executive and a
simulator. In addition to SML, the executive allows users to start and manage
processes, either foreground or background (the top-level runs itself as
an LCS process).  The simulator implements a set of commands for interactively
expanding LCS agents, under full control of the user.
	LCS runs between 6 times slower than SML-NJ on toy examples and 2
times slower on large examples (including garbage collection time, measured
on a locally used 7000 lines ML application).  Message passing between
processes is about 5 times slower than functional parameter passing.  It
requires about 2-4MB.
	LCS for Sun3 and Sun4 machines is available by anonymous FTP from
laas.laas.fr (140.93.0.15).  Login as anonymous with your name as password,
directory /pub/lcs.  Copy files V2-9R1.tar.Z, doc.tar.Z, bin.tar.Z and the
binary file(s) for your machine(s) and operating system(s).  Contact Bernard
Berthomieu (bernard@laas.laas.fr) for more information.


SourceGroup
	The SourceGroup separate compilation system for SML/NJ provides
functions to keep an SML environment up to date with respect to a set of
source files.  A source file dependency graph is maintained either
automatically (by examining the source files for use/definition of modules),
or manually by the user (through a file declaring use/definition of modules).
	To get SourceGroup, use anonymous ftp to connect to the machine
vista.venari.cs.cmu.edu. Use login id "anonymous" with your name as password,
and go to directory pub (command "cd pub").  Then put ftp in binary mode
(command "binary") and transfer the file sourcegroup.tar.Z (command "get
sourcegroup.tar.Z").  Contact Gene Rollins (rollins@cs.cmu.edu) for more
information.


OBSOLETE IMPLEMENTATIONS

Edinburgh ML 3.5.
	Edinburgh ML 3.5 is a predecessor of Edinburgh ML 4.0.  It uses the
old style exceptions, and includes an obsolete version of the modules system.
It is mentioned here because it is available on the Macintosh.
	Edinburgh ML 3.5 is available in the UK by e-mail from the LFCS.  We
will also distribute it on a tape, as for Edinburgh ML 4.0.  It is also
available from Meta Software (Peter Hendersen, pbh@sbcs.sunysb.edu).


Rutherford ML.
	Rutherford ML is an implementation of the core language that runs
on Franz Lisp.  It is no longer maintained, and is only distributed with
the Cambridge LCF system (which it supports).
	Rutherford also supply an SML-YACC parser generator, which runs on
Edinburgh ML and Poly/ML, and will soon run on New Jersey ML.
	Both SML-YACC and Cambridge LCF are available from Brian Matthews
(bmm@uk.ac.rl.inf).

--
 Dave Berry, LFCS, Edinburgh Uni.      db%dcs.ed.ac.uk@nsfnet-relay.ac.uk
From: sfk@otter.hpl.hp.com (Steve Knight)
Date: Fri, 6 Nov 1992 10:05:53 GMT
Subject: Re: arbitrary precision integer arithmetic in SML/NJ?
Organization: Hewlett-Packard Laboratories, Bristol, UK.