ResearchCompilers related to SML.NETMLj was a predecessor of SML.NET that targeted the Java Virtual Machine. Publications related to SML.NETShrinking Reductions in SML.NET One performance-critical phase in the SML.NET compiler involves rewriting intermediate terms to monadic normal form and performing non-duplicating β-reductions. We present an imperative algorithm for this simplification phase, working with a mutable, pointer-based term representation, which significantly outperforms our existing functional algorithm. This is the first implementation and evaluation of a linear-time rewriting algorithm proposed by Appel and Jim. Adventures in Interoperability: The SML.NET Experience. SML.NET is a compiler for Standard ML that targets the Common Language
Runtime and is integrated into the Visual Studio development environment. It
supports easy interoperability with other .NET languages via a number of
language extensions, which go considerably beyond those of our earlier compiler,
MLj. Exceptional Syntax
From the points of view of programming pragmatics, rewriting and operational
semantics, the syntactic construct used for exception handling in ML-like
programming languages, and in much theoretical work on exceptions, has subtly
undesirable features. We propose and discuss a more well-behaved construct. Monads, Effects and Transformations We define a typed compiler intermediate language, MIL-lite, which incorporates computational types refined with effect information. We
characterise MIL-lite observational congruence by using Howe's method to prove a ciu theorem for the language in terms of a
termination predicate defined directly on the term. We then define a logical predicate which captures an observable version of Interlanguage
Working Without Tears: Blending SML with Java A good foreign-language interface is crucial for the success of any modern programming language implementation. Although all serious compilers for functional languages have some facility for interlanguage working, these are often limited and awkward to use. This article describes the features for bidirectional interlanguage working with Java that are built into the latest version of the MLj compiler. Because the MLj foreign interface is to another high-level typed language which shares a garbage collector with compiled ML code, and because we are willing to extend the ML language, we are able to provide unusually powerful, safe and easy to use interlanguage working features. Indeed, rather then being a traditional foreign interface, our language extensions are more a partial integration of Java features into SML. We describe this integration of Standard ML and Java, first informally with example program fragments, and then formally in the notation used by The Definition of Standard ML. Compiling Standard ML to Java Bytecodes MLJ compiles SML'97 into verifier-compliant Java bytecodes. Its features include type-checked interlanguage working extensions which allow ML and Java code to call each other, automatic recompilation management, compact compiled code and runtime performance which, using a `just in time' compiling Java virtual machine, usually exceeds that of existing specialised bytecode interpreters for ML. Notable features of the compiler itself include whole-program optimisation based on rewriting, compilation of polymorphism by specialisation, a novel monadic intermediate language which expresses effect information in the type system and some interesting data representation choices. Related WorkDon Syme's F# compiler. Both MLj and SML.NET were developed using the Standard ML of New Jersey compiler. |