Skip to content

docs(decbench): O0 metric blind-spot + the real angr/ida gap - #162

Merged
mahaloz merged 1 commit into
mainfrom
docs/o0-metric-gap-analysis
Jul 11, 2026
Merged

mahaloz merged 1 commit into
mainfrom
docs/o0-metric-gap-analysis

Conversation

@mahaloz

@mahaloz mahaloz commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Durable analysis doc (the ghidra-gap-analysis.md analog). Documents: (1) the GED metric is blind to syntactic form — ternaries/gotos/branchflip/empty-switch are all GED-neutral (verified); (2) kuna beats Ghidra on O0, loses to ida/angr; (3) the entire angr/ida gap is conditional-value inlining vs materialization (verified 4→1 CFG nodes) — the one lever that moves O0 GED; (4) measurement gotchas. Docs-only, no gate impact.

🤖 Generated with Claude Code

Fair O0 re-measurement (all 6 decompilers re-scored post-#6) + a direct study
of what GED rewards. Findings:

- The GED metric (Joern basic-block CFG) is BLIND to syntactic form: ternaries,
  gotos, branch-flips, and per-function empty-switches are all GED-neutral
  (verified directly). Only basic-block count / branch structure moves it.
- kuna BEATS Ghidra on O0 (coreutils: wins 431 / ties 781 / loses 260); the
  real target is ida (loses 659) and angr (loses 623).
- The whole angr/ida gap is conditional-value INLINING vs materialization: kuna
  emits `if(c)v=A;else v=B; f(v)` (4 CFG nodes) where angr inlines `f(c?A:B)`
  (1 node). That collapse is the one lever that moves O0 GED (a substantial
  print/dataflow change; source-dependent -> option + ablation).
- Measurement gotchas: DECBENCH_REDO_DECOMPILERS is a no-op unless
  DECBENCH_DECOMPILERS lists kuna; run_benchmark resumes complete projects;
  scratchpad binaries need KUNA_SPECS; fair scoring needs purging all reeval
  checkpoints for a project.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0197dWa5QYabZofMfLDC1YP4
@mahaloz
mahaloz merged commit 166111b into main Jul 11, 2026
@mahaloz
mahaloz deleted the docs/o0-metric-gap-analysis branch July 11, 2026 03:31
mahaloz added a commit that referenced this pull request Jul 11, 2026
…-neutral (#163)

A valid iteexpr ablation (re-decompile forced correctly, .c verified to gain
ternaries) shows 0 GED change across all 1477 coreutils O0 functions. So the
whole ternary line — iteexpr, computed-arm recovery, a would-be inline pass —
is a GED dead end: Joern only collapses SIMPLE-arm ternaries to 1 node (already
iteregion's domain); computed/global-name arms stay 3-4 nodes whether inline or
statement. This REFUTES the earlier "conditional-value inlining is the lever"
framing (#162) — the diamonds are not the angr/ida gap. Adds the node-count
table, the empirical ablation result, and flags that the real O0 node-count gap
vs ida/angr is still unidentified (and is NOT ternaries) — needs a direct
Joern-CFG block diff, not another syntactic pass.


Claude-Session: https://claude.ai/code/session_0197dWa5QYabZofMfLDC1YP4

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant