Repository navigation
Add the kuna decompiler backend (+ kuna SLEIGH type aliases) - #2
Merged
Merged
Conversation
Adds a kuna decompiler backend (`decbench/decompilers/raw/kuna_raw.py`,
registered as `kuna`) that drives the standalone kuna Rust CLI's whole-binary
entrypoint `kuna decompile-all --json` — one process per binary, loading +
analyzing once and decompiling every function (the same load-once contract the
ghidra/angr raw backends satisfy). It reuses the shared `common` helpers for
ELF-file-space addressing, CRT/PLT skip-filtering, source-name narrowing,
gotos/bools metadata, and the atomic progress-pickle, and parses kuna's
per-function `{name,address,code,variables}` into the standard
`DecompilationResult`. The CLI is located via `$KUNA_BIN` or `kuna` on `$PATH`.
`type_match`: alias kuna's SLEIGH core-type spellings (`int4`/`int8`/`uint4`…,
sized in bytes like the existing `undefinedN`) into `TYPE_MAP`, so kuna's
recovered types normalize to the DWARF base-type names — the same way angr's
`undefinedN` and IDA's `__intN` are aliased. Without it kuna's type_match is
unfairly ~0.
Validated end-to-end via `decbench evaluate <bin> -d kuna` (GED + type_match +
byte_match all run on real Joern/gcc; type_match 0.85 mean on a -g sample).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019rQxQo7u2SGf7osJEjf3rK
mahaloz
marked this pull request as ready for review
June 29, 2026 15:39
mahaloz
added a commit
that referenced
this pull request
Nov 4, 2026
External eval-kit submission from Nemesis, ingested as the `psalms` column (version refine6t). Their decompiled output is withheld from every published payload at their request (`private_artifacts`, as for Ventris); their scores are measured and ranked exactly like every other column. Ingest was clean against the current manifest: no drift, 249 of the 250 sample-set functions submitted (the one miss is a Betaflight O2 firmware function), nothing dropped. Scored with the metric code behind the published numbers (GED cache v4, type_match v17, byte_match v7), so the column is comparable with the rest of the board. sample-set, #2 of 16 by Union: Union 144/250 57.6% (codex 59.6%, claude-code 56.8%) Structure 131/246 53.3% Types 37/236 15.7% Recompile 14/158 8.9% Errors 0/249 0.0% Verified before publishing: - every other column's ged/type_match/byte_match overlay entry and checkpoint leaf is unchanged, and no GED slice was lost (7515 slices, 0 pending); - the finalize coverage guard held at 770 -> 770 binaries and 96,103 -> 96,103 function rows; `--audit` reports no SILENT-DROP, and the four psalms gaps are the no-source-CFG slices every sample-set column has; - with psalms removed, aggregates.json and dataset.json match the deployed site exactly apart from generated_at; - the View page keeps all 539 samples, the same 100/100/100/239 mix and the same 536 entries carrying source; 25 easy/medium/hard picks re-tiered, because tiers use cross-decompiler GED agreement; - 242 View entries carry psalms scores with the body withheld, no psalms output appears anywhere in site/, and the Pages privacy check passes; - the HuggingFace dataset is unaffected (the column is excluded there). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKPMDEpdQyVL57JXxHw
mahaloz
added a commit
that referenced
this pull request
Nov 4, 2026
* Add Nemesis's Psalms as a private sample-set column Nemesis submitted the sample-set eval kit for their Psalms decompiler on the condition that their decompiled output is not republished. Handled exactly like Ventris: the column is scored and ranked like any other, its code is withheld from every site payload (the View page shows the "private" notice), and it is excluded from the HuggingFace dataset. - decompilers.toml / site.toml / external.py: register `psalms` as a closed-source, sample-set-only external column with `private_artifacts`. - `layout.EXCLUDED_DECOMPILERS` gains `psalms`, and `publish_dataset.py --exclude-decompiler` now adds to those defaults instead of replacing them. The recorded live invocation (`--exclude-decompiler ventris --exclude-decompiler retdec`) would otherwise have published the psalms column; `--no-exclusions` stays the only way to disable the defaults. - `psalms` joins the GED promotion defaults in reeval_ged.py and ingest.py. [AUTOMATED] authored end-to-end by Claude Code at the maintainer's request. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKPMDEpdQyVL57JXxHw * [AUTOMATED] Promote codex@gpt-6-astra's GED by default `reeval_ged.py` promotes CANONICAL_DECOMPILERS plus the ids named in DECBENCH_REEVAL_DECOMPILERS. The versioned `codex@gpt-6-astra` column was in neither by default, so a GED refresh scoped to a new column dropped all 257 of its published slices from ged_new.json. Add it to CANONICAL_DECOMPILERS and to ingest's printed defaults, with a test that every ingest default is promoted. [AUTOMATED] authored end-to-end by Claude Code at the maintainer's request. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKPMDEpdQyVL57JXxHw * [AUTOMATED] site: snapshot GED on Rust Joern Freeze the scoreboard as published on 2026-10-09 before Psalms joins the sample set. Adding Psalms moves no previously published number. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKPMDEpdQyVL57JXxHw * [AUTOMATED] site: add Nemesis Psalms sample-set results External eval-kit submission from Nemesis, ingested as the `psalms` column (version refine6t). Their decompiled output is withheld from every published payload at their request (`private_artifacts`, as for Ventris); their scores are measured and ranked exactly like every other column. Ingest was clean against the current manifest: no drift, 249 of the 250 sample-set functions submitted (the one miss is a Betaflight O2 firmware function), nothing dropped. Scored with the metric code behind the published numbers (GED cache v4, type_match v17, byte_match v7), so the column is comparable with the rest of the board. sample-set, #2 of 16 by Union: Union 144/250 57.6% (codex 59.6%, claude-code 56.8%) Structure 131/246 53.3% Types 37/236 15.7% Recompile 14/158 8.9% Errors 0/249 0.0% Verified before publishing: - every other column's ged/type_match/byte_match overlay entry and checkpoint leaf is unchanged, and no GED slice was lost (7515 slices, 0 pending); - the finalize coverage guard held at 770 -> 770 binaries and 96,103 -> 96,103 function rows; `--audit` reports no SILENT-DROP, and the four psalms gaps are the no-source-CFG slices every sample-set column has; - with psalms removed, aggregates.json and dataset.json match the deployed site exactly apart from generated_at; - the View page keeps all 539 samples, the same 100/100/100/239 mix and the same 536 entries carrying source; 25 easy/medium/hard picks re-tiered, because tiers use cross-decompiler GED agreement; - 242 View entries carry psalms scores with the body withheld, no psalms output appears anywhere in site/, and the Pages privacy check passes; - the HuggingFace dataset is unaffected (the column is excluded there). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKPMDEpdQyVL57JXxHw --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a kuna decompiler backend so the benchmark can score the standalone kuna Rust decompiler (a line-faithful port of Ghidra's decompiler) alongside angr / ghidra / ida / binja.
decbench/decompilers/raw/kuna_raw.py(registeredkuna)Unlike the other raw backends (which import a native Python module), kuna ships as a standalone CLI, so this backend shells out to it — like the dockerized backends — driving kuna's whole-binary entrypoint:
which loads + analyzes the binary once and decompiles every function (the load-once contract ghidra/angr satisfy by reusing one program/JVM/process). It reuses the shared
commonhelpers verbatim (ELF-file-space addressing, CRT/PLT skip-filter, source-name narrowing, gotos/bools metadata, atomic progress-pickle), parses kuna's per-function{name, address, code, variables}into the standardDecompilationResult, and is located via$KUNA_BINorkunaon$PATH.type_matchTYPE_MAP: kuna SLEIGH type aliaseskuna spells the integer core types
int4/int8/uint4/… (sized in bytes, like the existingundefinedN). Added these toTYPE_MAPso they normalize to the DWARF base-type names — exactly the way angr'sundefinedNand IDA's__intNare already aliased. Without it kuna'stype_matchis unfairly ~0.Validation
decbench evaluate <bin> -d kunaruns all three metrics end-to-end on real Joern/gcc:-gsample)Registry:
kunaappears inlist_registered(),is_available()true when the CLI is found.Notes
decompilers/raw/kuna_raw.py(new),decompilers/raw/__init__.py(registration), andmetrics/type_match.py(theTYPE_MAPaliases) — no other working-tree changes touched.kuna decompile-all --json) is a separate PR in the kuna repo.type_matchmetric content-caches per decompiler output; if you've already cached kuna results from before theTYPE_MAPchange, re-run withDECBENCH_NO_CACHE=1(or clear the cache) so the new aliases take effect. Fresh kuna runs are unaffected.🤖 Generated with Claude Code
https://claude.ai/code/session_019rQxQo7u2SGf7osJEjf3rK