The Path Not Taken: Duality in Reasoning about Program Execution
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Large language models (LLMs) have shown remarkable capabilities across diverse coding tasks. However, their adoption requires a true understanding of program execution rather than relying on surface-level patterns. Existing benchmarks primarily focus on predicting program properties tied to specific inputs (e.g., code coverage, program outputs). As a result, they provide a narrow view of dynamic code reasoning and are prone to data contamination. We argue that understanding program execution requires evaluating its inherent duality through two complementary reasoning tasks: (i) predicting a program's observed behavior for a given input, and (ii) inferring how the input must be mutated toward a specific behavioral objective. Both tasks jointly probe a model's causal understanding of execution flow. We instantiate this duality in DexBench, a benchmark comprising 445 paired instances, and evaluate 13 LLMs. Our results demonstrate that dual-path reasoning provides a robust and discriminative proxy for dynamic code understanding.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 11 of its 32 references that are in the map. First posted on arXiv 22 Apr 2026.
Builds on
11 of 32 references.
Closest ancestors · 4
Same direction, newest first
- 2025Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation28 Nov
- 2025Assessing Coherency and Consistency of Code Execution Reasoning by Large Language Models16 Oct
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks3 Jul
- 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb
Other references · 7
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2025Qwen3 Technical Reportcited by 8,820
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Mistral 7Bcited by 3,164
- 2025Llama-Nemotron: Efficient Reasoning Modelscited by 158
- 2025Magistralcited by 60
- 2023From Good to Great: Improving Math Reasoning with Tool-Augmented Interleaf Promptingcited by 10
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025A Tool for In-depth Analysis of Code Execution Reasoning of Large Language Models
- 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
- 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
- 2026CodeGlance: Understanding Code Reasoning Challenges in LLMs through Multi-Dimensional Feature Analysis
- 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
- 2025Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Models
- 2025Chain of Execution Supervision Promotes General Reasoning in Large Language Models
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking