
    7,Jj                      d Z ddlmZ ddlZddlZddlZddlZddlZddlm	Z	 ddl
mZ ej                  j                  d e e	e      j!                         j"                               ddlmZmZmZ ddlmZ  e	e      j!                         j0                  d   Zed	z  Zed
z  ZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(g dZ)g dZ*d
g dddg dddddgdd g d!dd"g d#dgZ+d$Z,d%Z-d&Z.dHd'Z/dId(Z0dJd)Z1dKd*Z2dLd+Z3dMd,Z4dNd-Z5dOd.Z6dPd/Z7dQd0Z8dRd1Z9dSd2Z:dTd3Z;dUd4Z<dVd5Z=dWd6Z>dXd7Z?	 dY	 	 	 	 	 	 	 	 	 	 	 dZd8Z@d[d9ZAd\d:ZB	 	 	 	 	 	 	 	 	 	 	 	 d]d;ZC	 	 	 	 	 	 	 	 	 	 	 	 d^d<ZDd_d=ZEd`d>ZFdad?ZGe>f	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dbd@ZH	 dc	 	 	 	 	 	 	 	 	 	 	 	 	 dddAZI	 	 	 	 	 de	 	 	 	 	 	 	 	 	 	 	 	 	 dfdBZJdgdCZKdgdDZLefdhdEZMdidFZNeOdGk(  r eN        yy)jzOScan direct dword bridges between target-side aliases and current selector 2:0.    )annotationsN)Path)Any)find_cns_stringsread_sectionsva_to_offset)trace_stream   outzHwanse2.exemap1_01amap2_02dz2:0ix5T i(T i)T i*T i*T i+T iD+T i+T ix.T )ztarget-alias-execution-orderzbranch-state-persistencez*real-selector-2:0-or-selected-root-runtimezstrict-source-hotspot)z7target-side alias execution before current selector 2:0z?secondaryBranchState persistence into current reader 0x00542b0cz:selector 2:0 savedata or runtime selected-pointer evidencezstrict map1_01a source hotspot)ztarget alias root rangeszcurrent selector 2:0 rangezpre-writer trace windows)pathfieldszout/save_scene_selectors.json)groupslotselectedPointerHex	fieldMapsz%out/save_selector_mapset_aliases.jsontargetAliasSelectorspublicCoveredAliasSelectorsz+out/save_selector_secondary_fill_roots.json)rootsfillEntryReferenceRoots"predecessorFillEntryCandidateFoundz'out/save_selector_leaf_index_space.json)rowsroutePairEntryIndicescorrectedReaderHitCountzmap1_01a.cnszmap2_02d.cnszmiddata.mlkc                    d| dS )N0x08x values    I/home/exedev/hwanse/tools/summarize_save_selector_target_alias_bridges.pyhex32r#   N   s    c{    c                @    t        |        d|t        |       S d S )Nz..?)r#   )startends     r"   	range_hexr)   R   s+    El^2COeCjEFFEFFr$   c                p    | j                         s|S t        j                  | j                  d            S )Nutf-8encoding)existsjsonloads	read_text)r   fallbacks     r"   	load_jsonr3   V   s*    ;;=::dnngn677r$   c                "    | rt        | d      S d S )N   )intr    s    r"   	parse_hexr7   \   s    "3ub>,,r$   c                L    | j                  d       d| j                  d       S )Nr   :r   get)rows    r"   selector_keyr=   `   s&    gggq 122r$   c                R    | D ]  }t        |      |k(  s|c S  t        d| d      )Nz	selector z
 not found)r=   
ValueError)	selectorskeyr<   s      r"   find_selectorrB   d   s9     #J yZ0
11r$   c                    | D ch c]3  }|j                  d      r |j                  d      rt        |d   d      5 }}t        |      S c c}w )Nr   r   r5   )r;   r6   sorted)r@   r<   r   s      r"   unique_rootsrE   k   sW     77;CGG,@$A 	C$%r*E 
 %=s   8A
c                x    t        |       }|j                  |      }|dz   t        |      k  r||dz      nd }||fS )Nr
   )rE   indexlen)r@   root_var   rG   r(   s        r"   
root_rangerJ   t   sC    #EKK E#ai#e*4%	
$CC<r$   c                v    t        ||      }||dz   t        |       kD  ry t        j                  d| |      d   S )N   z<Ir   )r   rH   structunpack_from)exesectionsvaoffsets       r"   dword_at_varS   {   s?    (B'F~!c#h.dC033r$   c                j    |j                  d      xs g D ]  }|j                  d      | k(  s|c S  i S )Nr   rootHexr:   )root_hexsecondary_fill_rootsr<   s      r"   root_fill_rowrX      s>    #''06B 779)J Ir$   c                    | xs i j                  d      xs g D ci c]%  }|j                  d      r|j                  d      |' c}S c c}w )Nr   
entryVaHexr:   )leaf_index_spacer<   s     r"   leaf_index_rows_by_entryr\      sS     %*//7=277<  	s"  s   *A	c                   t        |j                  d            }t        |j                  d            }t        |j                  d            }t        |j                  d            }| |k(  ry| |k(  ry| |k(  ry| |k(  ryy)NselectedPointerVaHexrowPointerHexz(current-selector-row-selected-root-entryzcurrent-selector-row-pointerz&alias-selector-row-selected-root-entryzalias-selector-row-pointerroot-range-datar7   r;   )	source_vacurrent_selectoralias_selectorcurrent_selected_entrycurrent_row_pointeralias_selected_entryalias_row_pointers          r"   source_location_roleri      s    &'7';';<R'ST#$4$8$8$IJ$^%7%78N%OP!."4"4_"EF**9''-((7%%+r$   c                6    | |v r||    S ||| cxk  r|k  ry yy)Ninside-target-root-rangezoutside-target-ranger   )r!   target_root
target_endexact_targetss       r"   target_value_labelro      s3    U##+"C"C) #D!r$   c                
    | dv S )N>   current root 2:0$current source scene record map1_01a$current target scene record map2_02d%current frontier reader/resource gater   )labels    r"   promoting_labelrv      s       r$   c                    |ry|dk(  ry|dk(  ry|dv ry| t         k  ry| t        k  ry	| t        k  ry
| t        k(  ry| t        k  ry| t
        k  ry| t        k  ryy)Nselector-row-metadatarq   zcurrent-root-exactrt   frontier-reader-exact>   rr   rs   route-scene-record-exactpre-writer-script-rangezwriter-payload-rangeleaf-table-windowzwrapper-entryzleaf-or-wrapper-child-rangezreader-to-scene-gapfrontier-scene-cluster-rangezpost-frontier-current-tail)CURRENT_WRITERCURRENT_LEAF_TABLE_STARTCURRENT_LEAF_TABLE_ENDCURRENT_WRAPPER_ENTRYCURRENT_READERCURRENT_SOURCE_RECORDCURRENT_FRONTIER_CLUSTER_END)r!   target_labelmetadata_likes      r"   current_target_classr      s    &))#>>&gg)~(''%%%"%%~,$$$++-'r$   c                Z    |ry|j                  d      rd|v ry|j                  d      ryy)Nrx   alias zsecondaryBranchState fillzalias-secondary-fillz
alias rootzalias-root-exactrk   )
startswith)_valuer   r   s      r"   generic_target_classr      s5    &x(-HL-X%|,!%r$   c                B    t        |      t        fd| D              S )Nc              3     K   | ]D  }|j                  d       k(  xs* |j                  d      k(  xs |j                  d      k(   F yw)vaHexbranchTargetHexfallthroughVaHexNr:   ).0r<   va_hexs     r"   	<genexpr>z$trace_contains_va.<locals>.<genexpr>   s\        	F" 	177$%/	177%&&0	1s   A
A)r#   any)tracerQ   r   s     @r"   trace_contains_var      s(    2YF  	  r$   c                r   i }i }|D ]|  }|j                  d      dk7  rt        |j                  d            }|5|j                  |d      dz   ||<   |j                  |g       j                  |j                  d             ~ g }	t	        |j                               D ]  \  }}
t        | ||||      }|r|d   ni }|	j                  t        |      |
|j                  |g       d d t        |      |j                  d	      |j                  d
      t        |t              t        |t              t        |t              t        |t              t        |t              xs t        |t              |d d D cg c]%  }|j                  d      s|j                  d      ' c}|d d d        |	S c c}w )NtargetClassr{   valueHexr   r
   sourceVaHex   
stopReasonr   	opcodeHexr5   )	targetHexsourceHitCountsampleSourceVaHextraceStepCounttraceStopReasontraceStopVaHexcontainsCurrentWritercontainsCurrentReadercontainsSourceRecordcontainsTargetRecordcontainsRouteSceneRecordfirstOpcodesr   )r;   r7   
setdefaultappendrD   itemsr	   r#   rH   r   r~   r   r   CURRENT_TARGET_RECORD)rO   rP   stringshits	max_stepscounts
source_vashitr!   r   countr   stopr<   s                 r"   summarize_pre_writer_tracesr      s     F')J H77=!%>>#''*-.=

