Skip to Main content Skip to Navigation
Journal articles

Automatic generation of Truffle-based interpreters for Domain-Specific Languages

Manuel Leduc 1, * Gwendal Jouneaux 1 Thomas Degueule 2 Gurvan Le Guernic 3 Olivier Barais 1 Benoit Combemale 4, 1
* Corresponding author
1 DiverSe - Diversity-centric Software Engineering
Inria Rennes – Bretagne Atlantique , IRISA-D4 - LANGAGE ET GÉNIE LOGICIEL
4 IRIT-SM@RT - Smart Modeling for softw@re Research and Technology
IRIT - Institut de recherche en informatique de Toulouse
Abstract : Numerous language workbenches have been proposed over the past decade to ease the definition of Domain-Specific Languages (DSLs). Language workbenches enable language designers to specify DSLs using high-level metalanguages and to generate their implementation (e.g., parsers, interpreters) and tool support (e.g., editors, debuggers) automatically. However, little attention has been given to the performance of the resulting interpreters. In many domains where performance is key (e.g., scientific and high-performance computing), this forces language designer to hand-craft ad-hoc optimizations in the interpreter implementations, or to lose compatibility with tool support. In this paper, we propose to systematically exploit the domain-specific information of language specifications to derive optimized Truffle-based language interpreters executed over the GraalVM. We implement our approach on top of the Eclipse Modeling Framework (EMF) by complementing its existing compilation chain with Truffle-specific information, which drives the GraalVM to benefit from an optimized just-in-time compilation. A key benefit of our approach is that it leverages existing language specifications and does not require additional information from language designers who remain oblivious of Truffle's low-level intricacies and JIT optimizations in general while staying compatible with tool support. We evaluate our approach using a representative set of four DSLs and eight conforming programs. Compared to the standard interpreters generated by EMF running on the GraalVM, we observe an average speed-up of x1.14, ranging from x1.07 to x1.26. Although the benefits vary slightly from one DSL or program to another, we conclude that our approach yields substantial performance gains while remaining non-intrusive of EMF abstractions.
Document type :
Journal articles
Complete list of metadata
Contributor : Benoit Combemale Connect in order to contact the contributor
Submitted on : Sunday, February 21, 2021 - 10:15:07 PM
Last modification on : Thursday, November 18, 2021 - 9:24:02 PM


Files produced by the author(s)



Manuel Leduc, Gwendal Jouneaux, Thomas Degueule, Gurvan Le Guernic, Olivier Barais, et al.. Automatic generation of Truffle-based interpreters for Domain-Specific Languages. The Journal of Object Technology, Chair of Software Engineering, 2020, 19 (2), pp.1-21. ⟨10.5381/jot.2020.19.2.a1⟩. ⟨hal-02395867v2⟩



Les métriques sont temporairement indisponibles