Position Paper: Programming Language Techniques for Bridging LLM Code Generation Semantic Gaps
Authors:
- Yalong DuYDYalong Du
- Chaozheng WangCWChaozheng Wang
- Huaijin WangHWHuaijin Wang
Preprint
Abstract
Large Language Models have demonstrated remarkable capabilities in automated code generation, yet their statistical nature and black-box characteristics create significant semantic gaps manifested through syntax errors, semantic hallucinations, and reliability concerns. This position paper argues that principled integration of Programming Language (PL) techniques is essential for bridging these gaps. Through structured program representations, formal correctness guarantees, and robust verification mechanisms, PL techniques can elevate LLM-generated code from statistical pattern matching to truly reliable and trustworthy levels. This integration is crucial for developing systems that generate code that is not only functionally correct but also interpretable, verifiable, and ultimately trustworthy.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Accuracy, Reliability, and Latency2025
- ClassInvGen: Class Invariant Synthesis Using Large Language Models2025
- Correctness assessment of code generated by Large Language Models using internal representationsJournal of Systems and Software, 2025
- RAG or Fine-tuning? A Comparative Study on LCMs-based Code Completion in Industry2025
- API-Guided Dataset Synthesis to Finetune Large Code ModelsProceedings of the ACM on Programming Languages, 2025
- Statically Contextualizing Large Language Models with Typed HolesProceedings of the ACM on Programming Languages, 2024
- Prompt Tuning in Code Intelligence: An Experimental EvaluationIEEE Transactions on Software Engineering, 2023
- sem2vec : Semantics-aware Assembly Tracelet EmbeddingACM Transactions on Software Engineering and Methodology, 2023
- Code Structure–Guided Transformer for Source Code SummarizationACM Transactions on Software Engineering and Methodology, 2023
- Enriching query semantics for code search with reinforcement learningNeural Networks, 2022