5!,q0ueR(//0FGH Dv||~. uS(GUIF!uRyru#!+r!:2A!>!%j#xx5"hhw/%6un%M%6un%M$5e=R$S$5e=R$S!%)>? C$U,AB=B2AY_c#''R]J^SWW[1_3BZ!
 	* K `s   8F4 F4 c                p    i }| D ].  }|j                  d      }|s|j                  |d      dz   ||<   0 |S )Nr   r   r
   r:   )r   r   r   target_classs       r"   count_target_classesr   
  sK    F ?ww}-%zz,:Q>|	?
 Mr$   c                    | t         k(  ry| t        k(  ryt        | cxk  r	t        k  ry t        | cxk  r	t
        k  ry t
        | cxk  r	t        k  ry yy)Ncurrent-source-scene-recordcurrent-target-scene-recordzcurrent-leaf-table-windowz$current-wrapper-or-leaf-child-windowzcurrent-frontier-clusterzcurrent-root-data)r   r   r   r   r   r   r   )ref_vas    r"   package_resource_ref_roler     s_    &&,&&,6B,BB* C775 8>">>) ?r$   c           	     F   |g S i }|D ]9  }t        |j                  d            }| |j                  d      s2|d   ||<   ; g }t        ||d      D ]J  }	t        | ||	      }|||vr|j	                  t        |	      t        |      ||   t        |	      d       L |S )Nr   textrL   )refVaHexresourceVaHexresourceNamerole)r7   r;   rangerS   r   r#   r   )
rO   rP   current_startcurrent_endstring_entriesnames_by_var<   r!   refsr   s
             r"   'scan_current_root_package_resource_refsr   "  s     	"$K -#'''*+!$VK- D{A6 	C62=E4f"5\'.-f5	
 			 Kr$   c                   |xs i }|j                  d      xs g }|j                  d      xs g }|j                  d      xs g }|r|d   ni }	t        |v }
t        |v }t        |v }t	        |j                  d            }t	        |j                  d            }|j                  d      xs d}|xr |xr t	        |      }t        | ||||      }|D cg c]  }|d	   d
k(  r| }}|D cg c]  }|d	   dk(  r| }}t        d |D              xr t        d |D              }i }|D ]  }|d	   }|j                  |d      dz   ||<   ! d}|rdnd}|rdnd}i d|d|j                  d      d|j                  d      d|j                  dd      d|	j                  d      d|	j                  d      d|d|d |d!|d"|d#|
d$|d%t        |      d&|d't        t        |j                                     d(|||t	        |j                  d)            t	        |j                  d*            t	        |j                  d+            |j                  d,d      |j                  d-d      |j                  d.d      |j                  d/d      |j                  d0d      t	        |j                  d1            t	        |j                  d2            |||d3S c c}w c c}w )4N0addressPredecessorCurrentRootRefFollowingStrings6addressPredecessorCurrentRootRefFollowingStringEntries#addressPredecessorToCurrentRootRefsr   'addressPredecessorToCurrentRootRefCount;addressPredecessorToCurrentRootRefIsCurrentSelectorRowEntry.addressPredecessorCurrentRootRefClassificationunknownr   r   r   c              3  4   K   | ]  }|d    t         k(    ywr   N)ADDRESS_PACKAGE_REQUIRED_SOURCEr   r<   s     r"   r   z5summarize_address_adjacent_package.<locals>.<genexpr>g  s     isC#BBi   c              3  4   K   | ]  }|d    t         k(    ywr   )ADDRESS_PACKAGE_REQUIRED_TARGETr   s     r"   r   z5summarize_address_adjacent_package.<locals>.<genexpr>h  s     m3N#'FFmr   r
   Fzpackage-prefix-shape-onlyz	not-foundzaddress-adjacent 10:0 contains the current 2:0 root pointer followed by a resource list that includes source/target map resources, but the pointer is selector-row/package metadata and still has no execution, consumer, reader, or scene-record edgezAaddress-adjacent package prefix not found in the supplied contextpackagePrefixFoundselectoraddressPredecessorSelectorrangeHexaddressPredecessorRangeHexcurrentRootRefCountcurrentRootRefHexr   currentRootTargetHextargetVaHexcurrentRootRefClassification$currentRootPointerIsSelectorRowEntryfollowingStringsfollowingStringEntriesincludesAudioResourceincludesSourceMapResourceincludesTargetMapResource"currentRootPackageResourceRefCountcurrentRootPackageResourceRefs'currentRootPackageResourceRefRoleCounts$sourceSceneRecordPackageResourceRefs addressPredecessorContainsSource addressPredecessorContainsTarget)currentEqualsAddressPredecessorPlusSource2addressPredecessorTailCurrentRootRangePointerCount.addressPredecessorTailCurrentRootExactRefCount,addressPredecessorTailFrontierReaderRefCount*addressPredecessorTailSourceRecordRefCount*addressPredecessorTailTargetRecordRefCount-addressPredecessorTailLooksLikeDescriptorData addressContiguityProvesExecution)$targetSceneRecordPackageResourceRefs&currentSceneRecordsUsePackageResourcescontainsSourceFieldMapcontainsTargetFieldMapr    tailCurrentRootRangePointerCounttailCurrentRootExactRefCounttailFrontierReaderRefCounttailSourceRecordRefCounttailTargetRecordRefCounttailLooksLikeDescriptorDatar   routeProofFoundstatusnote)r;   r   r   ADDRESS_PACKAGE_AUDIO_RESOURCEboolr   r   rH   dictrD   r   )rO   rP   r   r   address_predecessor_contextcontextfollowing_stringsfollowing_string_entriescurrent_root_refscurrent_refincludes_sourceincludes_targetincludes_audiocurrent_root_pointer_found*current_root_pointer_is_selector_row_entryclassificationpackage_prefix_foundcurrent_root_resource_refsr<   source_scene_resource_refstarget_scene_resource_refs+current_scene_records_use_package_resourcesresource_ref_role_countsrefr   route_proof_foundr  r  s                               r"   "summarize_address_adjacent_packager  >  s    */RG$VW][]&{{+cdjhj$IJPb*;#A&K59JJO59JJO37HHN!%gkk2[&\!]15QR2. [[!QR_V_N" 	$6	$"# 
 "I " 2"v;77 	" "
 2"v;77 	" "
 	iNhii 	nmRlmm 0 02) S6{)A)E)EdA)NQR)R &S    	$   	C Q 	%2%GKK <=% 	GKK <=% 	w{{+TVWX	%
 	[__Z8% 	 >% 	'% 	/0Z% 	-% 	!":% 	 % 	$_% 	$_% 	-c2L.M% 	)*D%  	24?W?]?]?_8`3a!%" 	/0J#%$ 1K2]"&w{{3U'V"W"&w{{3U'V"W59KKCD6
 -4KK@!-
 )04dfg(h&-kk2`bc&d$+KK0\^_$`$+KK0\^_$`'+GKK8g,h'i,0=_1`,a,I% %;""s   K-K#c                R     dj                   fdt               D              xs dS )N, c              3  2   K   | ]  }| d |      yw)r9   Nr   )r   rA   r   s     r"   r   z$class_counts_text.<locals>.<genexpr>  s      FuAfSk]+Fs   -)joinrD   )r   s   `r"   class_counts_textr%    s!    99Fvf~FFM#Mr$   c                L   | d   }| d   }i d| d   d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      xs g d	|j                  d
      d|j                  d      d|j                  d      d|j                  d      d| j                  d      d|j                  d      d|j                  d      xs i d| j                  d      d| j                  d      d| j                  d      d| j                  d      i d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d | j                  d       d!| j                  d!      xs i d"| j                  d"      d#| j                  d#      d$| j                  d$      d%| j                  d%      d&| j                  d&      d'| j                  d'      d(| j                  d(      d)| j                  d)      d*| j                  d*      | j                  d+      | j                  d,      |j                  d
      d-S ).NaliasToCurrentcurrentToAliasr   r   rU   rootRangeHex	fillCountpublicSampleIdsaliasToCurrentHitCounthitCountaliasToCurrentMetadataHitCountmetadataHitCountaliasToCurrentDataHitCountdataHitCount#aliasToCurrentPromotingDataHitCountpromotingDataHitCount'aliasToCurrentPromotingMetadataHitCount)aliasToCurrentReaderOrSceneRecordHitCountreaderOrSceneRecordHitCountaliasToCurrentTargetClassCountstargetClassCountsaliasToCurrentLeafTableHitCount(aliasToCurrentLeafTableRoutePairHitCount.aliasToCurrentLeafTableCorrectedReaderHitCount.aliasToCurrentLeafTableEffectiveReaderHitCount(aliasToCurrentPreWriterUniqueTargetCount1aliasToCurrentPreWriterTraceCurrentWriterHitCount1aliasToCurrentPreWriterTraceCurrentReaderHitCount4aliasToCurrentPreWriterTraceRouteSceneRecordHitCount#aliasToCurrentAfterLastFillHitCount+aliasToCurrentAfterLastFillMetadataHitCount'aliasToCurrentAfterLastFillDataHitCount,aliasToCurrentAfterLastFillTargetClassCounts,aliasToCurrentAfterLastFillPreWriterHitCount,aliasToCurrentAfterLastFillLeafTableHitCount;aliasToCurrentAfterLastFillLeafTableCorrectedReaderHitCount;aliasToCurrentAfterLastFillLeafTableEffectiveReaderHitCount6aliasToCurrentAfterLastFillReaderOrSceneRecordHitCount5aliasToCurrentAfterLastFillPreWriterUniqueTargetCount5aliasToCurrentAfterLastFillTraceCurrentWriterHitCount5aliasToCurrentAfterLastFillTraceCurrentReaderHitCount8aliasToCurrentAfterLastFillTraceRouteSceneRecordHitCount&aliasToCurrentExecutionLikeBridgeFound3aliasToCurrentAfterLastFillExecutionLikeBridgeFound)rN  rO  currentToAliasHitCountr:   )r<   alias_to_currentcurrent_to_aliass      r"   compact_alias_rowrS    s   +,+,JC
OJJ 	3779%J 	/	J
 	SWW[)J 	377#45;J 	!"2"6"6z"BJ 	)*:*>*>?Q*RJ 	%&6&:&:>&JJ 	./?/C/CD[/\J 	237754
J 	45E5I5IJg5hJ 	*+;+?+?@S+T+ZXZJ  	*3773T+U!J" 	3CGG<f4g#J$ 	9#''<;
%J* 	9#''<;
+J0 	3CGG<f4g1J2 	<SWW?>
3J8 	<SWW?>
9J> 	?BA
?JD 	.sww7\/]EJF 	6sww98
GJL 	2377;d3eMJN 	7:9
 9SJT 	7:9
UJZ 	7:9
[J` 	FswwIH
aJf 	FswwIH
gJl 	A#''DC
mJr 	@CB
sJx 	@CB
yJ~ 	@CB
JD 	CCGGFE
EJJ 36'':b2c?BwwA@
 #3"6"6z"BSJ Jr$   c                R    |yt        | j                  d            }|d uxr ||kD  S )NFr   ra   )r   floor_varb   s      r"   hit_source_afterrV    s3    #''-01ID 9Y%99r$   c	                   |t        ||      t        ||      dddddg dS d}	d}
g }t        ||d      D ]  }t        | ||      }||
dz  }
|	dz  }	|d uxr ||cxk  xr |k  nc }|j                  |      }|s|I ||      }|dk7  }t	        ||||      } ||||      }|j                  t        |      t        |      |||||d        t        |      }t        ||      t        ||      |	|
t        |      t        d |D              t        d |D              t        d	 |D              t        d
 |D              t        d |D              ||dS )Nr   )sourceRangeHextargetRangeHexreadableDwordCountunreadableDwordCountr-  r/  r1  r   rL   r
   r`   )r   r   insideTargetRangetargetLabelr   sourceLocationRolemetadataLikec              3  ,   K   | ]  }|d    s	d  ywr_  r
   Nr   r   s     r"   r   z$scan_dword_bridge.<locals>.<genexpr>5  s     IcS5HI   
c              3  ,   K   | ]  }|d    r	d  ywra  r   r   s     r"   r   z$scan_dword_bridge.<locals>.<genexpr>6  s     I#S5HAIrb  c              3  >   K   | ]  }t        |d          sd  yw)r]  r
   Nrv   r   s     r"   r   z$scan_dword_bridge.<locals>.<genexpr>7  s     %_C?3}K];^a%_s   c              3  F   K   | ]  }t        |d          r	|d   sd  ywr]  r_  r
   Nre  r   s     r"   r   z$scan_dword_bridge.<locals>.<genexpr>8  s,      %
s=123~;N %
   !c              3  .   K   | ]  }|d    dv rd  ywr   >   ry   rz   r}   r
   Nr   r   s     r"   r   z$scan_dword_bridge.<locals>.<genexpr><  s*      +
=! &  +
   )rX  rY  rZ  r[  r-  r/  r1  promotingExactHitCountr3  r6  r8  r   )
r)   r   rS   r;   ro   r   r#   r   rH   sum)rO   rP   source_start
source_endtarget_startrm   rn   source_role_fntarget_class_fnreadable
unreadabler   rQ   r!   inside_target_rangeexact_labelr   r   r   r   target_class_countss                        r"   scan_dword_bridgerx    s    'jA'jA"#$% !	
 		
 HJDL*a0 C2.=!OJA(4[9[Q[9[#''."{':b! 11)%z=Y&ulMJ 9e!4''"&)
 	. /t4#L*=#L*=& *IITIIIII"%%_4%_"_!$ %
%
 "
 (+ +
+
 (
 1- r$   c                v  6 t        |t              6t        6j                  d            }|t	        d      t        ||      \  }}t        }	|dt        dt        dt        di}
t        |      }t        | |      }g }|j                  d      xs i j                  d      xs g D ]  }|j                  d	      }t        ||      }t        |j                  d            }|t	        d
| d      t        ||      \  }}|d| i}t        t        |      |      }|j                  d      xs g }|D ](  }t        |j                  d            }| d| d||<   * t        | |||||	|
|f6fd	t        	      }|d   D cg c]  }t!        |d         r|d   r| }}|r!t        |d   xs i j                  d            nd }|d   D cg c]  }t#        ||      r| }}t        | |||	||||f6fd	      }g }|d   D ]"  }|j                  d      dk7  r|j                  |j                  d            xs i } |j%                  i || j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d       | j                  d!      | j                  d"      | j                  d#      | j                  d$      | j                  d%      | j                  d&      d'       % t'        d( |D              }!t'        d) |D              }"t'        d* |D              }#t'        d+ |D              }$|D cg c]  }t#        ||      r| }%}t'        d, |%D              }&t'        d- |%D              }'t'        d. |D              }(t'        d/ |D              })t)        | |||d         }*t'        d0 |*D              }+t'        d1 |*D              },t'        d2 |*D              }-t)        | |||      }.t'        d3 |.D              }/t'        d4 |.D              }0t'        d5 |.D              }1t'        d6 |D              }2t'        d7 |D              }3|2d8kD  xs |3d8kD  xs |/d8kD  xs |0d8kD  xs |1d8kD  }4|d9   d8kD  }5|j%                  i d	|d:|j                  d:      d;t        |      d<t+        ||      d=t-        |      d>|r|d8   xs i j                  d      nd d?|r|d   xs i j                  d      nd d@|j                  d@      xs g dA|dB|dCt-        |      dD|dE|dFt-        |      dG|!dH|"dI|#i dJ|$dK|(dL|)dM|*dNt-        |*      dO|+dP|,dQ|-dR|5dS|dTt-        |      dUt'        dV |D              dWt'        dX |D              dYt'        dZ |D              d[t'        d\ |D              d]|&d^|'|3|2t/        |      |.t-        |.      |/|0|1|4|d_   d8kD  xr |d`   d8k(  da
        |S c c}w c c}w c c}w )bNr   .current selector is missing selectedPointerHexrq   rt   rr   rs   targetAliasGroupaliasesr   zalias selector z is missing selectedPointerHexzalias root fillsr   r   z secondaryBranchState fillc                    t        | |      S Nri   rQ   rd   rc   s     r"   <lambda>zalias_rows.<locals>.<lambda>x      6J2O_ao6p r$   r   r]  r_  r   c                    t        | |      S r  r  r  s     r"   r  zalias_rows.<locals>.<lambda>  r  r$   r   r|   r   rootRelativeIndexinsideCurrentRootEntryRundescriptorHexchildPointerHexdescriptorHasRoutePairchildHasRoutePair%descriptorTraceContainsFrontierReader childTraceContainsFrontierReader.correctedDescriptorTraceContainsFrontierReader%correctedDescriptorFrontierReaderStep.effectiveDescriptorTraceContainsFrontierReaderisFrontierLeafChildrouteRelevant)r  r  r  r  r  r  r  r  r  r  r  r  r  c              3  d   K   | ](  }|j                  d       s|j                  d      rd * yw)r  r  r
   Nr:   r   r   s     r"   r   zalias_rows.<locals>.<genexpr>  s1      .
ww/0CGG<O4P .
   .0c              3  d   K   | ](  }|j                  d       s|j                  d      rd * yw)r  r  r
   Nr:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s1      *
ww>?377KmCn *
r  c              3  B   K   | ]  }|j                  d       rd  ywr  r
   Nr:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s%      4
wwGH 4
   c              3     K   | ]9  }|j                  d       s"|j                  d      s|j                  d      rd ; ywr  r  r  r
   Nr:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s?      4
?@77=>77KL	 4
   ?Ac              3  B   K   | ]  }|j                  d       rd  ywr  r:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s'      D
wwGH D
r  c              3     K   | ]9  }|j                  d       s"|j                  d      s|j                  d      rd ; ywr  r:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  sA      D
?@77=>77KL	 D
r  c              3  D   K   | ]  }|j                  d       sd  yw)r  r
   Nr:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s     0psQTQXQXYnQo0p     c              3  n   K   | ]-  }t        |j                  d       t              r|d    dk  rd / yw)r  r   r
   N)
isinstancer;   r6   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s:      ,
#''"56<EXAY\]A] ,
s   35c              3  D   K   | ]  }|j                  d       sd  ywr   r
   Nr:   r   r   s     r"   r   zalias_rows.<locals>.<genexpr>       +s%PUPYPYZqPrA+sr  c              3  D   K   | ]  }|j                  d       sd  ywr   r
   Nr:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  r  r  c              3  B   K   | ]  }|j                  d       rd  ywr   r
   Nr:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s%      1
yy34 1
r  c              3  B   K   | ]  }|j                  d       rd  ywr  r:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  %      1
yy01 1
r  c              3  B   K   | ]  }|j                  d       rd  ywr  r:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  r  r  c              3  B   K   | ]  }|j                  d       rd  ywr  r:   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s%      6
yy34 6
r  c              3  F   K   | ]  }t        |d          r	|d   sd  ywrg  re  r  s     r"   r   zalias_rows.<locals>.<genexpr>  s,      7
s=123~;N 7
rh  c              3  .   K   | ]  }|d    dv rd  ywrj  r   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s*      ?
=! &  ?
rk  r   r3  r   rU   r)  r*  firstFillHexlastFillHexr+  r'  r(  r4  #aliasToCurrentPromotingMetadataHitsaliasToCurrentLeafTableHitsr9  r:  %aliasToCurrentLeafTableReaderHitCountr;  r<  +aliasToCurrentLeafTableFrontierLeafHitCount'aliasToCurrentLeafTableNegativeHitCountaliasToCurrentPreWriterTracesr=  r>  r?  r@  rN  aliasToCurrentAfterLastFillHitsrA  rC  c              3  *   K   | ]  }|d    sd  ywra  r   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s       ;>* ;   rB  c              3  *   K   | ]  }|d    rd  ywra  r   r  s     r"   r   zalias_rows.<locals>.<genexpr>  s       ?~& ?r  rE  c              3  0   K   | ]  }|d    dk(  rd  yw)r   r{   r
   Nr   r  s     r"   r   zalias_rows.<locals>.<genexpr>"  s(      @}%)BB @   rF  c              3  0   K   | ]  }|d    dk(  rd  yw)r   r|   r
   Nr   r  s     r"   r   zalias_rows.<locals>.<genexpr>&  s(      @}%)<< @r  rG  rH  r-  r1  )
