DSLXpert: LLM-driven Generic DSL Code Generation

Bibliographic citation

Daniel Garcia-Gonzalez, Victor Lamas, and Miguel R. Luaces. 2024. DSLXpert: LLM-driven Generic DSL Code Generation. In ACM/IEEE 27th International Conference on Model Driven Engineering Languages and Systems (MODELS Companion ’24), September 22–27, 2024, Linz, Austria. ACM, New York, NY, USA, 5 pages. https://doi.org/10.1145/3652620.3687782

Type of academic work

Academic degree

Abstract

[Abstract]: Nowadays, large language models (LLMs) are an extremely useful and fast tool to complement and help in many jobs and current problems. However, there are cases where a pretty specific vocabulary is used in which these models were not previously trained, leading to less satisfactory results. More specifically, these models are less effective when dealing with less-known or unpublished domain-specific languages (DSLs). Within this field, the automatic generation of code based on such languages, starting from natural language, would speed up the development times of any related project, as well as the understanding of such DSLs. Therefore, this paper presents a tool in which developers can perform what is known as semantic parsing. In other words, the developer can ask a pre-trained LLM to translate a natural language instruction into the vocabulary of the established DSL. Thus, by setting the DSL grammar as context (grammar prompting) and providing usage examples (few-shot learning), the LLM can quickly generate reliable domain-specific code, significantly improving the quality of life of the developers. A video demonstration of the tool is shown in the following link: https://zenodo.org/records/12610506.

Description

Presented at: In ACM/IEEE 27th International Conference on Model Driven Engineering Languages and Systems (MODELS Companion ’24), September 22–27, 2024, Linz, Austria

Rights

© 2024 Owner/Author|ACM. This is the author's version of the work. It is posted here for your personal use. Not for redistribution. The definitive Version of Record was published in ACM/IEEE 27th International Conference on Model Driven Engineering Languages and Systems, https://doi.org/10.1145/3652620.3687782