Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
774acd7
feat(core): address→symbol map seam — the project's own names, and ex…
macabeus Jul 31, 2026
84559f5
feat(core): declaration-shape spellings — a project-declared global s…
macabeus Jul 31, 2026
e7b248c
fix(core): global-address spellings that survive the project's own he…
macabeus Jul 31, 2026
f966fad
feat(core): strict-mode declines NAME their gaps — one decline surfac…
macabeus Jul 31, 2026
805c3bf
feat(core): candidate declaration synthesis — a scored candidate decl…
macabeus Jul 31, 2026
8f5f9c0
feat(cli): read the project's symbol map from its own ELF
macabeus Jul 31, 2026
19b6a4a
feat(cli): candidate compiles carry their own declarations — and the …
macabeus Jul 31, 2026
4720ee0
data(bench): vendored symbol maps + fork-pinned sources
macabeus Jul 31, 2026
877bbe3
feat(bench): bench-owned pinned project checkouts — `pnpm bench setup`
macabeus Jul 31, 2026
76171eb
feat(bench): symbol maps in the benchmark — fed to asmlift, published…
macabeus Jul 31, 2026
351a4ac
fix(bench): the cast metric exempts project-idiom ADDRESS casts — for…
macabeus Jul 31, 2026
b56587d
feat(bench): reproduction scripts reproduce the SYMBOL-FED row, not a…
macabeus Jul 31, 2026
557c49c
fix(bench): the scoring context — ONE typedef guard, and `bench targe…
macabeus Jul 31, 2026
ef51b6b
feat(bench): fidelity verifies the map, the pin, and the bundle it ce…
macabeus Jul 31, 2026
638984e
fix(bench): fidelity had no `noncompile` branch — every noncompile ro…
macabeus Jul 31, 2026
0052278
feat(web): the benchmark report shows what each row's asmlift run act…
macabeus Jul 31, 2026
81cbad5
feat(web): the playground takes a symbol map — and ranks WITH it
macabeus Jul 31, 2026
c0d54b5
chore: `pnpm typecheck` covers apps/web
macabeus Jul 31, 2026
6deab4c
results: regenerate the benchmark — 675 rows, asmlift 344 (was 343), …
macabeus Jul 31, 2026
9685c84
fix(cli): the symbol map REFUSES when the DWARF facts are missing — n…
macabeus Jul 31, 2026
963ede8
docs(cli): README describes the config that exists
macabeus Jul 31, 2026
c902276
fix: three prose artifacts that describe code that no longer exists
macabeus Jul 31, 2026
77fdda5
results: re-run the benchmark at the rewritten tip
macabeus Jul 31, 2026
893cc90
feat(symbols): an access through a POINTER global's value is a NAMED …
macabeus Jul 31, 2026
d5bc876
results: re-run the benchmark on the pointee spelling — 2 rows read b…
macabeus Jul 31, 2026
db46384
fix(symbols): the pointee spelling names only what the declaration de…
macabeus Jul 31, 2026
5fa09a5
fix(symbols): drop the INDEXED pointee spelling — measurement says it…
macabeus Jul 31, 2026
6e4805c
docs(symbols): comments describe the spellings that exist after the i…
macabeus Jul 31, 2026
d228049
results: re-run the benchmark on the remediated pointee spelling — 1 …
macabeus Jul 31, 2026
cc0619e
fix(symbols): validate a layout BEFORE sorting it — the D5 guard had …
macabeus Jul 31, 2026
1a3d0bb
results: re-stamp the benchmark at the remediated tip — zero rows move
macabeus Jul 31, 2026
005f9de
test(symbols): pin the capability gate's end-of-load settlement
macabeus Jul 31, 2026
c813932
results: re-stamp at the final tip — zero rows move
macabeus Jul 31, 2026
ef8ef57
fix(core): the named spelling wins a score tie by contract, not by ac…
macabeus Aug 1, 2026
c24caee
feat(bench): score every row as if its function were still INCLUDE_ASM
macabeus Aug 1, 2026
4c68fb7
fix(core): never adopt a map name for a pool word the source spelled …
macabeus Aug 1, 2026
29134cc
feat(bench): a candidate that fails to build is recorded, not swallowed
macabeus Aug 1, 2026
2fe0798
fix(symbols): a pointer member is declared at its real pointee width
macabeus Aug 1, 2026
794206a
feat(symbols): name a cell by the project's address-cast macro
macabeus Aug 1, 2026
b4675f8
feat(symbols): callee prototypes from the project's own DWARF
macabeus Aug 1, 2026
47a47f0
fix(bench): one builder for the vendored map, so the drift gate agrees
macabeus Aug 1, 2026
98ea23f
fix(core): the numeric-pool veto is about relocation, not about naming
macabeus Aug 1, 2026
d54af3c
fix(bench): reproduction scripts carry the macro defines their source…
macabeus Aug 1, 2026
67308d2
feat(symbols): macro names come from the ELF, not from re-preprocessi…
macabeus Aug 1, 2026
2a1255c
data(bench): manifest hints keep only the row's OWN signature
macabeus Aug 1, 2026
59d119a
data(bench): drop the callee prototypes that were doing nothing
macabeus Aug 1, 2026
c1eba39
fix(cli): never consume the target's own definition-derived DWARF
macabeus Aug 1, 2026
2752d00
results: regenerate — asmlift 344 -> 343, m2c unchanged at 340
macabeus Aug 1, 2026
45ca32b
docs: document the elf: parameter — what the symbol map feeds, and ho…
macabeus Aug 1, 2026
d8ba1dc
docs: the elf: section survives its own adversarial review
macabeus Aug 2, 2026
f309fec
data(bench): re-vendor the maps with the four debug-info producer fixes
macabeus Aug 2, 2026
6d254d6
results: regenerate on the re-vendored maps — zero rows move
macabeus Aug 2, 2026
907b107
deps(cli): @gba-kit/debug-info ^0.4.0 — the published package, no mor…
macabeus Aug 2, 2026
1501e9d
fix(web): the symbol-map example assembles — and assembler errors sur…
macabeus Aug 2, 2026
aec56de
fix(web): the symbol-map example byte-matches — real agbcc output, sy…
macabeus Aug 2, 2026
2b060b5
test(web): the symbol-preset pins describe the byte-matching example
macabeus Aug 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ apps/benchmark/results/*.log
apps/benchmark/results/*.part*.json
# CI-fetched toolchains + pinned m2c (.github/workflows/benchmark.yml)
.deps/
# bench-owned toolchains fetched by `pnpm bench setup` (gcc 2.7.2 + binutils 2.6 releases)
apps/benchmark/toolchains/
# bench-owned project checkouts materialized by `pnpm bench setup` (disposable clones the
# harness may build in — the sibling WORKSPACE checkouts stay untouched)
apps/benchmark/checkouts/
# per-tier intermediates regenerated by every `bench run` (results.json stays committed)
apps/benchmark/results/synthetic.json
apps/benchmark/results/real.json
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ tools:
# Possible values: agbcc, ido7.1, gcc2.7.2kmc, mwcc_242_81
target: agbcc

# Optional. The project's built ELF. asmlift reads its symbol table and debug info to
# name the globals and struct fields the assembly only addresses, recover callee
# signatures, and adopt the project's address-cast macro names. How to produce a good
# one is covered in the CLI documentation linked below.
elf: rom.elf

# Optional. Used only for the `--score-against`
compiler: |
arm-none-eabi-cpp -nostdinc -I tools/agbcc/include {{inputPath}} -o {{outputPath}}.i
Expand Down
34 changes: 31 additions & 3 deletions apps/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,37 @@ key derivation is in `src/cache.ts`; the m2c side fails closed on a dirty m2c ch

Harness path defaults live in `src/config.ts`, following the sibling-checkout WORKSPACE
convention: `ASMLIFT_M2C_DIR` overrides the m2c checkout; `ASMLIFT_CPP` names the GNU cpp used
for real-tier preprocessing (Apple's `/usr/bin/cpp` ignores `-o`). Real-tier manifests carry NO machine paths — each project resolves as
`WORKSPACE/<repoDir>`, overridable per project via `ASMLIFT_PROJ_<PROJECT>`; projects missing on
this machine are skipped with one aggregated warning.
for real-tier preprocessing (Apple's `/usr/bin/cpp` ignores `-o`). Real-tier manifests carry NO
machine paths — each project's checkout resolves in order: `ASMLIFT_PROJ_<PROJECT>` env override

> bench-owned checkout (`apps/benchmark/checkouts/<repoDir>`, materialized by `pnpm bench
setup`) > sibling `WORKSPACE/<repoDir>`; projects missing on this machine are skipped with one
> aggregated warning.

### Bench-owned checkouts (`pnpm bench setup [--build]`)

`bench setup` materializes a HARNESS-OWNED workspace under the gitignored
`apps/benchmark/checkouts/`: every real-tier fork is cloned at its pinned branch (submodules
included; ssh submodule URLs are rewritten to https), baseroms are copied in from the sibling
user checkout when present, and each project's preparation recipe runs
(`src/cases/project-setup.ts`: agbcc builds, venvs, splat splits, generated sources).
`--build` then runs every project's full build through its own byte-compare gate (plus its
`elfMake` symbol-ELF target). These clones are disposable and freely mutated by the harness;
NON-bench-owned checkouts (env override or sibling WORKSPACE) are only ever reported — setup
never mutates them.

Host prerequisites (macOS; verified empirically):

- Xcode CLT (`/usr/bin/cc` — host tools build with `/usr/bin` ahead of homebrew, several
projects' host tools miscompile under homebrew gcc), plus homebrew `gmake`, `wget`, `libpng`
- an `arm-none-eabi` toolchain on PATH (GBA projects: pokeemerald, sa3, kleod)
- python >= 3.11 first on PATH for kleod's `setup.sh`; any python3 for the others
- big-endian `mips-linux-gnu` binutils under `/opt/cross` (af), and Rosetta
(`softwareupdate --install-rosetta` — af's IDO recomp and marioparty3's KMC gcc are x86_64)
- Docker (snowboardkids2 builds inside a linux/amd64 container; the `asmlift-elf` DWARF
sidecar targets also fall back to Docker when no host `mips-linux-gnu-gcc` exists)
- baseroms: setup copies them from the sibling user checkouts when found; otherwise place them
manually (the status table names the missing file and destination)

## Harness layout (`src/`)

Expand Down
69 changes: 36 additions & 33 deletions apps/benchmark/dataset/real/af.json

Large diffs are not rendered by default.

Loading
Loading