Software Engineering and Architecture Group (SEARCH) > CS > JBI > FWN > RUG

Java in Java via Truffle

Truffle is a framework in Java for defining high-performance interpreters, to be run on top of the GraalVM. It has been successfully used to define fast interpreters for Ruby, Javascript, and C. In this project, the goal is to define an interpreter for Java within Java, using Truffle, and evaluating its performance.

The goal of a meta-circular interpreter for Java is motivated as follows. Recent work in language extension is based on "virtualizing" method bodies into code that, instead of directly executing, interprets ASTs representing the original statements and expressions (see: Biboudis et al., Recaf: Java Dialects as Libraries, GPCE'16). This approach is extremely flexible and modular, but limited by the interpretative overhead incurred by virtualization. Truffle could be used to eliminate this overhead.

Deliverables:

  • A Truffle-based interpreter for the statements and expressions subset of Java 8.
  • Benchmarking of its performance compared to a vanilla interpreter.
  • Perform case-studies in the context of Recaf.

Contact: Tijs van der Storm.