# PCodeTrans: Translate Decompiled Pseudocode to Compilable and Executable Equivalent

arXiv: https://arxiv.org/abs/2603.14855 · HTML: https://mlsanity.com/paper/2603.14855/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 17 of its 46 references that are in the map.
- First posted on arXiv 16 Mar 2026.

## Builds on (most cited first, 17 of 17)

- [Split and Merge: Aligning Position Biases in LLM-based Evaluators](https://mlsanity.com/paper/2310.01432/) (2023)
- [LLM4Decompile: Decompiling Binary Code with Large Language Models](https://mlsanity.com/paper/2403.05286/) (2024)
- [DIRE: A Neural Approach to Decompiled Identifier Naming](https://mlsanity.com/paper/1909.09029/) (2019)
- [Augmenting Decompiler Output with Learned Variable Names and Types](https://mlsanity.com/paper/2108.06363/) (2021)
- [Towards Neural Decompilation](https://mlsanity.com/paper/1905.08325/) (2019)
- [Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approach](https://mlsanity.com/paper/2310.06680/) (2023)
- [Decompiling x86 Deep Neural Network Executables](https://mlsanity.com/paper/2210.01075/) (2022)
- [SK2Decompile: LLM-based Two-Phase Binary Decompilation from Skeleton to Skin](https://mlsanity.com/paper/2509.22114/) (2025)
- [Polymorphic Type Inference for Machine Code](https://mlsanity.com/paper/1603.05495/) (2016)
- [ReCopilot: Reverse Engineering Copilot in Binary Analysis](https://mlsanity.com/paper/2505.16366/) (2025)
- [D-LiFT: Improving LLM-based Decompiler Backend via Code Quality-driven Fine-tuning](https://mlsanity.com/paper/2506.10125/) (2025)
- [Automatically Mitigating Vulnerabilities in Binary Programs via Partially Recompilable Decompilation](https://mlsanity.com/paper/2202.12336/) (2022)
- [DecompileBench: A Comprehensive Benchmark for Evaluating Decompilers in Real-World Scenarios](https://mlsanity.com/paper/2505.11340/) (2025)
- [ALT4Decompile: Inferring C-aligned Abstract Loop Tree for LLM-Based Binary Decompilation](https://mlsanity.com/paper/2509.14646/) (2025)
- [The CodeInverter Suite: Structure- and Data-Aware Binary Decompilation with Efficient LLMs](https://mlsanity.com/paper/2503.07215/) (2025)
- [FidelityGPT: Correcting Decompilation Distortions with Retrieval Augmented Generation](https://mlsanity.com/paper/2510.19615/) (2025)
- [Context-Guided Decompilation: A Step Towards Re-executability](https://mlsanity.com/paper/2511.01763/) (2025)

## Abstract (arXiv)

Decompilation is foundational to binary analysis, yet conventional tools prioritize human readability over strict recompilability and verifiable runtime correctness. While recent LLM-based approaches attempt to refine decompiled pseudocode, they typically either optimize solely for readability or rely on static analysis for evaluation. This makes them prone to "semantic hallucinations" that compromise accuracy and fail to resolve actual runtime failures. For critical tasks like software modernization and vulnerability remediation, recovered code must not only compile but replicate the original binary's behavior. We present PCodeTrans, a feedback-driven framework that bridges the gap between decompilation, recompilation, and rigorous function-level dynamic validation. After extracting a minimal yet coherent context to guarantee recompilability, PCodeTrans employs an in situ substitutable engine to hot-swap the compiled function directly into the unmodified binary, natively preserving its authentic execution context and global dependencies. Guided by fine-grained differential tracing, PCodeTrans generates precise runtime feedback to iteratively guide an LLM in repairing semantic discrepancies. Evaluated on Coreutils and Binutils, PCodeTrans achieves unprecedented recovery performance when rectifying raw Hex-Rays outputs, attaining 100% function-level compilability on unstripped binaries alongside 99.55% and 99.89% test-validated behavioral consistency, respectively. In doing so, it resolves 76.56% and 79.74% of logic errors exposed by official test suites. Exhibiting exceptional resilience, PCodeTrans maintains over 96% behavioral consistency even on fully stripped binaries. By significantly outperforming all existing baselines, PCodeTrans paves a practical path to reliably translate decompiled pseudocode into compilable and executable equivalents.
