Repository navigation
[AUTOMATED] feat(p5): structsynth shares one layout across functions by subsumption - #675
Merged
Merged
Conversation
mahaloz
force-pushed
the
feat/structdedup
branch
2 times, most recently
from
September 18, 2026 20:08
bec33fc to
5cd7d4b
Compare
mahaloz
force-pushed
the
feat/structdedup
branch
5 times, most recently
from
September 19, 2026 14:28
a879669 to
f4b2e52
Compare
…by subsumption The layout ledger answers a measured layout with the smallest minted struct_N that contains it, under growth bounds and evidence rules (typed pointer, table, integer same-size, unclaimed-bytes); a larger layout supersedes a smaller one and decompile-all re-decides the functions that named it. Squashed from the review rounds (backup/structdedup-r6-prerebase). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…too; re-record stages on 6e4f6fa Since structsynth on by default (#682), a field read both as a float and as an integer is raw-byte filler in the reader's own layout. A container's typed field there would print the float read as a value conversion again, so the ledger's unclaimed-bytes veto covers those bytes as well. Stage baseline re-recorded on 6e4f6fa (+12 structsynth keys, 1156 -> 1168); options.md and the phase_catalog fixture regenerated. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…f6fa (structsynth default on) Pooled held-out claimed-field precision 0.8735 -> 0.8750, 30 builds gain and 4 lose, 1 of 178 absorbed parameters given a different record; census 516 -> 472; sweep rename-only, --option structsynth off byte-identical; typesweep identical. options.md and the phase_catalog fixture regenerated. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…ment padding A structure no longer answers for a reader when it claims a member inside the alignment padding the reader's own claims leave between two of them, and a reader with no typed pointer is no longer answered by a structure that claims anything past its last field. bash's if_com and for_com, the ITEMLIST readers and case_com, and dpkg's pkg_queue and pkg_spec each shared one struct_N before. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…y in a reader's padding Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…with the padding rule Eight sets, 177 builds: the second reviewer's 24 and 18 builds and 34 chosen before any result under the padding rule. Records the remaining e2fsck false unifications and the container-larger address spelling as known limits. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
… (+15 structsynth keys) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
… (+15 structsynth keys) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…es baseline on a3bf6a1 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
mahaloz
force-pushed
the
feat/structdedup
branch
from
September 19, 2026 15:42
66f1136 to
4256d37
Compare
mahaloz
added a commit
that referenced
this pull request
Sep 19, 2026
…s convergence sweep decompile-all's callee-first path decompiled each target with decompile_entry and never reached the batch's converge_synthesized_structs (#675), so under the protoorder default a function kept a structure a later, larger one had superseded (tests/cli/structsynth-sweep-mints-no-third-name failed). The sweep now runs at the end of the callee-first path, in plan order with each target's own park decision; not under lock, where a parked prototype is declared. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
mahaloz
added a commit
that referenced
this pull request
Sep 19, 2026
…s convergence sweep decompile-all's callee-first path decompiled each target with decompile_entry and never reached the batch's converge_synthesized_structs (#675), so under the protoorder default a function kept a structure a later, larger one had superseded (tests/cli/structsynth-sweep-mints-no-third-name failed). The sweep now runs at the end of the callee-first path, in plan order with each target's own park decision; not under lock, where a parked prototype is declared. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
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.
The problem
structsynthmints onestruct_Nper exact layout, so two functions that read different parts of one record get a name each:(Struct bodies joined onto one line here.) With this change both functions take
struct_1. Across twelve coreutils, findutils and tar builds the name count goes from 515 to 471.The fix
code */void *slots is answered only by its own shape.statandcycle_check_state, rsyslogd's*_if_sinterfaces, bash'sif_comandfor_com(int linesits whereif_compads), dpkg'spkg_queueandpkg_spec.charat 7 and printed after the reader's byte store at 8.decompile-all, the functions that name a superseded structure are decompiled once more. If that second pass fails, the first body is kept.structsynthis on by default since [AUTOMATED] feat(p5): structsynth on by default #682, so all of this is default output and was measured as such.The tests
structsynth-shared-layout.xml(main passes 9 of 15 assertions across both files: Port to Rust #2, cleanup: Rust-first restructure + terminology refresh #3 and Fix test stages #9–infra: dev container + cross-arch toolchains #12 fail; the previous revision fails Analyzer-tier port: bring Ghidra's Java analysis layer to kuna-analysis (Increments 1–17) #10–infra: dev container + cross-arch toolchains #12, the three padding shapes) andstructsynth-unclaimed-bytes.xml.tests/cli/structsynth-sweep-mints-no-third-name.jsonfails on main. There are 18 ledger unit tests.e2fsck; two areext2_inodevsext2_inode_large). Recall rises on every set. Details indocs/features/structsynth/dedup.md.--option structsynth off, output is byte-identical on 9 binaries. By default, every changed line on those 9 is a struct rename. The 444-slice typesweep is identical (988 perfect). Over 177 builds, no variable or argument is added or removed. Defaultdecompile-allspeed against main:tarO0 −1.0%,lsO2 +0.9%,rsyslogdO2 +1.0% (interleaved min-of-15). A synthetic binary with 1000 distinct layouts is +12%.🤖 Generated with Claude Code
https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG