mlsanityData to 24 Nov 2026

Metamodel-Guided LLM Decoding for Consistent DSL Generation

arXiv 2610.29749 ↗Submitted 21 Oct 2026cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) are increasingly used to generate software engineering artifacts written in domain-specific languages (DSLs). Correct DSL instances usually must comply with not only the concrete syntax but also the abstract syntax defined by a metamodel augmented with semantic well-formedness constraints. Existing constrained decoding approaches typically guarantee compliance only with concrete syntax or with a limited set of semantic constraints expressed over the generated text, making metamodel-level constraint consistency difficult to enforce during generation. We present MeMoDecode: a decoding framework that enforces a DSL's concrete syntax, abstract syntax, and well-formedness constraints jointly. Specifically, whenever the LLM generates a complete metamodel concept, MeMoDecode incrementally maps the current output to a partial model and verifies whether it can still be completed into a consistent instance. We combine MeMoDecode with a simple retry mechanism that resumes decoding from the most recent completable snapshot whenever an inconsistency is detected. Under a sound backend verifier, MeMoDecode never performs worse than grammar-constrained decoding on alignment metrics satisfying natural assumptions. Across four DSLs and six open-weight LLMs ranging from 0.6B to 70B parameters, MeMoDecode achieves the highest consistency, improving consistency by 23% on average over unconstrained decoding and by 8% on average over grammar-constrained decoding. It also improves benchmark performance while incurring only modest runtime overhead. These results show that metamodel-guided decoding is an effective approach for enforcing DSL consistency during decoding across diverse DSLs and LLM scales.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 36 of its 67 references that are in the map. Submitted 21 Oct 2026.

Builds on

36 of 67 references.

References · 36

  1. 2019The Curious Case of Neural Text Degenerationcited by 3,022
  2. 2023A Survey of Large Language Modelscited by 2,758
  3. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 2,083
  4. 2016CLEVR: A Diagnostic Dataset for Compositional Language and Elementary Visual Reasoningcited by 1,518
  5. 2018Hierarchical Neural Story Generationcited by 1,221
  6. 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,170
  7. 2024Executable Code Actions Elicit Better LLM Agentscited by 633
  8. 2023How Language Model Hallucinations Can Snowballcited by 330
  9. 2023Efficient Guided Generation for Large Language Modelscited by 244
  10. 2017Beam Search Strategies for Neural Machine Translationcited by 237
  11. 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 195
  12. 2024LLM-Based Multi-Agent Systems for Software Engineering: Literature Review, Vision and the Road Aheadcited by 164
24 more
  1. 2022Prompting Is Programming: A Query Language for Large Language Modelscited by 116
  2. 2024Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generationcited by 112
  3. 2024XGrammar: Flexible and Efficient Structured Generation Engine for Large Language Modelscited by 98
  4. 2025JSONSchemaBench: A Rigorous Benchmark of Structured Outputs for Language Modelscited by 86
  5. 2024SynCode: LLM Generation with Grammar Augmentationcited by 74
  6. 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 71
  7. 2024Grammar-Aligned Decodingcited by 63
  8. 2025Type-Constrained Code Generation with Language Modelscited by 40
  9. 2024Knowledge-to-SQL: Enhancing SQL Generation with Data Expert LLMcited by 39
  10. 2025Flow: Modularized Agentic Workflow Automationcited by 39
  11. 2024IterGen: Iterative Semantic-aware Structured LLM Generation with Backtrackingcited by 30
  12. 2024Chain-of-Layer: Iteratively Prompting Large Language Models for Taxonomy Induction from Limited Examplescited by 28
  13. 2025FlowAgent: Achieving Compliance and Flexibility for Workflow Agentscited by 21
  14. 2025ChopChop: a Programmable Framework for Semantically Constraining the Output of Language Modelscited by 21
  15. 2023Prompting or Fine-tuning? A Comparative Study of Large Language Models for Taxonomy Constructioncited by 20
  16. 2024Model Generation with LLMs: From Requirements to UML Sequence Diagramscited by 15
  17. 2026Synthesizing Multi-Agent Harnesses for Vulnerability Discoverycited by 15
  18. 2024Using Grammar Masking to Ensure Syntactic Validity in LLM-based Modeling Taskscited by 7
  19. 2025LLM-enabled Instance Model Generationcited by 6
  20. 2024PAGED: A Benchmark for Procedural Graphs Extraction from Documentscited by 5
  21. 2025Accurate and Consistent Graph Model Generation from Text with Large Language Modelscited by 4
  22. 2025The Impact of Critique on LLM-Based Model Generation from Natural Language: The Case of Activity Diagramscited by 2
  23. 2026Empirical Study for Structured Output Control in LLMs for Software Engineeringcited by 2
  24. 2026Projectional Decoding: Towards Semantic-Aware LLM Generationcited by 1

Built on by

Not cited yet.