Automatic Generation of Truffle-based Interpreters for Domain-Specific Languages. Leduc, M., Jouneaux, G., Degueule, T., Le Guernic, G., Barais, O., & Combemale, B. J. Object Technol. (Special Issue for ECMFA 2020 Proceedings), 19(2):1:1–21, 2020.
Automatic Generation of Truffle-based Interpreters for Domain-Specific Languages [link]Paper  doi  abstract   bibtex   
Numerous language workbenches have been proposed over the past decade to ease the definition of Domain-Specific Languages (DSLs).Language workbenches enable DSL designers to specify DSLs using high-level metalanguages, and to automatically generate their implementation (e.g., parsers, interpreters) and tool support (e.g., editors, debuggers). 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 DSL designers to handcraft ad-hoc optimizations in interpreter implementations, or lose compatibility with tool support. In this paper, we propose to systematically exploit domain-specific information of DSL specifications to derive optimized Truffle-based language interpreters executed over the GraalVM. Those optimizations are provided at no extra cost for the DSL designer. They are of course not as efficient as handcrafted optimizations, but do not require extra time or knowledge from the DSL designer (which industrial DSL designers often lack). We implement our approach on top of the Eclipse Modeling Framework (EMF) by complementing its existing compilation chain with Truffle-specific information, which drives GraalVM to benefit from optimized just-in-time compilation. A key benefit of our approach is that it leverages existing DSL specifications and does not require additional information from DSL 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 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.
@article{leduc2019automatic-dblp,
  abbr      = {{ECMFA'20}},
  author    = {Leduc, Manuel and 
               Jouneaux, Gwendal and 
               Degueule, Thomas and 
               Le Guernic, Gurvan and 
               Barais, Olivier and 
               Combemale, Benoit},
  title     = {Automatic Generation of Truffle-based Interpreters for Domain-Specific Languages},
  journal   = {J. Object Technol. (Special Issue for ECMFA 2020 Proceedings)},
  volume    = {19},
  number    = {2},
  pages     = {1:1--21},
  year      = {2020},
  url       = {https://doi.org/10.5381/jot.2020.19.2.a1},
  doi       = {10.5381/jot.2020.19.2.a1},
  abstract  = {{ Numerous language workbenches have been proposed over the past decade to ease the 
              definition of Domain-Specific Languages (DSLs).Language workbenches enable DSL designers 
              to specify DSLs using high-level metalanguages, and to automatically generate their 
              implementation (e.g., parsers, interpreters) and tool support (e.g., editors, debuggers). 
              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 DSL designers to handcraft ad-hoc optimizations in interpreter implementations, 
              or lose compatibility with tool support. In this paper, we propose to systematically exploit 
              domain-specific information of DSL specifications to derive optimized Truffle-based language 
              interpreters executed over the GraalVM. Those optimizations are provided at no extra cost for 
              the DSL designer. They are of course not as efficient as handcrafted optimizations, but do not 
              require extra time or knowledge from the DSL designer (which industrial DSL designers often lack). 
              We implement our approach on top of the Eclipse Modeling Framework (EMF) by complementing its 
              existing compilation chain with Truffle-specific information, which drives GraalVM to benefit 
              from optimized just-in-time compilation. A key benefit of our approach is that it leverages existing
              DSL specifications and does not require additional information from DSL 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 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.}}
}

Downloads: 0