NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Automatic Programming: Large Language Models and Beyond

Michael R. Lyu, Baishakhi Ray, Abhik Roychoudhury, Shin Hwei Tan, Patanamon Thongtanunam

Automatic Programming: Bridging the Trust Gap in the Age of LLMs

TL;DR

This paper explores the evolution of automatic programming, moving from traditional formal methods to the current era of Large Language Models (LLMs). The authors argue that while LLMs have revolutionized code generation, the "last mile" of reliability requires integrating automated program repair (APR) and symbolic analysis to ensure AI-generated code is secure, correct, and trustworthy.

What Problem Does This Paper Address?

For decades, the "holy grail" of computer science has been automatic programming: the ability for a machine to turn a user's intent into working code. While tools like GitHub Copilot and ChatGPT have made this feel like a reality, they’ve introduced a massive trust gap.

LLMs are essentially sophisticated "black boxes" that lack a deep understanding of program semantics (like type systems or runtime states). This leads to "misaligned algorithms"—code that looks right and might even pass a few tests but contains subtle bugs or critical security vulnerabilities. The paper tackles the challenge of how we can move from "AI-assisted drafting" to "assured autonomy," where we can actually trust the code these models produce.

Methods

The paper is a comprehensive survey and roadmap that synthesizes several decades of research. Key technical approaches discussed include:

  • Deductive vs. Inductive Synthesis: Moving from rigid formal logic (deductive) to "Programming by Example" (inductive), and finally to Natural Language-based generation.
  • Constraint-Based Program Repair: Instead of just guessing a fix, this method uses symbolic execution to extract "repair constraints" from test cases. This ensures the fix isn't just a "patch" that passes tests but a logically sound correction.
  • The "Last Mile" Repair Strategy: The authors propose a workflow where an LLM generates an initial draft, and a specialized APR tool (augmented with program analysis) performs the final refinement.
  • Human-LLM Interaction Patterns: Analyzing the shift from Autocompletion (passive) to Prompting (active), and the emerging need for "Chain-of-Thought" reasoning in code generation.

Datasets

The authors review the landscape of benchmarks used to evaluate these systems:

  • Classic Benchmarks: HumanEval and MBPP (Mostly Basic Python Problems), which focus on short, self-contained functions.
  • Complex/Real-World Benchmarks: APPS (10,000 problems) and the more recent SWE-bench, which tasks models with resolving actual GitHub issues, requiring an understanding of entire repositories.
  • Specialized Benchmarks: LMDefects (for buggy LLM code) and NoFunEval (for non-functional requirements like efficiency and security).

Key Insights and Ideas

  • The Overfitting Trap: A major "aha moment" is the discussion of overfitting in automated repair. A tool might "fix" a bug by simply deleting the code that triggers a test failure. The paper emphasizes that succinctness and semantic analysis are the only ways to ensure a repair is "better" rather than just "different."
  • Programmer as "Code Composer": The authors predict a fundamental shift in the workforce by 2030. Programmers will spend less time writing syntax and more time acting as Quality Assurance Specialists and Designers, orchestrating multiple LLM agents.
  • The Semantic Gap: LLMs are great at "intent capture" (understanding what the user wants) but poor at "formal verification." The future lies in a hybrid approach: LLMs for the creative drafting, and symbolic logic for the rigorous checking.
  • Security Alignment: The paper highlights a startling statistic: in some studies, up to 40% of code generated by GitHub Copilot was found to be vulnerable to exploitation. This underscores that "working code" is not the same as "secure code."

Key Results

While primarily a survey, the paper highlights several critical findings from the field:

  • Vulnerability Prevalence: Cites research showing that LLMs often produce "verbatim" bugs from their training data, sometimes twice as often as they produce verbatim correct code.
  • The Power of Feedback: Tools like ChatRepair show that providing LLMs with immediate execution feedback (test failures/compiler errors) significantly boosts their success rate compared to single-shot prompting.
  • Agentic Superiority: New "agent-based" systems (like AutoCodeRover) are beginning to outperform standalone LLMs by incorporating structural code search and localized fixing, moving closer to how human engineers actually work.

Limitations and Future Work

The authors acknowledge several hurdles:

  • Context Windows: LLMs still struggle with very large software systems where the "intent" is spread across thousands of files.
  • Data Leakage: There is a persistent concern that models are "cheating" on benchmarks because the solutions were included in their training data (contamination).
  • Knowledge Updates: LLMs are "frozen in time." When a new library version or security patch is released, the model continues to suggest outdated, "buggy" patterns until it is retrained.
  • Future Direction: The authors point toward Multi-modal coding (generating code from UI screenshots or flowcharts) and Probabilistic Program Repair as the next frontiers for the 2030-2035 era.

Summary updated

BibTeX
@article{lyu2025automatic,
  author = {Michael R. Lyu and Baishakhi Ray and Abhik Roychoudhury and Shin Hwei Tan and Patanamon Thongtanunam},
  title = {{Automatic Programming: Large Language Models and Beyond}},
  journal = {ACM Trans. Softw. Eng. Methodol.},
  year = {2025},
  doi = {10.1145/3708519},
}
Figure