Domain-Specific Languages (DSL’s) offer language-level abstractions that General-purpose languages do not offer, thus speeding up the implementation of the solution of problems within a specific domain. Developers have the choice of developing a DSL by building an interpreter/compiler for it, which is a hard and time-consuming task, or embedding it in a host language, thus speeding up the development process but losing several advantages that having a dedicated compiler might bring. In this work we present a meta-compiler called Metacasanova, whose meta-language is based on operational semantics. We then propose a language extension with functors and modules that allows to embed the type system of a language definition inside the meta-type system of Metacasanova and improves the performance of manipulating data structures at run-time. Our result shows that Metacasanova drastically reduces the code lines required to develop a compiler, and that the running time of the Metaprogram is improved by embedding the host Language type system in the meta-type system with the use of functors in the meta-language.

Metacasanova: an optimized meta-compiler for Domain-Specific Languages

DI GIACOMO, FRANCESCO;ABBADI, MOHAMED;CORTESI, Agostino;MAGGIORE, GIUSEPPE
2017

Abstract

Domain-Specific Languages (DSL’s) offer language-level abstractions that General-purpose languages do not offer, thus speeding up the implementation of the solution of problems within a specific domain. Developers have the choice of developing a DSL by building an interpreter/compiler for it, which is a hard and time-consuming task, or embedding it in a host language, thus speeding up the development process but losing several advantages that having a dedicated compiler might bring. In this work we present a meta-compiler called Metacasanova, whose meta-language is based on operational semantics. We then propose a language extension with functors and modules that allows to embed the type system of a language definition inside the meta-type system of Metacasanova and improves the performance of manipulating data structures at run-time. Our result shows that Metacasanova drastically reduces the code lines required to develop a compiler, and that the running time of the Metaprogram is improved by embedding the host Language type system in the meta-type system with the use of functors in the meta-language.
Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering
File in questo prodotto:
File Dimensione Formato  
sle17main-sle17main2-p-d4d128a-34194-final.pdf

non disponibili

Tipologia: Versione dell'editore
Licenza: Accesso chiuso-personale
Dimensione 742.1 kB
Formato Adobe PDF
742.1 kB Adobe PDF   Visualizza/Apri

I documenti in ARCA sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: http://hdl.handle.net/10278/3690432
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
social impact