Reasoning from Traces: Divergence-Guided Agentic Repair of WebAssembly Discrepancies
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
Other references · 7
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
- 2025Agentic Program Repair from Test Failures at Scale: A Neuro-symbolic approach with static analysis and test execution feedbackcited by 6
- 2026TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Codecited by 6
- 2026From Guessing to Seeing: Enhancing LLM-Based Program Repair via Trace-Guided Multi-strategy Debatecited by 5
- 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
- 2024StackSight: Unveiling WebAssembly through Large Language Models and Neurosymbolic Chain-of-Thought Decompilation
- 2025InspectCoder: Dynamic Analysis-Enabled Self Repair through interactive LLM-Debugger Collaboration
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust
- 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs
- 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
- 2026AdaTrans: Automated C to Rust Transformation via Error-Adaptive Repair ↗
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
- 2026Understanding Agent-Based Patching of Compiler Missed Optimizations