Defusing Logic Bombs in Symbolic Execution with LLM-Generated Ghost Code
Dimitrios Stamatios Bouras, Sergey Mechtaev

TL;DR
Gordian is a hybrid symbolic execution framework that uses LLM-generated ghost code to improve solver effectiveness and coverage in analyzing complex, real-world programs, significantly outperforming prior methods.
Contribution
This work introduces Gordian, which selectively employs LLMs to generate ghost code that enhances symbolic execution's ability to handle solver-hostile code fragments and unbounded structures.
Findings
Gordian improves coverage by 52-84% over traditional symbolic execution.
Gordian outperforms pure LLM-based techniques by 86-419% in coverage.
Gordian reduces LLM token usage by 90-96%.
Abstract
Symbolic execution is a powerful program analysis technique, but its effectiveness is fundamentally limited by solver-hostile program fragments, complex numerical reasoning, and unbounded heap structures. Recent work proposed replacing constraint solvers with large language models (LLMs) to bypass these limitations, but such approaches struggle to analyze real-world codebases, where deep execution paths require globally consistent reasoning across many interacting constraints. We present Gordian, a hybrid symbolic execution framework that uses LLMs selectively to generate lightweight ghost code that aids an SMT solver in handling solver-hostile code fragments, while preserving its precise, global reasoning capability. In particular, we propose three types of ghost code: (1) inversion of difficult code fragments with iterative bidirectional constraint propagation, (2) modeling via…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Parallel Computing and Optimization Techniques
