eregon / mozart-graal

An implementation of Oz on top of Truffle and Graal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mozart-Graal

Build Status

An implementation of the Oz programming language on top of Truffle and Graal.

The bootcompiler and Oz libraries are imported from Mozart 2.

Interesting Points

  • A master thesis was made with this project to optimize performance. It details many static and dynamic optimizations.

  • Tail calls are optimized and compiled as loops, see TailCallCatcherNode. Self-recursion is optimized further in SelfTailCallCatcherNode.

  • There is a Truffle AST serializer in OzSerializer using Kryo able to serialize Oz code.

  • The project uses the Coroutine patch for HotSpot to be able to create many lightweight threads.

  • The parser, typer, and some optimizations are written in Scala (bootcompiler/) and the AST produced by Scala is then translated to a Truffle AST in Translator.

Current Status

Early stage but the Panel and Browser are working.

The Panel On Mozart-Graal

Dependencies

  • Java 8
  • Maven 3
  • C/C++ toolchain (build-essential) for building Graal
  • Python 2.7 (for mx)
  • Ruby >= 2.2.0 (for the launcher)

Build instructions

mkdir mozart-dev
cd mozart-dev
git clone https://github.com/eregon/mozart-graal.git
cd mozart-graal
rake

It takes around 5 min to build everything.

Run with

./oz

Graal

Graal is not built by default to save time. To build it, run

rake build:graal

On recent Linux, you need to do part of the build manually, see Building JVMCI.

IDE: IntelliJ IDEA

IntelliJ IDEA configuration are checked in the repository and should work out of the box. Import mozart-dev as a project.

About

An implementation of Oz on top of Truffle and Graal

License:BSD 2-Clause "Simplified" License


Languages

Language:Oz 79.1%Language:Java 10.3%Language:Scala 5.2%Language:Emacs Lisp 3.5%Language:C++ 0.9%Language:HTML 0.5%Language:Ruby 0.3%Language:Shell 0.1%Language:Python 0.1%Language:Makefile 0.0%Language:Dockerfile 0.0%Language:Batchfile 0.0%