rI  0aliasToCurrentAfterLastFillPromotingDataHitCountrD  *aliasToCurrentAfterLastFillPreWriterTracesrJ  rK  rL  rM  rO  aliasToCurrentMetadataOnly)rB   CURRENT_SELECTORr7   r;   r?   rJ   CURRENT_ROOT_FALLBACK_ENDr   r   r   r\   r   rX   r#   rx  r   rv   rV  r   rm  r   r)   rH   r   )7rO   rP   r@   mapset_aliasesrW   r[   current_rootr   _current_dynamic_endr   current_exact_targetsleaf_rows_by_entryr   r   aliasr   rd   
alias_rootalias_start	alias_endalias_exact_targets	fill_rootr}  fillfill_varQ  r   (alias_to_current_promoting_metadata_hitslast_fill_va%alias_to_current_after_last_fill_hitsrR  leaf_table_hitsleaf_rowleaf_table_route_pair_hit_countleaf_table_reader_hit_count%leaf_table_corrected_reader_hit_count%leaf_table_effective_reader_hit_countafter_last_fill_leaf_table_hits5after_last_fill_leaf_table_corrected_reader_hit_count5after_last_fill_leaf_table_effective_reader_hit_count"leaf_table_frontier_leaf_hit_countleaf_table_negative_hit_countpre_writer_tracespre_writer_trace_writer_countpre_writer_trace_reader_count"pre_writer_trace_route_scene_count!after_last_fill_pre_writer_traces"after_last_fill_trace_writer_count"after_last_fill_trace_reader_count'after_last_fill_trace_route_scene_count(after_last_fill_promoting_data_hit_count0after_last_fill_reader_or_scene_record_hit_countafter_last_fill_execution_likealias_to_current_execution_likerc   s7                                                         @r"   
alias_rowsr  I  s    %Y0@A-112FGHLIJJ*4Y*M'M'+K(?EE	 22BCsH-GD $$%78>BCCINTRT [99Z(&y(;~112FGH
xj8VWXX!+Iz!BY+hZ0
 "%
"35IJ	g&," 	]D 12G"17zA[/\#G,	] -!&4p 

 ,F34
s=12s>7J 4
0 4
 EJy%)/r!6!6w!?@t+F31
\2 1
- 1
 -&4p	
 #F+ 	Cww}%)<<)--cggj.ABHbH"" $$%-\\2E%F-5\\:U-V!)o!>#+<<0A#B*2,,7O*P%-\\2E%F9AFm9n4<LLAc4dBJ,,DC :BFm9nBJ,,DC (0||4I'J!)o!>%$ 		0 +. .
(.
 +
' '* *
(*
 '
# 14 4
(4
 1
- 14 4
(4
 1
- ++
\2 +
' +
 AD D
8D
 A
= AD D
8D
 A
= .10po0p-p*(+ ,
(,
 )
% 8XwP`agPhi(++s;L+s(s%(++s;L+s(s%-0 1
,1
 .
* -H1	-
) .1 1
<1
 .
* .1 1
<1
 .
* 36 6
<6
 3
/ 47 7
>7
 4
0 <? ?
>?
 <
8 5q8 ;?!C;1A5; 2A5; 7: 	' +;;R*SVW*W' >
>
EIIf%>
 uZ(>
 Ik9=	>

 U>
 UU1X^009>
 UE"IO009>
 uyy):;Ar>
 .>
 .>
 6s;c7d>
 23[>
 *?>
 .s?/C>
 78W>
  45P!>
" =>c#>
$ =>c%>
& :;]'>
( 67T)>
* ,->+>
, 7<M8N->
. @A^/>
0 @A^1>
2 CDf3>
4 56U5>
6 ./T7>
8 237\3]9>
: 6s ;B; 8;>
B :3 ?B? <C>
J ;C @B@ =K>
R ;C @B@ =S>
Z J  LA[>
\ J  LA]>
^ Gw@h<P5= ;\EHIjEkEgEgHoCa ,q0 :$^49y>
 >	{[x KC4

1
v+
s   X,X12X6c           
        t        |       }||nt        t        dz  g       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }t        |t              }t        |j                  d            }|t        d      t        ||      \  }	}
t        }t        | |||||      }t        d |D              }t        d	 |D              }t        d
 |D              }t        d |D              }t        d |D              }t        d |D              }|D cg c]  }|d   D ]  }d|d   i|  }}}t        |D ch c]  }|d   	 c}      }t        |D ch c]$  }|j                  d      r|j                  d      & c}      }|dkD  xr |dk(  xr ||k(  }t        d |D              }t        d |D              }t        d |D              }t        d |D              }t        d |D              }t        d |D              }t        d |D              }t        d |D              } t        d |D              }!t        d |D              }"t        d |D              }#t        d |D              }$t        d |D              }%t        d |D              }&t        d  |D              }'t        d! |D              }(t        d" |D              })t        d# |D              }*t        d$ |D              }+t        d% |D              },t        d& |D              }-t        d' |D              }.t        d( |D              }/t        d) |D              }0t        d* |D              }1i }2i }3|D ]k  }|d+   d,   j                         D ]  \  }4}5|2j                  |4d      |5z   |2|4<    |d-   j                         D ]  \  }4}5|3j                  |4d      |5z   |3|4<    m |D cg c]  }|d.   r|d    }6}|D cg c]  }|d/   r|d    }7}|D cg c]  }|d0   r|d    }8}|D cg c]  }|d+   d1   dkD  r|d    }9}|D cg c]  }|d+   d2   dkD  r|d    }:}|D cg c]  }|d3   dkD  r|d    };}|D cg c]  }|d4   dkD  r|d    }<}t        |D cg c]
  }|d+   d2    c}d5      }=t        |D cg c]  }|d4   	 c}d5      }>|D cg c]  }|=dkD  r|d+   d2   |=k(  r|d    }?}|D cg c]  }|>dkD  r|d4   |>k(  r|d    }@}|D cg c]  }|d+   d1   dk(  r|d    }A}t        |D Bch c]  }|j                  d6      xs g D ]  }B|B   c}B}      }C|D cg c]  }|j                  d6      r|d    }D}|D cg c]#  }|j                  d6      r|d+   d1   dkD  r|d   % }E}|D cg c]#  }|j                  d6      r|d+   d2   dkD  r|d   % }F}|D cg c]   }|j                  d6      r|d4   dkD  r|d   " }G}t        |D Bch c])  }|d+   d1   dkD  r|j                  d6      xs g D ]  }B|B + c}B}      }H|D cg c]2  }d7t!        |j                  d8      xs d9      v r|d+   d1   dkD  r|d   4 }I}|D cg c]2  }d7t!        |j                  d8      xs d9      v r|d+   d2   dkD  r|d   4 }J}|D cg c]#  }|j                  d6      s|d+   d1   dkD  r|d   % }K}t#        |9      xr t%        |9      t%        I      k(  }L|9rEsLrd:nErd;nd<}M|6s
|7sLrEs|rd=nd>}N|Nd=k(  rd?d@j'                  I      xs dA dBndC}Ot)        | ||	||      }PdD}Qi dEt*        dFt,        dGt        dHt/        |      dIt1        |	|      dJ|D cg c]  }|d   	 c}dK|dL|D cg c]  }t3        |       c}d6CdMDdNt        |D      dOEdPt        |E      dQFdRt        |F      dSGdTt        |G      i dUHdVIdWJdXKdYLdZMd[Nd\Od]Pd^|Pd_   d`|Pda   db|Pdc   dd|Pde   df|Pdg   dh|Pdi   dj|Pdk   dl|Pdm   i dn|Pdo   dp|9dq|:dr|;ds|<dt|?du@dv|dw|dx|dy|dz|d{|d||d|d}|d~|i d|d|2d|d|d|d|d|d|d| d|!d|"d|#d|$d3|%d4|&d|'d|(i d|)d|*d|+d|,d|-d-|3d|.d|/d|0d|1d/t#        |7      d|7d.t#        |6      d|6d|8dAdddt4        t6        t8        t        t8              dt6        QdS c c}}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}B}w c c}w c c}w c c}w c c}w c c}B}w c c}w c c}w c c}w c c}w c c}w )Nsave_scene_selectors.json!save_selector_mapset_aliases.json'save_selector_secondary_fill_roots.json#save_selector_leaf_index_space.json.save_selector_address_predecessor_context.jsonr   rz  c              3  ,   K   | ]  }|d    d     yw)r'  r-  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>`  s     $W3S)9%::%F$W   c              3  ,   K   | ]  }|d    d     yw)r'  r/  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>a  s     -h\_c2B.CDV.W-hr  c              3  ,   K   | ]  }|d    d     yw)r'  r1  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>b  s     )`TW#.>*?*O)`r  c              3  ,   K   | ]  }|d    d     yw)r'  rl  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>c  s     4uilS9I5JKc5d4ur  c              3  ,   K   | ]  }|d    d     yw)r'  r3  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>d  s     3sgjC8H4IJa4b3sr  c              3  &   K   | ]	  }|d      yw)r4  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>e  s      8;>568   r  r   r^  r   c              3  ,   K   | ]  }|d    d     yw)r'  r6  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>z  s!      <AD;<<r  c              3  &   K   | ]	  }|d      yw)r9  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>}  s     /g[^4U0V/gr  c              3  &   K   | ]	  }|d      yw)r:  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>~  s      ;<?67;r  c              3  &   K   | ]	  }|d      yw)r  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      79<347r  c              3  &   K   | ]	  }|d      yw)r;  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>        ABE<=Ar  c              3  &   K   | ]	  }|d      yw)r<  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  r  r  c              3  &   K   | ]	  }|d      yw)r  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>        >?B9:>r  c              3  &   K   | ]	  }|d      yw)r  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s     8xlo=f9g8xr  c              3  &   K   | ]	  }|d      yw)r=  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      :<?67:r  c              3  &   K   | ]	  }|d      yw)r>  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>        EEH?@Er  c              3  &   K   | ]	  }|d      yw)r?  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  r  r  c              3  &   K   | ]	  }|d      yw)r@  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      IHKBCIr  c              3  &   K   | ]	  }|d      yw)rA  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      57:125r  c              3  &   K   | ]	  }|d      yw)rC  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      :;>56:r  c              3  &   K   | ]	  }|d      yw)rB  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  r  r  c              3  &   K   | ]	  }|d      yw)rE  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>        @@C:;@r  c              3  &   K   | ]	  }|d      yw)rF  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  r  r  c              3  &   K   | ]	  }|d      yw)rG  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>        QORIJQr  c              3  &   K   | ]	  }|d      yw)rH  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  r  r  c              3  &   K   | ]	  }|d      yw)rI  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      LJMDELr  c              3  &   K   | ]	  }|d      yw)r  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      DDG>?Dr  c              3  &   K   | ]	  }|d      yw)rJ  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>        JILCDJr  c              3  &   K   | ]	  }|d      yw)rK  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  r  r  c              3  &   K   | ]	  }|d      yw)rL  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  r  r  c              3  &   K   | ]	  }|d      yw)rM  Nr   r   s     r"   r   z build_summary.<locals>.<genexpr>  s      NLOFGNr  r'  r8  rD  rN  rO  r  r-  r1  rA  rC  )defaultr+  zaddress-adjacentr    zuncovered-address-adjacent-onlycoveredzno-forward-hitsz address-adjacent-alias-data-onlyopenzWpublic-covered aliases have no forward hits; all forward/data/tail-data hits come from ,r#  zq, with exact current-root promotion limited to selector-row metadata and no writer/reader/scene-record trace hitsz9target alias bridge still needs separate execution reviewaI  The target-side alias bridge scan finds direct dword links from target aliases into the bounded current 2:0 root range, but all forward hits come from the non-public, address-adjacent 10:0 range; the public-covered target alias 1:0 has no forward hits. None of those links directly targets the current root, the 0x00542b0c reader, or the map1_01a/map2_02d scene-record pair as a data edge. The sole exact current-root hit is selector-row metadata at 0x0053f328 rather than a root-range data edge. Two leaf-table hits land on current route-pair descriptor entries; their raw traces stop before the frontier reader, while the opcode-0x2c-corrected traces do reach it. The after-last-fill subset contains only 10:0 tail data links into pre-writer script and leaf-table windows, and those pre-writer traces still do not reach the current writer, reader, or route scene records. The address-adjacent 10:0 prefix also contains the current 2:0 root pointer followed by a resource list containing middata.mlk and source/target map CNS names, which is a useful package/list shape clue but still metadata rather than an execution edge. The hits therefore narrow likely shared substructure and corrected route-pair adjacency between alias roots but still do not prove runtime leaf selection, execution order, branch-state persistence, or a strict map1_01a hotspot.sourcetargetcurrentSelectorcurrentRootHexcurrentRootRangeHexr   	aliasRowsaliasBridgeSummaryRowsr   publicCoveredAliasCount publicCoveredForwardHitSelectors!publicCoveredForwardHitAliasCount!publicCoveredForwardDataSelectors"publicCoveredForwardDataAliasCount'publicCoveredAfterLastFillDataSelectors(publicCoveredAfterLastFillDataAliasCountforwardHitPublicSampleCount"addressAdjacentForwardHitSelectors#addressAdjacentForwardDataSelectorsnonPublicForwardHitSelectorsforwardHitsAddressAdjacentOnlypublicForwardHitCoverageStatus#targetAliasExecutionExclusionStatus#targetAliasExecutionExclusionDetailaddressAdjacentPackageBridge!addressAdjacentPackagePrefixFoundr   addressAdjacentPackageStatusr  %addressAdjacentPackageRouteProofFoundr  &addressAdjacentPackageFollowingStringsr   2addressAdjacentPackageCurrentRootRefClassificationr   /addressAdjacentPackageIncludesSourceMapResourcer   /addressAdjacentPackageIncludesTargetMapResourcer   1addressAdjacentPackageCurrentRootResourceRefCountr   <addressAdjacentPackageCurrentSceneRecordsUsePackageResourcesr   aliasesWithForwardHitsaliasesWithForwardDataHitsaliasesWithAfterLastFillHits aliasesWithAfterLastFillDataHitsdominantForwardDataAliases dominantAfterLastFillDataAliasesr,  r.  r0  $aliasToCurrentPromotingExactHitCountr2  r4  (aliasToCurrentPromotingExactMetadataOnly+aliasToCurrentPromotingMetadataHitSelectors*aliasToCurrentPromotingMetadataSourceRolesr5  r7  r9  r:  r  r;  r<  r  r  r=  r>  r?  r@  rB  rE  rF  rG  rH  rI  r  rJ  rK  rL  rM  /aliasToCurrentAfterLastFillExecutionLikeAliases"aliasToCurrentExecutionLikeAliases!aliasToCurrentMetadataOnlyAliasesaliasesWithoutForwardHits
proofFoundFblocked)targetAliasBridgeProofFoundfailedTargetAliasBridgeGateIdsmissingEvidenceevidenceRefsevidenceRefCountpromotionStatusremainingProofs
conclusion)r   r3   OUTrB   r  r7   r;   r?   rJ   r  r  rm  rD   r   maxrH   strr	  setr$  r  SOURCETARGETr#   r)   rS  #FAILED_TARGET_ALIAS_BRIDGE_GATE_IDS$TARGET_ALIAS_BRIDGE_MISSING_EVIDENCE!TARGET_ALIAS_BRIDGE_EVIDENCE_REFS)RrO   r@   r  rW   r[   r  rP   rc   r  r   r  r   r   alias_to_current_hit_count#alias_to_current_metadata_hit_countalias_to_current_data_hit_count*alias_to_current_promoting_exact_hit_count)alias_to_current_promoting_data_hit_count-alias_to_current_promoting_metadata_hit_countr<   r   r  1alias_to_current_promoting_metadata_hit_selectors0alias_to_current_promoting_metadata_source_roles.alias_to_current_promoting_exact_metadata_only1alias_to_current_reader_or_scene_record_hit_count%alias_to_current_leaf_table_hit_count0alias_to_current_leaf_table_route_pair_hit_count,alias_to_current_leaf_table_reader_hit_count6alias_to_current_leaf_table_corrected_reader_hit_count6alias_to_current_leaf_table_effective_reader_hit_count3alias_to_current_leaf_table_frontier_leaf_hit_count.alias_to_current_leaf_table_negative_hit_count/alias_to_current_pre_writer_unique_target_count:alias_to_current_pre_writer_trace_current_writer_hit_count:alias_to_current_pre_writer_trace_current_reader_hit_count>alias_to_current_pre_writer_trace_route_scene_record_hit_count*alias_to_current_after_last_fill_hit_count/alias_to_current_after_last_fill_data_hit_count3alias_to_current_after_last_fill_metadata_hit_count5alias_to_current_after_last_fill_pre_writer_hit_count5alias_to_current_after_last_fill_leaf_table_hit_countFalias_to_current_after_last_fill_leaf_table_corrected_reader_hit_countFalias_to_current_after_last_fill_leaf_table_effective_reader_hit_countAalias_to_current_after_last_fill_reader_or_scene_record_hit_count9alias_to_current_after_last_fill_promoting_data_hit_count?alias_to_current_after_last_fill_pre_writer_unique_target_count?alias_to_current_after_last_fill_trace_current_writer_hit_count?alias_to_current_after_last_fill_trace_current_reader_hit_countCalias_to_current_after_last_fill_trace_route_scene_record_hit_count$alias_to_current_target_class_counts4alias_to_current_after_last_fill_target_class_countsr   r   execution_like_aliases&after_last_fill_execution_like_aliasesmetadata_only_aliasesaliases_with_forward_hitsaliases_with_forward_data_hits!aliases_with_after_last_fill_hits&aliases_with_after_last_fill_data_hitsmax_forward_data_hitsmax_after_last_fill_data_hitsdominant_forward_data_aliases%dominant_after_last_fill_data_aliasesaliases_without_forward_hits	sample_idpublic_sample_idspublic_covered_aliases"public_covered_forward_hit_aliases#public_covered_forward_data_aliases+public_covered_after_last_fill_data_aliasesforward_hit_public_sample_count$address_adjacent_forward_hit_aliases%address_adjacent_forward_data_aliasesnon_public_forward_hit_aliases"forward_hits_address_adjacent_only"public_forward_hit_coverage_status'target_alias_execution_exclusion_status'target_alias_execution_exclusion_detailaddress_adjacent_package_bridgerU  sR                                                                                     r"   build_summaryr  ?  s    S!H&2		#HcBceg8hI'5'A^yQTWzQz|~GN  + 	sFFK  ' 	sBBBG  '2 	$sMMrR  
 %Y0@A-112FGHLIJJ*4Y*M'M'+Kc8Y@TVfgD!$$WRV$W!W*--hcg-h*h'&))`[_)`&`#144upt4u1u.033snr3s0s-47 8BF8 51
 0<=0  
S_,,0,0, 0
 9?#K@J@ 95 8>;?77'( 	$%? 84 	3Q6 	h5:	h9=gg 3
 9< <HL< 95 -0/gbf/g,g)7: ;CG; 84 47 7@D7 40 >A AIMA >: >A AIMA >: ;> >FJ> ;7 698xsw8x5x269 :CG: 73 BE ELPE B> BE ELPE B> FI IOSI FB 25 5>B5 2. 7: :BF: 73 ;> >FJ> ;7 =@ @GK@ =9 =@ @GK@ =9 NQ QVZQ NJ NQ QVZQ NJ IL LQUL IE AD DKOD A= GJ JPTJ GC GJ JPTJ GC GJ JPTJ GC KN NSWN KG <>(KM8 #&'7#89L#M#S#S#U 	L%488qIEQ 1>	 $''U#V#\#\#^ 	L%DHHWXY\aa AN	 78 	J  .DE 	J.* . +, 	J  ! ,q0 	J! ! & 014 	J&" & )459 	J)% ) .89A= 	J.* .
  :>?3	~	.? %(CGHC6	7H%! % 1$-=)>~)NRg)g 	J%! % -)A-=>B__	 	J-) - $ ,1 	J$  $
  !239r   	    77$% 	J  *77$%#.>*?
*Ka*O 	J*& * +77$%#.>*?*ORS*S 	J+' + 377$%#.W*X[\*\ 	J3/ 3
 '*+ ,q0!239r	+  	++ '# ,SWWV_%:!;; !*-1 	J,( , -SWWV_%:!;; !.1A5 	J-) - &ww()c2B.CJ.ORS.S 	J&" & 	&' 	X)*c2V.WW ' &62	 	* .  ' ':26> 	+  , 36XX 	b8889@S
A BP	P I , 'I#'#	5 h&h&h 	+h 	%-	h
 	yDh 	D ASZ Ah 	Th 	!T"Jc#4S#9"Jh 	,h 	&'=h 	"3'=#>h 	+,Nh 	,S1S-Th 	,-Ph 	-c2U.Vh  	23^!h" 	3C8c4d#h$ 	&'F%h& 	-.R'h( 	./T)h* 	'(F+h, 	)*L-h. 	)*L/h0 	./V1h2 	./V3h4 	'(G5h6 	,-LMa-b7h8 	'(G(Q9h: 	01PQb1c;h< 	12QRd2e=h> 	=>]*?
?hD 	:;Z'<
EhJ 	:;Z'<
KhP 	<=\0>
QhV 	GHg4I
Wh\ 	!";]h^ 	%&D_h` 	'(Iahb 	+,Rchd 	%&Cehf 	+,Qghh 	!"<ihj 	)*Mkhl 	%&Emhn 	/0Zohp 	./Xqhr 	23`sht 	34buhv 	./Wwhx 	67hyhz 	56f{h| 	45f}h~ 	*+Oh@ 	*+PAhB 	34dChD 	01]EhF 	9:pGhH 	9:pIhJ 	67jKhL 	23aMhN 	34cOhP 	<=wQhR 	<=wShT 	?@~UhV 	./YWhX 	23bYhZ 	67j[h\ 	78m]h^ 	78m_h` 	F  HNahb 	F  HNchd 	A  CDehf 	;<ughh 	78lihj 	@  BAkhl 	@  BAmhn 	@  BAohp 	C  EHqhr 	>tDj?ksht 	:;auhv 	1$7M2Nwhx 	-.Dyhz 	,-B{h| 	$%A}h~ 	eh@ (-*M?9 AB$? Oh hQ0
@?x
.

!
&
)
. 	@ 	I%
-$
 

*
+
3
+,-&D !B"Js   e2e)e#e("e-9e2e7-e<
f$ff$f=ff>f!#f$
f*3(f/!(f4%f9 .f>
:7g77g	4(gggc                    g ddd| d    d| d    dd| d	    d
| d    dddj                  | d          dd| d    d| d    d| d    d| d    d| d    d| d    d| d    ddj                  | d         xs d dd dj                  | d!         xs d dd"dj                  | d#         xs d dd$dj                  | d%         xs d d
dj                  | d&         xs d d
dj                  | d'         xs d dd(| d)    d*dj                  | d+         xs d d
dj                  | d,         xs d dd-| d.    d/| d0    dd1| d2    d3| d4    d5d6| d7    d8| d9    dd:| d;    dd<| d=    d>| d?    d@| dA    dB| dC    dD| dE    dF| dG    dH| dI    dJ| dK    dL| dM    dN| dO    dP| dQ    dR| dS    dT| dU    d>| dV    d>| dW    dX| dY    dZ| d[    d>| d\    d>| d]    d^| d_    d>| d`    d>| da    db| dc    d>| dd    de| df    d>| dg    d>| dh    di| dj    dk| dl    dmdj                  | dn         xs d ddodj                  | dp         xs d ddqdj                  | dr         xs d ddsdj                  | dt         xs d d
dj                  | du         xs d ddvdj                  | dw         xs d ddxdj                  | dy         xs d ddz| d{    d|dj                  | d}          d~t        | d          d| j                  d       d| d    dd| d   dddd| d   j                  d      xs d dd| d   j                  d      xs d dd| d   j                  d      xs d d| d   j                  d      xs d dd| d   j                  d      xs d dd| d   j                  d       ddj                  | d   j                  d      xs g       xs d dd| d   j                  d       d>| d   j                  d       d| d   j                  d       d| d   j                  d       d>| d   j                  d       d| d   j                  d       d>| d   j                  d       d>| d   j                  d       d| d   j                  d       dt        | d   j                  d      xs i        dddj                  d | d   j                  d      xs g D              xs d dddj                  d | d   j                  d      xs g D              xs d dd| d   j                  d       d| d   j                  d       dd| d   j                  d       ddddd}| d   rG| d   D ]>  }|j	                  d|d    d|d    d|d    d|d    d|d    d|d    d|d    d       @ n|j	                  d       |j                  g d       | d   D ]  }t        |d         }t        |d         }|j	                  dj                  g d|d    d|d    ddj                  |d!         xs d d|d    dƑ|d    dƑ| dƑ|d\    dƑ| dƑ|dO    d>|dQ    dƑ|dS    dƑ|dU    d>|dV    d>|dW    dƑ|d    d              |j                  g dȢ       | d   D ]  }|d   }|d   }|j	                  dj                  g d|d    d|d    d|d    d|d    dƑ|d    dƑ|d    d>|d    d>|d    d>|d    dƑ|dY    dƑ|df    d>|dg    d>|dh    dƑ|d    dƑ|dl    d              |j                  g dӢ       t        | d   j                               D ]  \  }}	|j	                  d| d|	         |j                  g d֢       t        | d   j                               D ]  \  }}	|j	                  d| d|	         |j                  g dע       | d   D ]h  }|j	                  d|d    d|dY    d|d[    d|d\    d|d_    d|d`    d|dc    d>|dd    d|da    d|d    d|df    d>|dg    d>|dh    d|dj    d       j |j                  g d٢       | d   D ]  }|d   D ]  }t        |j                  d۫      xs |j                  dܫ            }
t        |j                  dݫ      xs |j                  dޫ            }t        |j                  d߫            }t        |xs |      }|j	                  d|d    d|d    d|d    d|j                  d       d|j                  d      xs d d|j                  d      xs d d|
 d| d| d| d|j                  d       d       	  |j                  g d       | d   D ]  }|d   D ]  }|j	                  d|d    d|d    d|d    d|d    d|j                  d      xs d d|j                  d      xs d d|d    d|d    d|d    ddj                  |j                  d      xs g       xs d d         |j                  g d       | d   D ]  }|j	                  d|d           |d   d   }|s4|j	                  d       |j	                  d       |j	                  d       X|j                  g d       |D ],  }|j	                  d|d    d|d    d|d    d|d    d	       . |j	                  d        |j                  ddg       |j                  d | d   D               |j	                  d       dj                  |      S )Nz$# Save Selector Target Alias Bridgesr  z
