From Language-Specific to Cross-DSL: Semantic-Role-Guided Model Completion with LLMs
Meriem Ben Chaaben, Théo Giraudet, Benoit Combemale, Houari Sahraoui
Abstract
The rapid emergence of large language models (LLMs), trained on vast and diverse corpora, has positioned them as a promising source of domain knowledge to assist modelers. However, leveraging LLMs for model completion remains challenging: suggestions must respect both the syntax of a domain-specific language (DSL) and the intended domain semantics, while remaining consistent with an evolving model. This paper presents RAFiC, an LLM-based approach for iterative domain model completion that generalizes across DSLs. It drives completion using metamodel information to ensure syntactic validity and enriches prompts with semantic-role annotations to better capture the intended modeling role of DSL elements. The approach provides context-aware, incremental guidance during model construction. We evaluate RAFiC through an ablation-based comparative study over three DSLs and two scenarios per DSL to isolate the contribution of syntactic and semantic guidance. Across these six scenarios, semantic role guidance improves contribution rate in every case, and RAFiC improves completion effectiveness over weaker prompting configurations in most of them. The largest gains occur for DSLs that are less represented in LLM training data. In these cases, iterative guidance leads to earlier and more stable accepted suggestions, while semantic role guidance improves their relevance.
Create a lesson
Related papers
Guided Generation of Linux Kernel Semantic Patches with Small Local Language Models
Shared title terminology · Mohanned Ahmed
Verify the Verifier: Specification-Grounded LLM Cross-Checking for Bugs That Escape UVM Scoreboards
Shared title terminology · Ana E. Sanchez Villalobos, Michael D. Quinn, Aakash Tyagi et al.
Reliability is a user-specific property of large language models
Shared title terminology · Xingyu Zhao
BugGen 2.0: Rethinking the Roles of LLMs for Scalable RTL Bug Synthesis
Shared title terminology · Minh Luu, Michael Quinn, Aakash Tyagi et al.
Beyond Source Code: Evaluating Natural Language Specifications for LLM-Based C-to-Rust Translation
Shared title terminology · Biruk Tadesse, Lawrence Arkoh, Marcelo D'Amorim et al.
Spec-Driven PBT: Deriving Semantic Invariants from Code Specifications for Agentic Property-based Testing
Shared title terminology · Aditya Shukla, Kartik Gupta, Ali Alavi et al.