Skip to content

Experimental implementation of a meta-hybrid JIT compiler mixing trace- and method-based compilation strategies.

License

Notifications You must be signed in to change notification settings

prg-titech/baccaml

Repository files navigation

BacCaml: The Meta-Hybrid Just-In-Time Compiler

Build Status

Trace-based compilation and method-based compilation are two major compilation strategies in JIT compilers. In general, the former excels in compiling programs with more in-depth method calls and more dynamic branches, while the latter is a suitable wide range of applications.

This project aims at developing a fundamental mechanism for compiling with both trace-based and method-based strategies. Instead of developing a compiler for one particular language, we provide such a mechanism in a meta-compilation framework that generates a virtual machine with a JIT compiler from an interpreter definition of a programming language.

We are developing the BacCamel meta-compiler framework as a proof-of-concept, which is based on the MinCaml compiler.

Prerequisites

  • Linux operating system
  • OCaml >= 4.10.0+32bit

Running BacCaml Framework

To set up BacCaml, plese follow these instructions:

$ opam switch create 4.10.0+32bit
$ opam install -y ppx_deriving ppx_inline_test

Next, write your own interpreter with BacCaml. For reference, please see the implementation of the PMinCaml language.

Papers

If you cite this work, please use the DLS'20 paper on "Amalgamating Different JIT Compilations in a Meta-tracing JIT Compiler Framework"

2020

  • DLS'20: Yusuke Izawa, Hidehiko Masuhara. "Amalgamating Different JIT Compilations in a Meta-tracing JIT Compiler Framework". [url]

  • Master's thesis: Yusuke Izawa, "Stack Hybridization: A Mechanism for Bridging Two Compilation Strategies in a Meta Compiler Framework". [url]

2019

  • MoveVMs'19 workshop: Yusuke Izawa, Hidehiko Masuhara, Tomoyuki Aotani, "Extending a Meta-tracing Compiler to Mix Method and Tracing Compilation". [url]

  • Student Research Competition at <Programming> 2019: Yusuke Izawa, "BacCaml: The Meta-hybrid Just-In-Time Compiler". [url]