Poly/ML Home
About Poly/ML
Support for Poly/ML
Documentation
Get Poly/ML
About Poly/ML

Table of Contents

  1. History and Acknowledgements
  2. How much of Standard/ML does Poly/ML support?
  3. What else does Poly/ML provide?
  4. Will Poly/ML run on my computer?
  5. What is the persistent store?
  6. What does "No room in pages" mean?
  7. Where has discgarb/changeParent gone?
  8. How do I use X-Windows/Motif in Linux?
  9. How do I make a stand-alone application?

History and Acknowledgements

Poly/ML was originally written by David Matthews at the Computer Laboratory at Cambridge University.  It was written in an experimental language, Poly, similar to ML but with a different type system.  Among the first users was Larry Paulson who used it to develop the Isabelle theorem prover.  It was licensed by Cambridge University's company Cambridge University Technical Services, then called Lynxvale, to Abstract Hardware Limited (AHL) who developed it further and used it to write the Lamba system for hardware verification as well as other tools.  Mike Crawley did significant work on the run-time system and Simon Finn was heavily involved in translating Poly/ML from Poly into Standard ML.  Nick Chapman (nic@truthmachine.demon.co.uk) wrote the C-language interface. In 1999 AHL's rights in Poly/ML were acquired by CUTS and they agreed to make Poly/ML freely available.

Early last year David Matthews started on the implementation of the Standard Basis Library and the conversion to the 1997 Definition of Standard ML (Revised).  This work was supported in part by LFCS.

Back to Top

How much of Standard/ML does Poly/ML support?

Since the version 4.0 release Poly/ML now supports the full version of the language as given in the "Definition of Standard ML (Revised)", generally known as ML97.

Back to Top

What else does Poly/ML provide?

As well as being extremely fast and efficient implementation of Standard ML Poly/ML provides several additional features.  Program state can be saved in a memory-mapped persistent store.  There is a foreign language interface which allows dynamically linked libraries to be loaded and functions within them called from ML.   An X-Windows interface using Motif is available and a Windows programming interface.  There is also a symbolic debugger for Poly/ML.

Back to Top

Will Poly/ML run on my computer?

Poly/ML is available for the most popular architectures and operating systems.   There are native code versions for the i386, Power PC and Sparc architectures.   There are ready made distributions for i386/Windows (NT and 95/98), i386/Linux, Sparc/Solaris and MacOS-X.  You may be able to get Poly/ML to run on other operating systems by compiling from source.  There is a byte-code interpreted version which can be used on unsupported architectures.

Back to Top

What is the persistent store?

The persistent store is a way of saving program state (the declarations made in an interactive session) from one session to the next.  Other implementations of Standard ML provide something similar.  The main differences are that Poly/ML uses memory-mapping to load the saved state into working memory rather than reading it in.   This greatly reduces the start-up time of a session and improves the virtual memory behaviour of the program as well as reducing the load on the garbage collector.

Back to Top

What does "No room in pages" mean?

There is a limit on the size a database can reach which is different for different operating systems.  The current limit for Linux is 32Mbytes.  There is a beta version of the driver which allows databases to grow to up to 99Mbytes.  This message means that the database has reached this limit and "commit" has failed.  If you get this message the first thing to do is to run discgarb on the database to reduce its size.  Using the "-c" option to share common values may well help.   Another alternative is to create a child database using "PolyML.make_database".  Since the limit is per database this effectively doubles the space available.

Back to Top

Where has discgarb/changeParent gone?

The database garbage collector discgarb and the changeParent program have both been incorporated into the poly program.  To compact a database use poly with the -d option.  An additional option -c can be used to run the common-expression elimination phase.  The -p option changes the parent of a database as with changeParent.  If you need a discgarb or changeParent program, for instance if you have scripts which assume them, you can get the old behaviour simply by creating links to the poly binary called discgarb and changeParent.  Invoking the binary through these names will work as though the appropriate option had been given.

Back to Top

How do I use X-Windows/Motif in Linux?

Support for X-Windows/Motif is included in the release for Sparc/Solaris since the Motif libraries are included as part of Solaris.  The other distributions do not include X-Windows/Motif but you can add support yourself.  If you want to use X-Windows/Motif with, say, Linux, you need to install the appropriate libraries (e.g. lesstif or openmotif) and then compile the structures into Poly/ML.

Assuming you've installed the appropriate libraries and header files for X-Windows/Motif you need to download the sources for the driver (poly program) and mlsource appropriate for the version of Poly/ML you're running.  Unpack the sources and change to the driver directory.   Build the driver (poly program) by typing:
./configure
make

When you run configure you should see a message saying that X-Windows support is being included.  When make has completed you will have a poly program.

Using this poly program compile in the X-Windows/Motif structures from the mlsource directory using the following ML commands:

PolyML.Compiler.ml90 := true;
PolyML.make "mlsource/extra/XWindows"
PolyML.Compiler.ml90 := false;
PolyML.make "mlsource/extra/Motif"

Commit the database as usual and you will now be able to run the examples.

Back to Top

How do I make a stand-alone application?

At present it is not possible to make a single stand-alone executable.  There is work going on to do this but it isn't at the stage where it can be released. 

You can get close to this by setting up a database to run your application function and having Poly run your application when the database is started rather than running the Poly/ML compiler.

The simplest way to do this is to use the PolyML.onEntry function.  This function installs a function to be run when the database is started, before the main Poly/ML begins.  For example:

> PolyML.onEntry(fn () => print "Welcome to my program\n");

followed by EOT (control-D) to save the changes and quit will cause this message to be printed before the main loop.  If your function exits by calling OS.Process.exit (or PolyML.quit) the Poly/ML compiler will never be run.

This has only one drawback: the database will contain both your application and the compiler and you will not be able to remove the compiler by running the disc garbage collector (poly -d).  If you need to reduce the space you are forced to use a rather awkward method. 

Back to Top

Last updated: 15 April 2002 by David Matthews.