Treffer: Enhanced Architecture of Structure Semantics for Syntax‐Aware Code Generation.

Title:
Enhanced Architecture of Structure Semantics for Syntax‐Aware Code Generation.
Source:
Software: Practice & Experience; Jan2026, Vol. 56 Issue 1, p80-95, 16p
Database:
Complementary Index

Weitere Informationen

Objective: The task of code generation aims to transform natural language descriptions into corresponding target code. Among the various approaches, syntax‐aware code generation has emerged as a significant approach that strives to generate code by directly modeling the underlying syntactic rules. However, existing works typically adopt an autoregressive approach to sequentially generate each abstract syntax rule, which inevitably neglects the rich structural semantic information inherent within the syntax rules. To address this issue, we propose an enhanced architecture of structure semantics based on Graph Neural Network for code generation. Methods: Our approach explicitly models the internal structure of syntactic rules by treating them as graph data, thereby enabling the extraction of deeper structural semantics. Furthermore, we jointly model both the sequential semantics and structural semantics of syntactic rules, effectively addressing the limitations of solely sequence‐based approaches in capturing the inherent structural semantics of code. Results: Experimental results on two widely used code generation datasets demonstrate that the proposed model consistently outperforms strong baselines, with gains of up to 2.14 BLEU points and 2.02 CodeBLEU points, highlighting the effectiveness of our structural‐semantic modeling approach for code generation. [ABSTRACT FROM AUTHOR]

Copyright of Software: Practice & Experience is the property of Wiley-Blackwell and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)