Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
Hamed Taherkhani, Mohammad Abdollahi, Melika Sepidband, Hridya Dhulipala, Tien N. Nguyen, Hadi Hemmati
Abstract
Large language models (LLMs) are increasingly used in coding tasks, but their ability to reason about code execution remains unclear. Existing repository-level QA benchmarks mainly evaluate static code understanding and often rely on LLM-based evaluation, while execution-reasoning benchmarks are mostly limited to snippets or functions. We introduce SWE-Flux, a repository-level benchmark for dynamic execution reasoning containing 480 execution-grounded instances across 12 real Python repositories, with gold answers automatically harvested from instrumented test executions rather than written manually or judged by LLMs. The benchmark covers singletest and multi-test questions over control flow, loops, program state, dataflow, exceptions, and program invariants. Evaluating five LLMs shows that this task remains challenging. The best model achieves only 37% accuracy. Models perform better on localized behavior such as invariants, intra-procedural control flow, exceptions, and simple loops, but struggle with dataflow, inter-procedural execution, precise state reasoning, and suite-level aggregation. Finally, we show that the oracle-harvesting pipeline can generate fresh benchmark variants using input perturbation. It successfully harvests valid variants for almost 90% of the selected instances, and the resulting variants are substantially more challenging for the evaluated models.
Create a lesson
Metadata
- Categories
- cs.SE, cs.AI, cs.CL
Related papers
SWE-PolyVision: Benchmarking Cross-Image Abductive Reasoning for Repository-Level Software Engineering
Shared title terminologycs.SEJiajun Wu, Leixin Sun, Zihan Tan et al.
How Much Do Coding Agents Over-Edit, and Why? An Empirical Study of Unneeded Edits in Repository-Level Agent Patches
Shared title terminologycs.SEAakash Goel, Benjamin Steenhoek, Yu Hu
DesignEvo: Recovering and Tracking Repository-Level Implemented Design Systems Across Commits
Shared title terminologycs.SEMingyue Yuan, Jinbo Yang, Jieshan Chen et al.
Trustworthy Runtime Error Healing in Real-World Repositories: A Benchmark and Guardrail
Shared title terminologycs.SEGou Tan, Pengfei Chen, Zhensu Sun et al.
FeatLens: Feature-Guided Dependency Retrieval for Repository-Level Code Generation
Shared title terminologycs.SEXutian Li, Bo Xiong, Yifeng Zhu et al.
AdaRepair-Mem: Adaptive Experience Orchestration for Repository-Level Program Repair
Shared title terminologycs.SEZ. C. Luo, J. C. Guo, W. J. He et al.