Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 2.6 KB

README.md

File metadata and controls

78 lines (56 loc) · 2.6 KB

Tril

Tril is a Domain Specific Language (DSL) for generating the Testarossa Intermediate Language (IL). Its goal is to simplify testing Testarossa by providing very fine control over the IL that is fed into the compiler.

Overview

The Tril implementation is a small library with a parser and IL generator, located in the tril/ directory. It provides the core tools for dealing with Tril code. Compilation and executing of Tril code is implemented separately. This allows custom tools to be easily developed on top of Tril.

The examples/ directory contains examples demonstrating how to implement compilation and execution of Tril code.

The test/ directory contains some GTest-based test cases for Tril.

Building Tril

  1. Make sure you have the latest versions of cmake installed on your machine.

  2. Clone the Eclipse OMR repo:

    git clone https://github.com/eclipse/omr.git
  3. Build tril using cmake. To ensure OMR gets built in a compatible configuration, we currently recommend you use the CMake cache that drives our Azure builds.

    mkdir build
    cd build
    cmake -C../cmake/caches/Travis.cmake ..

    At this point you can use whatever generated build system to build tril:

    make tril
    
  4. You should now have a static archive called libtril.a

  5. You can build the tests by building triltest, or the compiler tests built using tril by by building comptest. There's also the mandelbrot and incordec examples.

  6. Enjoy the view!

    ./fvtest/tril/examples/mandelbrot/mandelbrot ../fvtest/tril/examples/mandelbrot/mandelbrot.tril