Trace exact infrastructure prefix classes
This commit is contained in:
parent
ba424bd82f
commit
0eb1b2386e
1 changed files with 538 additions and 19 deletions
|
|
@ -2161,6 +2161,9 @@ pub struct SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidateSummary {
|
|||
pub profile_span_correlations:
|
||||
Vec<SmpSavePlacedStructureDynamicSideBufferNamePreludeProfileSpanCorrelation>,
|
||||
#[serde(default)]
|
||||
pub compact_prefix_correlations:
|
||||
Vec<SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixCorrelation>,
|
||||
#[serde(default)]
|
||||
pub sample_rows: Vec<SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidateSample>,
|
||||
}
|
||||
|
||||
|
|
@ -2189,6 +2192,54 @@ pub struct SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidateSample {
|
|||
pub previous_profile_chunk_len_to_next_name_or_end: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixCorrelation {
|
||||
pub prefix_leading_dword: u32,
|
||||
pub prefix_leading_dword_hex: String,
|
||||
pub prefix_trailing_word: u16,
|
||||
pub prefix_trailing_word_hex: String,
|
||||
pub prefix_separator_byte: u8,
|
||||
pub prefix_separator_byte_hex: String,
|
||||
pub row_count: usize,
|
||||
pub unique_name_pair_count: usize,
|
||||
pub unique_profile_span_count: usize,
|
||||
#[serde(default)]
|
||||
pub dominant_primary_name: Option<String>,
|
||||
#[serde(default)]
|
||||
pub dominant_secondary_name: Option<String>,
|
||||
pub dominant_name_pair_count: usize,
|
||||
#[serde(default)]
|
||||
pub dominant_profile_span: Option<usize>,
|
||||
pub dominant_profile_span_count: usize,
|
||||
#[serde(default)]
|
||||
pub dominant_candidate_pattern:
|
||||
Option<SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidatePattern>,
|
||||
#[serde(default)]
|
||||
pub dominant_mode_family: Option<String>,
|
||||
pub dominant_mode_family_count: usize,
|
||||
#[serde(default)]
|
||||
pub mode_family_counts:
|
||||
Vec<SmpSavePlacedStructureDynamicSideBufferNamePreludeModeFamilyCount>,
|
||||
#[serde(default)]
|
||||
pub sample_rows: Vec<SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixSample>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixSample {
|
||||
pub sample_index: usize,
|
||||
pub name_tag_relative_offset: usize,
|
||||
#[serde(default)]
|
||||
pub primary_name: Option<String>,
|
||||
#[serde(default)]
|
||||
pub secondary_name: Option<String>,
|
||||
pub child_count_candidate: u16,
|
||||
pub child_count_candidate_hex: String,
|
||||
pub saved_primary_child_byte_candidate: u8,
|
||||
pub saved_primary_child_byte_candidate_hex: String,
|
||||
#[serde(default)]
|
||||
pub previous_profile_chunk_len_to_next_name_or_end: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidatePatternCorrelation {
|
||||
pub child_count_candidate: u16,
|
||||
|
|
@ -4684,6 +4735,44 @@ fn build_infrastructure_asset_trace_report(
|
|||
.unwrap_or_else(|| {
|
||||
"no profile-span mode-family correlation summary was available".to_string()
|
||||
}),
|
||||
side_buffer
|
||||
.and_then(|probe| probe.payload_envelope_summary.as_ref())
|
||||
.and_then(|summary| summary.name_prelude_candidate_summary.as_ref())
|
||||
.map(|summary| {
|
||||
format!(
|
||||
"exact compact-prefix correlations now split the residual prelude classes directly: {:?}",
|
||||
summary
|
||||
.compact_prefix_correlations
|
||||
.iter()
|
||||
.map(|entry| format!(
|
||||
"{}/{}/{} rows={} dominant-name={:?}/{:?} x{} dominant-span={:?} x{} dominant-candidate={:?} dominant-mode={:?} x{}",
|
||||
entry.prefix_leading_dword_hex,
|
||||
entry.prefix_trailing_word_hex,
|
||||
entry.prefix_separator_byte_hex,
|
||||
entry.row_count,
|
||||
entry.dominant_primary_name,
|
||||
entry.dominant_secondary_name,
|
||||
entry.dominant_name_pair_count,
|
||||
entry.dominant_profile_span,
|
||||
entry.dominant_profile_span_count,
|
||||
entry
|
||||
.dominant_candidate_pattern
|
||||
.as_ref()
|
||||
.map(|pattern| format!(
|
||||
"{}/{}:{}",
|
||||
pattern.child_count_candidate_hex,
|
||||
pattern.saved_primary_child_byte_candidate_hex,
|
||||
pattern.count
|
||||
)),
|
||||
entry.dominant_mode_family,
|
||||
entry.dominant_mode_family_count
|
||||
))
|
||||
.collect::<Vec<_>>()
|
||||
)
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
"no compact-prefix correlation summary was available for the prelude candidates".to_string()
|
||||
}),
|
||||
side_buffer
|
||||
.and_then(|probe| probe.payload_envelope_summary.as_ref())
|
||||
.and_then(|summary| summary.name_prelude_candidate_summary.as_ref())
|
||||
|
|
@ -4761,6 +4850,72 @@ fn build_infrastructure_asset_trace_report(
|
|||
.unwrap_or_else(|| {
|
||||
"no grounded 0x03-byte post-profile span correlation was available for the prelude candidates".to_string()
|
||||
}),
|
||||
side_buffer
|
||||
.and_then(|probe| probe.payload_envelope_summary.as_ref())
|
||||
.and_then(|summary| summary.name_prelude_candidate_summary.as_ref())
|
||||
.and_then(|summary| {
|
||||
summary.compact_prefix_correlations.iter().find(|entry| {
|
||||
entry.prefix_leading_dword == 0xff00_00ff
|
||||
&& entry.prefix_trailing_word == 0x0001
|
||||
&& entry.prefix_separator_byte == 0xff
|
||||
})
|
||||
})
|
||||
.map(|correlation| {
|
||||
format!(
|
||||
"the exact 0xff0000ff/0x0001/0xff compact-prefix class is now explicit: dominant name={:?}/{:?} x{}, dominant span={:?} x{}, and sample rows={:?}",
|
||||
correlation.dominant_primary_name,
|
||||
correlation.dominant_secondary_name,
|
||||
correlation.dominant_name_pair_count,
|
||||
correlation.dominant_profile_span,
|
||||
correlation.dominant_profile_span_count,
|
||||
correlation
|
||||
.sample_rows
|
||||
.iter()
|
||||
.map(|sample| format!(
|
||||
"{}:{:?}/{:?}",
|
||||
sample.name_tag_relative_offset,
|
||||
sample.primary_name,
|
||||
sample.secondary_name
|
||||
))
|
||||
.collect::<Vec<_>>()
|
||||
)
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
"no grounded 0xff0000ff/0x0001/0xff compact-prefix correlation was available".to_string()
|
||||
}),
|
||||
side_buffer
|
||||
.and_then(|probe| probe.payload_envelope_summary.as_ref())
|
||||
.and_then(|summary| summary.name_prelude_candidate_summary.as_ref())
|
||||
.and_then(|summary| {
|
||||
summary.compact_prefix_correlations.iter().find(|entry| {
|
||||
entry.prefix_leading_dword == 0xff00_00ff
|
||||
&& entry.prefix_trailing_word == 0x0002
|
||||
&& entry.prefix_separator_byte == 0xff
|
||||
})
|
||||
})
|
||||
.map(|correlation| {
|
||||
format!(
|
||||
"the exact 0xff0000ff/0x0002/0xff compact-prefix class is now explicit too: dominant name={:?}/{:?} x{}, dominant span={:?} x{}, and sample rows={:?}",
|
||||
correlation.dominant_primary_name,
|
||||
correlation.dominant_secondary_name,
|
||||
correlation.dominant_name_pair_count,
|
||||
correlation.dominant_profile_span,
|
||||
correlation.dominant_profile_span_count,
|
||||
correlation
|
||||
.sample_rows
|
||||
.iter()
|
||||
.map(|sample| format!(
|
||||
"{}:{:?}/{:?}",
|
||||
sample.name_tag_relative_offset,
|
||||
sample.primary_name,
|
||||
sample.secondary_name
|
||||
))
|
||||
.collect::<Vec<_>>()
|
||||
)
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
"no grounded 0xff0000ff/0x0002/0xff compact-prefix correlation was available".to_string()
|
||||
}),
|
||||
side_buffer
|
||||
.and_then(|probe| probe.payload_envelope_summary.as_ref())
|
||||
.and_then(|summary| summary.name_prelude_candidate_summary.as_ref())
|
||||
|
|
@ -4867,7 +5022,7 @@ fn build_infrastructure_asset_trace_report(
|
|||
"the smaller attach primitive 0x00490a3c no longer looks like the semantic fork by itself: it just allocates one literal Infrastructure child, seeds it through 0x455b70 with caller-provided stem input, attaches it through 0x5395d0, seeds position lanes through 0x539530/0x53a5b0, and optionally caches it as primary child".to_string(),
|
||||
],
|
||||
blockers: vec![
|
||||
"how the exact residual compact-prefix patterns map back onto constructor semantics now that the mixed 0x0001/0xff class is narrowed to concrete outliers: span 0x03 stays entirely on 0x000055f3/0x0001/0xff but still mixes tunnel with a tiny track-cap residue, while span 0x27 splits cleanly between 0xff0000ff/0x0001/0xff tunnel residue and 0xff0000ff/0x0002/0xff bridge residue".to_string(),
|
||||
"how the remaining mixed exact compact-prefix classes map back onto constructor semantics now that the whole prelude corpus is split directly: 0xff0000ff/0x0002/0xff is pure bridge, 0xff000000/{0x0001,0x0002}/0xff are pure bridge, 0xf3010100/0x0055/0x00 is pure ballast-cap, and 0x0005d368/0x0001/0xff is pure track-cap, leaving only 0xff0000ff/0x0001/0xff and 0x000055f3/0x0001/0xff as the mixed residual classes".to_string(),
|
||||
"how the payload streams reached through 0x00518380 -> 0x00518140 align with the embedded 0x55f1 name-pair groups and compact-prefix regimes surfaced by the save-side probe".to_string(),
|
||||
"how the observed 0x55f3-to-next-0x55f1 gaps partition between the two 0x52ebd0 flag bytes and the next-record prelude now that 0x0048a6c0 is grounded as the writer for the outer child-count / primary-child prelude".to_string(),
|
||||
"which fields written through the grounded 0x00490960 -> 0x004559d0 -> slot +0x4c -> 0x52ec50 chain retain the 0x38a5 embedded name-pair semantics before route/local-runtime follow-ons take over".to_string(),
|
||||
|
|
@ -4982,7 +5137,7 @@ fn build_infrastructure_asset_trace_report(
|
|||
),
|
||||
];
|
||||
let notes = vec![
|
||||
"Infrastructure asset trace now makes the side-buffer-versus-triplet split explicit: owner seam identity is grounded, the pure bridge-only 0x0002/0xff candidate class is grounded save-side, the upstream chooser above the child attach path is grounded as paired DT/ST siblings at 0x004a2c80 and 0x004a34e0 with decoded Bridge/Tunnel/BallastCap/Overpass families, grounded top-level branch meaning, grounded bridge/tunnel material selector roles, a concrete child-construction/write-side chain through 0x00490960, 0x00491c60, 0x0048a6c0, 0x00455a40, and 0x004559d0, and stable 0x00490960 mode families for BallastCap, TrackCap, Overpass, Tunnel, and Bridge branches. The current save-side name corpus already maps BallastCap, TrackCap, Tunnel, and Bridge rows onto those families directly, the candidate-pattern correlation narrows the dominant mixed 0x0001/0xff class to bridge:62 / track_cap:21 / tunnel:19, and the profile-span/prefix correlation now pins the remaining outliers down to exact residual prefix patterns: 0x03 is a 0x000055f3/0x0001/0xff tunnel-dominant class with a tiny track-cap residue, while 0x27 splits between 0xff0000ff/0x0001/0xff tunnel residue and 0xff0000ff/0x0002/0xff bridge residue.".to_string(),
|
||||
"Infrastructure asset trace now makes the side-buffer-versus-triplet split explicit: owner seam identity is grounded, the pure bridge-only 0x0002/0xff candidate class is grounded save-side, the upstream chooser above the child attach path is grounded as paired DT/ST siblings at 0x004a2c80 and 0x004a34e0 with decoded Bridge/Tunnel/BallastCap/Overpass families, grounded top-level branch meaning, grounded bridge/tunnel material selector roles, a concrete child-construction/write-side chain through 0x00490960, 0x00491c60, 0x0048a6c0, 0x00455a40, and 0x004559d0, and stable 0x00490960 mode families for BallastCap, TrackCap, Overpass, Tunnel, and Bridge branches. The current save-side name corpus already maps BallastCap, TrackCap, Tunnel, and Bridge rows onto those families directly, the candidate-pattern correlation narrows the dominant mixed 0x0001/0xff class to bridge:62 / track_cap:21 / tunnel:19, and the exact compact-prefix correlation now splits the full prelude corpus into mostly pure classes: 0xff0000ff/0x0002/0xff is pure bridge, 0xff000000/{0x0001,0x0002}/0xff are pure bridge, 0xf3010100/0x0055/0x00 is pure ballast-cap, and 0x0005d368/0x0001/0xff is pure track-cap, leaving only 0xff0000ff/0x0001/0xff and 0x000055f3/0x0001/0xff as the mixed residual classes.".to_string(),
|
||||
if st_only_name_pair_corpus {
|
||||
"The current save-side side-buffer corpus is ST-only, so this trace directly exercises the ST chooser sibling while the DT sibling remains grounded statically but unexercised in this save.".to_string()
|
||||
} else {
|
||||
|
|
@ -13400,6 +13555,9 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
row.name_tag_relative_offset,
|
||||
row.primary_name.clone(),
|
||||
row.secondary_name.clone(),
|
||||
row.prefix_leading_dword,
|
||||
row.prefix_trailing_word,
|
||||
row.prefix_separator_byte,
|
||||
child_count_candidate,
|
||||
saved_primary_child_byte_candidate,
|
||||
row_index.checked_sub(1).and_then(|previous_index| {
|
||||
|
|
@ -13413,7 +13571,7 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
let mut name_prelude_candidate_pattern_counts = BTreeMap::<(u16, u8), usize>::new();
|
||||
let mut name_prelude_child_count_counts = BTreeMap::<u16, usize>::new();
|
||||
let mut name_prelude_saved_primary_counts = BTreeMap::<u8, usize>::new();
|
||||
for (_, _, _, child_count_candidate, saved_primary_child_byte_candidate, _) in
|
||||
for (_, _, _, _, _, _, child_count_candidate, saved_primary_child_byte_candidate, _) in
|
||||
&name_prelude_candidate_rows
|
||||
{
|
||||
*name_prelude_candidate_pattern_counts
|
||||
|
|
@ -13489,6 +13647,9 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
name_tag_relative_offset,
|
||||
primary_name,
|
||||
secondary_name,
|
||||
_prefix_leading_dword,
|
||||
_prefix_trailing_word,
|
||||
_prefix_separator_byte,
|
||||
child_count_candidate,
|
||||
saved_primary_child_byte_candidate,
|
||||
previous_span,
|
||||
|
|
@ -13643,20 +13804,15 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
name_tag_relative_offset,
|
||||
primary_name,
|
||||
secondary_name,
|
||||
prefix_leading_dword,
|
||||
prefix_trailing_word,
|
||||
prefix_separator_byte,
|
||||
child_count_candidate,
|
||||
saved_primary_child_byte_candidate,
|
||||
previous_span,
|
||||
) in &name_prelude_candidate_rows
|
||||
{
|
||||
if let Some(previous_span) = previous_span {
|
||||
let Some(row) = embedded_name_rows.get(
|
||||
payload_envelope_rows
|
||||
.iter()
|
||||
.position(|row| row.name_tag_relative_offset == *name_tag_relative_offset)
|
||||
.unwrap_or(usize::MAX),
|
||||
) else {
|
||||
continue;
|
||||
};
|
||||
name_prelude_profile_span_groups
|
||||
.entry(*previous_span)
|
||||
.or_default()
|
||||
|
|
@ -13664,9 +13820,9 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
*name_tag_relative_offset,
|
||||
primary_name.clone(),
|
||||
secondary_name.clone(),
|
||||
row.prefix_leading_dword,
|
||||
row.prefix_trailing_word,
|
||||
row.prefix_separator_byte,
|
||||
*prefix_leading_dword,
|
||||
*prefix_trailing_word,
|
||||
*prefix_separator_byte,
|
||||
*child_count_candidate,
|
||||
*saved_primary_child_byte_candidate,
|
||||
));
|
||||
|
|
@ -13869,6 +14025,211 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
})
|
||||
.take(8)
|
||||
.collect::<Vec<_>>();
|
||||
let mut name_prelude_compact_prefix_groups = BTreeMap::<
|
||||
(u32, u16, u8),
|
||||
Vec<(usize, Option<String>, Option<String>, u16, u8, Option<usize>)>,
|
||||
>::new();
|
||||
for (
|
||||
name_tag_relative_offset,
|
||||
primary_name,
|
||||
secondary_name,
|
||||
prefix_leading_dword,
|
||||
prefix_trailing_word,
|
||||
prefix_separator_byte,
|
||||
child_count_candidate,
|
||||
saved_primary_child_byte_candidate,
|
||||
previous_span,
|
||||
) in &name_prelude_candidate_rows
|
||||
{
|
||||
name_prelude_compact_prefix_groups
|
||||
.entry((
|
||||
*prefix_leading_dword,
|
||||
*prefix_trailing_word,
|
||||
*prefix_separator_byte,
|
||||
))
|
||||
.or_default()
|
||||
.push((
|
||||
*name_tag_relative_offset,
|
||||
primary_name.clone(),
|
||||
secondary_name.clone(),
|
||||
*child_count_candidate,
|
||||
*saved_primary_child_byte_candidate,
|
||||
*previous_span,
|
||||
));
|
||||
}
|
||||
let compact_prefix_correlations = name_prelude_compact_prefix_groups
|
||||
.into_iter()
|
||||
.map(
|
||||
|(
|
||||
(prefix_leading_dword, prefix_trailing_word, prefix_separator_byte),
|
||||
rows,
|
||||
)| {
|
||||
let mut name_pair_counts =
|
||||
BTreeMap::<(Option<String>, Option<String>), usize>::new();
|
||||
let mut profile_span_counts = BTreeMap::<usize, usize>::new();
|
||||
let mut candidate_pattern_counts = BTreeMap::<(u16, u8), usize>::new();
|
||||
let mut mode_family_counts = BTreeMap::<String, usize>::new();
|
||||
for (
|
||||
_name_tag_relative_offset,
|
||||
primary_name,
|
||||
secondary_name,
|
||||
child_count_candidate,
|
||||
saved_primary_child_byte_candidate,
|
||||
previous_span,
|
||||
) in &rows
|
||||
{
|
||||
*name_pair_counts
|
||||
.entry((primary_name.clone(), secondary_name.clone()))
|
||||
.or_default() += 1;
|
||||
if let Some(previous_span) = previous_span {
|
||||
*profile_span_counts.entry(*previous_span).or_default() += 1;
|
||||
}
|
||||
*candidate_pattern_counts
|
||||
.entry((*child_count_candidate, *saved_primary_child_byte_candidate))
|
||||
.or_default() += 1;
|
||||
*mode_family_counts
|
||||
.entry(
|
||||
classify_side_buffer_mode_family(
|
||||
primary_name.as_deref(),
|
||||
secondary_name.as_deref(),
|
||||
)
|
||||
.to_string(),
|
||||
)
|
||||
.or_default() += 1;
|
||||
}
|
||||
let dominant_name_pair = name_pair_counts
|
||||
.iter()
|
||||
.max_by(|(left_key, left_count), (right_key, right_count)| {
|
||||
left_count
|
||||
.cmp(right_count)
|
||||
.then_with(|| right_key.cmp(left_key))
|
||||
})
|
||||
.map(|((primary_name, secondary_name), count)| {
|
||||
(primary_name.clone(), secondary_name.clone(), *count)
|
||||
});
|
||||
let dominant_profile_span = profile_span_counts
|
||||
.iter()
|
||||
.max_by(|(left_key, left_count), (right_key, right_count)| {
|
||||
left_count
|
||||
.cmp(right_count)
|
||||
.then_with(|| right_key.cmp(left_key))
|
||||
})
|
||||
.map(|(span, count)| (*span, *count));
|
||||
let dominant_candidate_pattern = candidate_pattern_counts
|
||||
.iter()
|
||||
.max_by(|(left_key, left_count), (right_key, right_count)| {
|
||||
left_count
|
||||
.cmp(right_count)
|
||||
.then_with(|| right_key.cmp(left_key))
|
||||
})
|
||||
.map(
|
||||
|(
|
||||
(child_count_candidate, saved_primary_child_byte_candidate),
|
||||
count,
|
||||
)| {
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidatePattern {
|
||||
child_count_candidate: *child_count_candidate,
|
||||
child_count_candidate_hex: format!(
|
||||
"0x{child_count_candidate:04x}"
|
||||
),
|
||||
saved_primary_child_byte_candidate:
|
||||
*saved_primary_child_byte_candidate,
|
||||
saved_primary_child_byte_candidate_hex: format!(
|
||||
"0x{saved_primary_child_byte_candidate:02x}"
|
||||
),
|
||||
count: *count,
|
||||
}
|
||||
},
|
||||
);
|
||||
let dominant_mode_family = mode_family_counts
|
||||
.iter()
|
||||
.max_by(|(left_key, left_count), (right_key, right_count)| {
|
||||
left_count
|
||||
.cmp(right_count)
|
||||
.then_with(|| right_key.cmp(left_key))
|
||||
})
|
||||
.map(|(mode_family, count)| (mode_family.clone(), *count));
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixCorrelation {
|
||||
prefix_leading_dword,
|
||||
prefix_leading_dword_hex: format!("0x{prefix_leading_dword:08x}"),
|
||||
prefix_trailing_word,
|
||||
prefix_trailing_word_hex: format!("0x{prefix_trailing_word:04x}"),
|
||||
prefix_separator_byte,
|
||||
prefix_separator_byte_hex: format!("0x{prefix_separator_byte:02x}"),
|
||||
row_count: rows.len(),
|
||||
unique_name_pair_count: name_pair_counts.len(),
|
||||
unique_profile_span_count: profile_span_counts.len(),
|
||||
dominant_primary_name: dominant_name_pair
|
||||
.as_ref()
|
||||
.and_then(|(primary_name, _, _)| primary_name.clone()),
|
||||
dominant_secondary_name: dominant_name_pair
|
||||
.as_ref()
|
||||
.and_then(|(_, secondary_name, _)| secondary_name.clone()),
|
||||
dominant_name_pair_count: dominant_name_pair
|
||||
.map(|(_, _, count)| count)
|
||||
.unwrap_or_default(),
|
||||
dominant_profile_span: dominant_profile_span
|
||||
.map(|(profile_span, _)| profile_span),
|
||||
dominant_profile_span_count: dominant_profile_span
|
||||
.map(|(_, count)| count)
|
||||
.unwrap_or_default(),
|
||||
dominant_candidate_pattern,
|
||||
dominant_mode_family: dominant_mode_family
|
||||
.as_ref()
|
||||
.map(|(mode_family, _)| mode_family.clone()),
|
||||
dominant_mode_family_count: dominant_mode_family
|
||||
.map(|(_, count)| count)
|
||||
.unwrap_or_default(),
|
||||
mode_family_counts: mode_family_counts
|
||||
.into_iter()
|
||||
.map(|(mode_family, count)| {
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeModeFamilyCount {
|
||||
mode_family,
|
||||
count,
|
||||
}
|
||||
})
|
||||
.collect(),
|
||||
sample_rows: rows
|
||||
.iter()
|
||||
.take(8)
|
||||
.enumerate()
|
||||
.map(
|
||||
|(
|
||||
sample_index,
|
||||
(
|
||||
name_tag_relative_offset,
|
||||
primary_name,
|
||||
secondary_name,
|
||||
child_count_candidate,
|
||||
saved_primary_child_byte_candidate,
|
||||
previous_profile_chunk_len_to_next_name_or_end,
|
||||
),
|
||||
)| {
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixSample {
|
||||
sample_index,
|
||||
name_tag_relative_offset: *name_tag_relative_offset,
|
||||
primary_name: primary_name.clone(),
|
||||
secondary_name: secondary_name.clone(),
|
||||
child_count_candidate: *child_count_candidate,
|
||||
child_count_candidate_hex: format!(
|
||||
"0x{child_count_candidate:04x}"
|
||||
),
|
||||
saved_primary_child_byte_candidate:
|
||||
*saved_primary_child_byte_candidate,
|
||||
saved_primary_child_byte_candidate_hex: format!(
|
||||
"0x{saved_primary_child_byte_candidate:02x}"
|
||||
),
|
||||
previous_profile_chunk_len_to_next_name_or_end:
|
||||
*previous_profile_chunk_len_to_next_name_or_end,
|
||||
}
|
||||
},
|
||||
)
|
||||
.collect(),
|
||||
}
|
||||
},
|
||||
)
|
||||
.take(8)
|
||||
.collect::<Vec<_>>();
|
||||
let name_prelude_candidate_summary = Some(
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidateSummary {
|
||||
row_count_with_candidate_window: name_prelude_candidate_rows.len(),
|
||||
|
|
@ -13889,6 +14250,7 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
dominant_candidate_pattern: dominant_name_prelude_candidate_pattern.clone(),
|
||||
candidate_pattern_correlations,
|
||||
profile_span_correlations,
|
||||
compact_prefix_correlations,
|
||||
sample_rows: name_prelude_candidate_rows
|
||||
.iter()
|
||||
.take(8)
|
||||
|
|
@ -13900,6 +14262,9 @@ fn parse_save_placed_structure_dynamic_side_buffer_probe(
|
|||
name_tag_relative_offset,
|
||||
primary_name,
|
||||
secondary_name,
|
||||
_prefix_leading_dword,
|
||||
_prefix_trailing_word,
|
||||
_prefix_separator_byte,
|
||||
child_count_candidate,
|
||||
saved_primary_child_byte_candidate,
|
||||
previous_profile_chunk_len_to_next_name_or_end,
|
||||
|
|
@ -24919,6 +25284,150 @@ mod tests {
|
|||
],
|
||||
},
|
||||
],
|
||||
compact_prefix_correlations: vec![
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixCorrelation {
|
||||
prefix_leading_dword: 0x0000_55f3,
|
||||
prefix_leading_dword_hex: "0x000055f3".to_string(),
|
||||
prefix_trailing_word: 0x0001,
|
||||
prefix_trailing_word_hex: "0x0001".to_string(),
|
||||
prefix_separator_byte: 0xff,
|
||||
prefix_separator_byte_hex: "0xff".to_string(),
|
||||
row_count: 17,
|
||||
unique_name_pair_count: 2,
|
||||
unique_profile_span_count: 1,
|
||||
dominant_primary_name: Some("TunnelSTBrick_Section.3dp".to_string()),
|
||||
dominant_secondary_name: Some("Infrastructure".to_string()),
|
||||
dominant_name_pair_count: 15,
|
||||
dominant_profile_span: Some(3),
|
||||
dominant_profile_span_count: 17,
|
||||
dominant_candidate_pattern: Some(
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidatePattern {
|
||||
child_count_candidate: 1,
|
||||
child_count_candidate_hex: "0x0001".to_string(),
|
||||
saved_primary_child_byte_candidate: 0xff,
|
||||
saved_primary_child_byte_candidate_hex: "0xff".to_string(),
|
||||
count: 17,
|
||||
},
|
||||
),
|
||||
dominant_mode_family: Some("tunnel".to_string()),
|
||||
dominant_mode_family_count: 15,
|
||||
mode_family_counts: vec![
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeModeFamilyCount {
|
||||
mode_family: "track_cap".to_string(),
|
||||
count: 2,
|
||||
},
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeModeFamilyCount {
|
||||
mode_family: "tunnel".to_string(),
|
||||
count: 15,
|
||||
},
|
||||
],
|
||||
sample_rows: vec![
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixSample {
|
||||
sample_index: 0,
|
||||
name_tag_relative_offset: 1200,
|
||||
primary_name: Some("TunnelSTBrick_Section.3dp".to_string()),
|
||||
secondary_name: Some("Infrastructure".to_string()),
|
||||
child_count_candidate: 1,
|
||||
child_count_candidate_hex: "0x0001".to_string(),
|
||||
saved_primary_child_byte_candidate: 0xff,
|
||||
saved_primary_child_byte_candidate_hex: "0xff".to_string(),
|
||||
previous_profile_chunk_len_to_next_name_or_end: Some(3),
|
||||
},
|
||||
],
|
||||
},
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixCorrelation {
|
||||
prefix_leading_dword: 0xff00_00ff,
|
||||
prefix_leading_dword_hex: "0xff0000ff".to_string(),
|
||||
prefix_trailing_word: 0x0001,
|
||||
prefix_trailing_word_hex: "0x0001".to_string(),
|
||||
prefix_separator_byte: 0xff,
|
||||
prefix_separator_byte_hex: "0xff".to_string(),
|
||||
row_count: 1,
|
||||
unique_name_pair_count: 1,
|
||||
unique_profile_span_count: 1,
|
||||
dominant_primary_name: Some("TunnelSTBrick_Section.3dp".to_string()),
|
||||
dominant_secondary_name: Some("Infrastructure".to_string()),
|
||||
dominant_name_pair_count: 1,
|
||||
dominant_profile_span: Some(0x27),
|
||||
dominant_profile_span_count: 1,
|
||||
dominant_candidate_pattern: Some(
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidatePattern {
|
||||
child_count_candidate: 1,
|
||||
child_count_candidate_hex: "0x0001".to_string(),
|
||||
saved_primary_child_byte_candidate: 0xff,
|
||||
saved_primary_child_byte_candidate_hex: "0xff".to_string(),
|
||||
count: 1,
|
||||
},
|
||||
),
|
||||
dominant_mode_family: Some("tunnel".to_string()),
|
||||
dominant_mode_family_count: 1,
|
||||
mode_family_counts: vec![
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeModeFamilyCount {
|
||||
mode_family: "tunnel".to_string(),
|
||||
count: 1,
|
||||
},
|
||||
],
|
||||
sample_rows: vec![
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixSample {
|
||||
sample_index: 0,
|
||||
name_tag_relative_offset: 2805,
|
||||
primary_name: Some("TunnelSTBrick_Section.3dp".to_string()),
|
||||
secondary_name: Some("Infrastructure".to_string()),
|
||||
child_count_candidate: 1,
|
||||
child_count_candidate_hex: "0x0001".to_string(),
|
||||
saved_primary_child_byte_candidate: 0xff,
|
||||
saved_primary_child_byte_candidate_hex: "0xff".to_string(),
|
||||
previous_profile_chunk_len_to_next_name_or_end: Some(0x27),
|
||||
},
|
||||
],
|
||||
},
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixCorrelation {
|
||||
prefix_leading_dword: 0xff00_00ff,
|
||||
prefix_leading_dword_hex: "0xff0000ff".to_string(),
|
||||
prefix_trailing_word: 0x0002,
|
||||
prefix_trailing_word_hex: "0x0002".to_string(),
|
||||
prefix_separator_byte: 0xff,
|
||||
prefix_separator_byte_hex: "0xff".to_string(),
|
||||
row_count: 2,
|
||||
unique_name_pair_count: 1,
|
||||
unique_profile_span_count: 1,
|
||||
dominant_primary_name: Some("BridgeSTWood_Section.3dp".to_string()),
|
||||
dominant_secondary_name: Some("Infrastructure".to_string()),
|
||||
dominant_name_pair_count: 2,
|
||||
dominant_profile_span: Some(0x27),
|
||||
dominant_profile_span_count: 2,
|
||||
dominant_candidate_pattern: Some(
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCandidatePattern {
|
||||
child_count_candidate: 1,
|
||||
child_count_candidate_hex: "0x0001".to_string(),
|
||||
saved_primary_child_byte_candidate: 0xff,
|
||||
saved_primary_child_byte_candidate_hex: "0xff".to_string(),
|
||||
count: 2,
|
||||
},
|
||||
),
|
||||
dominant_mode_family: Some("bridge".to_string()),
|
||||
dominant_mode_family_count: 2,
|
||||
mode_family_counts: vec![
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeModeFamilyCount {
|
||||
mode_family: "bridge".to_string(),
|
||||
count: 2,
|
||||
},
|
||||
],
|
||||
sample_rows: vec![
|
||||
SmpSavePlacedStructureDynamicSideBufferNamePreludeCompactPrefixSample {
|
||||
sample_index: 0,
|
||||
name_tag_relative_offset: 3764,
|
||||
primary_name: Some("BridgeSTWood_Section.3dp".to_string()),
|
||||
secondary_name: Some("Infrastructure".to_string()),
|
||||
child_count_candidate: 1,
|
||||
child_count_candidate_hex: "0x0001".to_string(),
|
||||
saved_primary_child_byte_candidate: 0xff,
|
||||
saved_primary_child_byte_candidate_hex: "0xff".to_string(),
|
||||
previous_profile_chunk_len_to_next_name_or_end: Some(0x27),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
sample_rows: Vec::new(),
|
||||
},
|
||||
),
|
||||
|
|
@ -25080,11 +25589,11 @@ mod tests {
|
|||
trace.candidate_consumer_hypotheses[0]
|
||||
.blockers
|
||||
.iter()
|
||||
.any(|line| line.contains("exact residual compact-prefix patterns")
|
||||
&& line.contains("span 0x03")
|
||||
&& line.contains("0x000055f3/0x0001/0xff")
|
||||
&& line.contains("span 0x27")
|
||||
&& line.contains("0xff0000ff/0x0002/0xff"))
|
||||
.any(|line| line.contains("remaining mixed exact compact-prefix classes")
|
||||
&& line.contains("0xff0000ff/0x0002/0xff is pure bridge")
|
||||
&& line.contains("0x0005d368/0x0001/0xff is pure track-cap")
|
||||
&& line.contains("0xff0000ff/0x0001/0xff")
|
||||
&& line.contains("0x000055f3/0x0001/0xff"))
|
||||
);
|
||||
assert!(
|
||||
trace.candidate_consumer_hypotheses[0]
|
||||
|
|
@ -25096,6 +25605,16 @@ mod tests {
|
|||
&& line.contains("span=0x3 rows=17")
|
||||
&& line.contains("span=0x27 rows=3"))
|
||||
);
|
||||
assert!(
|
||||
trace.candidate_consumer_hypotheses[0]
|
||||
.evidence
|
||||
.iter()
|
||||
.any(|line| line.contains(
|
||||
"exact compact-prefix correlations now split the residual prelude classes directly"
|
||||
) && line.contains("0x000055f3/0x0001/0xff")
|
||||
&& line.contains("0xff0000ff/0x0001/0xff")
|
||||
&& line.contains("0xff0000ff/0x0002/0xff"))
|
||||
);
|
||||
assert!(
|
||||
trace.candidate_consumer_hypotheses[0]
|
||||
.evidence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue