A tool-assisted approach to engineer domain-specific languages (DSLs) using Rust.

Léo Olivier, Lou-Anne Sauvetre,Erwan Bousse,Gerson Sunyé

ACM/IEEE International Conference on Model Driven Engineering Languages and Systems (MoDELS)(2022)

引用 0|浏览10
暂无评分
摘要
Domain-Specific Languages (DSLs) are required in a wide range of contexts, implying different execution environments. The same DSL may even have to exist in different environments. We propose in this paper an approach to engineer a DSL using the Rust language, which can be used to target several environments. Our approach focuses on selecting an implementation language, Rust, that provides multiple compilation targets for a DSL definition. However, this is a rather laborious process because Rust is only partially object-oriented, while the definition of a metamodel-based abstract syntax is essentially object-oriented. For this reason, we offer a complete DSL's development method beginning with the metamodel definition in Ecore language, then the abstract syntax conversion in Rust with a code generation tool, and finally the deployment of the language in different execution environments. We evaluated our approach by creating two DSLs with it, a Petri nets DSL and a Finite State Machine (FSM) DSL. Finally, we discuss possible improvements for our Ecore2Rust conversion tool.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要