Evaluating Program Semantics Reasoning with Type Inference in System F
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Large Language Models (LLMs) are increasingly integrated into the software engineering ecosystem. Their test-time compute (TTC) reasoning capabilities show significant potential for understanding program logic and semantics beyond mere token recognition. However, current benchmarks for code reasoning lack a formal, program-centric deductive framework to ensure sound evaluation, and are incapable of assessing whether models genuinely reason about program semantics or merely exploit superficial associations between natural language and code tokens. To bridge this gap, we introduce TF-Bench, a benchmark designed to evaluate LLM reasoning based on type inference in System F, a task we refer to as program semantics reasoning. By employing verified transformations to remove semantically irrelevant natural language, we construct TF-Bench_pure, a purely semantics-driven variant of TF-Bench. Our analysis reveals substantial limitations in state-of-the-art LLMs, with the best-performing LLM (Claude-3.7-sonnet) achieving only 55.85% accuracy on TF-Bench_pure. Additionally, we propose two novel metrics to assess robustness and the effectiveness of test-time reasoning, underscoring critical limitations in current LLM capabilities and highlighting essential directions for future research.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 25 of its 103 references that are in the map. First posted on arXiv 28 Sep 2025.
Builds on
25 of 103 references.
Closest ancestors · 1
Same direction, newest first
Other references · 24
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2023Mistral 7Bcited by 3,164
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024Qwen2 Technical Reportcited by 2,120
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
- 2024Mixtral of Expertscited by 1,823
- 2025s1: Simple test-time scalingcited by 1,341
12 more
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
- 2024GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Modelscited by 550
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2024CodeGemma: Open Code Models Based on Gemmacited by 150
- 2024Marco-o1: Towards Open Reasoning Models for Open-Ended Solutionscited by 144
- 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 117
- 2024SpecGen: Automated Generation of Formal Program Specifications via Large Language Modelscited by 53
- 2024LLAMAFUZZ: Large Language Model Enhanced Greybox Fuzzingcited by 14
- 2024ReasonAgain: Using Extractable Symbolic Programs to Evaluate Mathematical Reasoningcited by 9
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
- 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings
- 2025Disproving Program Equivalence with LLMs
- 2026Inferring Code Correctness from Specification
- 2025Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Models