Monday, February 22, 2010

Mathias' Mint Talk

On February 8, Mathias gave a talk about Mint in the COMP 600 graduate seminar at Rice. The slides for "Mint: A Multi-stage Extension of Java" and the video recording are available now:

Slides (PDF)
Slides (PowerPoint)
Video Recording (on vimeo, requires Flash)

Abstract:

Multi-stage programming (MSP) provides a safe way of generating code at run-time. In mostly-functional languages like MetaOCaml, this has been used to reduce the performance penalties of abstractions such as loops, recursion or interpretation. The main advantage of MSP compared to other techniques, such as string or LISP quotations, is that MSP guarantees type safety for the generated code statically, at the time the program is compiled.

Unfortunately, MSP is difficult to combine with imperative features found in most mainstream languages like Java. The central problem is "scope extrusion", which may accidentally move variables outside the scopes in which they are bound, leading to run-time errors in the generated code. This problem can be prevented if code in escapes (or "anti-quotes") is "weakly separable", i.e. the computational effects occurring inside an escape that are visible from the outside do not involve code.

We have formalized a type system, based on Lightweight Java, that uses weak separability to prevent scope extrusion, and we have proved that the type system is sound. We have also developed an implementation called Mint to demonstrate the expressivity of the type system and the performance benefits MSP can provide in an imperative setting. Since our implementation extends the Java language, our work is accessible to mainstream programmers.

This talk is based on work done in collaboration with Edwin Westbrook, Jun Inoue, Yilong Yao, Tamer Abdelatif, and Walid Taha. A paper titled Mint: Java Multi-stage Programming Using Weak Separability has been accepted for publication in the Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2010).

Wednesday, February 17, 2010

New Mint Release: r15116

I just created a new release of Mint and DrJava with Mint: February 17, 2010 (r15116). The release is available from the Mint implementation page:
There were some small changes in the approximation of weak separability to make the implementation match improvements in the paper more closely. It also disallows stitching in a Code<?> as a statement, because we can't statically know if we have to discard the result in a statement context or not.

Friday, February 12, 2010

New Mint Release: r15085

I just created a new release of Mint and DrJava with Mint: February 12, 2010 (r15085). The release is available from the Mint implementation page:
The two changes since the last release involve CSP values and escapes in bracket statements. Instead of storing CSP values in a CSP table, we now store CSP values in individual fields. This reduces the overhead by eliminating an array lookup. The serializer benchmark benefited from this, for example.

We now also allow non-void escapes in bracket statements. For example, the following code is now allowed:

Code<Integer> x = <| 1 |>;
Code<void> c = <| { `x } |>;


In the past, this caused an error because 1 was not a statement. The Mint compiler now accepts this and discards the result of the escape if it is used in statement form, but it does emit a warning.

Monday, February 8, 2010

Great News

Our paper, "Mint: Java Multi-stage Programming Using Weak Separability" (pre-print PDF), has been accepted to PLDI 2010. We look forward to spreading the word about Mint in Toronto!

Mathias just gave the first presentation about Mint in the COMP 600 graduate seminar at Rice. The slides for "Mint: A Multi-stage Extension of Java" are available (PDF).

Finally, you may already have noticed that the blog has a new URL: www.javamint.org. We currently also have some problems with the implementation URL; for now, you can use http://mint.concutest.org as a resource hub for everything Mint-related.