paper-with-me

Papers

Learning to Guarantee Type Correctness in Code Generation through Type-Guided Program Synthesis

2025-10-11 · Zhechong Huang, Zhao Zhang, Ruyi Ji, Tingxuan Xia, Qihao Zhu, Qinxiang Cao, Zeyu Sun, Wiggin Zhou, Yingfei Xiong arxiv

Language models have shown remarkable proficiency in code generation; nevertheless, ensuring type correctness remains a challenge. Although traditional methods, such as constrained decoding, alleviate this problem by externally rejecting untypable code, the model itself does not effectively learn type reasoning internally, which ultimately limits its overall performance. This paper introduces TyFlow, a novel system that internalizes type reasoning within code generation to guide the model to learn the type system. The core of our approach is a novel type-guided program synthesis system that maintains an isomorphism between type derivation trees and synthesis derivation trees, enabling a new code representation based on synthesis decision sequences rather than traditional text-based token sequences. By offloading the complexity of type system learning to the representation itself, models can redirect their computational resources toward higher-level program semantics. Our evaluation shows that TyFlow not only eliminates type errors but also significantly improves functional correctness, highlighting the importance of aligning LMs with type systems internally.

📄 PDF Abstract BibTeX arXiv:2510.10216

Code (0)

등록된 구현이 없습니다.

Tasks

Program SynthesisCode Generation

Similar Papers 제목 키워드 기반

Correctness-Guaranteed Code Generation via Constrained Decoding

2025-08-20 · Lingxiao Li, Salar Rahili, Yiwei Zhao arxiv

Language Models (LMs) are increasingly being used for code generation, but ensuring the correctness of generated programs remains a significant challenge. Although imperfect code may be acceptable during software develop…

Code Generation

The Alignment Problem in Constrained Code Generation

2026-06-19 · Matteo Biagiola, Jahrim Gabriele Cesario, Luca Di Grazia, George Zakhour 외 arxiv

Large Language Models (LLMs) have demonstrated strong capabilities in code generation, but their outputs frequently contain syntax or type errors that result in compilation failures. Constrained decoding has been propose…

Code Generation

SiliconMind-V1: Multi-Agent Distillation and Debug-Reasoning Workflows for Verilog Code Generation

2026-02-10 · Mu-Chi Chen, Yu-Hung Kao, Po-Hsuan Huang, Shao-Chun Ho 외 arxiv

Large language models (LLMs) have recently emerged as a promising approach for automating Verilog code generation; however, existing methods primarily emphasize syntactic correctness and often rely on commercial models o…

Code Generation

Specification-Guided Synthesis of Deadlock-Free Communication Protocol Refinements with Large Language Models

2026-07-30 · Yang Li, Ping Hou, Nobuko Yoshida arxiv

Ensuring behavioural correctness in communication protocols is a central challenge in distributed software systems, as subtle inconsistencies can lead to deadlocks. In such settings, protocol refinement - the safe substi…

Program SynthesisCode Generation

LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctness

2025-02-17 · Tong Ye, Weigang Huang, Xuhong Zhang, Tengfei Ma 외

Large Language Models (LLMs), particularly Code LLMs, have demonstrated impressive performance in code generation. Current research primarily focuses on the correctness of generated code, while efficiency remains less ex…

Code Generation