The MLj Compiler


MLj is a complete system for SML to Java bytecode compilation. Its features include:

Why use MLj?

If you're an ML programmer, MLj lets you keep using your favourite language whilst taking advantage of Java's growing infrastructure: If you're a Java programmer, MLj brings you the benefits of interworking with a powerful and elegant modern functional programming language. ML's algebraic datatypes, pattern matching, higher-order functions, type inference and great module system make code shorter, easier to reason about and easier to maintain. You can use MLj to write just part of a Java application in ML, using each language for the things it's best at.

Limitations of MLj 0.2

MLJ is designed for writing compact stand-alone applications, applets and libraries and does not have ML's usual interactive top-level read-eval-print loop. Instead, it operates much more like a traditional batch compiler. Much existing ML code has no real user interface at all - it just consists of a collection of definitions which are used by calling functions from within the interactive ML environment. Such programs have to have at least some user interface code added before they can be compiled into stand-alone applications with MLJ.

MLj 0.2 is a snapshot of the development effort at Persimmon IT. As such, and apart from the inevitable bugs, it has a number of limitations which will be addressed in future releases. The most serious are:

Availability and System Requirements

MLj 0.2 may be downloaded and used under the GNU Public license. We currently have pre-built binaries available for x86 (Linux and Win32) and Sparc (Solaris), and source-only distribution available for installation on systems that have the SML/NJ compiler.

MLj runs best on a fairly powerful machine (what doesn't?). We certainly wouldn't really recommend trying to use it with less than 32MB of RAM or a processor slower than a 100MHz Pentium. The full distribution requires around 13MB of disk space.

You'll also need the standard Java class libraries and some way to run Java programs. The best thing to do is to get a copy of Sun's Java Development Kit (or one of its many ports), or some other third-party Java development environment, such as Microsoft's SDK for Java. It is also possible to work with just a copy of Netscape for running programs and providing the libraries against which MLj compiles (you'll also need an unzip program if you have a recent version of Netscape which stores the standard class libraries in compressed format).

Documentation

The MLj Team

MLj was developed by Nick Benton , Andrew Kennedy and George Russell of Persimmon IT's Cambridge research group and the download site is currently hosted by Ian Stark and Tom Chothia of the University of Edinburgh.


MLj home Comments to: mlj@dcs.ed.ac.uk