Reasoning Runtime Behavior of a Program with LLM: How Far Are We?
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Large language models for code (i.e., code LLMs) have shown strong code understanding and generation capabilities. To evaluate the capabilities of code LLMs in various aspects, many benchmarks have been proposed (e.g., HumanEval and ClassEval). Code reasoning is one of the most essential abilities of code LLMs, but existing benchmarks for code reasoning are not sufficient. Typically, they focus on predicting the input and output of a program, ignoring the evaluation of the intermediate behavior during program execution, as well as the logical consistency (e.g., the model should not give the correct output if the prediction of execution path is wrong) when performing the reasoning. To address these problems, in this paper, we propose a framework, namely REval, for evaluating code reasoning abilities and consistency of code LLMs with program execution. We utilize existing code benchmarks and adapt them to new benchmarks within our framework. A large-scale empirical study is conducted and most LLMs show unsatisfactory performance on both Runtime Behavior Reasoning (i.e., an average accuracy of 44.4%) and Incremental Consistency Evaluation (i.e., an average IC score of 10.3). Evaluation results of current code LLMs reflect the urgent need for the community to strengthen the code reasoning capability of code LLMs. Our code, data, and newname leaderboard are available at https://r-eval.github.io.
Key facts. Cited by 44 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 45 of its 66 references that are in the map. First posted on arXiv 25 Mar 2024.
Builds on
45 of 66 references.
Closest ancestors · 2
Same direction, newest first
- 2023Teaching Large Language Models to Self-Debug11 Apr
- 2023LEVER: Learning to Verify Language-to-Code Generation with Execution16 Feb
Other references · 43
- 2023GPT-4 Technical Reportcited by 18,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023Mistral 7Bcited by 3,065
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023A Survey on Evaluation of Large Language Modelscited by 1,227
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
31 more
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2021Recent Advances in Natural Language Processing via Large Pre-Trained Language Models: A Surveycited by 457
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 361
- 2022Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoningcited by 331
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
- 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 178
- 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
- 2022A Comprehensive Survey of Few-shot Learning: Evolution, Applications, Challenges, and Opportunitiescited by 162
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
- 2021XLM-T: Multilingual Language Models in Twitter for Sentiment Analysis and Beyondcited by 114
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
- 2023Learning Performance-Improving Code Editscited by 103
- 2021QA Dataset Explosion: A Taxonomy of NLP Resources for Question Answering and Reading Comprehensioncited by 91
- 2023Large Language Models for Test-Free Fault Localizationcited by 67
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
- 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 46
- 2023Consistency Analysis of ChatGPTcited by 37
- 2023Code Execution with Pre-trained Language Modelscited by 33
- 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
- 2024Unsupervised Evaluation of Code LLMs with Round-Trip Correctnesscited by 23
- 2022Unpacking Large Language Models with Conceptual Consistencycited by 18
- 2024Code Simulation Challenges for Large Language Modelscited by 15
- 2021Static Inference Meets Deep Learning: A Hybrid Type Inference Approach for Pythoncited by 12
- 2023Predicting Code Coverage without Executioncited by 9
- 2024DevEval: Evaluating Code Generation in Practical Software Projectscited by 9
- 2018Code Vectors: Understanding Programs Through Embedded Abstracted Symbolic Tracescited by 7
- 2023LExecutor: Learning-Guided Executioncited by 7
Built on by
Citing papers per year: 2024: 3; 2025: 25; 2026: 16.
44 papers.
Sort:
By area:
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Executioncited by 31
- 2025Revisit Self-Debugging with Self-Generated Tests for Code Generationcited by 21
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inferencecited by 14
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoningcited by 14
- 2025Towards Reliable Benchmarking: A Contamination Free, Controllable Evaluation Framework for Multi-step LLM Function Callingcited by 13
- 2025CodeSense: a Real-World Benchmark and Dataset for Code Semantic Reasoningcited by 12
- 2026Can We Predict Before Executing Machine Learning Agents?cited by 10
- 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignmentcited by 7
- 2025CoCoNUT: Structural Code Understanding does not fall out of a treecited by 7
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Languagecited by 7
- 2026From Laboratory to Real-World Applications: Benchmarking Agentic Code Reasoning at the Repository Levelcited by 6
32 more
- 2025L0-Reasoning Bench: Evaluating Procedural Correctness in Language Models via Simple Program Executioncited by 5
- 2025Large Language Models for Validating Network Protocol Parserscited by 5
- 2025LLMs Lean on Priors, Not Programming Language Semanticscited by 5
- 2026ExecVerify: White-Box RL with Verifiable Stepwise Rewards for Code Execution Reasoningcited by 5
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
- 2025The Hitchhiker's Guide to Program Analysis, Part II: Deep Thoughts by LLMscited by 4
- 2025CodeReasoner: Enhancing the Code Reasoning Ability with Reinforcement Learningcited by 4
- 2025When Names Disappear: Revealing What LLMs Actually Understand About Codecited by 4
- 2025Gistify! Codebase-Level Understanding via Runtime Executioncited by 4
- 2026Can LLMs Compress (and Decompress)? Evaluating Code Understanding and Execution via Invertibilitycited by 4
- 2025Is "Knowing It's Malicious Enough?" Evaluating LLMs for Fine-Grained Malware Behavior Auditingcited by 3
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settingscited by 3
- 2025Is Compression Really Linear with Code Intelligence?cited by 2
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generationcited by 2
- 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
- 2025A Semantic-based Optimization Approach for Repairing LLMs: Case Study on Code Generationcited by 1
- 2025Re-Evaluating Code LLM Benchmarks Under Semantic Mutationcited by 1
- 2025Open the Oyster: Empirical Evaluation and Improvement of Code Reasoning Confidence in LLMscited by 1
- 2025Imitation Game: Reproducing Deep Learning Bugs Leveraging an Intelligent Agentcited by 1
- 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoningcited by 1
- 2026StepCodeReasoner: Aligning Code Reasoning with Stepwise Execution Traces via Reinforcement Learningcited by 1
- 2026Veritas: Grounding LLM Agents for Reliable Vulnerability Reasoning over Stripped Binariescited by 1
- 2026Enhancing the Code Reasoning Capabilities of LLMs via Consistency-based Reinforcement Learningcited by 1
- 2025Will AI replace Software Engineers? Do not hold your breathcited by 0
- 2025Themisto: Jupyter-Based Runtime Benchmarkcited by 0
- 2026Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptationcited by 0
- 2026ExplainBench: Evaluating Code Explanations from Agentscited by 0
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generationcited by 0
- 2026Predicting Program Exit Code with LLMs and Programming Language Semanticscited by 0
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmarkcited by 0
- 2026Codoku: Renewable Program-Reasoning Challenges for Frontier Coding Agentscited by 0
- 2026Codoku: Renewable Program-Reasoning Challenges for Frontier Coding Agents28 Sep 2026
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark23 Sep 2026
- 2026Predicting Program Exit Code with LLMs and Programming Language Semantics1 Sep 2026
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generation6 Aug 2026
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements29 Jul 2026
- 2026ExplainBench: Evaluating Code Explanations from Agents29 Jul 2026
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2026Enhancing the Code Reasoning Capabilities of LLMs via Consistency-based Reinforcement Learning18 May 2026
- 2026Veritas: Grounding LLM Agents for Reliable Vulnerability Reasoning over Stripped Binaries14 May 2026
- 2026StepCodeReasoner: Aligning Code Reasoning with Stepwise Execution Traces via Reinforcement Learning12 May 2026
- 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning10 May 2026
- 2026ExecVerify: White-Box RL with Verifiable Stepwise Rewards for Code Execution Reasoning11 Mar 2026
32 more
- 2026Can LLMs Compress (and Decompress)? Evaluating Code Understanding and Execution via Invertibility19 Jan 2026
- 2026Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptation10 Jan 2026
- 2026Can We Predict Before Executing Machine Learning Agents?9 Jan 2026
- 2026From Laboratory to Real-World Applications: Benchmarking Agentic Code Reasoning at the Repository Level7 Jan 2026
- 2025Imitation Game: Reproducing Deep Learning Bugs Leveraging an Intelligent Agent17 Dec 2025
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings16 Dec 2025
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generation12 Nov 2025
- 2025Open the Oyster: Empirical Evaluation and Improvement of Code Reasoning Confidence in LLMs4 Nov 2025
- 2025Gistify! Codebase-Level Understanding via Runtime Execution30 Oct 2025
- 2025LLMs Lean on Priors, Not Programming Language Semantics3 Oct 2025
- 2025When Names Disappear: Revealing What LLMs Actually Understand About Code3 Oct 2025
- 2025Towards Reliable Benchmarking: A Contamination Free, Controllable Evaluation Framework for Multi-step LLM Function Calling30 Sep 2025
- 2025Is "Knowing It's Malicious Enough?" Evaluating LLMs for Fine-Grained Malware Behavior Auditing17 Sep 2025
- 2025CodeReasoner: Enhancing the Code Reasoning Ability with Reinforcement Learning23 Jul 2025
- 2025Re-Evaluating Code LLM Benchmarks Under Semantic Mutation20 Jun 2025
- 2025CodeSense: a Real-World Benchmark and Dataset for Code Semantic Reasoning31 May 2025
- 2025Is Compression Really Linear with Code Intelligence?16 May 2025
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning19 Apr 2025
- 2025Large Language Models for Validating Network Protocol Parsers18 Apr 2025
- 2025Themisto: Jupyter-Based Runtime Benchmark16 Apr 2025
- 2025The Hitchhiker's Guide to Program Analysis, Part II: Deep Thoughts by LLMs16 Apr 2025
- 2025L0-Reasoning Bench: Evaluating Procedural Correctness in Language Models via Simple Program Execution28 Mar 2025
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Language25 Mar 2025
- 2025A Semantic-based Optimization Approach for Repairing LLMs: Case Study on Code Generation17 Mar 2025
- 2025Investigating Execution-Aware Language Models for Code Optimization11 Mar 2025
- 2025Will AI replace Software Engineers? Do not hold your breath27 Feb 2025
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inference22 Feb 2025
- 2025CoCoNUT: Structural Code Understanding does not fall out of a tree27 Jan 2025
- 2025Revisit Self-Debugging with Self-Generated Tests for Code Generation22 Jan 2025
- 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment30 Sep 2024
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Execution23 Aug 2024
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variations28 Jun 2024
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Executioncited by 31
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inferencecited by 14
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoningcited by 14
- 2025CodeSense: a Real-World Benchmark and Dataset for Code Semantic Reasoningcited by 12
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Languagecited by 7
- 2026From Laboratory to Real-World Applications: Benchmarking Agentic Code Reasoning at the Repository Levelcited by 6
- 2025L0-Reasoning Bench: Evaluating Procedural Correctness in Language Models via Simple Program Executioncited by 5
- 2025LLMs Lean on Priors, Not Programming Language Semanticscited by 5
- 2026ExecVerify: White-Box RL with Verifiable Stepwise Rewards for Code Execution Reasoningcited by 5
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
- 2025CodeReasoner: Enhancing the Code Reasoning Ability with Reinforcement Learningcited by 4
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settingscited by 3
12 most cited of 18 All 18 (JSON)
- 2026Codoku: Renewable Program-Reasoning Challenges for Frontier Coding Agents28 Sep 2026
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark23 Sep 2026
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2026Enhancing the Code Reasoning Capabilities of LLMs via Consistency-based Reinforcement Learning18 May 2026
- 2026Veritas: Grounding LLM Agents for Reliable Vulnerability Reasoning over Stripped Binaries14 May 2026
- 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning10 May 2026
- 2026ExecVerify: White-Box RL with Verifiable Stepwise Rewards for Code Execution Reasoning11 Mar 2026
- 2026From Laboratory to Real-World Applications: Benchmarking Agentic Code Reasoning at the Repository Level7 Jan 2026
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings16 Dec 2025
- 2025Open the Oyster: Empirical Evaluation and Improvement of Code Reasoning Confidence in LLMs4 Nov 2025
- 2025LLMs Lean on Priors, Not Programming Language Semantics3 Oct 2025
- 2025CodeReasoner: Enhancing the Code Reasoning Ability with Reinforcement Learning23 Jul 2025
12 newest of 18 All 18 (JSON)
- 2025Towards Reliable Benchmarking: A Contamination Free, Controllable Evaluation Framework for Multi-step LLM Function Callingcited by 13
- 2026Can We Predict Before Executing Machine Learning Agents?cited by 10
- 2025Gistify! Codebase-Level Understanding via Runtime Executioncited by 4
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generationcited by 2
- 2025Imitation Game: Reproducing Deep Learning Bugs Leveraging an Intelligent Agentcited by 1
- 2026ExplainBench: Evaluating Code Explanations from Agentscited by 0
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generationcited by 0
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generation6 Aug 2026
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements29 Jul 2026
- 2026ExplainBench: Evaluating Code Explanations from Agents29 Jul 2026
- 2026Can We Predict Before Executing Machine Learning Agents?9 Jan 2026
- 2025Imitation Game: Reproducing Deep Learning Bugs Leveraging an Intelligent Agent17 Dec 2025
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generation12 Nov 2025
- 2025Gistify! Codebase-Level Understanding via Runtime Execution30 Oct 2025
- 2025Towards Reliable Benchmarking: A Contamination Free, Controllable Evaluation Framework for Multi-step LLM Function Calling30 Sep 2025
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
- 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignmentcited by 7
- 2025CoCoNUT: Structural Code Understanding does not fall out of a treecited by 7
- 2025Large Language Models for Validating Network Protocol Parserscited by 5
- 2025The Hitchhiker's Guide to Program Analysis, Part II: Deep Thoughts by LLMscited by 4
- 2025When Names Disappear: Revealing What LLMs Actually Understand About Codecited by 4
- 2026Can LLMs Compress (and Decompress)? Evaluating Code Understanding and Execution via Invertibilitycited by 4
- 2025Is "Knowing It's Malicious Enough?" Evaluating LLMs for Fine-Grained Malware Behavior Auditingcited by 3
- 2025Is Compression Really Linear with Code Intelligence?cited by 2
- 2025Investigating Execution-Aware Language Models for Code Optimizationcited by 1
- 2025A Semantic-based Optimization Approach for Repairing LLMs: Case Study on Code Generationcited by 1
- 2025Re-Evaluating Code LLM Benchmarks Under Semantic Mutationcited by 1
12 most cited of 16 All 16 (JSON)
- 2026Predicting Program Exit Code with LLMs and Programming Language Semantics1 Sep 2026
- 2026Can LLMs Compress (and Decompress)? Evaluating Code Understanding and Execution via Invertibility19 Jan 2026
- 2026Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptation10 Jan 2026
- 2025When Names Disappear: Revealing What LLMs Actually Understand About Code3 Oct 2025
- 2025Is "Knowing It's Malicious Enough?" Evaluating LLMs for Fine-Grained Malware Behavior Auditing17 Sep 2025
- 2025Re-Evaluating Code LLM Benchmarks Under Semantic Mutation20 Jun 2025
- 2025Is Compression Really Linear with Code Intelligence?16 May 2025
- 2025Large Language Models for Validating Network Protocol Parsers18 Apr 2025
- 2025Themisto: Jupyter-Based Runtime Benchmark16 Apr 2025
- 2025The Hitchhiker's Guide to Program Analysis, Part II: Deep Thoughts by LLMs16 Apr 2025
- 2025A Semantic-based Optimization Approach for Repairing LLMs: Case Study on Code Generation17 Mar 2025
- 2025Investigating Execution-Aware Language Models for Code Optimization11 Mar 2025
12 newest of 16 All 16 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation
- 2025A Tool for In-depth Analysis of Code Execution Reasoning of Large Language Models
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
- 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
- 2026How Robustly do LLMs Understand Execution Semantics?
- 2024CodeMind: Evaluating Large Language Models for Code Reasoning
- 2025Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Models
- 2026Evaluating LLMs Code Reasoning Under Real-World Context