A framework for assessing the capabilities of code generation of constraint domain-specific languages with large language models

dc.centroE.T.S.I. Informática
dc.contributor.authorDelgado, David
dc.contributor.authorBurgueño-Caballero, Lola
dc.contributor.authorClarisó, Robert
dc.date.accessioned2026-04-09T10:02:31Z
dc.date.issued2026
dc.departamentoLenguajes y Ciencias de la Computación
dc.description.abstractLarge language models (LLMs) can be used to support software development tasks, e.g., through code completion or code generation. However, their effectiveness drops significantly when considering less popular programming languages such as domain-specific languages (DSLs). In this paper, we propose a generic framework for evaluating the capabilities of LLMs generating DSL code from textual specifications. The generated code is assessed from the perspectives of well-formedness and correctness. This framework is applied to a particular type of DSL, constraint languages, focusing our experiments on OCL and Alloy and comparing their results to those achieved for Python, a popular general-purpose programming language. Experimental results show that, in general, LLMs have better performance for Python than for OCL and Alloy. LLMs with smaller context windows such as open-source LLMs may be unable to generate constraint-related code, as this requires managing both the constraint and the domain model where it is defined. Moreover, some improvements to the code generation process such as code repair (asking an LLM to fix incorrect code) or multiple attempts (generating several candidates for each coding task) can improve the quality of the generated code. Meanwhile, other decisions like the choice of a prompt template have less impact. All these dimensions can be systematically analyzed using our evaluation framework, making it possible to decide the most effective way to set up code generation for a particular type of task.
dc.description.sponsorshipMinisterio de Ciencia, Innovación y Universidades
dc.description.sponsorshipFunding for open access charge: Universidad de Málaga / CBUA
dc.description.sponsorshipUniversitat Oberta de Catalunya
dc.identifier.citationDavid Delgado, Lola Burgueño, Robert Clarisó, A framework for assessing the capabilities of code generation of constraint domain-specific languages with large language models, Journal of Systems and Software, Volume 238, 2026, 112871, ISSN 0164-1212, https://doi.org/10.1016/j.jss.2026.112871.
dc.identifier.doi10.1016/j.jss.2026.112871
dc.identifier.issn0164-1212
dc.identifier.urihttps://hdl.handle.net/10630/46312
dc.language.isoeng
dc.publisherElsevier
dc.rightsAttribution-NonCommercial 4.0 Internationalen
dc.rights.accessRightsopen access
dc.rights.urihttp://creativecommons.org/licenses/by-nc/4.0/
dc.subjectLenguajes de programación lógicos
dc.subjectIngeniería del software
dc.subjectInteligencia artificial
dc.subjectCalidad
dc.subject.otherLarge language models
dc.subject.otherDomain-specific languages
dc.subject.otherFramework
dc.subject.otherCode generation
dc.subject.otherQuality
dc.titleA framework for assessing the capabilities of code generation of constraint domain-specific languages with large language models
dc.typejournal article
dc.type.hasVersionVoR
dspace.entity.typePublication
relation.isAuthorOfPublication31808e70-d2ec-4318-8ead-dded38954d40
relation.isAuthorOfPublication.latestForDiscovery31808e70-d2ec-4318-8ead-dded38954d40

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
1-s2.0-S0164121226001044-main.pdf
Size:
9.26 MB
Format:
Adobe Portable Document Format

Collections