Java/Scala Compilers

ThingML models can be compiled to Java/Scala code. Scala is a JVM-based language (hence seamlessly compatible with Java), which extends Object-Oriented principles with functional programming. In particular, Scala provides an actor library for lightweight and scalable concurrent and asynchronous programming, very much aligned with ThingML philosophy.


This family of compilers produces Maven projects, which are then rather easy for users to build and execute. Please make sure you have Maven correctly installed on your computer. In a terminal, type

mvn --version

to check Maven is properly installed.


The goals of this family of compilers are to:

  • Simulate the behavior of things in a controlled environment (JVM), where it is easy to connect to other tools for visualization, etc. After simulation, the same ThingML model could then be compiled to target microcontrollers.
  • Implement the server-side application logic (running in the Cloud on in Java-based gateways), which should realize complex tasks such as bridging low-level optimized communication/data protocols running on things to high-level standard protocols (like HTTP, REST, SenML) already in use in the Internet of Services.

Familly of compilers

All these compilers are implemented in Scala.

  • ThingML to SMAc: This is the main compiler of the Java/Scala family. It targets SMAc (State Machine with Actors), a Scala framework for implementing operational state machines. It also defines a lightweight component model. Source code.
  • ThingML to Kevoree: This compiler wraps the results of the previous compiler into Kevoree component. Kevoree is a model-driven dynamic component model. This makes it possible to deploy ThingML components on different nodes, and dynamically manage ThingML applications. Source code.
  • ThingML to GUI Mock-ups: