acceptodds
Under review as a conference paper at ICLR 2027

Learning a Symbolic Decompiler

Abstract

Decompilation reverses the transformations of compilers. These transformations are deterministic but non-bijective, often discarding names, types, and structure from high-level languages. Traditional decompilers infer plausible high-level information through heuristic analyses that require expert labor to write and maintain. Recent work instead fine-tunes large language models to generate source code directly or uses LLM agents to iteratively refine the output of existing decompilers. Both approaches make decompilation knowledge hard to accumulate and inspect: neural models encode it implicitly in weights, where individual behaviors are hard to trace or repair; agents typically reason about each program independently, leaving no residue for future tasks. Symbolic rules offer complementary properties: they are inspectable, traceable, precisely repairable, and reusable across programs, but have traditionally been difficult to learn autonomously. To address this, we present RuleCrafter, an agentic framework that decomposes decompilation into substeps and learns Datalog rules for each. Without LLM calls at evaluation, the best learned rule base matches or exceeds traditional decompilers in re-execution, and rule bases learned on one corpus apply to the others without modification.

Primary area:
neurosymbolic & hybrid AI systems (physics-informed, logic & formal reasoning, etc.)
Keywords:
Static Analysis, Program Synthesis, Reverse Engineering

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_vonmOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

This paper proposes RuleCrafter, a framework that uses LLM agents to learn reusable symbolic rules for decompilation. Instead of generating C code directly from assembly, the agents write and refine Datalog rules that reconstruct program structures. The system uses execution feedback and provenance tracing to identify and fix incorrect rules. Once training is complete, the learned rules can decompile new programs without additional LLM calls. The authors evaluate RuleCrafter on HumanEval, MBPP, and ExeBench, comparing it with traditional and neural decompilers.

Critical strengths
  1. I like the idea of having LLM agents learn reusable symbolic rules. Most existing LLM-based approaches handle each decompilation task separately, while RuleCrafter allows the knowledge acquired from previous tasks to be reused.

  2. The combination of Datalog rules and LLM agents is interesting. The learned rules are interpretable and can be inspected or modified when errors occur. Provenance tracing also provides a reasonable way to identify which rules may be responsible for incorrect outputs.

  3. The cross-dataset experiments are encouraging. The authors show that rules learned on one dataset can be applied to other datasets without modification.

Critical weaknesses
  1. The performance of RuleCrafter varies significantly depending on the LLM used to construct the rules. For example, the DeepSeek-based rule base achieves only 3.79% and 7.57% re-execution accuracy on HumanEval and MBPP, despite having relatively high readability scores. This makes me question how reliable the rule learning process is.

  2. The paper lacks sufficient ablation studies. RuleCrafter relies on several components, including predefined interfaces, provenance tracing, execution feedback, and MaxSMT-based selection. It would be useful to understand which components contribute most to the final performance. In particular, I am interested in how much of the decompilation capability is learned by the agents and how much comes from the predefined system architecture.

  3. I have some concerns about the evaluation. Some baseline results are taken from prior work using different evaluation protocols, making direct comparisons difficult. Also, the experiments focus on relatively small benchmark programs. It would be interesting to evaluate the learned rules on more complex real-world programs to better understand their generalization.

Questions for authors

See Weaknesses

1 comment

We thank the reviewer for the review and feedback. We address the weakness and questions below. Section, table and figure numbers refer to the revised PDF, a summary of the updated results is included under W2 for easier comparison.

W1.

The learner writes the decompiler, so its capability matters, as with any LLM-based method. What differs here is that the result is a fixed program: its correctness is measured by re-execution (R-E) and its readability by R2I, so a rule base’s quality is reflected in these numbers. The one case where R2I misleads is discussed next and in §4.4. DeepSeek's low R-E has a specific cause (§4.4): 74–79% of its learned code sits in the AST stage, concentrated on whole-function templates with placeholder fallbacks. Across 7,360 outputs there are no live loops, gotos or else branches. R2I scores such simple bodies highly, a limitation §6 now states; our correctness claims rest on R-E. With the two stronger learners the same process produces rule bases at the top of the comparison. The unified Opus 5.5 base ranks first in R-E on MBPP and ExeBench among all evaluated systems, neural ones included, and second on HumanEval, 1.5 points behind SK2Decompile. It exceeds every traditional decompiler on all three corpora, by 3 to 25 points over the best of them. The from-scratch GPT-6 Astra base is already on par with Hex-Rays (ahead on two corpora, behind on one).

W2.

All decompilation analysis is learned; the predefined architecture contains no analysis code. It supplies instruction decoding, the stage interfaces, C emitter, the Datalog engine, and the rule base starts empty. The interfaces only name the outputs each stage should produce. How to derive them is left to the workers, who wrote relations of their own in each rule base learned from scratch.

For the components of the rule base, new Table 3 (also included below) gives the share of learned code per reconstruction group. All four groups are populated in every rule base. Learned MaxSMT constraints appear only in the unified base (5.4%), so the single-corpus results do not depend on this component.

ModelTrained onMachine structureMachine semanticsC-level constructsASTMaxSMT
GPT-6 AstraHumanEval10.6%18.7%11.7%59.0%0.0%
GPT-6 AstraMBPP7.6%10.6%18.3%63.5%0.0%
GPT-6 AstraExeBench20.4%27.8%10.2%41.6%0.0%
Opus 5.5HumanEval19.4%27.0%11.0%42.7%0.0%
Opus 5.5MBPP16.9%37.0%11.7%34.3%0.0%
Opus 5.5ExeBench17.2%10.7%17.3%54.7%0.0%
Opus 5.5Unified19.0%16.0%13.5%46.0%5.4%
DeepSeek V4.1 FlashHumanEval8.1%9.2%8.7%73.9%0.0%
DeepSeek V4.1 FlashMBPP5.8%6.8%8.6%78.9%0.0%
DeepSeek V4.1 FlashExeBench7.0%5.5%9.1%78.3%0.0%

Provenance and execution feedback are used while the rules are being learned. They are not components of the finished decompiler, so removing either one would require a new learning run rather than a re-evaluation. §4.2 shows them at work in a recorded repair: a failing test and a KLEE counterexample expose the error, a provenance trace points to the rules responsible, and the worker fixes them in 26 edits. They are also in constant use: across all learners, 36.4% of tool calls read facts or trace provenance, and 17.7% run trial evaluations or read their results.

Tool-call groupShare of all tool calls
Read facts (query_facts, trace_fact)36.4%
Read rules and guidance19.9%
Read results (read_c, read_observation, read_feedback)8.5%
Rule edits (try_rule, promote, discard, edit_rule)12.9%
claim_substep4.3%
Trial evaluation (try_emit, try_oracle, try_r2i)9.2%
check and rotate_batch8.8%

W3.

Table 2 is now a matched comparison. We evaluate every system ourselves on the same validation sets at O0–O3 with one shared R2I pool. On complexity, ExeBench valid_real consists of real-world GitHub functions, not programming exercises. The unified base's R-E there (50.74) exceeds Hex-Rays (47.63) and every neural system. Like the neural baselines, RuleCrafter reconstructs one function at a time. These three corpora are the most widely used in this literature, which is what allows a matched comparison with prior systems such as LLM4Decompile, SK2Decompile, and Idioms.

We hope this addresses your concerns, and we will be happy to answer any further questions.

Reviewer_y8zkOpenReview ↗
Rating
2(+1)
Confidence
2
Informativeness
2
Presentation
1
Soundness
1
Read review
Paper summary

This paper presents RuleCrafter, an agentic framework that learns a symbolic decompiler by having LLMs incrementally build a reusable rule base from an empty start, guided by program feedback and provenance. Different from directly fine-tuning model parameters or using large language models to generate source code, the constructed rule base is persistent, and large language models are no longer required during decompilation. Experiments demonstrate the effectiveness of this approach, yet its overall performance still lags behind state-of-the-art neural and non-neural decompiler.

Critical strengths

The motivation of the paper is innovative and reasonable. This approach of using LLMs to generate a rule base can get rid of reliance on large models during subsequent decompilation, thereby saving token costs and invocation time.

Critical weaknesses
  1. The logic jumps and the writing is poor. For example, the abbreviation AST appears multiple times in the introduction, yet its first explanation does not come until the end of Section 2. As another example, KLEE is mentioned in Section 3, Page 3, while its reference does not appear until page 5. The most serious issue concerns eq1. What do Γ\Gamma , EmE_m and σm\sigma_m  in eq1 stand for? The text states “With Γ\Gamma  fixed …” but never defines Γ\Gamma. Almost none of the symbols within this formula are explained, rendering eq1 nearly incomprehensible and severely hurting readability.

  2. The performance in the experiments is not competitive. In Table 1, the results of the three LLMs are generally outperformed by the existing decompiler Kuna and the neural decompiler SK2Decompile. In particular, although the code produced by DeepSeek has decent readability(R2I), it achieves a very low R-E score (this correctness with re-execution metric may be more critical for decompilation), reaching only 3.79 and 7.57 on HumanEval and MBPP respectively.

Questions for authors
  1. Please explain the symbols and meanings in eq1 (see W1).

  2. The outputs of LLM usually have high randomness, so I recommend running multiple times and reporting the mean and variance.

  3. Given the constructed rule base, is the decompilation engine an existing decompilation engine or a decompilation program built by this work?

4 comments

We thank the reviewer for their time and feedback. We address the questions and concerns below, and the table and figure numbers refer to the revised PDF.

Q1 (W1).

Γ\Gamma was defined at the start of §3 in the submission, but the definitions were spread over two pages. The revision gives them all directly under Eq. (1):

  • Γ\Gamma: the fixed, supplied architecture (machine description, loader, substep interfaces, C AST grammar, evaluation schedule, MaxSMT selector, emitter).
  • FΓ(m)F_\Gamma(m): the facts the loader extracts from assembly input mm.
  • EmE_m: the facts derived by evaluating rule base R\mathcal{R} on FΓ(m)F_\Gamma(m), including candidate AST graphs and learned constraints.
  • σm\sigma_m: the MaxSMT assignment, i.e. the selected value of each declared decision variable.
  • c^m\widehat{c}_m: the emitted C.

AST is now expanded at first use (§1), and KLEE is cited where it first appears (§3).

W2.

Our claim is about the best learned rule base, and the submitted table already supported it. The GPT-6 Astra base exceeded Kuna on MBPP and ExeBench and trailed it by 0.75 points on HumanEval.

In the revision's matched comparison (Table 2), the unified Opus 5.5 base has the highest R-E of all evaluated systems on MBPP and ExeBench. On HumanEval it is 1.5 points behind SK2Decompile. Note that SK2Decompile refines Hex-Rays pseudocode with a 6.7B-parameter model on every function, while RuleCrafter works from raw assembly with no model at evaluation. DeepSeek's low R-E is a failure case we report in full, not the method's ceiling: its rules fall back to placeholder bodies (§4.4), which re-execution exposes.

CorpusRuleCrafter: Opus 5.5 unifiedBest existing system
HumanEval67.42%68.94% — SK2Decompile
MBPP59.46%55.81% — SK2Decompile
ExeBench50.74%47.63% — Hex-Rays

Q2. We agree that repeated learning runs would help quantify variability. However, evaluation involves no randomness. A frozen rule base is a deterministic program and no LLM is called, so every RuleCrafter number in Table 2 stays the same across reruns. Randomness enters only during learning. In the paper we report eleven learning runs in full rather than a single LLM/dataset setup, and our claim is one of existence: LLM workers can learn a symbolic decompiler that reaches this level. The best runs establish our claim regardless of variance. We make no claim about the expected outcome of a single run, which is what repeated runs would estimate. In the revised version, we have updated our conclusion to reflect this.

Q3. No existing decompiler engine is used at any stage. The learned rule base is the decompiler: control-flow recovery, data flow, types and structuring are all rules written by the LLM workers, starting from an empty base. The supplied parts are conventional in this research area. Capstone decodes instructions, the FlowLog Datalog engine executes the rules, and a MaxSMT solver selects among alternatives the rules declare.

We hope this addresses your concerns, and we are happy to answer any further questions.

We hope our response and the revision answer your questions. We have revised:

  • Every symbol in Eq.1 is now defined directly below it, and AST and KLEE are introduced at first use;
  • The best from-scratch rule base was already ahead of Kuna on two of three corpora in the submitted table, and in the matched comparison of Table 2 the unified rule base has the highest re-execution rate of all evaluated systems on MBPP and ExeBench
  • §6 now states the scope of our claim with respect to run-to-run variability.

If anything remains unclear, please let us know and we will do our best to answer before the discussion ends. If these resolve your concerns, we would be grateful if you could update your review.

Thank you for the clarifications and revisions, some of my concerns have been addressed. However, I still find the paper difficult to read. The presentation feels somewhat fragmented, and several concepts are introduced without sufficient explanation or context. The transitions between the formal pipeline, learning procedure, and evaluation are also not always clear, making it difficult to understand how the different parts fit together. While the authors have addressed my specific technical questions, I do not think the overall readability has improved sufficiently.

In light of these revisions, I have raised my rating from 1 to 2 (weak reject), although my overall concerns about the presentation remain.

Thank you for your reply and for raising your rating. We also appreciate your recognition that the motivation is innovative and reasonable. We understand that some of the terminology and writing are still hard to follow. In future versions, we will introduce the concepts with clear definitions and more comprehensive context, and we will make the transitions between the formal pipeline, the learning procedure, and the evaluation more explicit, so that readers can easily follow and see how the parts fit together. Thank you again for your time and feedback.

Reviewer_zn2GOpenReview ↗
Rating
3
Confidence
2
Informativeness
3
Presentation
3
Soundness
3
Read review
Paper summary

The paper presents RuleCrafter, which uses LLMs to learn reusable Datalog rules for a symbolic decompiler that translates x86-64 assembly into C code. The system divides reconstruction into interdependent stages and uses program feedback to generate and revise rules iteratively. Rule provenance helps locate problematic rules. Once frozen, the rule base processes new inputs without LLM calls at evaluation time. The authors evaluate correctness (R-E) and readability (R2I) on HumanEval, MBPP, and ExeBench. The best rule base achieves R-E close to that of traditional decompilers on some datasets, and cross-dataset experiments provide evidence of rule reuse. An unsigned comparison repair case also illustrates how provenance helps locate errors and revise the relevant rules.

Critical strengths
  1. Combining LLM learning with rule-based methods and symbolic knowledge allows decompilation knowledge to be explicitly accumulated, inspected, and reused as executable rules. The approach provides a meaningful way to balance performance and system interpretability.
  2. The learned rules cover interdependent stages, including control-flow and data-flow analysis. Rule provenance supports error localisation and repair.
  3. The frozen rule base requires no LLM calls during evaluation and achieves R-E close to that of traditional decompilers on some datasets. Cross-dataset experiments also support the reusability of the learned rules.
Critical weaknesses
  1. The neural baselines and RuleCrafter use different input settings and R2I normalisation, which limits direct comparison of their results.
  2. Performance varies substantially across LLM workers, but the paper provides limited analysis of the differences in their learned rules. Even the best-performing worker, GPT-6-Astra, shows only limited advantages over existing decompilers in re-execution correctness.
  3. Rule reuse is not sufficiently explored. The cross-dataset experiments demonstrate transfer, but the generalisation of learned rules to a broader range of decompilation scenarios remains unclear.
Questions for authors
  1. Can RuleCrafter reuse rules from other research projects or products, or use expert knowledge for initialisation? Could such initialisation improve reconstruction quality and reduce learning costs?
  2. For Astra, training on ExeBench uses roughly five times as many input tokens as training on HumanEval, despite similar numbers of training functions. What drives the difference, such as program complexity or repeated rule revisions? How does the additional token usage relate to the final rule base size and reconstruction quality?
  3. Some rule bases achieve relatively high readability (R2I) but low correctness (R-E). Could the authors further analyse and discuss the observation?
4 comments

Thank you for the careful review. Section, table and figure numbers refer to the revised PDF. For convenience, Table 2 of the revision is attached here.

SystemInputHE R2IHE R-EMBPP R2IMBPP R-EEB R2IEB R-E
LLM4Decompile Ref-9B v2Ghidra C62.9849.2463.3839.1961.9437.92
Idioms CodeGemma-7BIDA C56.6927.2763.1032.8464.8228.71
SK2Decompile (6.7B)IDA C56.4868.9457.3055.8158.1642.91
angr (9.2.102)Native code44.446.8245.5118.6044.6130.64
Ghidra (12.0.3)Native code40.5337.8847.8738.5050.7345.13
Hex-Rays (8.3)Native code46.8740.1551.5046.5158.8347.63
Kuna (1.553)Native code43.2242.4248.2339.0251.3542.34
DeepSeek V4.1 Flashx86-64 asm76.043.7971.157.5761.3226.49
GPT-6 Astrax86-64 asm30.6541.6737.7247.2340.0344.53
Opus 5.5x86-64 asm43.7625.7651.3229.4749.2930.79
Opus 5.5 cont. GPT-6x86-64 asm33.6344.7041.8849.4642.5948.15
Opus 5.5 unifiedx86-64 asm47.6767.4253.5759.4651.0250.74

Thank you for the careful review and questions, and we answer the weaknesses and questions one by one.

W1. We have rerun the evaluation and Table 2 (above and in paper) is now a matched comparison. We evaluate every system ourselves on the same validation sets (HumanEval, MBPP, ExeBench valid_real) with one shared R2I pool. The input difference is inherent to the methods: the baselines refine Ghidra or Hex-Rays pseudocode with a model call per function, while RuleCrafter starts from raw assembly and calls no model. Under this protocol the unified Opus 5.5 base has the highest R-E on MBPP and ExeBench, and SK2Decompile leads on HumanEval by 1.5 points.

W2. §4.4 and Table 3 now analyze the rule bases directly. GPT-6 Astra builds many small guarded rewrites and emits C close to machine code, with a median of eight casts per function. It has the lowest R2I and the highest R-E of the from-scratch bases. Opus 5.5 recovers control flow and arithmetic and emits compact C (median 12 lines, one cast). DeepSeek concentrates on whole-function templates (please see Q3). On the advantage: starting from an empty rule base, the Astra base is on par in R-E with Hex-Rays, a production decompiler built over many years (ahead on two corpora, behind on one). The unified Opus base exceeds every traditional decompiler on all three corpora in R-E.

W3.

Beyond dataset transfer (§4.3), we added two reuse experiments (§4.1).

  • Continuation across learners: Opus 5.5 continues learning from an ExeBench rule base previously learned by GPT-6 Astra (937 edits after switch).
  • Consolidation across training corpora: We combine the Opus 5.5 rule bases learned on HumanEval, MBPP, and ExeBench, and then continue learning from the combined base (887 edits after merge)
SystemInputHumanEval R2IHumanEval R-EMBPP R2IMBPP R-EExeBench R2IExeBench R-E
Opus 5.5 cont. GPT-6x86-64 asm33.6344.7041.8849.4642.5948.15
Opus 5.5 unifiedx86-64 asm47.6767.4253.5759.4651.0250.74

These added experiments demonstrate that a learned rule base can be retained across a change of learner and consolidated across training corpora. §4.1 describes both variants, and §4.3 (now ‘Transfer and reuse of learned rules’) discusses them.

Q1. In principle an initialisation could improve reconstruction quality and reduce learning costs. Any rule base that sticks to the stage interfaces can be the starting point, though rules from other projects would first need porting to our relation schemas. We have not evaluated expert-written rules. The continuation experiment tests the same mechanism with rules the learner did not write: from Astra’s checkpoint, Opus improved on the final GPT-6 Astra base in R2I and R-E on all three corpora with 937 edits, against the 1,660 further edits GPT-6 Astra itself made from the same checkpoint.

Q2. The higher token usage is mostly overhead, not due to program complexity. This was Astra's initial run: infrastructure bugs and misaligned tests consumed about 30% of the tokens on 11 functions, and a scalability experiment of running up to 16 workers added roughly 20% rejection and race overhead. The 5× tokens produced 1.5× the clauses and the highest R-E of Astra's three bases on every corpus (Figure 4). However, single runs cannot separate the effect of compute from the corpus and model capability. Q3. We have added §4.4 that identifies the cause and discusses this difference. DeepSeek rules concentrate on whole-function templates, and placeholder fallbacks for unmatched code emit compilable C that often omits the original behavior. R2I scores such simple bodies highly and re-execution exposes them. Our correctness claims therefore rest on R-E, and §6 now states this limitation of R2I.

We hope this addresses your questions and concerns. We are happy to answer any further questions.

Thanks for your feedback. I have no further comments, and I'd be happy to keep my original score.

Thank you for the reply. We are glad that our response answered your questions, and we appreciate your support of the paper.

Comments on the paper

1 comment

Dear reviewers and AC, here is a summary of the changes in the revision (marked in red). The abstract and main contributions remains the same, with more evidence and evaluations updated.

  • Comparison results (zn2G W1, vonm W3): Table 2 re-evaluates every system on the same validation sets with one shared R2I pool.
  • Competitiveness (y8zk W2, zn2G W2): starting from an empty rule base and no model at evaluation, the GPT-6 Astra base matches traditional decompilers in re-execution. The unified Opus base exceeds every traditional decompiler on all three corpora in R-E.
  • Rule reuse (zn2G W3): two added rule bases continue learning from existing rules (§4.1, §4.3). Opus 5.5 cont. GPT-6, trained on ExeBench only, exceeds all four traditional decompilers on all three corpora. Opus 5.5 unified, has the highest re-execution rate of all systems on MBPP and ExeBench.
  • Differences between learners, R2I vs R-E (zn2G W2/Q3, vonm W1): reflected in §4.4 and Table 3; §6 states the limitation of R2I.
  • What is learned vs. supplied (vonm W2): Table 3 gives the share of learned code per reconstruction group; no analysis code is provided at the beginning.
  • Notation (y8zk W1): symbols in Eq. (1) are defined directly below it; AST and KLEE are introduced at the first use.
  • Variability (y8zk Q2): §6 states that our results support an existence claim and repeated runs would be needed to characterize variability.

If any concern remains, please let us know and we will answer before the discussion closes. If the revision resolves your concerns, we would be grateful if you could update your review.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.