Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
cs.SE, cs.AI, cs.CL
Submitted: 2026-09-23
Updated: 2026-09-23
Code: https://github.com/HamedTaherkhani/SWE-Flux
Project page: https://www.anthropic.com/news/claude-sonnet-4-6
License: http://creativecommons.org/licenses/by/4.0/
The gist: Large language models (LLMs) are increasingly used in coding tasks, but their ability to reason about code execution remains unclear.
Terminology
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.
Sources
- An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
- CodeRepoQA: A Large-scale Benchmark for Software Engineering Question Answering
- RepoQA: Evaluating Long Context Code Understanding
- Evaluating Large Language Models Trained on Code
- Program Synthesis with Large Language Models
- RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems
- SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?
- SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?
- FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementation
- SWE-MERA: A Dynamic Benchmark for Agenticly Evaluating Large Language Models on Software Engineering Tasks
- SWE-smith: Scaling Data for Software Engineering Agents
- Multi-SWE-bench: A Multilingual Benchmark for Issue Resolving
- TESTEVAL: Benchmarking Large Language Models for Test Case Generation
- CoReQA: Uncovering Potentials of Language Models in Code Repository Question Answering
- Beyond Code Snippets: Benchmarking LLMs on Repository-Level Question Answering
- SWE-QA: Can Language Models Answer Repository-level Code Questions?
- SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understanding
- Code-QA-Bench: Separating Code Reasoning from Documentation Memorization in Repository-Level QA
- CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
- Assessing Coherency and Consistency of Code Execution Reasoning by Large Language Models
Related papers
- Falsification-Based Verification of LLM-Generated Optimization Models: Sound Test Batteries and Their Detection Limits
- GitSkills: A Dataset of Agent Skills on GitHub
- SABER: Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces
- PackMonitor: Enabling Zero Package Hallucinations Through Decoding-Time Monitoring
- IntentCoding: Amplifying User Intent in Code Generation
- Incentives and Outcomes in Bug Bounties