mlsanityData to 14 Oct 2026

Evaluating Program Semantics Reasoning with Type Inference in System F

arXiv 2509.23686 ↗First posted 28 Sep 2025cs.CL cs.PL cs.SEcited by 2

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

  1. 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inference22 Feb

Other references · 24

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  4. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  5. 2024Qwen2.5 Technical Reportcited by 4,942
  6. 2023Mistral 7Bcited by 3,164
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  8. 2024Qwen2 Technical Reportcited by 2,120
  9. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
  10. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
  11. 2024Mixtral of Expertscited by 1,823
  12. 2025s1: Simple test-time scalingcited by 1,341
12 more
  1. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
  2. 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
  3. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
  4. 2024GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Modelscited by 550
  5. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  6. 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
  7. 2024CodeGemma: Open Code Models Based on Gemmacited by 150
  8. 2024Marco-o1: Towards Open Reasoning Models for Open-Ended Solutionscited by 144
  9. 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 117
  10. 2024SpecGen: Automated Generation of Formal Program Specifications via Large Language Modelscited by 53
  11. 2024LLAMAFUZZ: Large Language Model Enhanced Greybox Fuzzingcited by 14
  12. 2024ReasonAgain: Using Extractable Symbolic Programs to Evaluate Mathematical Reasoningcited by 9

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
  2. 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking
  3. 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
  4. 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
  5. 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings
  6. 2025Disproving Program Equivalence with LLMs
  7. 2026Inferring Code Correctness from Specification
  8. 2025Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Models