Jumbo - a Staged Compilation System for Java
Development of Jumbo was supported by NSF grants 9988307 and 0306221.
Jumbo is a staged compilation system for Java. It allows code fragments to be created, passed around, combined and eventually compiled to bytecode in an efficient and flexible manner.
For instance, this program
import uiuc.Jumbo.Util.*;
import uiuc.Jumbo.Jaemus.*;
import uiuc.Jumbo.Compiler.*;
public class HelloStaged {
public static void main(String argv[]) {
Code c = $<
public class Hello {
public static void main(String[] argv) {
System.out.println("Hello, world!");
}
}
>$;
c.generate();
}
}
is a legal Jumbo using simple quotation. When compiled, it will produce a Java program that, when run, will in turn create the archetypical first program, Hello World:
$ ls
HelloStaged.java
$ jumbo HelloStaged.java
$ ls
HelloStaged.class HelloStaged.java
$ java HelloStaged
$ ls
Hello.class HelloStaged.class HelloStaged.java
$ java Hello
Hello, world!
See this
overview of Jumbo for more details on what Jumbo can be used for. The (outdated)
Jumbo documentation is also available.
For most up-to-date information see our publications.