mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-03 00:05:11 -04:00
phase-37: T4 step (f) first pass — census 8,830 lying / 950 callees (+5,002 K&R sites counted APART: argcheck kr_marked, type_census + readability_progress split), levers 4,010 → 3,730 (0 unmarked), series snapshots + README; the 8,830 bucketed by ledger verdict: 3,700 never judged, 2,832 instrument disagreement, 1,120 T5's types, 723 cross-binary, 415 conflicts | 🛑 T4 in progress (S108)
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"summary": {
|
||||
"head": "da26c05d6",
|
||||
"src_stamp": "ab7aba1c21c89889",
|
||||
"tool_stamp": "9870539c77",
|
||||
"when": "2026-09-12T07:20:21Z",
|
||||
"head": "274223396",
|
||||
"src_stamp": "a91c084f1ac9e504",
|
||||
"tool_stamp": "3d72938e1b",
|
||||
"when": "2026-09-13T01:06:59Z",
|
||||
"files": 7305,
|
||||
"tus": 4121,
|
||||
"headers": 3181,
|
||||
@@ -36,16 +36,16 @@
|
||||
},
|
||||
"casts": {
|
||||
"by_form": {
|
||||
"P": 409007,
|
||||
"I": 60666,
|
||||
"P": 409006,
|
||||
"I": 60664,
|
||||
"X": 13800,
|
||||
"A": 18912,
|
||||
"C": 36681,
|
||||
"M": 19543
|
||||
},
|
||||
"raw_counts": {
|
||||
"P": 409007,
|
||||
"I": 60666,
|
||||
"P": 409006,
|
||||
"I": 60664,
|
||||
"X": 13800,
|
||||
"A": 18912,
|
||||
"C": 36681,
|
||||
@@ -53,31 +53,31 @@
|
||||
},
|
||||
"coverage_ok": true,
|
||||
"refused": 0,
|
||||
"deref_total": 503016,
|
||||
"deref_total": 503013,
|
||||
"addr_form": 18912,
|
||||
"typed_cast_member": 36681,
|
||||
"bodies": 69497,
|
||||
"by_bclass": {
|
||||
"local": 149915,
|
||||
"local": 149911,
|
||||
"param": 276860,
|
||||
"global": 8860,
|
||||
"gaddr": 40122,
|
||||
"global": 8861,
|
||||
"gaddr": 40123,
|
||||
"nested": 24076,
|
||||
"ident": 156,
|
||||
"other": 1678,
|
||||
"addr-of": 1349
|
||||
"addr-of": 1348
|
||||
},
|
||||
"by_width": {
|
||||
"s4": 145167,
|
||||
"s4": 145161,
|
||||
"u2": 142775,
|
||||
"s2": 131818,
|
||||
"u1": 43174,
|
||||
"agg": 13472,
|
||||
"p4": 12016,
|
||||
"p4": 12019,
|
||||
"u4": 11165,
|
||||
"s1": 3429
|
||||
},
|
||||
"readability_raw_regex": 411850,
|
||||
"readability_raw_regex": 411848,
|
||||
"abs_casts": 0,
|
||||
"top_bases": [
|
||||
[
|
||||
@@ -163,7 +163,7 @@
|
||||
[
|
||||
"local",
|
||||
"obj",
|
||||
3678
|
||||
3681
|
||||
],
|
||||
[
|
||||
"local",
|
||||
@@ -273,7 +273,7 @@
|
||||
[
|
||||
"local",
|
||||
"v1",
|
||||
1564
|
||||
1561
|
||||
],
|
||||
[
|
||||
"local",
|
||||
@@ -284,86 +284,88 @@
|
||||
},
|
||||
"decls": {
|
||||
"fn_definitions": 99130,
|
||||
"kr_definitions": 1889,
|
||||
"extern_fn_decls": 4279362,
|
||||
"extern_data_decls": 1078837,
|
||||
"declared_fn_names": 12139,
|
||||
"multi_spelled_callees": 3870,
|
||||
"multi_body_names": 6415,
|
||||
"data_symbols_declared": 55569,
|
||||
"multi_typed_data_symbols": 18442,
|
||||
"asm_label_aliases": 5749,
|
||||
"asm_label_alias_names": 225,
|
||||
"kr_definitions": 1894,
|
||||
"extern_fn_decls": 4279270,
|
||||
"extern_data_decls": 1078774,
|
||||
"declared_fn_names": 12088,
|
||||
"multi_spelled_callees": 3830,
|
||||
"multi_body_names": 6419,
|
||||
"data_symbols_declared": 55548,
|
||||
"multi_typed_data_symbols": 18493,
|
||||
"asm_label_aliases": 5158,
|
||||
"asm_label_alias_names": 165,
|
||||
"builtins": {
|
||||
"memcpy": 301,
|
||||
"abs": 144
|
||||
"abs": 1
|
||||
},
|
||||
"attributes": {
|
||||
"packed": 63,
|
||||
"aligned": 12
|
||||
},
|
||||
"lying": 98648,
|
||||
"lying_callees": 1609,
|
||||
"lying": 8830,
|
||||
"lying_callees": 950,
|
||||
"lying_kinds": {
|
||||
"K&R-empty": 91357,
|
||||
"narrow": 7291
|
||||
}
|
||||
"K&R-empty": 2997,
|
||||
"narrow": 5833
|
||||
},
|
||||
"kr_sites": 5002,
|
||||
"kr_callees": 147
|
||||
},
|
||||
"struct_map": {
|
||||
"types": 18760,
|
||||
"explained_sites": 498896,
|
||||
"deref_sites": 503016,
|
||||
"types": 18741,
|
||||
"explained_sites": 498894,
|
||||
"deref_sites": 503013,
|
||||
"explained_pct": 99.2,
|
||||
"unassigned_sites": 4120,
|
||||
"conflicts": 729,
|
||||
"unassigned_sites": 4119,
|
||||
"conflicts": 727,
|
||||
"suspect": 11,
|
||||
"evidence": {
|
||||
"param": 36550,
|
||||
"assign": 14717,
|
||||
"ret-of": 3410,
|
||||
"arg": 10176,
|
||||
"return": 1523,
|
||||
"param": 36486,
|
||||
"assign": 14665,
|
||||
"ret-of": 3374,
|
||||
"arg": 10173,
|
||||
"return": 1524,
|
||||
"assign&": 1051,
|
||||
"arg&": 270,
|
||||
"field": 9623
|
||||
"field": 9613
|
||||
},
|
||||
"vetoed": {
|
||||
"arg-conduit": 115291,
|
||||
"ret-of-multisource": 6651,
|
||||
"assign-multisource": 34545,
|
||||
"arg&-conduit": 14516,
|
||||
"arg-conduit": 115288,
|
||||
"ret-of-multisource": 6686,
|
||||
"assign-multisource": 34568,
|
||||
"arg&-conduit": 14628,
|
||||
"field-multisource": 7008,
|
||||
"ret-of": 683,
|
||||
"assign&-multisource": 12499,
|
||||
"arg&-no-overlap": 3455,
|
||||
"ret-of": 679,
|
||||
"assign&-multisource": 12500,
|
||||
"arg&-no-overlap": 3456,
|
||||
"assign": 347,
|
||||
"arg-no-overlap": 43018,
|
||||
"arg-no-overlap": 43021,
|
||||
"assign&": 69,
|
||||
"arg": 182,
|
||||
"return": 12,
|
||||
"field": 3220
|
||||
"field": 3224
|
||||
},
|
||||
"singletons": 14706,
|
||||
"multi_body": 4054,
|
||||
"sites_in_multi_body": 441056,
|
||||
"singletons": 14677,
|
||||
"multi_body": 4064,
|
||||
"sites_in_multi_body": 441229,
|
||||
"top": [
|
||||
{
|
||||
"name": "Unkstruct_800B5CB8",
|
||||
"sites": 107598,
|
||||
"bodies": 11186,
|
||||
"bodies": 11187,
|
||||
"size_hint": 268,
|
||||
"fields": 134,
|
||||
"conflicts": 50,
|
||||
"sign_mixed": 55,
|
||||
"merges": {
|
||||
"arg&": 249,
|
||||
"param": 9464,
|
||||
"arg": 6960,
|
||||
"assign": 7396,
|
||||
"return": 712,
|
||||
"ret-of": 1476,
|
||||
"param": 9454,
|
||||
"arg": 6955,
|
||||
"assign": 7400,
|
||||
"return": 713,
|
||||
"ret-of": 1477,
|
||||
"assign&": 18,
|
||||
"field": 2617
|
||||
"field": 2622
|
||||
},
|
||||
"globals_at": [
|
||||
"D_800B5CB8",
|
||||
@@ -388,7 +390,7 @@
|
||||
"assign&": 106,
|
||||
"param": 2100,
|
||||
"arg": 1086,
|
||||
"assign": 41,
|
||||
"assign": 43,
|
||||
"field": 51
|
||||
},
|
||||
"globals_at": [
|
||||
@@ -635,7 +637,7 @@
|
||||
"sign_mixed": 3,
|
||||
"merges": {
|
||||
"field": 1,
|
||||
"assign": 117
|
||||
"assign": 112
|
||||
},
|
||||
"globals_at": [],
|
||||
"globals_ptr": [
|
||||
@@ -752,14 +754,14 @@
|
||||
},
|
||||
"tu_conflict_D_800A651C": {
|
||||
"ok": true,
|
||||
"detail": "s32:1202 | OtBlk[]:9 | OtBlk_80016450[]:8 | u8[]:8 | s32[][5]:6"
|
||||
"detail": "s32:1202 | u8[]:9 | OtBlk[]:9 | OtBlk_80016450[]:8 | s32[]:7"
|
||||
},
|
||||
"ok": 4,
|
||||
"n": 4
|
||||
},
|
||||
"global_blocks": {
|
||||
"n": 2123,
|
||||
"members": 14251,
|
||||
"n": 2124,
|
||||
"members": 14253,
|
||||
"top": [
|
||||
{
|
||||
"base": "0x800cf10c",
|
||||
@@ -937,9 +939,9 @@
|
||||
"path": ".run/P37/census/parked.tsv"
|
||||
},
|
||||
"timing": {
|
||||
"walk_s": 61.0,
|
||||
"decls_s": 188.3,
|
||||
"total_s": 197.6
|
||||
"walk_s": 62.7,
|
||||
"decls_s": 191.0,
|
||||
"total_s": 200.3
|
||||
}
|
||||
},
|
||||
"dup_layout_classes": [
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
type_census — 2026-09-12T07:20:21Z at da26c05d6 (src stamp ab7aba1c21c89889, tool 9870539c77); 7305 files (4121 TUs + 3181 headers), 99130 function definitions; walk 61.0 s, total 197.6 s
|
||||
type_census — 2026-09-13T01:06:59Z at 274223396 (src stamp a91c084f1ac9e504, tool 3d72938e1b); 7305 files (4121 TUs + 3181 headers), 99130 function definitions; walk 62.7 s, total 200.3 s
|
||||
|
||||
DEFINITIONS 7255 struct/union bodies (+0 enums): canonical header 1179 · .c file-scope 4085 · .c block-scope 1904 · per-function shared headers 63 · other headers 24 · include/ 0
|
||||
3143 distinct names · 527 distinct layouts (0 unresolved) · 206 duplicate classes covering 2823 names (tier 1 122 same-named, tier 2 84 opaque; 46 layout-twin classes / 1867 names kept apart) · 585 exact-text classes / 4460 copies · 40 VARIANT names (>1 layout) · 141 dead canonical names · 74 canonical names redefined in .c · 1781 scalar/alias typedefs · 157 forward decls
|
||||
CAST SITES deref 503016 = P 409007 + I 60666 + X 13800 + M 19543 (+ A address-of 18912; + C typed cast-member 36681) in 69497 bodies · coverage OK (raw {'P': 409007, 'I': 60666, 'X': 13800, 'A': 18912, 'C': 36681, 'M': 19543}) · refused 0 · absolute 0 · readability regex over raw text 411850
|
||||
by base: param 276860 · local 149915 · gaddr 40122 · nested 24076 · global 8860 · other 1678 · addr-of 1349 · ident 156
|
||||
by width: s4 145167 · u2 142775 · s2 131818 · u1 43174 · agg 13472 · p4 12016 · u4 11165 · s1 3429
|
||||
CAST SITES deref 503013 = P 409006 + I 60664 + X 13800 + M 19543 (+ A address-of 18912; + C typed cast-member 36681) in 69497 bodies · coverage OK (raw {'P': 409006, 'I': 60664, 'X': 13800, 'A': 18912, 'C': 36681, 'M': 19543}) · refused 0 · absolute 0 · readability regex over raw text 411848
|
||||
by base: param 276860 · local 149911 · gaddr 40123 · nested 24076 · global 8861 · other 1678 · addr-of 1348 · ident 156
|
||||
by width: s4 145161 · u2 142775 · s2 131818 · u1 43174 · agg 13472 · p4 12019 · u4 11165 · s1 3429
|
||||
top bases: a0(param) 92255 · param_1(param) 81595 · arg0(param) 67704 · p(local) 18043 · p(param) 11784 · s0(local) 10368 · cach(local) 8246 · s1(local) 7137 · buf(local) 7067 · flag(local) 5453 · *(s32 *)(a0 + 0x20)(nested) 5215 · iVar2(local) 5160 · dst(local) 4874 · iVar1(local) 4836 · iVar3(local) 4693 · e(local) 3918
|
||||
DECLARATIONS 99130 function definitions (1889 K&R) · 4279362 extern function declarations over 12139 names (3870 spelled >1 way) · 6415 names with >1 body text · 1078837 data externs over 55569 symbols (18442 typed >1 way) · asm-label aliases 5749 (225 names) · builtins {'memcpy': 301, 'abs': 144} · attributes {'packed': 63, 'aligned': 12}
|
||||
lying declarations 98648 over 1609 callees {'K&R-empty': 91357, 'narrow': 7291}
|
||||
STRUCT MAP 18760 types explain 498896/503016 deref sites (99.2 %); unassigned 4120; 4054 types span ≥2 bodies (441056 sites), 14706 single-body; types with conflicts 729, suspect 11
|
||||
merges by evidence {'param': 36550, 'assign': 14717, 'ret-of': 3410, 'arg': 10176, 'return': 1523, 'assign&': 1051, 'arg&': 270, 'field': 9623}; vetoed {'arg-conduit': 115291, 'ret-of-multisource': 6651, 'assign-multisource': 34545, 'arg&-conduit': 14516, 'field-multisource': 7008, 'ret-of': 683, 'assign&-multisource': 12499, 'arg&-no-overlap': 3455, 'assign': 347, 'arg-no-overlap': 43018, 'assign&': 69, 'arg': 182, 'return': 12, 'field': 3220}
|
||||
Unkstruct_800B5CB8 sites 107598 bodies 11186 fields 134 size≥0x10c width-conflicts 50 sign-mixed 55 merges {'param': 9464, 'assign': 7396, 'arg': 6960, 'field': 2617} at D_800B5CB8,D_800D3888,D_80181448 ptr D_8006386C,D_80074778,D_80074780
|
||||
DECLARATIONS 99130 function definitions (1894 K&R) · 4279270 extern function declarations over 12088 names (3830 spelled >1 way) · 6419 names with >1 body text · 1078774 data externs over 55548 symbols (18493 typed >1 way) · asm-label aliases 5158 (165 names) · builtins {'memcpy': 301, 'abs': 1} · attributes {'packed': 63, 'aligned': 12}
|
||||
lying declarations 8830 over 950 callees {'K&R-empty': 2997, 'narrow': 5833} · K&R sites (marked, counted apart) 5002 over 147 callees
|
||||
STRUCT MAP 18741 types explain 498894/503013 deref sites (99.2 %); unassigned 4119; 4064 types span ≥2 bodies (441229 sites), 14677 single-body; types with conflicts 727, suspect 11
|
||||
merges by evidence {'param': 36486, 'assign': 14665, 'ret-of': 3374, 'arg': 10173, 'return': 1524, 'assign&': 1051, 'arg&': 270, 'field': 9613}; vetoed {'arg-conduit': 115288, 'ret-of-multisource': 6686, 'assign-multisource': 34568, 'arg&-conduit': 14628, 'field-multisource': 7008, 'ret-of': 679, 'assign&-multisource': 12500, 'arg&-no-overlap': 3456, 'assign': 347, 'arg-no-overlap': 43021, 'assign&': 69, 'arg': 182, 'return': 12, 'field': 3224}
|
||||
Unkstruct_800B5CB8 sites 107598 bodies 11187 fields 134 size≥0x10c width-conflicts 50 sign-mixed 55 merges {'param': 9454, 'assign': 7400, 'arg': 6955, 'field': 2622} at D_800B5CB8,D_800D3888,D_80181448 ptr D_8006386C,D_80074778,D_80074780
|
||||
Unkstruct_80126B58 sites 65397 bodies 17047 fields 175 size≥0x24c width-conflicts 50 sign-mixed 60 merges {'param': 2100, 'arg': 1086, 'assign&': 106, 'field': 51} at D_80126B58 ptr D_80126B58
|
||||
Unkstruct_8018E71C sites 6745 bodies 396 fields 7 size≥0x10 width-conflicts 0 sign-mixed 0 merges {'param': 18, 'arg': 15, 'assign&': 2} at D_8018E71C
|
||||
Unkstruct_dac960ce sites 4464 bodies 124 fields 13 size≥0x24c width-conflicts 0 sign-mixed 2 merges {'param': 2}
|
||||
@@ -22,12 +22,12 @@ STRUCT MAP 18760 types explain 498896/503016 deref sites (99.2 %); unassigned
|
||||
Unkstruct_80128EA8 sites 3311 bodies 632 fields 18 size≥0x38 width-conflicts 0 sign-mixed 13 merges {'arg': 23, 'ret-of': 19, 'field': 7, 'param': 2}
|
||||
Unkstruct_ade2e8a0 sites 3271 bodies 196 fields 26 size≥0xa4 width-conflicts 3 sign-mixed 9 merges {'param': 268, 'arg': 133}
|
||||
Unkstruct_1fa9e810 sites 3144 bodies 131 fields 3 size≥0x49 width-conflicts 0 sign-mixed 0 merges {}
|
||||
GLOBAL BLOCKS 2123 runs of ≥4 adjacent scalar D_ symbols (14251 symbols): 0x800cf10c+0x34 ×29 (D_800CF10C..D_800CF13C) · 0x800a6580+0x3a ×27 (D_800A6580..D_800A65B8) · 0x801998a4+0x57 ×24 (D_801998A4..D_801998FA) · 0x80199840+0x56 ×23 (D_80199840..D_80199895) · 0x801a9608+0x50 ×22 (D_801A9608..D_801A9654) · 0x801ab708+0x54 ×21 (D_801AB708..D_801AB758) · 0x801b0df0+0x4b ×21 (D_801B0DF0..D_801B0E3A) · 0x801b83a0+0x4e ×21 (D_801B83A0..D_801B83ED)
|
||||
GLOBAL BLOCKS 2124 runs of ≥4 adjacent scalar D_ symbols (14253 symbols): 0x800cf10c+0x34 ×29 (D_800CF10C..D_800CF13C) · 0x800a6580+0x3a ×27 (D_800A6580..D_800A65B8) · 0x801998a4+0x57 ×24 (D_801998A4..D_801998FA) · 0x80199840+0x56 ×23 (D_80199840..D_80199895) · 0x801a9608+0x50 ×22 (D_801A9608..D_801A9654) · 0x801ab708+0x54 ×21 (D_801AB708..D_801AB758) · 0x801b0df0+0x4b ×21 (D_801B0DF0..D_801B0E3A) · 0x801b83a0+0x4e ×21 (D_801B83A0..D_801B83ED)
|
||||
PARKED (P36) 24 classes / 453 bodies / 691 needed sites → .run/P37/census/parked.tsv; needs {'signature': 13, 'struct': 7, '?': 4}; 22 PARK names are minimum-lever banks
|
||||
CONTROLS 4/4: player_block_widths OK (D_80078E8C:4/4 D_80078EB2:2/2 D_80078EB4:2/2 D_80078EB6:2/2 D_80078EB8:2/2 [doc-disputed D_80078F08: code 4 vs actor-struct.md 2] [doc-disputed D_80078F0C: code 4 vs actor-struct.md 2]) · matrix_layouts OK (MATRIX=32 MATRIX_L48=48) · prim_layout_class OK (defs in 1192 files, 2 spellings, 1192/1192 in one layout (64 B)) · tu_conflict_D_800A651C OK (s32:1202 | OtBlk[]:9 | OtBlk_80016450[]:8 | u8[]:8 | s32[][5]:6)
|
||||
CONTROLS 4/4: player_block_widths OK (D_80078E8C:4/4 D_80078EB2:2/2 D_80078EB4:2/2 D_80078EB6:2/2 D_80078EB8:2/2 [doc-disputed D_80078F08: code 4 vs actor-struct.md 2] [doc-disputed D_80078F0C: code 4 vs actor-struct.md 2]) · matrix_layouts OK (MATRIX=32 MATRIX_L48=48) · prim_layout_class OK (defs in 1192 files, 2 spellings, 1192/1192 in one layout (64 B)) · tu_conflict_D_800A651C OK (s32:1202 | u8[]:9 | OtBlk[]:9 | OtBlk_80016450[]:8 | s32[]:7)
|
||||
|
||||
duplicate-layout classes (top 12): 8B×293 names (488 defs): GTESVec, GVec8, SIn_8017E95C, SV… | 8B×202 names (0 defs): Blk8L, Blk8S16, Blk8U, Blk8_80126940… | 32B×170 names (277 defs): M32_8017F154, M32_80188094, MATRIX, MATRIX2… | 8B×153 names (341 defs): Blk8_801807DC, Blk8_8018453C, COL_8001EFE0, MoveT… | 32B×129 names (0 defs): B20, Blk20, Blk20_800CB68C, Blk20_8016DF5C… | 4B×111 names (0 defs): B4, B4_80165140, B4_8017F154, B4_80181970… | 64B×91 names (1428 defs): Prim_8016E7C8, Prim_8016E7C8_8016B6BC, Prim_8016E7C8_8016B9F8, Prim_8016E7C8_8016C2C4… | 8B×82 names (0 defs): B8, B8_17F474, B8_80165140, B8_801851A8… | 8B×63 names (211 defs): Ang_8017E95C, DVEC_80183534, SOut_8017E95C, SVEC… | 4B×60 names (68 defs): PTAG_85910, PTag, PTag293C, PTag_1412A8… | 8B×59 names (0 defs): Bc8_80180E0C, CdFileLoc, Cmd_801805C8, M8_8016B6BC… | 16B×54 names (0 defs): B16, B16_8017CDE4, B16_80183ED8, B16_801841C8…
|
||||
VARIANT names (top 12): Prim×5, Rec×4, Blk8×4, St×4, S×4, V8×4, Vec8×3, Obj×3, Ent×3, Blk16×2, CdReq×2, Blk4×2
|
||||
|
||||
type_census: 7255 definitions (527 layouts, 206 duplicate classes, 40 variant camps) · 503016 cast sites in 69497 bodies over 8 base classes (4 forms + A, coverage OK) · 98648 lying declarations / 1609 callees · controls 4/4
|
||||
struct_map: 18760 types over 18760 clusters explain 498896/503016 sites (99.2 %); 4120 unassigned sites; 729 types with conflicts
|
||||
type_census: 7255 definitions (527 layouts, 206 duplicate classes, 40 variant camps) · 503013 cast sites in 69497 bodies over 8 base classes (4 forms + A, coverage OK) · 8830 lying declarations / 950 callees (+5002 K&R sites apart) · controls 4/4
|
||||
struct_map: 18741 types over 18741 clusters explain 498894/503013 sites (99.2 %); 4119 unassigned sites; 727 types with conflicts
|
||||
|
||||
@@ -27,9 +27,9 @@ originals; nothing "functionally equivalent" counts. What the repository claims
|
||||
|
||||
One source per unique function (Phase 35): 103,015 function bodies written once in C (3,173 of them shared headers instantiated 262,573 times); 160 duplicate copies remain in 51 ledgered classes (declaration conflicts left for the types phase); 38 functions whose bytes vary per binary share one text through the text tier (2,030 sites); 1,668 same-address copies of 381 tiny bodies inside the cross-address classes are deferred to the names phase.
|
||||
|
||||
Levers off (Phase 36, snapshot 2026-09-11): 2,141 register pins and 1,869 asm statements remain in 1,980 functions (674 distinct bodies), 4,010 of them marked `// !FAKE:`; 1,589 volatile qualifiers and 50 bare `register` keywords are censused; 6,447 GTE coprocessor operations and 22 whole-body assembly routines kept inside C shells (2,682 sites; the original's scratchpad stack-switch trampolines, one copy per overlay, listed in the verbatim manifest) are not levers and are excluded.
|
||||
Levers off (Phase 36, snapshot 2026-09-12): 1,868 register pins and 1,862 asm statements remain in 1,838 functions (662 distinct bodies), 3,730 of them marked `// !FAKE:`; 1,589 volatile qualifiers and 50 bare `register` keywords are censused; 6,447 GTE coprocessor operations and 22 whole-body assembly routines kept inside C shells (2,682 sites; the original's scratchpad stack-switch trampolines, one copy per overlay, listed in the verbatim manifest) are not levers and are excluded.
|
||||
|
||||
Types (Phase 37, snapshot 2026-09-12): 503,016 raw pointer-cast dereferences remain in 69,497 functions (four forms; 36,681 typed cast-member accesses and 18,912 address-of casts counted apart); 7,255 struct definitions (1,179 in the canonical header, 5,989 inside `.c` files) over 527 distinct layouts, 206 duplicate classes covering 2,823 names; 98,648 call declarations narrower than their callee's definition over 1,609 callees; the struct map clusters the cast sites into 18,760 types by evidence (99.2 % of sites assigned).
|
||||
Types (Phase 37, snapshot 2026-09-13): 503,013 raw pointer-cast dereferences remain in 69,497 functions (four forms; 36,681 typed cast-member accesses and 18,912 address-of casts counted apart); 7,255 struct definitions (1,179 in the canonical header, 5,989 inside `.c` files) over 527 distinct layouts, 206 duplicate classes covering 2,823 names; 8,830 call declarations narrower than their callee's definition over 950 callees; the struct map clusters the cast sites into 18,741 types by evidence (99.2 % of sites assigned).
|
||||
|
||||
_Generated by `tools/progress.py --readme` from `docs/progress.json` — numbers are never typed by hand._
|
||||
<!-- progress:end -->
|
||||
|
||||
@@ -78,3 +78,4 @@ date milestone head sites_AB pins asm bodies_AB distinct_AB marked unmarked gte_
|
||||
2026-09-11 S105 f11 (4 + 4 copies) — T7 ENDS 31cf8695f 4010 2141 1869 1980 674 4010 0 450 314 1589 50 7802 445 76
|
||||
2026-09-11 P36 close (T8/T9 done; the @unstuck retag) 60c4bb1cc 4010 2141 1869 1980 674 4010 0 450 314 1589 50 7802 445 76
|
||||
2026-09-11 P37 T1 — the lever census re-keyed (controls) and --strict made literal; 4,010 unchanged 23fc5d215 4010 2141 1869 1980 674 4010 0 450 314 1589 50 7802 445 76
|
||||
2026-09-12 P37 T4 — the declaration layer: func_80157D20 ×132 (--map-data), func_80029D3C + 3 callers (--with), func_80188A30 void→s32, func_80183CC4/8017FC5C/80185578/80188DF4 (--tu); 4,010 → 3,730 274223396 3730 1868 1862 1838 662 3730 0 450 314 1589 50 5996 302 76
|
||||
|
||||
|
@@ -124,6 +124,7 @@ counted, not marked). E, F and G belong to the canonical type layer and are the
|
||||
| 2026-09-11 | S105 f11 (4 + 4 copies) — T7 ENDS | 2141 | 1869 | **4010** | 1980 | 674 | 450 | 314 | 1589 | 50 | 7802 | 445 | 76 | `31cf8695f` |
|
||||
| 2026-09-11 | P36 close (T8/T9 done; the @unstuck retag) | 2141 | 1869 | **4010** | 1980 | 674 | 450 | 314 | 1589 | 50 | 7802 | 445 | 76 | `60c4bb1cc` |
|
||||
| 2026-09-11 | P37 T1 — the lever census re-keyed (controls) and --strict made literal; 4,010 unchanged | 2141 | 1869 | **4010** | 1980 | 674 | 450 | 314 | 1589 | 50 | 7802 | 445 | 76 | `23fc5d215` |
|
||||
| 2026-09-12 | P37 T4 — the declaration layer: func_80157D20 ×132 (--map-data), func_80029D3C + 3 callers (--with), func_80188A30 void→s32, func_80183CC4/8017FC5C/80185578/80188DF4 (--tu); 4,010 → 3,730 | 1868 | 1862 | **3730** | 1838 | 662 | 450 | 314 | 1589 | 50 | 5996 | 302 | 76 | `274223396` |
|
||||
|
||||
### The campaign — every batch, from the ledger (derived on every render)
|
||||
|
||||
|
||||
+17
-17
@@ -49,14 +49,14 @@
|
||||
"deferred_same_address_texts": 381,
|
||||
"deferred_same_address_copies": 1668,
|
||||
"levers": {
|
||||
"date": "2026-09-11",
|
||||
"date": "2026-09-12",
|
||||
"what": "compiler-forcing constructs left in the C: register pins + asm statements (the classes Phase 36 drives to 0; GTE coprocessor ops and whole-body hand-asm routines excluded), with the volatile/register qualifiers censused",
|
||||
"sites": 4010,
|
||||
"pins": 2141,
|
||||
"asm_statements": 1869,
|
||||
"bodies": 1980,
|
||||
"distinct_bodies": 674,
|
||||
"marked_fake": 4010,
|
||||
"sites": 3730,
|
||||
"pins": 1868,
|
||||
"asm_statements": 1862,
|
||||
"bodies": 1838,
|
||||
"distinct_bodies": 662,
|
||||
"marked_fake": 3730,
|
||||
"unmarked": 0,
|
||||
"volatile_sites": 1589,
|
||||
"register_keyword_sites": 50,
|
||||
@@ -65,13 +65,13 @@
|
||||
"hand_asm_routine_sites": 2682
|
||||
},
|
||||
"types": {
|
||||
"date": "2026-09-12",
|
||||
"head": "da26c05d6",
|
||||
"date": "2026-09-13",
|
||||
"head": "274223396",
|
||||
"what": "the structs phase's counters: raw pointer-cast dereferences in four forms (P *(T*)(\u2026), I *(T*)ident, X ((T*)e)[i], M M2C_FIELD), struct definitions and their duplicate classes, lying call declarations, and the struct map's types (Phase 37 drives the first three to 0)",
|
||||
"raw_cast_sites": 503016,
|
||||
"raw_cast_sites": 503013,
|
||||
"raw_cast_forms": {
|
||||
"P": 409007,
|
||||
"I": 60666,
|
||||
"P": 409006,
|
||||
"I": 60664,
|
||||
"X": 13800,
|
||||
"A": 18912,
|
||||
"C": 36681,
|
||||
@@ -89,11 +89,11 @@
|
||||
"duplicate_names": 2823,
|
||||
"variant_names": 40,
|
||||
"dead_canonical_names": 141,
|
||||
"lying_declarations": 98648,
|
||||
"lying_callees": 1609,
|
||||
"asm_label_aliases": 5749,
|
||||
"multi_spelled_callees": 3870,
|
||||
"struct_map_types": 18760,
|
||||
"lying_declarations": 8830,
|
||||
"lying_callees": 950,
|
||||
"asm_label_aliases": 5158,
|
||||
"multi_spelled_callees": 3830,
|
||||
"struct_map_types": 18741,
|
||||
"struct_map_explained_pct": 99.2
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
date label commit definitions narrow_decls callees kr_empty narrow pinned_rows pinned_bodies raw_casts struct_members deref_all form_P form_I form_X form_M addr_form typed_cast_member struct_defs canon_defs in_c_defs distinct_layouts dup_classes dup_names map_types map_pct
|
||||
date label commit definitions narrow_decls callees kr_empty narrow pinned_rows pinned_bodies raw_casts struct_members deref_all form_P form_I form_X form_M addr_form typed_cast_member struct_defs canon_defs in_c_defs distinct_layouts dup_classes dup_names map_types map_pct kr_sites kr_callees
|
||||
2026-09-10 P36 S102 — after the 16,759 free declaration repairs 51028a78d377b0ff8e0a12a86500ed2ae1f2346d 15626 94001 1564 86701 7300 461 314 414148 173286
|
||||
2026-09-11 P36 close 7a7f78e255ec3661992d12b5ceb1bd2ec2c1d680 15726 98648 1609 91357 7291 33 25 411850 177902
|
||||
2026-09-11 P37 T1 — the type census (four forms, definitions, the map) 23fc5d21592452084c7ae11fed1e98e0a40913a7 15726 98648 1609 91357 7291 33 25 411850 177902 503016 409007 60666 13800 19543 18912 36681 7261 1179 5995 525 206 2789 18760 99.2
|
||||
2026-09-12 P37 T2 — the census after the audit's parser fixes (attributes, dead guards) da26c05d674085afaa5727006efe6354acfc59ff 15726 98648 1609 91357 7291 33 25 411850 177902 503016 409007 60666 13800 19543 18912 36681 7255 1179 5989 527 206 2823 18760 99.2
|
||||
2026-09-12 t4 274223396dc7b5e7eedd8c8f96c82b0e80738c6a 15653 8830 950 2997 5833 13 10 411848 177902 503013 409006 60664 13800 19543 18912 36681 7255 1179 5989 527 206 2823 18741 99.2 5002 147
|
||||
|
||||
|
+7
-6
@@ -6,12 +6,13 @@
|
||||
> pointer casts where the original had a struct. From Phase 37 the row carries the type census's columns
|
||||
> (`tools/type_census.py`): all four dereference forms, the typed cast-member intermediate, the definitions and the map.
|
||||
|
||||
| date | label | commit | lying declarations | of which `()` | of which `(void)` | in a pinned body | raw cast derefs (one form, raw text) | struct member reads | **raw derefs, four forms** | typed cast-member | struct defs (canonical / in .c) | layouts | duplicate classes / names | map types (% sites) |
|
||||
|---|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---|---:|---|---|
|
||||
| 2026-09-10 | P36 S102 — after the 16,759 free declaration repairs | `51028a78d` | 94001 | 86701 | 7300 | 461 | 414148 | 173286 | **—** | — | — | — | — | — |
|
||||
| 2026-09-11 | P36 close | `7a7f78e25` | 98648 | 91357 | 7291 | 33 | 411850 | 177902 | **—** | — | — | — | — | — |
|
||||
| 2026-09-11 | P37 T1 — the type census (four forms, definitions, the map) | `23fc5d215` | 98648 | 91357 | 7291 | 33 | 411850 | 177902 | **503016** | 36681 | 7261 (1179 / 5995) | 525 | 206 / 2789 | 18760 (99.2 %) |
|
||||
| 2026-09-12 | P37 T2 — the census after the audit's parser fixes (attributes, dead guards) | `da26c05d6` | 98648 | 91357 | 7291 | 33 | 411850 | 177902 | **503016** | 36681 | 7255 (1179 / 5989) | 527 | 206 / 2823 | 18760 (99.2 %) |
|
||||
| date | label | commit | lying declarations | of which `()` | of which `(void)` | in a pinned body | raw cast derefs (one form, raw text) | struct member reads | **raw derefs, four forms** | typed cast-member | struct defs (canonical / in .c) | layouts | duplicate classes / names | map types (% sites) K&R sites (marked, apart) |
|
||||
|---|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---|---:|---|---|---:|
|
||||
| 2026-09-10 | P36 S102 — after the 16,759 free declaration repairs | `51028a78d` | 94001 | 86701 | 7300 | 461 | 414148 | 173286 | **—** | — | — | — | — | — | — |
|
||||
| 2026-09-11 | P36 close | `7a7f78e25` | 98648 | 91357 | 7291 | 33 | 411850 | 177902 | **—** | — | — | — | — | — | — |
|
||||
| 2026-09-11 | P37 T1 — the type census (four forms, definitions, the map) | `23fc5d215` | 98648 | 91357 | 7291 | 33 | 411850 | 177902 | **503016** | 36681 | 7261 (1179 / 5995) | 525 | 206 / 2789 | 18760 (99.2 %) | — |
|
||||
| 2026-09-12 | P37 T2 — the census after the audit's parser fixes (attributes, dead guards) | `da26c05d6` | 98648 | 91357 | 7291 | 33 | 411850 | 177902 | **503016** | 36681 | 7255 (1179 / 5989) | 527 | 206 / 2823 | 18760 (99.2 %) | — |
|
||||
| 2026-09-12 | t4 | `274223396` | 8830 | 2997 | 5833 | 13 | 411848 | 177902 | **503013** | 36681 | 7255 (1179 / 5989) | 527 | 206 / 2823 | 18741 (99.2 %) | 5002 |
|
||||
|
||||
**How to read it.** A *lying declaration* is a call site whose in-scope declaration names fewer parameters
|
||||
than the callee's own definition. It is not a style problem: on this processor an argument travels in a
|
||||
|
||||
@@ -649,6 +649,21 @@ bucketed by what each bucket needs before any plan is proposed. **Candidates for
|
||||
alone went; 142 prose mentions kept), `git diff --stat src`: **3,546 files changed, 0 insertions, 21,274 deletions**, every removed line a
|
||||
comment line → R22 (`.run/P37/baseline/r22_t4_banners.log`) **`check-all: 218 passed, 0 failed of 218`** (`wall=92.04 s`, exit 0).
|
||||
|
||||
- **S108 — step (f), first pass: the census + series.** `type_census -j 16 --sites` → **`8830 lying declarations / 950 callees (+5002 K&R sites
|
||||
apart) · controls 4/4`** (from 98,648 / 1,609 at T1; K&R-empty 2,997 / narrow 5,833). The K&R accounting built first: `argcheck.scan` rows gain
|
||||
`kr_marked` (the `// K&R:` marker read from the RAW line — the mask blanks comments), `type_census` and `readability_progress` count those
|
||||
APART (`kr_sites`/`kr_callees` columns; the rendered table's last column) and exclude them from "lying" — the census had lumped the 5,020
|
||||
marked sites into "K&R-empty". `lever_census --check: 3,730 pin/asm sites, 3,730 marked, 0 UNMARKED — OK` (from 4,010; −280 = func_80157D20's
|
||||
264 + func_80029D3C's 4 + func_80183CC4's 4 + …); `lever_progress --snapshot` (80 milestones) + `--check OK`; `readability_progress --snapshot t4`
|
||||
→ `8830 lying … (+5002 K&R sites apart) … 13 in 10 pinned bodies` + `--check OK`; `progress.py --json --readme` + `--check` fresh.
|
||||
**The 8,830 bucketed by their ledger verdict (R117) — T4 is NOT closable yet:** 3,700 **no ledger row** (never judged: the `md_*` module
|
||||
TUs and others — they were inside the 1,088 "drawable" TUs when I stopped the D cycle on two low-yield batches; an inference, not a
|
||||
measurement — R14); 2,379 `DECL-NONE "already canonical"` + 453 `DECL-CANON` **that argcheck still calls lying** (two instruments resolve the
|
||||
callee to different definitions — 6,419 names carry >1 body; R34, to read on one case each); 1,120 `DECL-KEPT parse error` (T5's types →
|
||||
`--redraw DECL-KEPT` after T5); 723 `DECL-NONE no visible definition` (cross-binary callees: a module calling an overlay-region function —
|
||||
a fleet-unique-signature fallback would judge them); 415 `conflicting types`; 21 assorted. Next: the D cycle again WITHOUT `REDRAW`
|
||||
(draws only the never-judged pairs), the disagreement read, the fallback.
|
||||
|
||||
## 🛑 SESSION CHECKPOINT — S107 (2026-09-12, FINAL — written for a FRESH session at 84 % context; the session's last commit follows this): gate 1 APPROVED, **T0 ☑ T1 ☑ T2 ☑ T3 ☑ — T4 IN PROGRESS (☐)** — 🛑 **T4 NEXT: resume the declaration layer where the cycle stopped (below, §1 "T4 — where it stands and the exact next commands"); xHigh** | R22 `check-all: 218 passed, 0 failed of 218` at `f2b58011e` (every one of the 21 T4 commits carries its own) | HEAD after this commit is the checkpoint's commit; tree clean; nothing pushed after `79b2f6f15` (Drew pushes, R6) | last batch `t4_sig5b` on 5016a185d: restruct: signature func_80183CC4 — IDENTICAL · 1 files written
|
||||
|
||||
**Replay this block into the chat at the next session start (R64); it is the ONLY in-phase context the next session inherits. Everything below
|
||||
|
||||
+5
-1
@@ -138,6 +138,7 @@ def scan(defs, only_needed_argpins=True):
|
||||
continue
|
||||
masked = lc.sc.mask_text(txt)
|
||||
lines = masked.split("\n")
|
||||
raw_lines = txt.split("\n") # the K&R marker lives in a comment, which the mask blanks
|
||||
# the bodies of this TU, and which of them hold a NEEDED pin on an argument register
|
||||
argpin_fns = set()
|
||||
if "!FAKE" in txt:
|
||||
@@ -171,7 +172,10 @@ def scan(defs, only_needed_argpins=True):
|
||||
rows.append(dict(tu=rel, line=i + 1, callee=callee, declared=dec, real=real[0],
|
||||
real_params=real[1], defined_in=real[2], scope="block" if depth > 0 else "file",
|
||||
kind=kind, in_fn=holder,
|
||||
argpin=bool(holder and holder in argpin_fns)))
|
||||
argpin=bool(holder and holder in argpin_fns),
|
||||
# a byte-proven K&R site (P37 rung D: the calls pass another count and every prototype form moved the
|
||||
# bytes): `()` + `// K&R: n of m args (…)` on the line — counted APART from the lies (the plan's "zero")
|
||||
kr_marked=("// K&R:" in raw_lines[i]) if i < len(raw_lines) else False))
|
||||
depth += l.count("{") - l.count("}")
|
||||
depth = max(depth, 0)
|
||||
return rows
|
||||
|
||||
@@ -32,7 +32,11 @@ MEMBER = re.compile(r"->[A-Za-z_]\w*|\.[A-Za-z_]\w*\s*=")
|
||||
|
||||
def counts():
|
||||
defs = argcheck.definitions()
|
||||
rows = argcheck.scan(defs)
|
||||
rows_all = argcheck.scan(defs)
|
||||
# P37 T4 (2026-09-12): a byte-proven K&R site — `()` + `// K&R: n of m args` on its line, the calls pass another count and every
|
||||
# prototype form moved the bytes — is the original's calling convention, not a lie: counted APART (`kr_sites`), never in `narrow_decls`
|
||||
kr_rows = [r for r in rows_all if r.get("kr_marked")]
|
||||
rows = [r for r in rows_all if not r.get("kr_marked")]
|
||||
casts = members = 0
|
||||
for f in (REPO / "src").glob("**/*.c"):
|
||||
t = f.read_text(errors="surrogateescape")
|
||||
@@ -48,7 +52,8 @@ def counts():
|
||||
kr_empty=sum(1 for r in rows if r["kind"] == "K&R-empty"),
|
||||
narrow=sum(1 for r in rows if r["kind"] == "narrow"),
|
||||
pinned_rows=len(pinned), pinned_bodies=len({(r["tu"], r["in_fn"]) for r in pinned}),
|
||||
raw_casts=casts, struct_members=members)
|
||||
raw_casts=casts, struct_members=members,
|
||||
kr_sites=len(kr_rows), kr_callees=len({r["callee"] for r in kr_rows}))
|
||||
# Phase 37 T1 (2026-09-12): the type census's columns — the four dereference forms (the CAST regex above sees one of them, over raw
|
||||
# text), the typed cast-member accesses (the MEMBER regex counts these as members — they are the rewrite's rung 1, not finished
|
||||
# members), the struct definitions and their duplicate classes, the struct map. A snapshot REFUSES a stale census (R43/R51).
|
||||
@@ -72,7 +77,9 @@ COLS = ["date", "label", "commit", "definitions", "narrow_decls", "callees", "kr
|
||||
"raw_casts", "struct_members",
|
||||
# P37 columns (appended 2026-09-12; older rows carry blanks — the renderer reads by name, never by position)
|
||||
"deref_all", "form_P", "form_I", "form_X", "form_M", "addr_form", "typed_cast_member", "struct_defs", "canon_defs", "in_c_defs",
|
||||
"distinct_layouts", "dup_classes", "dup_names", "map_types", "map_pct"]
|
||||
"distinct_layouts", "dup_classes", "dup_names", "map_types", "map_pct",
|
||||
# P37 T4 (2026-09-12): the byte-proven K&R sites, counted apart from the lies
|
||||
"kr_sites", "kr_callees"]
|
||||
HEAD = "\t".join(COLS) + "\n"
|
||||
|
||||
|
||||
@@ -97,14 +104,14 @@ def render():
|
||||
"> pointer casts where the original had a struct. From Phase 37 the row carries the type census's columns",
|
||||
"> (`tools/type_census.py`): all four dereference forms, the typed cast-member intermediate, the definitions and the map.",
|
||||
"",
|
||||
"| date | label | commit | lying declarations | of which `()` | of which `(void)` | in a pinned body | raw cast derefs (one form, raw text) | struct member reads | **raw derefs, four forms** | typed cast-member | struct defs (canonical / in .c) | layouts | duplicate classes / names | map types (% sites) |",
|
||||
"|---|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---|---:|---|---|"]
|
||||
"| date | label | commit | lying declarations | of which `()` | of which `(void)` | in a pinned body | raw cast derefs (one form, raw text) | struct member reads | **raw derefs, four forms** | typed cast-member | struct defs (canonical / in .c) | layouts | duplicate classes / names | map types (% sites) K&R sites (marked, apart) |",
|
||||
"|---|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---|---:|---|---|---:|"]
|
||||
for r in rows:
|
||||
defs = f"{g(r,'struct_defs')} ({g(r,'canon_defs')} / {g(r,'in_c_defs')})" if r.get("struct_defs") else "—"
|
||||
dups = f"{g(r,'dup_classes')} / {g(r,'dup_names')}" if r.get("dup_classes") else "—"
|
||||
mp = f"{g(r,'map_types')} ({g(r,'map_pct')} %)" if r.get("map_types") else "—"
|
||||
out.append(f"| {r['date']} | {r['label']} | `{r['commit'][:9]}` | {r['narrow_decls']} | {r['kr_empty']} | {r['narrow']} | {r['pinned_rows']} | "
|
||||
f"{r['raw_casts']} | {r['struct_members']} | **{g(r,'deref_all')}** | {g(r,'typed_cast_member')} | {defs} | {g(r,'distinct_layouts')} | {dups} | {mp} |")
|
||||
f"{r['raw_casts']} | {r['struct_members']} | **{g(r,'deref_all')}** | {g(r,'typed_cast_member')} | {defs} | {g(r,'distinct_layouts')} | {dups} | {mp} | {g(r,'kr_sites')} |")
|
||||
out += ["",
|
||||
"**How to read it.** A *lying declaration* is a call site whose in-scope declaration names fewer parameters",
|
||||
"than the callee's own definition. It is not a style problem: on this processor an argument travels in a",
|
||||
@@ -139,7 +146,7 @@ def main():
|
||||
old = [l for l in TSV.read_text().splitlines()[1:] if l.strip()] if TSV.exists() else []
|
||||
TSV.write_text(HEAD + "".join(l + "\n" for l in old) + "\t".join(str(c.get(k, "")) for k in COLS) + "\n")
|
||||
render()
|
||||
print(f"readability_progress: {a.snapshot} — {c['narrow_decls']} lying declaration(s) over {c['callees']} callee(s) "
|
||||
print(f"readability_progress: {a.snapshot} — {c['narrow_decls']} lying declaration(s) over {c['callees']} callee(s) (+{c['kr_sites']} K&R sites apart) "
|
||||
f"({c['kr_empty']} `()`, {c['narrow']} `(void)`), {c['pinned_rows']} in {c['pinned_bodies']} pinned bodies; "
|
||||
f"{c['raw_casts']} raw cast deref(s) by the one-form regex, {c['deref_all']} by the census's four forms (+{c['typed_cast_member']} typed "
|
||||
f"cast-member, +{c['addr_form']} address-of), {c['struct_members']} struct member read(s); {c['struct_defs']} struct definitions over "
|
||||
|
||||
@@ -1203,9 +1203,12 @@ def run_census(jobs, use_cache=True, out_dir=OUT_DIR_DEFAULT, want_sites=False):
|
||||
# the lying set (argcheck as a library)
|
||||
import argcheck
|
||||
ac_defs = argcheck.definitions()
|
||||
lying = argcheck.scan(ac_defs, only_needed_argpins=False)
|
||||
ac_rows = argcheck.scan(ac_defs, only_needed_argpins=False)
|
||||
kr_sites = [r for r in ac_rows if r.get("kr_marked")] # byte-proven K&R sites, marked — counted apart (P37 T4)
|
||||
lying = [r for r in ac_rows if not r.get("kr_marked")]
|
||||
lying_kinds = collections.Counter(r["kind"] for r in lying)
|
||||
lying_callees = len({r["callee"] for r in lying})
|
||||
kr_callees = len({r["callee"] for r in kr_sites})
|
||||
t_decl = time.time() - t0
|
||||
# ---- 3b. global blocks: runs of adjacent D_ symbols (address + declared width == the next address) — record candidates
|
||||
decl_w = collections.defaultdict(collections.Counter)
|
||||
@@ -1275,7 +1278,8 @@ def run_census(jobs, use_cache=True, out_dir=OUT_DIR_DEFAULT, want_sites=False):
|
||||
multi_body_names=multi_body, data_symbols_declared=len(data_types), multi_typed_data_symbols=multi_typed_data,
|
||||
asm_label_aliases=len(asm_aliases), asm_label_alias_names=len({a["name"] for a in asm_aliases}),
|
||||
builtins=dict(builtins), attributes=dict(attrs),
|
||||
lying=len(lying), lying_callees=lying_callees, lying_kinds=dict(lying_kinds)),
|
||||
lying=len(lying), lying_callees=lying_callees, lying_kinds=dict(lying_kinds),
|
||||
kr_sites=len(kr_sites), kr_callees=kr_callees),
|
||||
struct_map=dict(types=len(types), explained_sites=explained, deref_sites=len(deref_sites),
|
||||
explained_pct=round(100.0 * explained / max(1, len(deref_sites)), 1), unassigned_sites=unassigned,
|
||||
conflicts=sum(1 for t in types if t["conflicts"]), suspect=sum(1 for t in types if t.get("suspect")),
|
||||
@@ -1469,7 +1473,8 @@ def render(s, dup_classes, variants, types):
|
||||
f"{dc['declared_fn_names']} names ({dc['multi_spelled_callees']} spelled >1 way) · {dc['multi_body_names']} names with >1 body text · "
|
||||
f"{dc['extern_data_decls']} data externs over {dc['data_symbols_declared']} symbols ({dc['multi_typed_data_symbols']} typed >1 way) · "
|
||||
f"asm-label aliases {dc['asm_label_aliases']} ({dc['asm_label_alias_names']} names) · builtins {dc['builtins']} · attributes {dc['attributes']}")
|
||||
L.append(f" lying declarations {dc['lying']} over {dc['lying_callees']} callees {dc['lying_kinds']}")
|
||||
L.append(f" lying declarations {dc['lying']} over {dc['lying_callees']} callees {dc['lying_kinds']} · K&R sites (marked, counted apart) "
|
||||
f"{dc.get('kr_sites', 0)} over {dc.get('kr_callees', 0)} callees")
|
||||
L.append(f"STRUCT MAP {sm['types']} types explain {sm['explained_sites']}/{sm['deref_sites']} deref sites ({sm['explained_pct']} %); unassigned {sm['unassigned_sites']}; "
|
||||
f"{sm['multi_body']} types span ≥2 bodies ({sm['sites_in_multi_body']} sites), {sm['singletons']} single-body; types with conflicts {sm['conflicts']}, suspect {sm['suspect']}")
|
||||
L.append(f" merges by evidence {sm['evidence']}; vetoed {sm['vetoed']}")
|
||||
@@ -1492,7 +1497,7 @@ def render(s, dup_classes, variants, types):
|
||||
L.append("")
|
||||
L.append(f"type_census: {d['total']} definitions ({d['distinct_layouts']} layouts, {d['dup_layout_classes']} duplicate classes, {d['variant_names']} variant camps) · "
|
||||
f"{c['deref_total']} cast sites in {c['bodies']} bodies over {len(c['by_bclass'])} base classes (4 forms + A, coverage {'OK' if c['coverage_ok'] else 'FAIL'}) · "
|
||||
f"{dc['lying']} lying declarations / {dc['lying_callees']} callees · controls {s['controls']['ok']}/{s['controls']['n']}")
|
||||
f"{dc['lying']} lying declarations / {dc['lying_callees']} callees (+{dc.get('kr_sites', 0)} K&R sites apart) · controls {s['controls']['ok']}/{s['controls']['n']}")
|
||||
L.append(f"struct_map: {sm['types']} types over {sum(1 for _ in [0])*0 + sm['types']} clusters explain {sm['explained_sites']}/{sm['deref_sites']} sites ({sm['explained_pct']} %); "
|
||||
f"{sm['unassigned_sites']} unassigned sites; {sm['conflicts']} types with conflicts")
|
||||
return "\n".join(L) + "\n"
|
||||
|
||||
Reference in New Issue
Block a user