mlsanityData to 7 Oct 2026

Reasoning from Traces: Divergence-Guided Agentic Repair of WebAssembly Discrepancies

arXiv 2608.05521 ↗First posted 6 Aug 2026cs.SEcited by 0

On the map: LLM reasoning → Reasoning for agents, planning and code

also in 1 more
Abstract (arXiv)

WebAssembly (Wasm) promises seamless reuse of C/C++ codebases as portable, fast, sandboxed binaries. In practice, however, this promise often falls short: recent studies show that cross-compiling the same C/C++ source to Wasm and native binaries frequently leads to runtime discrepancies, owing to library implementation differences or compiler bugs. Since the root causes lie in the platform-level runtime and are hidden beneath the source code, even state-of-the-art LLM-based repair agents often fail to fix these discrepancies. In this paper, we present WasmMend, the first system to automatically repair Native-Wasm functional discrepancies. WasmMend converts the undirected exploration to a focused reasoning task in two stages: First, a novel differential trace analysis approach localizes the function where Wasm and native executions initially diverge; guided by this localization, LLM agents then reason about the root causes and generate patches that eliminate the divergent behavior. Experiments on real-world C/C++ projects show that WasmMend achieves a fix rate of 70.0%, compared to 50.2% for the agentic baseline and 54.5% for the approach augmented with repair-time LLM-based instrumentation, demonstrating the value of divergence-guided reasoning for cross-platform repair.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 8 of its 54 references that are in the map. First posted on arXiv 6 Aug 2026.

Builds on

8 of 54 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023Teaching Large Language Models to Self-Debug11 Apr

Other references · 7

  1. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  2. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  3. 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
  4. 2025Agentic Program Repair from Test Failures at Scale: A Neuro-symbolic approach with static analysis and test execution feedbackcited by 6
  5. 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Codecited by 6
  6. 2026From Guessing to Seeing: Enhancing LLM-Based Program Repair via Trace-Guided Multi-strategy Debatecited by 5
  7. 2026DebugRepair: Enhancing LLM-Based Automated Program Repair via Self-Directed Debuggingcited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024StackSight: Unveiling WebAssembly through Large Language Models and Neurosymbolic Chain-of-Thought Decompilation
  2. 2025InspectCoder: Dynamic Analysis-Enabled Self Repair through interactive LLM-Debugger Collaboration
  3. 2026Documentation-Guided Agentic Codebase Migration from C to Rust
  4. 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs
  5. 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
  6. 2026AdaTrans: Automated C to Rust Transformation via Error-Adaptive Repair ↗
  7. 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
  8. 2026Understanding Agent-Based Patching of Compiler Missed Optimizations