- route: `r  z` -> `r  `z- current selector/root: `r   z` / `r!  z- target aliases: `r!  r   z- alias -> current hits: r,  z"- alias -> current metadata hits: r.  z- alias -> current data hits: r0  z)- alias -> current promoting exact hits: rD  z(- alias -> current promoting data hits: r2  z,- alias -> current promoting metadata hits: r4  z*- promoting exact hits are metadata-only: rE  z$- promoting metadata source roles: `rG  r#  z- public samples: `r+  z- public-covered aliases: `r   z8- public-covered forward/data/after-fill-data aliases: `r&  r(  r*  z#- forward-hit public sample count: r,  z*- address-adjacent forward/data aliases: `r-  r.  z&- forward hits address-adjacent only: r0  z'- public forward-hit coverage status: `r1  z%- target-alias execution exclusion: `r2  z` (r3  )z)- address-adjacent package prefix found: r5  z$- address-adjacent package status: `r6  z4- address-adjacent package current-root ref class: `r9  z<- address-adjacent package resources include source/target: r:  /r;  z7- address-adjacent package current-root resource refs: r<  z@- address-adjacent package scene records use package resources: r=  z.- address-adjacent package route proof found: r7  z-- alias -> current reader/scene-record hits: r5  z$- alias -> current leaf-table hits: r9  z/- alias -> current leaf-table route-pair hits: r:  z+- alias -> current leaf-table reader hits: r  z5- alias -> current leaf-table corrected reader hits: r;  z5- alias -> current leaf-table effective reader hits: r<  z.- alias -> current pre-writer unique targets: r=  zA- pre-writer traces hitting current writer/reader/scene records: r>  r?  r@  z)- alias -> current after last fill hits: rA  z5- after last fill metadata/data/promoting-data hits: rB  rC  r  z;- after last fill pre-writer/leaf-table/reader-scene hits: rE  rF  rI  z>- after last fill leaf-table corrected/effective reader hits: rG  rH  zA- after-fill traces hitting current writer/reader/scene records: rK  rL  rM  z/- after last fill execution-like bridge found: rO  z0- execution-like alias -> current bridge found: rN  z- aliases with forward hits: `r>  z#- aliases with forward data hits: `r?  z&- aliases with after-fill data hits: `rA  z-- dominant forward/after-fill data aliases: `rB  rC  z- metadata-only aliases: `rJ  z!- aliases without forward hits: `rK  z- proof found: rL  z$- failed target-alias bridge gates: rO  z- missing evidence count: rP  z- evidence refs: rR  z- promotion status: `rS  rU  z"## Address-Adjacent Package Prefixz- selector: `r4  r   z
- range: `r   z- current-root ref: `r   r   z- current-root ref class: `r   z.- current-root pointer is selector-row entry: r   z- following resources: `r   z%- contains source/target field maps: r   r   z2- current equals address-predecessor plus source: r   z*- tail current-root range/exact pointers: r   r   z)- tail reader/source/target record refs: r  r  r  z&- current-root package resource refs: r   z,- current-root package resource ref roles: `r   z- source scene resource refs: `c              3  @   K   | ]  }|j                  d d        ywr   r#  Nr:   r   s     r"   r   zmarkdown.<locals>.<genexpr>$  "       4wUXCGGNC4P  4w   r   z- target scene resource refs: `c              3  @   K   | ]  }|j                  d d        ywr  r:   r   s     r"   r   zmarkdown.<locals>.<genexpr>%  r  r  r   z/- current scene records use package resources: r   z- status: `r  z- note: r  z## Promoting Exact HitszT| selector | source | value | target label | source role | target class | metadata |z+| --- | --- | --- | --- | --- | --- | --- |r  z| `z` | `r   r   z` | r]  z | `r^  r   r_  z |z| - | - | - | - | - | - | - |)r  z## Alias Bridge Summaryr  z| selector | role | public samples | hits | data | classes | after-fill data | after-fill classes | leaf corrected/effective | pre-writer targets | trace W/R/S | current->alias |zN| --- | --- | --- | ---: | ---: | --- | ---: | --- | --- | ---: | --- | ---: |r$  r7  rD  r   r  z | rP  )r  z## Alias Rowsr  z| selector | role | root range | fills | alias->current hits | metadata/data/promoting/promoting-data | after last fill hits | after-fill traces W/R/S | current->alias hits | execution-like |zA| --- | --- | --- | ---: | ---: | --- | ---: | --- | ---: | --- |r#  r'  r(  r)  r*  r-  r/  r1  rl  r3  )r  z## Target Classesr  z- `z`: )r  z!## After Last Fill Target Classesr  )r  z## After Last Fill Summaryr  z| selector | tail hits | metadata | data | pre-writer | leaf-table | corrected/effective leaf reader | reader/scene | unique trace targets | trace W/R/S | execution-like |zJ| --- | ---: | ---: | ---: | ---: | ---: | --- | ---: | ---: | --- | --- |rJ  )r  z## Leaf-Table Hitsr  z| selector | source | entry | index | descriptor | child | route pair | raw reader | corrected reader | effective reader | frontier leaf |zD| --- | --- | --- | ---: | --- | --- | --- | --- | --- | --- | --- |r  r  r  r  r  r  r  r  r  r  )r  z## Pre-Writer Trace Targetsr  z\| selector | target | hits | steps | stop | writer | reader | scene record | first opcodes |z9| --- | --- | ---: | ---: | --- | --- | --- | --- | --- |r  r   r   r   r   z @ `r   r   r   r   r   z` |)r  z## Forward Hitsr  z### r   z- none)r  z/| source | value | target label | source role |z| --- | --- | --- | --- |z## Remaining Proofsc              3  &   K   | ]	  }d |   yw)z- Nr   r   items     r"   r   zmarkdown.<locals>.<genexpr>  s     D2dVDr  rT  
)	r$  rH   r;   r%  r   extendrD   r   r	  )summarylinesr   r<   classesafter_classesrQ  rR  r   r   
route_pairreadercorrected_readereffective_reader	trace_rowr   s                   r"   markdownr    s   R.R
R WX&'vgh.?-@BR %W->%?$@gN^F_E``ab	R
 dii0F(GHIKR $G,D$E#FGR -W5U-V,WXR )1M)N(OPR 4G<b4c3deR 37;`3a2bcR 7w?h7i6jkR 5W=g5h4ijR /tyyAm9n/o/vsv.wwxyR dii0A(BCJsK1MR &dii8U0V&W&^[^%__`aR  C499WUwMxCy  DA  ~A  CB  BG  HL  HQ  HQ  RY  Z}  R~  H  HF  CF  GG  GL  MQ  MV  MV  W^  _H  WI  MJ  MQ  NQ  LR  RS  	T!R" .g6S.T-UV#R$ 5TYYwGk?l5m5tqt4uuz{  |E  |E  FM  Ns  Ft  |u  ||  y|  {}  }~  	%R& 19Y1Z0[\'R( 2':Z2[1\\]^)R* 08]0^/__bcj  lQ  dR  cS  ST  	U+R, 4G<_4`3ab-R. /w7U/V.WWXY/R0 ?wG{?|>}}~1R2 Gw  PA  HB  GC  CD  EL  M~  E  D@  	A3R4 B'J}B~A  	A5R6 K7  TR  LS  KT  	U7R8 9Ah9i8jk9R: 8@k8l7mn;R< /w7X/Y.Z[=R> :'Bl:m9no?R@ 6g>e6f5ghARB @Hx@y?z{CRD @Hx@y?z{ERF 9Ak9l8mnGRH LG  UH  MI  LJ  JK  LS  TG  LH  KI  IJ  KR  SI  KJ  JK  	LIRJ 4G<a4b3cdKRL @Hu@v?wwx  zA  Bk  zl  ym  mn  ov  wi  oj  nk  	lMRN FgN|F}E~~  AH  Iw  Ax  @y  yz  {B  C{  {|  z}  	~ORP I  RO  JP  IQ  QR  SZ  [X  SY  RZ  	[QRR LG  UL  MM  LN  NO  PW  XO  PP  OQ  QR  SZ  [U  SV  RW  	XSRT :'Bw:x9yzURV ;7Ck;l:mnWRX )7;S3T)U)\Y\(]]^_YRZ .dii@\8].^.ebe-ffgh[R\ 17Ce;f1g1nkn0oopq]R^ 8		'JfBg8h8olo7ppuvzvv  AH  Ik  Al  wm  wt  qt  vu  uv  	w_R` %TYYw7Z/[%\%c`c$ddefaRb ,DIIg>Y6Z,[,b_b+ccdecRd ',/01eRf /tyyAa9b/c.degRh %S1B)C%D$EFiRj GKK(:;<=kRl  (9 :;1=mRn 	oRp 	qRr 	sRt 	-uRv 	wRx  >?CCJOVSVWWXYyRz W;<@@LSPSTTUV{R|  (F G K KL_ ` gdghhnov  xV  pW  p[  p[  \r  ps  pz  wz  o{  {|  	}}R~ &g.L&M&Q&QRp&q&xux%yyz{R@ 9A_9`9d9d  fL  :M  9N  	OARB #499W5S-T-X-XYk-l-rpr#s#zwz"{{|}CRD 08V0W0[0[\t0u/vvwx  A_  y`  yd  yd  e}  y~  x  	@ERF =WEc=d=h=h  jU  >V  =W  	XGRH 5W=[5\5`5`  bD  6E  5F  FG  HO  Pn  Ho  Hs  Hs  tR  HS  GT  	UIRJ 4G<Z4[4_4_`|4}3~~  AH  Ig  Ah  Al  Al  mG  AH  @I  IJ  KR  Sq  Kr  Kv  Kv  wQ  KR  JS  	TKRL 19W1X1\1\  ^B  2C  1D  	EMRN 77HQoIpItIt  v_  J`  Jf  df  8g  7h  hi  	jORP *$))  4w\c  eC  ]D  ]H  ]H  Io  ]p  ]v  tv  4w  +w  +~  {~  *  @  	AQRR *$))  4w\c  eC  ]D  ]H  ]H  Io  ]p  ]v  tv  4w  +w  +~  {~  *  @  	ASRT :'B`:a:e:e  gO  ;P  :Q  	RURV g<=AA(KLANWRX 79:>>vFGHYRZ 	[R\ 	"]R^ 	_R` 	_aRb 	6cREf 45@A 	CLLc*o&eC,>+?uS_DUUY}%&d3/C+D*E F&'tC,?+@D	 	45	LL   /0 
#C(I$JK)#.\*]^1 1c 1#j/" 1$ 1s6{m 14 1EVAW8X8_\_7` 1`d 1eh  jB  fC  eD 1  DG 1/0111415<I1=@1<=>1>A1BO1PS1 CDE1 FG1 HKK{G|F}1 ~A1 =>?	1 @C	1
 FGH1
 IJ1
 KN  OB  KC  JD1
 DE1
 FI  J@  FA  EB1
 BE1 +,-1 .01	

 
LL   {# 
/0/0b bc b#j/" b$ bs6{m b4 bN8K7L bD bQTU`QaPb bbe b
+,b,/b0@AS0T/UbUVbWghvWwVxbxyb {K  Ld  {e  zfb fgb hx  yP  hQ  gRb RUb89:b:=b>ABy>z={b{|b ~A  By  ~z  }{b {|b }@  A{  }|  |}b }@b  
+,b -0b 144\0]/^b _ab	

 
LL./%g.O&P&V&V&XY 5es<.E7345	LL>?%g.\&]&c&c&ef 5es<.E7345	LL   {# 
#j/"$s+P'Q&RRU@AB#<=>cABC3ABC3PQRRSTW  YV  UW  TX  X[KLMSJKLCJKLAc  SJ  OK  NL  LM  NQ  RL  NM  MN  NQHIJ"	N	

 
LL   {# 45 
	Ccgg&>?_377K^C_`J#''"IJycggVxNyzF#CGG,\$]^#F$>.>?LLc*o&eC,>+?uS_DUUY77./0SWW_5M5TQT4U VGG-.5#6d:,c&QT#$C(8'9SWWEZ=[<\\^`
	 
LL   {# <= 	ILLc*o&eIk,B+C4	RbHcGddg-./s9==AR3S3ZWZ2[[_`i`m`mn~`  aG  DG  `H  HL456c)D[:\9]]`789chhy}}UcGdGjhj>k>ror=ssvx	 
LL,-{# tC
O,-.#$V,LLLL"LLij 	CLLc-()s:.?tCDVCWW[\_`t\u[vvyz	 	R 
LL',-	LLD1B)CDD	LL99Ur$   c           #     r   dj                  d | d   D              }g }| d   D ]R  }dj                  d |d   d   D              }|sd}|j                  dt        j                  |d	          d
| d       T dj                  d | d   D              }dj                  g dddddt        j                  | d          dt        j                  | d          ddt        j                  | d          dt        j                  | d          ddt        j                  dj                  | d                dd| d     d!| d"    d#| d$    d%d&| d'    d%d(| d)    d%d*| d+    d%d,| d-    d%d.t        j                  dj                  | d/         xs d0       dd1t        j                  dj                  | d2         xs d0       dd3t        j                  dj                  | d4         xs d0       dd5t        j                  dj                  | d6         xs d0       dt        j                  dj                  | d7         xs d0       dt        j                  dj                  | d8         xs d0       dd9| d:    d%d;t        j                  dj                  | d<         xs d0       dt        j                  dj                  | d=         xs d0       dd>| d?    d%d@t        j                  | dA          ddBt        j                  | dC          dDt        j                  | dE          dFdG| dH    d%dIt        j                  | dJ          ddKt        j                  | dL          ddM| dN    dO| dP    d%dQ| dR    d%dS| dT    d%dU| dV    d%dW| dX    d%dY| dZ    d%d[| d\    d%d]| d^    d%d_| d`    d%da| db    d%dc| dd    d%de| df    dO| dg    dO| dh    d%di| dj    d%dk| dl    dO| dm    dO| dn    d%do| dp    dO| dq    dO| dr    d%ds| dt    dO| du    d%dv| dw    dO| dx    dO| dy    d%dz| d{    d%d|| d}    d%d~t        j                  dj                  | d         xs d0       ddt        j                  dj                  | d         xs d0       ddt        j                  dj                  | d         xs d0       ddt        j                  dj                  | d         xs d0       dt        j                  dj                  | d         xs d0       ddt        j                  dj                  | d         xs d0       ddt        j                  dj                  | d         xs d0       dd| d    ddt        j                  dj                  | d                ddt	        | d          d%d| j                  d       d%dt        j                  | d          dddddt        j                  t        | d   j                  d	      xs d0             dt        j                  t        | d   j                  d      xs d0             ddt        j                  t        | d   j                  d      xs d0             dt        j                  t        | d   j                  d      xs d0             ddt        j                  t        | d   j                  d      xs d0             ddt        j                  dj                  | d   j                  d      xs g       xs d0       dd| d   j                  d       dO| d   j                  d       d%d| d   j                  d       d%d| d   j                  d       dO| d   j                  d       d%d| d   j                  d       dO| d   j                  d       dO| d   j                  d       d%d| d   j                  d       d%dt        j                  t        | d   j                  d      xs i              ddt        j                  dj                  d | d   j                  d      xs g D              xs d0       ddt        j                  dj                  d | d   j                  d      xs g D              xs d0       dd| d   j                  d       d%dt        j                  t        | d   j                  d      xs d             d%ddd| d   D cg c]  }dt        j                  |d	          dt        j                  |d          dt        j                  |d          dt        j                  |d          dt        j                  |d          dt        j                  |d          d|d    dɝ c}ddʑdˑ| d   D cg c]  }dj                  g dt        j                  |d	          dÑt        j                  t        |d                dőt        j                  dj                  |d2         xs d0       dÑ|d     dΑ|d$    dΑt        j                  t        |d                dΑ|dm    dΑt        j                  t        |d                dΑ|d`    dO|db    dΑ|dd    dΑ|df    dO|dg    dO|dh    dΑ|d    dɑ       c}ddґdӑ| d   D cg c]l  }dt        j                  |d	          d|dj    d|dl    d|dm    d|dp    d|dq    d|dt    dO|du    d|dr    d|d    d|dw    dO|dx    dO|dy    d|d{    dɝn c}ddՑd֑| d   D cg c]  }|d   D ]  }dt        j                  |d	          dt        j                  |d          dt        j                  |d          dt        j                  t        |j                  dث                   dt        j                  t        |j                  d٫      xs d0             dt        j                  t        |j                  dګ      xs d0             dt        |j                  d۫      xs |j                  dܫ             dt        |j                  dݫ      xs |j                  dޫ             dt        |j                  d߫             dt        |j                  dݫ      xs$ |j                  dޫ      xs |j                  d߫             d|j                  d       dɝ  c}}ddd| d   D cg c]   }|d   D ]  }dt        j                  |d	          dt        j                  |d          d|d    d|d    dt        j                  t        |j                  d      xs d0             dt        j                  t        |j                  d      xs d0             d|d    d|d    d|d    dt        j                  dj                  |j                  d      xs g       xs d0       d  c}}ddt        j                  | d          ddd|dddt        | d   j                               D 	cg c]!  \  }}	dt        j                  |       d|	 d%# c}	}dddt        | d   j                               D 	cg c]!  \  }}	dt        j                  |       d|	 d%# c}	}dd|dd| d      S c c}w c c}w c c}w c c}}w c c}}w c c}	}w c c}	}w )Nr  c           
   3    K   | ]  }d j                  g dt        j                  |d          dt        j                  t        |d                dt        j                  |d          d|d    d|d	   d
    d|d	   d    d|d	   d    d|d	   d    d|d	   d    d|d    d|d    d|d    d|d    d|d   d
    d|d    d        yw)r  <tr><td><code>r   </code></td><td>r   </td><td><code>r)  r*  	</td><td>r'  r-  r/  r  r1  rl  r3  rA  rK  rL  rM  r(  rN  
</td></tr>N)r$  htmlescaperX  r   s     r"   r   zhtml_page.<locals>.<genexpr>  sc      	 	 	 	[[Z12	3	{{3s6{+,-	.	 [[^!456	7	 ; 		!		
 #$Z01	
