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.

Highlights

  • Numerous language workbenches [EVDSV+15] have been proposed over the past decade to ease the development of Domain-Specific Languages (DSLs)

  • As we target GraalVM and the Interpreter implementation pattern, we first investigate the impact of the transition to those two options

  • We propose an optimized alternative to the standard execution framework for metamodel-based interpreted DSLs, while preserving the compatibility with existing tool support

Read more

Summary

Introduction

Numerous language workbenches [EVDSV+15] have been proposed over the past decade to ease the development of Domain-Specific Languages (DSLs). We can cite industrial language workbenches such as MetaEdit+ [TR03], MPS [Voe11], EMF [SBMP08], or academic projects such as Rascal [BvdBH+15], Spoofax [KV10], Neverlang [VC15] or the GEMOC Studio [BDV+16]. By their very nature, generative and generic approaches hamper the incorporation of language-specific optimizations, making the resulting language runtimes much less efficient than the optimized runtimes of general-purpose languages (e.g., just-intime (JIT) compilation in the current JDK or V8 JS engine). Many tools are provided to manipulate Ecore metamodels (e.g., tree-based, textual, or graphical editors) This compatibility with a wide range of tools is a key aspect of EMF, and we aim at preserving it while improving language performance. Our contribution extends the compilation chain of EMF to provide additional performance gains for EMF-based language interpreters without breaking their compatibility with the existing EMF ecosystem

Results
Discussion
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call