First of all, get the source code by cloning the release repository.

git clone


For building the generator, a JDK is required. We recommend using version 11.

IDE Support

We recommend using IntelliJ IDEA (the community edition is fine). Downloads can be found here.

Using an IDE is not required. Instructions on how to do things without it can be found here.

Setting up the IDE for Coding

If you plan to commit code please use our code style. It is located in /Documentation/IntelliJ/ExaStencils.xml and can be imported like this:

  • File -> Settings -> Editor -> Code Style -> Scala -> Import Scheme (click small gear) -> IntelliJ IDEA code style XML

  • locate /Documentation/IntelliJ/ExaStencils.xml

  • ok

If you are used to another IDE, e.g. Eclipse, setting the keymap to an according style may be helpful:

  • File -> Settings -> Keymap -> Eclipse

Compiling the Generator

  • If IntelliJ is opened the first time:

    • Open

    • select path in which you checked out the git repository -> ok

    • ok

  • If already in the IDE:

    • File -> New -> project from existing sources

    • select path in which you checked out the git repository -> ok

    • import project from external model -> sbt -> next

    • Finish

  • if ‘Add Files to Git’ dialogue opens -> don’t add anything (press cancel)

  • check that everything works: Build -> Build Project

  • Note: in some configurations it might be necessary to add the Scala SDK under Project Structure -> Global Libraries. Otherwise no files will be compiled (build still succeeds).

Creating a JAR

Inside the IDE do the following to create a task to assemble the jar:

  • Run -> Edit configurations

    • green plus (upper left corner) -> sbt Task

    • fill name : assembly

    • fill tasks : assembly

    • Ok

The first step has to be done only once. Afterwards running the task is sufficient to assemble the jar(s).

  • Run -> Run ‘assembly’ (if this is not available use Run -> Run… and select assembly manually)

alternatively, adding artifacts in IntelliJ is possible as well and often faster:

  • File -> Project Structure -> Project Settings -> Artifacts -> Click green plus sign -> Jar -> From modules with dependencies

    • Module: Compiler

    • Main Class: Main

    • ok

  • Output Directory -> $path_to_your_git$\Compiler

  • ok

The jar can then be created using

  • Build -> Build Artifacts -> Compiler.jar -> build

Artifacts can be added for the other sub-projects in a similar fashion.


For users that don’t want to use an IDE or want to compile on the command line, sbt is required.

If you are using Windows, we recommend using Ubuntu Shell which is part of the Windows Subsystem for Linux (WSL).

The first step is installing sbt – a guide can be found here

Next, open a shell and locate the folder the git repository has been checked out to. Compilation is done via typing

sbt compile

To assemble a jar the following command is available

sbt assembly

CImg support

For CImg support, the corresponding CImg.h header file needs to be downloaded such that it can be used as ressource by our generator. This can be done in three different ways:

  • for users using sbt on the command line: sbt downloadCImg

  • for IntelliJ users:

    • Run -> Run -> 0: Edit Configurations -> + -> sbtTask

    • Name: downloadCImg; Tasks: downloadCImg; Run

  • for all users: directly download the required file from here and place it in Compiler/res/ Updating the file works the same way.