mlsanityData to 7 Oct 2026

Python Symbolic Execution with LLM-powered Code Generation

arXiv 2409.09271 ↗First posted 14 Sep 2024cs.SE cs.PLcited by 10

Not on the map. Why?

Abstract (arXiv)

Symbolic execution is a key technology in software testing, which generates test cases by collecting symbolic path constraints and then solving constraints with SMT solvers. Symbolic execution has been proven helpful in generating high-coverage test cases, but its limitations, e.g., the difficulties in solving path constraints, prevent it from broader usage in software testing. Moreover, symbolic execution has encountered many difficulties when applied to dynamically typed languages like Python, because it is extremely challenging to translate the flexible Python grammar into rigid solvers. To overcome the main challenges of applying symbolic execution in Python, we proposed an LLM-empowered agent, LLM-Sym, that automatically calls an SMT solver, Z3, to solve execution path constraints. Based on an introductory-level symbolic execution engine, our LLM agent can extend it to supporting programs with complex data type `list'. The core contribution of LLM-Sym is translating complex Python path constraints into Z3 code. To enable accurate path-to-Z3 translation, we design a multiple-step code generation pipeline including type inference, retrieval and self-refine. Our experiments demonstrate that LLM-Sym is capable of solving path constraints on Leetcode problems with complicated control flows and list data structures, which is impossible for the backbone symbolic execution engine. Our approach paves the way for the combination of the generation ability of LLMs with the reasoning ability of symbolic solvers, and opens up new opportunities in LLM-augmented test case generation.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Sep 2024.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 8; 2026: 1.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026ConcoLixir: Reactive LLM Discovery Oracles for Python Concolic Testing
  2. 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
  3. 2024PyBench: Evaluating LLM Agent on various real-world coding tasks
  4. 2026Defusing Logic Bombs in Symbolic Execution with LLM-Generated Ghost Code ↗
  5. 2025UTBoost: Rigorous Evaluation of Coding Agents on SWE-Bench
  6. 2025Integrating Symbolic Execution with LLMs for Automated Generation of Program Specifications
  7. 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancement
  8. 2025PyVeritas: On Verifying Python via LLM-Based Transpilation and Bounded Model Checking for C