Automatic generation of Truffle-based interpreters for Domain-Specific Languages - Inria - Institut national de recherche en sciences et technologies du numérique
Article Dans Une Revue The Journal of Object Technology Année : 2020

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

Résumé

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.
Fichier principal
Vignette du fichier
Truffle_Based_Systematic_Optimizations_of_DSL_Interpreters (3).pdf (606.55 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-02395867 , version 1 (05-12-2019)
hal-02395867 , version 2 (21-02-2021)

Identifiants

Citer

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, 2020, 19 (2), pp.1-21. ⟨10.5381/jot.2020.19.2.a1⟩. ⟨hal-02395867v1⟩
571 Consultations
1340 Téléchargements

Altmetric

Partager

More