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.
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.
-
Make sure you have the latest versions of cmake installed on your machine.
-
Clone the Eclipse OMR repo:
git clone https://github.com/eclipse/omr.git
-
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
-
You should now have a static archive called
libtril.a
-
You can build the tests by building
triltest
, or the compiler tests built using tril by by buildingcomptest
. There's also themandelbrot
andincordec
examples. -
Enjoy the view!
./fvtest/tril/examples/mandelbrot/mandelbrot ../fvtest/tril/examples/mandelbrot/mandelbrot.tril