acceptodds
Under review as a conference paper at ICLR 2027

Executable Semantic Alignment for Specification-Driven Program Generation

Abstract

Large language models (LLMs) have substantially improved natural- language-to-program generation, enabling specification-driven program synthesis. However, specification-driven program generation still faces the challenge of preserving execution semantics defined by specifications. In this work, we study the semantic-fidelity problem in specification- to-program transformation and propose Executable Semantic Alignment (ESA). ESA introduces explicit execution-semantic representations, recov- ers atomic execution behaviors through parameterized semantic interfaces, and decomposes compositional semantic recovery into parsing processes for different semantic blocks to construct Logical IR. We construct a cross-domain dataset containing 50 standard documents and 3,055 specification clauses. We find that although natural-language specifications exhibit high linguistic diversity, their corresponding execu- tion behaviors show substantial semantic convergence. On this dataset, we evaluate semantic fidelity from three perspectives: end-to-end program generation, atomic execution-semantic recovery, and compositional seman- tic reconstruction. Experimental results show that ESA effectively improves semantic fidelity in specification-driven program generation and validates the effectiveness of explicit semantic representations and structured Logical IR construction.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.