2	 #$%789	 :;	 <??O;PQ_;`:a	 bc	 dggwcx  zR  dS  cT	 TU	 VY  Zj  Vk  lC  VD  UE	E	 89:	;	 JKL	 MN	 OR  SJ  OK  NL	 LM	 NQ  RL  NM  MN	N	 #$Z01	2	 ;<=	>	 	s   C)C+r#  c              3     K   | ]k  }d t        j                  |d          dt        j                  |d          dt        j                  |d          dt        j                  |d          d	 m y	w)
r  r   </code></td><td><code>r   r  r]  r  r^  </code></td></tr>Nr  r  r  s     r"   r   zhtml_page.<locals>.<genexpr>  s      
 S%789 :S_56 7;;s=123 4S)=%>?@ A	
s   A1A3r'  r   z"<tr><td colspan="4">none</td></tr>z<h3>r   zq</h3><table><thead><tr><th>source</th><th>value</th><th>target label</th><th>source role</th></tr></thead><tbody>z</tbody></table>r  c              3  N   K   | ]  }d t        j                  |       d  yw)z<li></li>Nr  r  s     r"   r   zhtml_page.<locals>.<genexpr>  s#     \tDKK-.e4\s   #%rT  zV<!doctype html><meta charset="utf-8"><title>Save Selector Target Alias Bridges</title>z<style>body{font-family:system-ui,sans-serif;background:#111;color:#eee;max-width:1200px;margin:24px auto}table{border-collapse:collapse;width:100%;margin:12px 0}td,th{border:1px solid #444;padding:6px 8px;vertical-align:top}code{color:#9bd4ff}</style>z+<h1>Save Selector Target Alias Bridges</h1>z<ul>z<li>route: <code>r  z</code> -&gt; <code>r  z</code></li>z!<li>current selector/root: <code>r   z</code> / <code>r!  z<li>target aliases: <code>r!  r   z<li>alias -&gt; current hits: r,  z
 metadata r.  z data r0  r  z.<li>alias -&gt; current promoting exact hits: rD  z-<li>alias -&gt; current promoting data hits: r2  z1<li>alias -&gt; current promoting metadata hits: r4  z,<li>promoting exact hits are metadata-only: rE  z+<li>promoting metadata source roles: <code>rG  r#  z<li>public samples: <code>r+  z"<li>public-covered aliases: <code>r   z?<li>public-covered forward/data/after-fill-data aliases: <code>r&  r(  r*  z%<li>forward-hit public sample count: r,  z1<li>address-adjacent forward/data aliases: <code>r-  r.  z(<li>forward hits address-adjacent only: r0  z.<li>public forward-hit coverage status: <code>r1  z,<li>target-alias execution exclusion: <code>r2  z	</code> (r3  z)</li>z+<li>address-adjacent package prefix found: r5  z+<li>address-adjacent package status: <code>r6  z;<li>address-adjacent package current-root ref class: <code>r9  z><li>address-adjacent package resources include source/target: r:  r  r;  z9<li>address-adjacent package current-root resource refs: r<  zB<li>address-adjacent package scene records use package resources: r=  z0<li>address-adjacent package route proof found: r7  z2<li>alias -&gt; current reader/scene-record hits: r5  z)<li>alias -&gt; current leaf-table hits: r9  z4<li>alias -&gt; current leaf-table route-pair hits: r:  z0<li>alias -&gt; current leaf-table reader hits: r  z:<li>alias -&gt; current leaf-table corrected reader hits: r;  z:<li>alias -&gt; current leaf-table effective reader hits: r<  z3<li>alias -&gt; current pre-writer unique targets: r=  zC<li>pre-writer traces hitting current writer/reader/scene records: r>  r?  r@  z.<li>alias -&gt; current after last fill hits: rA  z7<li>after last fill metadata/data/promoting-data hits: rB  rC  r  z=<li>after last fill pre-writer/leaf-table/reader-scene hits: rE  rF  rI  z@<li>after last fill leaf-table corrected/effective reader hits: rG  rH  zC<li>after-fill traces hitting current writer/reader/scene records: rK  rL  rM  z1<li>after last fill execution-like bridge found: rO  z5<li>execution-like alias -&gt; current bridge found: rN  z%<li>aliases with forward hits: <code>r>  z*<li>aliases with forward data hits: <code>r?  z-<li>aliases with after-fill data hits: <code>rA  z4<li>dominant forward/after-fill data aliases: <code>rB  rC  z!<li>metadata-only aliases: <code>rJ  z(<li>aliases without forward hits: <code>rK  z<li>proof found: <code>rL  z,<li>failed target-alias bridge gates: <code>r  rO  z<li>missing evidence count: rP  z<li>evidence refs: rR  z<li>promotion status: <code>rS  z</ul>z(<h2>Address-Adjacent Package Prefix</h2>z<li>selector/range: <code>r4  r   z<li>current-root ref: <code>r   r   z"<li>current-root ref class: <code>r   z<li>following resources: <code>r   z'<li>contains source/target field maps: r   r   z4<li>current equals address-predecessor plus source: r   z,<li>tail current-root range/exact pointers: r   r   z+<li>tail reader/source/target record refs: r  r  r  z(<li>current-root package resource refs: r   z3<li>current-root package resource ref roles: <code>r   z&<li>source scene resource refs: <code>c              3  @   K   | ]  }|j                  d d        ywr  r:   r   s     r"   r   zhtml_page.<locals>.<genexpr>  %       GJhksww~_bGc  GJr  r   z&<li>target scene resource refs: <code>c              3  @   K   | ]  }|j                  d d        ywr  r:   r   s     r"   r   zhtml_page.<locals>.<genexpr>  r  r  r   z1<li>current scene records use package resources: r   z
