
LLMs as Code Executors
Transforming code analysis with LLM-powered surrogate models
This research introduces a novel approach using Large Language Models as surrogate models to predict code execution outcomes without actually running the code.
- LLMs demonstrate surprising effectiveness at predicting program outputs across diverse codebases
- Performs particularly well on repository-level code analysis and identifying buggy code
- Offers significant computational efficiency compared to traditional execution methods
- Creates new possibilities for software testing and rapid program analysis
This engineering breakthrough enables faster software development cycles, reduces computational resources, and provides a flexible framework for code analysis across multiple programming languages.
SURGE: On the Potential of Large Language Models as General-Purpose Surrogate Code Executors