<li>note: r  z<h2>Promoting Exact Hits</h2>z<table><thead><tr><th>selector</th><th>source</th><th>value</th><th>target label</th><th>source role</th><th>target class</th><th>metadata</th></tr></thead><tbody>r  r  r  r   r   r  r]  r  r^  r   r_  r  z<h2>Alias Bridge Summary</h2>a"  <table><thead><tr><th>selector</th><th>role</th><th>public samples</th><th>hits</th><th>data</th><th>classes</th><th>after-fill data</th><th>after-fill classes</th><th>leaf corrected/effective</th><th>pre-writer targets</th><th>trace W/R/S</th><th>current-&gt;alias</th></tr></thead><tbody>r$  r   r  r7  rD  rP  z <h2>After Last Fill Summary</h2>a  <table><thead><tr><th>selector</th><th>tail hits</th><th>metadata</th><th>data</th><th>pre-writer</th><th>leaf-table</th><th>corrected/effective leaf reader</th><th>reader/scene</th><th>unique trace targets</th><th>trace W/R/S</th><th>execution-like</th></tr></thead><tbody>rJ  z<h2>Leaf-Table Hits</h2>z<table><thead><tr><th>selector</th><th>source</th><th>entry</th><th>index</th><th>descriptor</th><th>child</th><th>route pair</th><th>raw reader</th><th>corrected reader</th><th>effective reader</th><th>frontier leaf</th></tr></thead><tbody>r  r  r  r  r  r  r  r  r  r  z!<h2>Pre-Writer Trace Targets</h2>z<table><thead><tr><th>selector</th><th>target</th><th>hits</th><th>steps</th><th>stop</th><th>writer</th><th>reader</th><th>scene record</th><th>first opcodes</th></tr></thead><tbody>r  r   r   r   r   z	 @ <code>r   r   r   r   r   r  z<p>rU  z</p>z<h2>Alias Rows</h2>a  <table><thead><tr><th>selector</th><th>role</th><th>root range</th><th>fills</th><th>alias-&gt;current</th><th>metadata/data/promoting/promoting-data</th><th>after last fill hits</th><th>after-fill traces W/R/S</th><th>current-&gt;alias</th><th>execution-like</th></tr></thead><tbody>z<h2>Target Classes</h2>z
<li><code>z	</code>: z'<h2>After Last Fill Target Classes</h2>z<h2>Forward Hits</h2>z<h2>Remaining Proofs</h2>)r$  r   r  r  rH   r;   rX  r%  r	  rD   r   )
r  r  forward_sectionsr<   hit_rowsproofsr   r  r   r   s
             r"   	html_pager    s,     ;' J {# 
99 
 +,V4
 
 =H4;;s:/0 1{j(*	

" WW\IZA[\\F99 |b| 	G| 	6| 		|
 DKK(9:;;OPTP[P[\cdl\mPnOoo{|| ,DKK@Q8R,S+TTdeiepepqx  zJ  rK  fL  eM  MY  	Z| %T[[7CY;Z1[%\$]]ij| )1I)J(K:V]^~V  VA  AG  HO  Pl  Hm  Gn  ns  	t| 9Ag9h8iino| 8@e8f7gglm| <GDm<n;ootu| 7w?i7j6kkpq| 6dkk$))G  UA  MB  CC  CJ  GJ  7K  6L  LX  	Y| %T[[7CT;U1V1]Z]%^$__kl| -T[[7KhCi9j9qnq-r,ss  	A|  J$++VZV_V_`g  iK  aL  WM  WT  QT  KU  JV  Vf  gk  gr  gr  sw  s|  s|  }D  Eh  }i  sj  sq  nq  gr  fs  sC  DH  DO  DO  PT  PY  PY  Za  bK  ZL  PM  PT  QT  DU  CV  Vb  	c!|" 08U0V/WW\]#|$ <DKK		RYZ~R  IA  IH  EH  =I  <J  JZ  [_  [f  [f  gk  gp  gp  qx  y^  q_  g`  gg  dg  [h  Zi  iu  	v%|& 37;[3\2]]bc'|( 9WMmEn9o8pp|})|* 7t{{7KpCq7r6ss|  ~B  ~I  ~I  JQ  Rw  Jx  ~y  }z  z@  	A+|, 6g>a6b5cchi-|. 6dkk'JhBi6j5kkwx/|0 FdkkRY  [O  SP  GQ  FR  R^  	_1|2 I  RC  JD  IE  EF  GN  O@  GA  FB  BG  	H3|4 DGL  EA  DB  BG  	H5|6 MW  VT  NU  MV  V[  	\7|8 ;7Cj;k:llqr9|: =WEp=q<rrwx;|< 4G<]4^3__de=|> ?wGq?r>ssxy?|@ ;7Cj;k:llqrA|B EWM}E~D  @E  	FC|D EWM}E~D  @E  	FE|F >gFp>q=rrwxG|H Ng  WJ  OK  NL  LM  NU  VI  NJ  MK  KL  MT  UK  ML  LM  MR  	SI|J 9Af9g8hhmnK|L B'JwBxAyyz  |C  Dm  |n  {o  op  qx  yk  ql  pm  mr  	sM|N HP~H  HA  AB  CJ  Ky  Cz  B{  {|  }D  E}  }~  |  D  	EO|P K7  TQ  LR  KS  ST  U\  ]Z  U[  T\  \a  	bQ|R Ng  WN  OO  NP  PQ  RY  ZQ  RR  QS  ST  U\  ]W  UX  TY  Y^  	_S|T <GDy<z;{  |A  	BU|V @Hp@q?rrwxW|X 0DIIgNfFg<h<olo0p/qq}~Y|Z 5T[[7SoKpAqAxux5y4z  {G  	H[|\ 8DIIgVxNyDz  EB  B  9C  8D  DP  	Q]|^ ?t{{499U\]yUzK{  LC  @C  @D  ?E  EU  VZ  Va  Va  bf  bk  bk  ls  tV  lW  bX  b_  \_  V`  Ua  am  	n_|` ,DKK		'JmBn8o8vsv,w+x  yE  	Fa|b 34;;tyyQlIm?n?uru3v2w  xD  	Ec|d "',"7!8Ee|f 7t{{388GTtLuCv7w6x  yE  	Fg|h 's73D+E'F&GuMi|j gkk*<=>eDk|l 't{{7;L3M'N&O|\m|n 	o|p 	3q|r 	s|t %T[[W=[5\5`5`ak5l5sps1t%u$v  wG  HL  HS  HS  TW  X_  `~  X  XC  XC  DN  XO  XV  SV  TW  HX  GY  Ye  	fu|v 't{{3w?]7^7b7bcv7w7~{~3  (A  'B  BV  W[  Wb  Wb  cf  gn  oM  gN  gR  gR  Si  gj  gq  nq  cr  Ws  Vt  t@  	Aw|x -T[[WEc=d=h=h  jH  >I  >P  MP  :Q  .R  -S  S_  	`y|z *$++diiHf@g@k@kl~@  AF  DF  7G  7N  KN  +O  *P  P\  	]{|| 2':X2Y2]2]^v2w1xxy  {B  Ca  {b  {f  {f  g  {@  zA  AF  	G}|~ ?wGe?f?j?j  lW  @X  ?Y  Y^  	_|@ 7w?]7^7b7b  dF  8G  7H  HI  JQ  Rp  Jq  Ju  Ju  vT  JU  IV  V[  	\A|B 6g>\6]6a6ab~6  6A  AB  CJ  Ki  Cj  Cn  Cn  oI  CJ  BK  KL  MT  Us  Mt  Mx  Mx  yS  MT  LU  UZ  	[C|D 37;Y3Z3^3^  `D  4E  3F  FK  	LE|F >dkkJ[\c  eC  ]D  ]H  ]H  Ir  ]s  ]y  wy  Kz  ?{  >|  |H  	IG|H 1TYY  GJov  xV  pW  p[  p[  \B  pC  pI  GI  GJ  >J  >Q  NQ  2R  1S  S_  	`I|J 1TYY  GJov  xV  pW  p[  p[  \B  pC  pI  GI  GJ  >J  >Q  NQ  2R  1S  S_  	`K|L <GDb<c<g<g  iQ  =R  <S  SX  	YM|N T[[W-K%L%P%PQW%X%^\^!_`aafgO|P 	Q|R 	(S|T 	nU|j DE

 S_56 7S%789 :S_56 7;;s=123 4S)=%>?@ AS%789 :~&' (

W|n 	o|p 	(q|r 	ms|R 78

    S_567;;s3v;/012 SXXc2C.D%E%LMNO /01	2	
 345
6 ;;05V1WXYZ[ @ABC ;;05c1defgh GHI JK LOO  LA  KBB ABCD JKL MN OR  SF  OG  NH HI JM  ND  JE  IFF /012

u|V 	W|X 	+Y|Z 	][|x {+

 S_56 7<=> ?DEF G@AB CEFG HEFG HTUVVWX[  ]Z  Y[  X\ \OPQ RNOP QNOPPQRU  WN  SO  RP  PQ  RU  VP  RQ  QR RLMN O

]|| 	}|~ 	#|@ 	|A|^ {+

 

 89

 S_56 7S%789 :S_56 7;;s377+>#?@AB CS)A)HS%IJK LS1B)C)Js%KLM N 89YSWWEX=YZ[ \ GHwCGGTvLwxy z PQRS T GH  uCGGTvLw  u{~  |C  |C  Dt  |u  v  w w77012 3



C|d 	e|f 	,g|h 	Bi|B {+

 

  !@A

 S_56 7Y{%;<= >-./ 0-./ 0;;s9==1B#C#JsKLMYW[WbWbcfgpgtgt  vF  hG  hN  KN  dO  XP  WQ Q456 7456 7789 :SXXimmN.K.Qr%R%YVYZ[ \





k|H 	I|J dkk',/016K|L 	M|N 	gO|P 	Q|R 	S|T 	"U|V 	W|\ (.g6W.X.^.^.`'a

#e \239UG5I

Y|` 	a|b 	2c|d 	e|j (.g6d.e.k.k.m'n

#e \239UG5I

g|n 	o|p 	 q|r 
s|t 	$u|v vhew| | |V



(

&

(

.



s/   9B&~
/D!~
 A1~
"F?~!3D~'&~-&~3c                    |j                  dd       |dz  j                  t        j                  | dd      dz   d	       |d
z  j                  t	        |       d	       y )NT)parentsexist_okz'save_selector_target_alias_bridges.jsonF   )ensure_asciiindentr  r+   r,   'save_selector_target_alias_bridges.html)mkdir
write_textr/   dumpsr  )r  out_dirs     r"   write_outputsr    se    MM$M.88DD

7q9D@ E  88DDYwEWbiDjr$   c                 x   t        j                  t              } | j                  dt        t
               | j                  dt        t        dz         | j                  dt        t        dz         | j                  dt        t        d	z         | j                  d
t        t        dz         | j                  dt        t        dz         | j                  dt        t               | j                         }t        |j                  j                         t        |j                  g       t        |j                  i       t        |j                  i       t        |j                  i       t        |j                   i             }t#        ||j$                         t'        d|j$                  dz          y )N)descriptionz--exe)typer  z--selectorsr  z--mapset-aliasesr  z--secondary-fill-rootsr  z--leaf-index-spacer  z--address-predecessor-contextr  z	--out-dirzwrote target alias bridges -> r  )argparseArgumentParser__doc__add_argumentr   EXErV  
parse_argsr  rO   
read_bytesr3   r@   r  rW   r[   r  r  r  print)parserargsr  s      r"   mainr    ss   $$9F
dC8
D#@[:[\
*sEh?hi
0tSKtEtu
,4GlAlm
7dC  SC  MC  D
$<D$.."%$%%r*$++R0$'',$22B7G '4<<(	*4<<:c+c*d
efr$   __main__)r!   r6   returnrX  )r'   r6   r(   
int | Noner  rX  )r   r   r2   r   r  r   )r!   z
str | Noner  r  )r<   r
  r  rX  )r@   
list[dict]rA   rX  r  r
  )r@   r  r  z	list[int])r@   r  rI   r6   r  ztuple[int, int | None])rO   bytesrP   r  rQ   r6   r  r  )rV   rX  rW   r
  r  r
  )r[   dict | Noner  zdict[str, dict])rb   r6   rc   r
  rd   r
  r  rX  )
r!   r6   rl   r6   rm   r  rn   dict[int, str]r  rX  )ru   rX  r  r	  )r!   r6   r   rX  r   r	  r  rX  )r   r6   r   rX  r   r	  r  rX  )r   r  rQ   r6   r  r	  )0   )rO   r  rP   r  r   r  r   r  r   r6   r  r  )r   r  r  dict[str, int])r   r6   r  rX  )rO   r  rP   r  r   r6   r   r  r   r  r  r  )rO   r  rP   r  r   r6   r   r  r  r  r  r
  )r   r  r  rX  )r<   r
  r  r
  )r   r
  rU  r  r  r	  )rO   r  rP   r  rn  r6   ro  r  rp  r6   rm   r  rn   r  r  r
  r  )rO   r  rP   r  r@   r  r  r
  rW   r
  r[   r  r  r  )NNNNN)rO   r  r@   zlist[dict] | Noner  r  rW   r  r[   r  r  r  r  r
  )r  r
  r  rX  )r  r
  r  r   r  None)r  r  )Pr  
__future__r   r  r  r/   rM   syspathlibr   typingr   r   insertrX  __file__resolveparentprobe_exe_scene_tablesr   r   r   %summarize_save_selector_stream_tracesr	   r  ROOTrV  r  rZ  r[  r  r  r~   r   r   r   CURRENT_LEAF_STARTr   r   r   r   r\  r]  r^  r   r   r  r#   r)   r3   r7   r=   rB   rE   rJ   rS   rX   r\   ri   ro   rv   r   r   r   r   r   r   r   r  r%  rS  rV  rx  r  r  r  r  r  r  __name__r   r$   r"   <module>r     s   U "     
   3tH~--/667 8 P P > H~''*
Ul
]		 & % # "  " " ) ' #( $ 
 0F
 8)+HI
 >\
 :N+% !4 #1 "0 !. G8-324 "(4& '	'' ' 	'
 ' 'T	  	
  8b	bb b 	b
 "-b 
bJNM`:  )H	HH H 	H
 H H "H 
Hb %)s	ss s 	s
 s "s sp $("&(,$(/3Y	Y Y  Y &	Y
 "Y "-Y 
YxNb_D 25 kg, zF r$   