
    7,JjW                   \   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mZ ddl	m
Z
 ddlmZ  ee      j                         j                  d   Zedz  Zd	Zd
Zdg dddg dddg dddg dddg dddg dddg dddg dddg dddg ddg
Zd d!d"d#d$d%Zd<d&Zd=d'Zd>d(Zd?d)Zd@d*ZdAd+Z	 	 	 	 	 	 	 	 	 	 dBd,ZdCd-ZdDd.Z	 	 	 	 	 	 	 	 	 	 dEd/ZdFd0Z dGd1Z!dHd2Z"dId3Z#dFd4Z$dId5Z%	 	 	 dJ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dKd6Z&dLd7Z'dLd8Z(efdMd9Z)dNd:Z*e+d;k(  r e*        yy)OzFConsolidate route-pair leaf-entry execution evidence for selector 2:0.    )annotationsN)Path)Any)read_sections   outmap1_01amap2_02dz'out/save_selector_leaf_index_space.json)routeRelevantRows!routePairCurrentDescriptorIndices(routePairCorrectedTraceDescriptorIndicesreaderBearingNegativeIndices*frontierReaderSelectableByNonNegativeIndex2frontierReaderReachableByCorrectedNonNegativeIndex)pathfieldsz0out/save_selector_leaf_table_global_context.json)selectorTableCountfieldEntryRowCountcurrentSelectorRoutePairIndicescurrentFrontierLeafOnlyNegativez2out/save_selector_opcode08_activation_windows.json))sourceOrPredecessorOpcode08ActivatorCount+sourceOrPredecessorCurrentRootProducerCount,sourceOrPredecessorCurrentRangeProducerCount(currentInternalCurrentRangeProducerCountcontextWindowsz0out/save_selector_opcode07_indexed_pointers.json)opcode07IndexModerowCount selectedLeafTableWindowSlotCount"selectedNegativeRootEntrySlotCount!selectedCurrentRootEntrySlotCountselectedWrapperEntrySlotCountdirectFrontierTargetCountz2out/save_selector_opcode09_pointer_collisions.json)#sourceOrPredecessorOpcode09RowCount,sourceOrPredecessorSupportedOpcode09RowCount2sourceOrPredecessorUnsupportedModeOpcode09RowCount)sourceOrPredecessorCurrentRangeStoreCountrowsz1out/save_selector_wrapper_descriptor_context.json)wrapperEntryHexwrapperDescriptorHexwrapperChildPointerHexwrapperRefBeforeCurrentRootwrapperEntryRefswrapperEntryPromotingRefCountz2out/save_selector_selected_root_execution_gap.json)selectedRootExecutionRefFoundcurrentRootHexselectedPointerGlobalHexruntimeProbeGatediagnosticExclusionGateevidenceRefsevidenceRefCountz2out/save_selector_current_root_frontier_paths.json)strictHotspotFoundfrontierClusterClassfrontierClusterEventCountfrontierClusterSelectorRefCountz2out/save_selector_route_pair_index_source_gap.json)routeEntryIndicesentryPointerRefCountentryPointerTextRefCountentryPointerPromotingRefCount)encodedEntryAnchorRawScalarCandidateCount)encodedEntryAnchorPromotingCandidateCounthigherLevelIndexSourceProvenz)out/save_selector_leaf_table_context.json)selectorrootHexrootTablePointerHextableWindowHexfrontierLeafHexfrontierReaderHexzEselected-root execution reaches selector 2:0 on the normal route pathzJhigher-level selector/table index source selects route-pair entries 6 or 8zJsource/predecessor opcode 0x08 or 0x09 producer for the current root/rangezCwrapper entry -12 executes into 0x00542ae8 on the normal route pathz?strict map1_01a source coordinate or hotspot linked to map2_02d)selected-root-executionroute-pair-index-source#source-predecessor-current-producerwrapper-entry-executionstrict-hotspotc                p    | j                         s|S t        j                  | j                  d            S )Nutf-8encoding)existsjsonloads	read_text)r   fallbacks     S/home/exedev/hwanse/tools/summarize_save_selector_route_pair_entry_execution_gap.py	load_jsonrU      s*    ;;=::dnngn677    c                B    dj                  d | xs g D              xs dS )N,c              3  2   K   | ]  }t        |        y wN)str).0values     rT   	<genexpr>zcsv.<locals>.<genexpr>   s     95CJ9   -)join)valuess    rT   csvrc      s     889FLb99@S@rV   c                     | sy t        | d      S )N   )intr]   s    rT   	parse_hexrh      s    ub>rV   c                0    t        | t              sy d| dS )N0x08x)
isinstancerf   rg   s    rT   hex32rm      s    eS!c{rV   c                N    | D ]   }|d   }||d   z   }||cxk  r	|k  s|c S  " y )Nrawraw_size )sectionsoffsetsectionstartends        rT   section_for_offsetrw      sE     gj))F S N !
 rV   c                &   t        |t              sg S t        j                  d|      }g }d}	 | j	                  ||      }|dk  r	 |S |dz   }t        ||      }|/|j                  |d   t        |d   |z   |d   z
        t        |      d       e)N<Ir   r   namevaro   rt   refVaHexvalueHex)rl   rf   structpackfindrw   appendrm   )exerr   r]   needlerefssearchhitrt   s           rT   refs_to_valuer      s    eS!	[[u%FDF
hhvv&7 K q$Xs3?vgdmc1GENBCe
 	 rV   c           	     j   t        |t              rt        |t              sg S g }|D ]  }|d   }| |||d   z    }t        dt        |      dz
  d      D ][  }t	        j
                  d||      d   }	||	cxk  r|k  s)n ,|j                  |d   t        |d   |z         t        |	      d	       ]  |S )
Nro   rp   r         ry   rz   r{   r|   )rl   rf   rangelenr   unpack_fromr   rm   )
r   rr   start_vaend_var   rt   	raw_startro   indexr]   s
             rT   aligned_refs_to_ranger      s     h$Jvs,C	D 
EN	)i'**==>1c#hlA. 	E&&tS%8;E5*F*&v %gdme&; < %e 	
 KrV   c                    i }| D ]/  }|j                  d      xs d}|j                  |d      dz   ||<   1 t        t        |j                                     S )Nrt   r`   r   r   )getdictsorteditems)r   countsrefrt   s       rT   section_countsr      sZ    F 5'')$+ **Wa014w5 v||~&''rV   c                f    | rd| vry| j                  dd      \  }}t        |      t        |      fS )Nz..)NNr   )splitrh   )textru   rv   s      rT   parse_table_windowr      s7    4t#D!$JE3UYs^++rV   c           
     j   | xs i } t         dz  }|j                         sd| j                  d      dS |j                         }t	        |      }t        | j                  d            \  }}t        ||||      }	|D 
cg c]-  }
|
j                  d      rt        |
j                  d            / }}
|D 
cg c]-  }
|
j                  d      rt        |
j                  d            / }}
|D 
cg c]-  }
|
j                  d      rt        |
j                  d            / }}
| j                  d      }t        |      }t        |      }t        | j                  d            }d	|fgt        |      D cg c]  \  }}d
| |f c}}t        |      D cg c]  \  }}d| |f c}}}g t        |      D cg c]  \  }}d| |f c}}d|fd|f}g }|D ]U  \  }}t        |||      }|j                  |t        |      t        |      t        d |D              t        |      |d       W g }|D ]U  \  }}t        |||      }|j                  |t        |      t        |      t        d |D              t        |      |d       W t        d |D              }t        d |D              }t        d |D              }t        d |D              }i d|	rt        d |	D              sdndd| j                  d      dt        |	      dt        d |	D              dt        |	      d|dt        d  |D              d!|d"|d#|d$t        d% |D              d&t        d' |D              d(t        d) |D              d*|d+|d,|	S c c}
w c c}
w c c}
w c c}}w c c}}w c c}}w )-NzHwanse2.exezmissing-exerC   )statusrC   
entryVaHexdescriptorHexrD   rB   rootTablePointer
routeEntrynegativeReaderEntry	routeLeaffrontierLeaffrontierReaderc              3  J   K   | ]  }|j                  d       dk(  sd  ywrt   .textr   Nr   r\   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>#        ScSWWY5G75RS   ##)rz   r~   refCounttextRefCountsectionCountsr   c              3  J   K   | ]  }|j                  d       dk(  sd  ywr   r   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>.  r   r   c              3  P   K   | ]  }|d    j                  d      s|d      yw)rz   r   r   N
startswithr\   rows     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>2  s*     xSVW]S^SiSijvSwN 3x   &
&c              3  P   K   | ]  }|d    j                  d      s|d      yw)rz   r   r   Nr   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>3  s(     sssSY{OeOefqOrs>2sr   c              3  8   K   | ]  }|d    dk(  s|d     yw)rz   r   r   Nrq   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>4  s$     !p#RUV\R]aoRo#n"5!p   
c              3  8   K   | ]  }|d    dk(  s|d     yw)rz   r   r   Nrq   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>5  s$     #tCTWX^T_csTsC$7#tr   r   c              3  D   K   | ]  }|j                  d       dk(    yw)rt   r   Nr   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>8  s     !VC#'')"4"?!Vs    zdata-only-no-text-refopentableWindowRefCounttableWindowTextRefCountc              3  J   K   | ]  }|j                  d       dk(  sd  ywr   r   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr><  s!     &`S#'')BTX_B_q&`r   tableWindowSectionCountsrouteEntryAddressTextRefCount&negativeReaderEntryAddressTextRefCountc              3  P   K   | ]  }|d    j                  d      s|d      yw)rz   r   r   Nr   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>?  s,      6
$'s6{?U?UVk?lC6
r   routeLeafValueTextRefCountfrontierLeafValueTextRefCountfrontierReaderValueTextRefCountrouteLeafValueRefCountc              3  P   K   | ]  }|d    j                  d      s|d      yw)rz   r   r   Nr   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>E  s)     %v#RUV\R]RhRhitRuc*o%vr   frontierLeafValueRefCountc              3  8   K   | ]  }|d    dk(  s|d     yw)rz   r   r   Nrq   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>F  s#     (sSUXY_U`drUrZ(sr   frontierReaderValueRefCountc              3  8   K   | ]  }|d    dk(  s|d     yw)rz   r   r   Nrq   r   s     rT   r^   z0root_table_direct_ref_context.<locals>.<genexpr>G  s#     *wsWZ[aWbfvWv3z?*wr   keyAddressRowskeyLeafRowstableWindowRefs)ROOTrO   r   
read_bytesr   r   r   rh   	enumerater   r   rm   r   sumr   any)leaf_table_contextroute_pair_rowsnegative_reader_rowsfrontier_reader_hexexe_pathr   rr   table_start	table_end
table_refsr   route_entry_addressesnegative_entry_addressesroute_leaf_addressesfrontier_leaf_hexfrontier_leaffrontier_readerroot_table_pointerr   r]   key_addresseskey_leaf_valueskey_address_rowsrz   r   key_leaf_rowsroute_entry_text_refsroute_leaf_text_refsfrontier_leaf_text_refsfrontier_reader_text_refss                                 rT   root_table_direct_ref_contextr      s    ,1rm#H??#0445EF
 	
 


CS!H/0B0F0FGW0XYK&sHk9MJ #77<  	#'','(  ( 77<  	#'','(    #77?# 	#''/*+ 
 +../@A/0M 34O"#5#9#9:O#PQ	/0<EF[<\	]LE5Zw
'	] FOOgEh	i\UE (%
0	iM
;DEY;Z	[<5%Yug
&	[	' 
?+O
 $ 	eS(E2eD	STSS+D1!
 		 M& 	eS(E2eD	STSS+D1
 		  x?Oxxsmss!!p!pp ##t=#t tc!V:!VV * 	,001AB	
 	s: 	"3&`J&`#` 	#N:$> 	()> 	1# 6
+;6
 3
 	%&: 	()@ 	*+D 	!#%v%v"v  	$S(sM(s%s!" 	&s*wm*w'w#$ 	*%& 	}'( 	:) o
 
 
^	i 
\s$   >2N62N.2N5N#N)=N/c                    | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      xs g | j                  d      xs g | j                  d      xs g | j                  d	      | j                  d
      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      dS )NrootRelativeIndexr   insideCurrentRootEntryRunr   childPointerHexdescriptorFieldMapsdescriptorNestedFieldMapschildFieldMapsdescriptorHasRoutePairchildHasRoutePair%descriptorTraceContainsFrontierReader childTraceContainsFrontierReader.correctedDescriptorTraceContainsFrontierReader%correctedDescriptorFrontierReaderStep.effectiveDescriptorTraceContainsFrontierReader)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s    rT   compact_leaf_rowr   N  s     WW%89ggl+%(WW-H%I177#45"ww'<=C%(WW-H%I%OR''"239r"%''*B"C WW%89149`1a,/GG4V,W:=''<;
 259`1a:=''<;
# rV   c                   | j                  d      xs i }| j                  d      xs i }i d|j                  d      d|j                  d      xs g d|j                  d      d|j                  d      xs g d|j                  d      d|j                  d      d	|j                  d	      xs g d
|j                  d
      d|j                  d      d|j                  d      xs g d|j                  d      d|j                  d      d|j                  d      xs g d|j                  d      d|j                  d      d|j                  d      d|j                  d      S )Nr1   r2   pollSampleCountpollObservedSelectorsrouteWatchPollSampleCountrouteWatchPollObservedSelectorsrouteWatchPollValues(predecessorDirectionSweepPollSampleCount.predecessorDirectionSweepPollObservedSelectors1predecessorDirectionSweepPollReachedRouteSelector4predecessorLeftOverrunActivationSweepPollSampleCount:predecessorLeftOverrunActivationSweepPollObservedSelectors=predecessorLeftOverrunActivationSweepPollReachedRouteSelector&patchedPublicSelector20PollSampleCount8patchedPublicSelector20InputPathCaseAliasPollSampleCount,patchedPublicSelector20PollObservedSelectors>patchedPublicSelector20InputPathCaseAliasPollObservedSelectors-constructedDiagnosticPollReachedRouteSelector0diagnosticExcludedFromSelectedRootExecutionProof&excludedFromSelectedRootExecutionProofdiagnosticFollowupSelectorfollowupSelectordiagnosticBridgeExecutionLike&aliasToCurrentExecutionLikeBridgeFoundr   )selected_root_execution_gapruntime_gatediagnostic_gates      rT   selected_root_runtime_summaryr  f  s   .223EFL"L1556OPVTVO)<++,=>)!1!12I!J!Pb) 	$\%5%56Q%R) 	*<+;+;<]+^+dbd	)
 	 0 01G H) 	3L4D4D65
) 	9,:J:J<;
 ; ) 	<\=M=M?>
)  	?@P@PBA
!)& 	ElFVFVHG
 G -). 	HIYIYKJ
/)4 	1,2B2BF3
5): 	78H8HL9
 9 A)B 	89I9I;:
C)H 	;O<O<O4=
I)N 	%o&9&9:L&MO)P 	()<)<=e)fQ) )rV   c                H   | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d	      | j                  d
      d
S )Nr@   rolerangeHexactivationCountnearestCurrentRootProducerCount nearestCurrentRangeProducerCountnearestOwnRangeProducerCount nearestScriptScalarProducerCountnearestUnreadableProducerCountnearestNoLocalProducerCount)
r@   r  r  r  r   r!  r"  r#  r$  r%  r   )contexts    rT   compact_opcode08_contextr'    s    KK
+F#KK
+";;'89+2;;7X+Y,3KK8Z,[(/4R(S,3KK8Z,[*1++6V*W'.{{3P'Q rV   c                    | j                  d       d| j                  d       d| j                  d       d| j                  d       d| j                  d	       d
| j                  d       d| j                  d       S )Nr@   z:op8=r  z,currentRootRange=r   /r!  z,own=r"  z,script=r#  z,unreadable=r$  r   r   s    rT   opcode08_context_summaryr*    s    77:
uSWW->%?$@ AGG$EFGq7756
7 8ww567 8''<=> ?gg>?@	BrV   c                H   | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d      | j                  d	      | j                  d
      d
S )Nr@   vaHexr~   valueSectionmodeHexstoredPointerSourcemodeSupportedByHandler"unsupportedModeReturnsWithoutStorepointerCollisionclassification)
r@   r,  r~   r-  r.  r/  r0  r1  r2  r3  r   r   s    rT   compact_opcode09_collision_rowr4    s    GGJ'!GGJ'/779%"ww'<="%''*B"C.1gg6Z.[GG$67''"23 rV   c                    | j                  d       d| j                  d       d| j                  d       d| j                  d       d| j                  d      xs d	 	S )
Nr@   @r,  =r~   r)  r.  r-  r`   r   r   s    rT   opcode09_collision_summaryr8    sb    77:
q!1 2!77:
q!3 4A77>")c
*	,rV   c
                !   |xs i }|xs i }| j                  d      xs g D 
ci c]  }
|
j                  d      t        |
       }}
| j                  d      xs g }| j                  d      xs g }| j                  d      xs g }|D cg c]  }||v s||    }}|D cg c]  }||v s||    }}|j                  d      xs g }|j                  d      du }|j                  d	      d
k(  xrV |j                  d      d
k(  xr@ |j                  d      d
k(  xr* |j                  d      d
k(  xr |j                  d      d
k(  }|j                  d      xs d
}|j                  d      xs d
}|j                  d      xs d
}|j                  d      xs g D cg c]  }t        |       }}|D 
cg c]  }
|
j                  d      dv r|
 }}
|D 
cg c]  }
|
j                  d      dk(  s|
 }}
dj                  d |D              }dj                  d |D              }|j                  d      xs g D 
cg c]3  }
|
j                  d      dv r|
j                  d      du rt	        |
      5 }}
dj                  d |D              }||z   |z   } |j                  dd
      d
kD  xs |j                  d      du }!|j                  d      xs g }"|j                  d      xs d
}#t        d  |"D              }$t        d! |"D              }%|"D 
cg c]g  }
|
j                  d"      d#k(  rQ|
j                  d$       d%|
j                  d&       d'|
j                  d(      xs d) d%|
j                  d*      xs d) i }&}
|j                  d+      d,k(  xr |$d,k(  }'|j                  d-      du }(t        |      xr ||k(  xr t        d. |D              })|(xr	 |)xr | d
kD  }*|)xrA | j                  d/      du xr, | j                  d0      d1u xr |xr |xr | d
k(  xr |! xr |( }+|+rd2nd3},|j                  d4      du xs, |j                  d5d
      d
kD  xs |j                  d6d
      d
kD  }-| j                  d7      du xs |j                  d7      du }.g }/|(s|/j                  d8       |-s|/j                  d9       | d
k(  r|/j                  d:       |!s|/j                  d;       |.s|/j                  d<       |/D 0cg c]  }0t        j                  |0|0       }1}0t        |	||| j                  d=            }2|* }3|*r|.rd>nd?}4d@|)rdAndBdCt        |       dDt        |       dE| j                  d/       dFdGdHdCt        |       dI|j                  dJ       dK|j                  dL       dM|j                  dN       dO|# dP|$ dQ|% dRdSj                  |&      xs d) dFdT|r'|-s%|j                  dU      |j                  dV      k(  rdWnd3dXj                  g dYt        |j                  dZ      xs g        d[|j                  dV       d\|j                  d]       d^|j                  d5       dP|j                  dU       dQ|j                  d_       d`|j                  da       db|j                  dc       dd|j                  de       df|j                  dg       dh|j                  di       dj|j                  d6       dk|j                  dl       dmdSj                  |j                  dn      xs g       xs d) do|j                  dp       dq|j                  dr             dFds|rdtndudv|j                  dw       dx|j                  dy       dz|j                  d{       d%|j                  d|       d}t        |       d~| dFd|2j                  d      xs dd|2j                  d       d|2j                  d       d%|2j                  d       d|2j                  d       d|2j                  d       d|2j                  d       d|2j                  d       d|2j                  d       d|2j                  d       dFd|rdndd|j                  d       d|j                  d       d|j                  d	       d|j                  d       d|j                  d       dK|j                  d       d|j                  d       dFd|s|sdndd|j                  d       d| d| d|j                  d       d|j                  d       d|j                  d       d|xs d) d|xs d) d|j                  d       dFd|d
k(  rdndd|j                  d       d|j                  d       d|j                  d       ddSj                  |j                  d      xs g       xs d) d|j                  d       d| d|j                  d       d|xs d) d|j                  d       dFd|,d|) d| j                  d0       d| j                  d/       d| d| d|  d|! d|( dFd8|(sdndd|( d|j                  dͫ       d|j                  dϫ       d|j                  dѫ       dFd<|.sdndd| j                  d7       d|j                  d7       d|j                  dի       dFg}5d}6i d| j                  d׫      xs t        d| j                  dث      xs t        d| j                  d      xs dd| j                  d٫      d| j                  dګ      d| j                  d۫      d=| j                  d=      d|d|d|d| j                  d      d| j                  d      d|)d|j                  dw      d|j                  dy      d|j                  d{      d|j                  d|      i d|d|j                  d      d|j                  d      d|d0| j                  d0      d/| j                  d/      d|+d|,d|d|j                  d	      d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|d|i d|j                  d      d|d|d|d|j                  d      d|d|j                  d      d|j                  d      d |j                  d      xs g d|j                  d      d|j                  d      d|j                  d      d|d|d|j                  d      d| d|j                  dZ      xs g i d	|j                  dV      d
|j                  d]      d|j                  d5      d|j                  de      d|j                  dg      d|j                  di      d|j                  d6      d|j                  dl      d|j                  dU      d|j                  d_      d|j                  da      d|j                  dc      d|j                  dn      xs g d|j                  dp      d|j                  dr      d|j                  d4      d|j                  d      i d|j                  d      xs g d|j                  d      xs g d|2d |2j                  d      d!|2j                  d      d"|2j                  d      d#|2j                  d      d$|2j                  d      d%|2j                  d      d&|2j                  d      d'|2j                  d      dJ|j                  dJ      dL|j                  dL      dN|j                  dN      d(|j                  d(      d|j                  d      d+|j                  d+      i d)|j                  d)      d|#d*|$d+|%d,|&d-|'d|j                  d      d.|!d-|(d/t        |      d0|*d|*d1|/d|1d2|3d7|.d|4|||5t        t!        t              g d3|6d4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}0w (5  Nr   r   r   r   r   r   r   Tr   r   r   r    r!   r"   r   r   r&   r   r@   >   0:01:0z2:0;c              3  2   K   | ]  }t        |        y wrZ   r*  r   s     rT   r^   z build_summary.<locals>.<genexpr>        :*- %:r_   c              3  2   K   | ]  }t        |        y wrZ   r>  r   s     rT   r^   z build_summary.<locals>.<genexpr>  r?  r_   r'   r2  c              3  2   K   | ]  }t        |        y wrZ   )r8  r   s     rT   r^   z build_summary.<locals>.<genexpr>
  s      E 	#3'Er_   r-   currentRootReferencesWrapperr,   'wrapperEntryCurrentRootEntryRunRefCountc              3  n   K   | ]-  }|j                  d       dk(  r|j                  d      du rd / yw)referenceRole"opcode-0x5a-mode0-fallthrough-wordpromotesWrapperSelectionFr   Nr   r   s     rT   r^   z build_summary.<locals>.<genexpr>  s<      777?#'KKGG./58 	
7s   35c              3     K   | ]@  }|j                  d       dk(  r*|j                  d      du r|j                  d      du rd B yw)rE  rF  fallthroughWordHandlerIsCodeF$fallthroughWordCanJumpToDwordAtPlus4r   Nr   r   s     rT   r^   z build_summary.<locals>.<genexpr>!  sN      777?#'KKGG23u<GG:;uD	 	
7s   AArE  rF  fallthroughWordValueHexr)  fallthroughWordOpcodeHexz->fallthroughWordHandlerHexr`   fallthroughWordHandlerSectionwrapperEntryRefCountr   r.   c              3  B   K   | ]  }|j                  d       du   yw)r   TNr   r   s     rT   r^   z build_summary.<locals>.<genexpr>9  s      mVYHITQms   r   r   Fz*corrected-trace-not-normal-selection-proofr   r?   r<   r>   r5   rF   rG   rH   rI   rJ   rE   zready-for-reviewblockedzroute-pair-current-entrieszcorrected-reader-trace-onlyzmissing-corrected-reader-tracezindices=z; corrected=z-; readerReachableByCorrectedNonNegativeIndex=)kindr   detailznegative-wrapper-readerzoutside-current-root-runz; wrapperEntry=r(   z
; wrapper=r)   z; child=r*   z; entryRunRefs=z; opcode5aFallthroughRefs=z; fallthroughNonCodeRefs=z; fallthroughHandlers=rX   zroute-entry-pointer-source-refs'entryPointerOpcode5aFallthroughRefCountr:   znon-promoting-fallthrough-only zrouteEntryIdx=r9   z; entryRefs=z; textRefs=r;   z; promotingRefs=&entryPointerFallthroughNonCodeRefCountz; nonNegPromoting=(nonNegativeEntryPointerPromotingRefCountz; negativeReaderPromoting=+negativeReaderEntryPointerPromotingRefCountz; encodedRaw=r=   z; encodedBranch=1encodedEntryAnchorBranchAttachedEncodedFieldCountz; encodedModeled=2encodedEntryAnchorModeledControlFlowCandidateCountz; encodedPromoting=z; encodedClass= encodedEntryAnchorClassificationz; handlers='entryPointerFallthroughHandlerSummariesz; descriptorTableOnly=descriptorRefsOnlyTableCellsz; childDescriptorWordOnly=!childRefsOnlyDescriptorChildWordszglobal-leaf-table-contextzfrontier-leaf-negative-onlyzfrontier-leaf-nonnegative-openzselectorTables=r   z; fieldEntries=r   z; negative/nonNegative=negativeFieldEntryRowCountnonNegativeFieldEntryRowCountz; currentRoutePairIdx=z; frontierLeafOnlyNegative=zroot-table-direct-ref-contextr   unknownztableWindow=rC   z; tableRefs=r   r   z; sections=r   z; routeEntryTextRefs=r   z; routeLeafTextRefs=r   z; frontierLeafTextRefs=r   z; frontierReaderTextRefs=r   z; frontierReaderRefs=r   zopcode07-direct-entry-selectionabsentpresentz	rowCount=r   z; indexMode=r   z; leafWindow=z; negative=z
; current=z; directFrontier=zopcode08-activation-windowz*source-predecessor-current-producer-absentz+source-predecessor-current-producer-presentzsourcePredecessorActivators=r   z; currentRoot=z; currentRange=z; ownRange=(sourceOrPredecessorOwnRangeProducerCountz; scriptScalar=,sourceOrPredecessorScriptScalarProducerCountz; currentInternalRange=r   z; sourcePredBuckets=z; currentContrast=z; promotes=opcode08ActivationPromotesRoutezopcode09-selected-pointer-storez'source-predecessor-current-store-absentz(source-predecessor-current-store-presentzsourcePredecessorRows=r#   z; supported=r$   z; unsupported=r%   z; unsupportedModes=&sourceOrPredecessorUnsupportedModesHexz; pointerCollisions=+sourceOrPredecessorPointerCollisionRowCountz; currentRangeStores=z; activationLinkedCollisions=%activationLinkedPointerCollisionCountz; collisionRows=%opcode09PointerCollisionPromotesRoutez$corrected-trace-normal-selection-gapzcorrectedReaderGrounded=z; nonNegativeSelectable=z ; nonNegativeCorrectedReachable=z; frontierLeafNegativeOnly=z; opcode07DirectAbsent=z; sourcePredCurrentProducers=z; wrapperExec=z; selectedRootRef=missingfoundzselectedRootExecutionRefFound=r/   z; selectedPointerGlobal=r0   z; promotion=promotionStatuszleafIndexStrict=z; frontierStrict=z; frontierClusterClass=r6   a`  Selector 2:0 has current-root route-pair entries 6 and 8, and opcode 0x2c-corrected traces from both entries reach reader 0x00542b0c. This still does not prove normal route execution chooses those entries: opcode 0x07 has no direct entry selection, source/predecessor opcode 0x08 and 0x09 windows do not produce the current root/range, explicit entry-pointer refs to -12/6/8 are non-code opcode 0x5a fallthrough words, the negative wrapper entry -12 is outside the current root run, the reader is corrected-reachable but not selectable by a non-negative index, and selected-root runtime proof remains absent.sourcetargetrA   rB   rD   routePairEntryIndices#routePairCorrectedTraceEntryIndicesnegativeReaderEntryIndicesroutePairCurrentEntryCount$routePairDescriptorCurrentEntryCount)routePairCorrectedTraceReachesReaderCount)correctedRoutePairTraceReachesReaderCount routePairCorrectedReaderGroundedglobalSelectorTableCountglobalFieldEntryRowCount globalNegativeFieldEntryRowCount#globalNonNegativeFieldEntryRowCount%globalCurrentSelectorRoutePairIndices.globalCurrentSelectorNegativeRoutePairRowCount(currentSelectorNegativeRoutePairRowCount1globalCurrentSelectorNonNegativeRoutePairRowCount+currentSelectorNonNegativeRoutePairRowCount%globalCurrentFrontierLeafOnlyNegative%correctedTraceNormalSelectionGapFound&correctedTraceNormalSelectionGapStatus"opcode07DirectEntrySelectionAbsent(opcode07SelectedLeafTableWindowSlotCount*opcode07SelectedNegativeRootEntrySlotCount)opcode07SelectedCurrentRootEntrySlotCount%opcode07SelectedWrapperEntrySlotCount!opcode07DirectFrontierTargetCount)opcode08SourceOrPredecessorActivatorCount3opcode08SourceOrPredecessorCurrentRootProducerCount4opcode08SourceOrPredecessorCurrentRangeProducerCount0opcode08CurrentInternalCurrentRangeProducerCountopcode08SelectorBucketRows&opcode08SourcePredecessorBucketSummary&opcode08CurrentSelectorContrastSummary1opcode09SourceOrPredecessorCurrentRangeStoreCount4opcode09SourceOrPredecessorSupportedOpcode09RowCount:opcode09SourceOrPredecessorUnsupportedModeOpcode09RowCount.opcode09SourceOrPredecessorUnsupportedModesHex?opcode09SourceOrPredecessorUnsupportedModePointerCollisionCount7sourceOrPredecessorUnsupportedModePointerCollisionCount3opcode09SourceOrPredecessorPointerCollisionRowCount-opcode09ActivationLinkedPointerCollisionCount-opcode09SourcePredecessorPointerCollisionRows0opcode09SourcePredecessorPointerCollisionSummary'sourceOrPredecessorCurrentProducerCount%routePairIndexSourceRouteEntryIndices(routePairIndexSourceEntryPointerRefCount,routePairIndexSourceEntryPointerTextRefCount1routePairIndexSourceEntryPointerPromotingRefCount=routePairIndexSourceEncodedEntryAnchorRawScalarCandidateCountEroutePairIndexSourceEncodedEntryAnchorBranchAttachedEncodedFieldCountFroutePairIndexSourceEncodedEntryAnchorModeledControlFlowCandidateCount=routePairIndexSourceEncodedEntryAnchorPromotingCandidateCount4routePairIndexSourceEncodedEntryAnchorClassification;routePairIndexSourceEntryPointerOpcode5aFallthroughRefCount:routePairIndexSourceEntryPointerFallthroughNonCodeRefCount<routePairIndexSourceNonNegativeEntryPointerPromotingRefCount?routePairIndexSourceNegativeReaderEntryPointerPromotingRefCount;routePairIndexSourceEntryPointerFallthroughHandlerSummaries0routePairIndexSourceDescriptorRefsOnlyTableCells5routePairIndexSourceChildRefsOnlyDescriptorChildWords0routePairIndexSourceHigherLevelIndexSourceProvenroutePairIndexSourceProofFound
proofFound!routePairIndexSourceFailedGateIds!failedRoutePairIndexSourceGateIds#routePairIndexSourceMissingEvidencemissingEvidencerootTableDirectRefContextrootTableWindowDirectRefCount!rootTableWindowDirectTextRefCount%rootTableWindowDirectRefSectionCounts&rootTableRouteEntryAddressTextRefCount#rootTableRouteLeafValueTextRefCount&rootTableFrontierLeafValueTextRefCount(rootTableFrontierReaderValueTextRefCount$rootTableFrontierReaderValueRefCountr+   $wrapperEntryCurrentRootRangeRefCount'wrapperEntryOpcode5aFallthroughRefCount&wrapperEntryFallthroughNonCodeRefCount'wrapperEntryFallthroughHandlerSummaries(wrapperEntryOnlyRefIsOpcode5aFallthroughwrapperExecutionProofFoundselectedRootRuntimeSummaryroutePairEntryExecutionProvenfailedRoutePairEntryGateIdsentrySelectionGapOpen)zKprove selected-root execution reaches selector 2:0 on the normal route pathz>prove a higher-level selector/table index selects entry 6 or 8zLor prove wrapper entry -12 executes into 0x00542ae8 on the normal route pathzFfind a strict map1_01a source coordinate or hotspot linked to map2_02d)routePairEntryRowsnegativeReaderRowsevidenceRowsr3   r4   remainingProofs
conclusion)r   r   r'  ra   r4  r   boolallr   )ROUTE_PAIR_ENTRY_MISSING_EVIDENCE_BY_GATEr   rc   SOURCETARGETr  EVIDENCE_REFSr   )7leaf_index_spaceleaf_table_global_contextopcode08_activation_windowsopcode07_indexed_pointersopcode09_pointer_collisionswrapper_descriptor_contextr  current_root_frontier_pathsroute_pair_index_source_gapr   r   route_rows_by_indexroute_pair_indicescorrected_route_pair_indicesnegative_reader_indicesr   r   r   !global_current_route_pair_indices*global_current_frontier_leaf_only_negative opcode07_direct_selection_absent"opcode08_source_current_root_count#opcode08_source_current_range_count#opcode09_source_current_range_countr&  opcode08_selector_bucket_rows'opcode08_source_predecessor_bucket_rows%opcode08_current_selector_bucket_rows*opcode08_source_predecessor_bucket_summary*opcode08_current_selector_contrast_summary2opcode09_source_predecessor_pointer_collision_rows5opcode09_source_predecessor_pointer_collision_summary,source_or_predecessor_current_producer_countwrapper_execution_proof_foundwrapper_entry_refs.wrapper_entry_current_root_entry_run_ref_count,wrapper_entry_opcode5a_fallthrough_ref_count,wrapper_entry_fallthrough_non_code_ref_count+wrapper_entry_fallthrough_handler_summaries.wrapper_entry_only_ref_is_opcode5a_fallthrough!selected_root_execution_ref_found$route_pair_corrected_reader_grounded!route_pair_entry_execution_proven*corrected_trace_normal_selection_gap_found+corrected_trace_normal_selection_gap_status"direct_entry_pointer_source_provenstrict_hotspot_found failed_route_pair_entry_gate_idsgate_idmissing_evidencetable_direct_ref_contextentry_selection_gap_openpromotion_statusevidence_rowsr  s7                                                          rT   build_summaryr     s    #>"C"="C $''(;<B 	#$&6s&;;  *--.QRXVX#3#7#78b#c#igi .223QRXVX?QreUZ^qUq*51rOr0G',5TgKgE"  )B(E(EFg(h(nln%!%%&GHDP / 	"%%&HIQN 	L%))*NOSTT	L%))*MNRSS	L &))*IJaO	L &))*EF!K % 	$''(UV[Z[ ' 	$''(VW\[\ ( 	$''(STYXY (
 3667GHNB% 	!)%! % 1/77:.0 	/+ / 5-
8Ku8T-) - 25 :1X: 2. 25 :1V: 2.
 /226:@b:77:.0SWW=O5PTX5X 	's+:6 :
 =@HH EEE =9
 	+
-	.
-	. 1 	#&&'FJQN 	R%))*HITQ " 4778JKQr"&&'PQVUV 3 47 7%7 40 47 7%7 40 &3 77?#'KK ww012!CGG<V4W3X45<=78?C@B3/ 3 	#&&'=>!C 	>8A= 3 )D(G(GHg(hlp(p%  	n(,>>	nm]lmm ) 	* 	=0	=81< & 	- 	2  !UVZ^^	2  !MNRWW	2 7	2 -		2
 9A=	2 .-	2 21 / 6 	5 0 	$''(FG4O 	_&**+JANQRR	_&**+VXYZ]^^ ' 	12d: 	I&**+?@DH  (*$,(//0IJ-(//0IJ3q8(//0UV((//0IJ(//0@A 8 	255gwG   =01	  $ED -1E 	  13 413123<D`@a?b c>#''(\]^`
	
 .03678-112CDEZ-112HIJ(-112JKL M  NO P++W*X Y**V)W X''*xx0['\'c`c&df		
 6*6+//0YZ+//0FG 7 r r. r%@%D%DEX%Y%_]_!` a r b r8<<=STUrVr7;;<VWXrY!r "=!@!@A`!a brc+r
 /223\]^r
_*r /223[\]r^#r /223]^_r`+r /223`abrcr :==>ijkrl!r "=!@!@At!u vrw"r #>"A"ABv"w!xry$r %@$C$CDo$p#qrr r  !< ? ?@b cd!r e!r"  HH%@%D%DEn%o%usuv}z}~#r"'#r$ (C'F'FGe'f&g%r$h+%r& ,G+J+JKn+o*p'r	
B 09 41!";"?"?@T"U!V W  9 = =>R ST U(,001MNOq,001PQR S''*+L'M&N O,,V+WY	
  4.228<I	7;;<LMN O599:OPQQR+//0IJK L4889STU V&&>&B&BCb&c%d e%%=%A%AB^%_$` a((@(D(DEd(e'f g**B*F*FGh*i)j k&&>&B&BC`&a%bd		
  6"Bh	599*EF G6::;NOP Q7;;<^_` a599:^_` a4889\]^ _4889XYZ ["";"?"?@["\!]_		
 16:] C>..223^_` aAB C  CD E7;;<fgh i  ; ? ?@n op q(.223]^_ `%%O%VSV$W X##M#TQT"U V7;;<]^_
a	
( 62a7 @;(.223XYZ [8<<=klm n:>>?stu v$887;;<dekiklspst u%%@%D%DEr%s$t u&&I%J K..223Z[\ ]!!V!]Z] ^ _7;;<cdeg	
* ;A*+O*P Q)#''(TUV W1#''(\]^ _,,V+W X((H'I J..Z-[ \<= >##D"E	G		
" .'Hig01R0S T:>>?OPQ R))D)H)HIc)d(e f8<<=NOPR			
 %';i"#3#7#78L#M"N O""="A"ABV"W!X Y((C(G(GH^(_'`b		
MoMb	 N"&&x0:FN"&&x0:FN 	$((4=N 	#''	2	N
 	/334IJN 	+//0ABN 	-112EFN 	 !3N 	./KN 	%&=N 	%&6&:&:;a&bN 	45E5I5I76
N 	+,PN  	#$=$A$ABV$W!N" 	#$=$A$ABV$W#N$ 	+,E,I,IJf,g%N& 	./H/L/L+0
'N, 	01R-N. 	9:S:W:W6;
/N4 	<=V=Z=Z9>
5N: 	01[;N< 	56F6J6J87
=NB 	=>N>R>R@?
CNH 	01[INJ 	12]KNL 	-.NMNN 	34M4Q4Q.5
ONT 	56O6S6S07
UNZ 	45N5R5R/6
[N` 	01J1N1N+2
aNf 	,-F-J-JKf-ggNh 	45P5T5T76
iNn 	>?aoNp 	?@cqNr 	;<W<[<[6=
sNx 	%&CyNz 	12\{N| 	12\}N~ 	*+F+J+JKl+mN@ 	<=`ANB 	?@[@_@_:A
CNH 	EFaFeFe@G
INN 	9:U:Y:Y4;
 ; UNV 	JKfKjKjEL
WN\ 	>?Z?^?^9@
]Nb 	89T9X9X3:
cNh 	89kiNj 	;AmNp 	01L1P1P32
qNv 	23_wNx 	01L1P1PQd1e1kikyNz 	34O4S4S"5
{N@ 	78S8W8W&9
ANF 	<=X=\=\+>
GNL 	HIdIhIh7J
MNR 	PQlQpQp?R
SNX 	QRmRqRq@S
YN^ 	HIdIhIh7J
_Nd 	?@[@_@_.A
eNj 	FGbGfGf5H
kNp 	EFaFeFe4G
qNv 	GHcHgHg6I
wN| 	JKfKjKj9L
}NB 	F'++,UV\Z\ENH 	;<W<[<[*=
INN 	@A\A`A`/B
ONT 	;<W<[<[*=
UNZ 	)*E*I*I,*W[N\ 	,'++,OPVTV_Nb 	.'++,=>D"eNh 	$%=iNj 	()A)E)EF[)\kNl 	,-E-I-IJc-dmNn 	01I1M1M&2
oNt 	12J2N2N+3
uNz 	./G/K/K(0
{N@ 	12J2N2N+3
ANF 	34L4P4P-5
GNL 	/0H0L0L)1
MNR 	599:KLSNT 	 : > >?U VUNV 	!"<"@"@AY"ZWNX 	&'A'E'EFc'dYNZ 	'(B(F(FGe(f[N\ 	 : > >?U V]N^ 	/0J0N0N21
_Nd 	23aeNf 	23_gNh 	12^iNj 	23^kNl 	34bmNn 	()C)G)GHg)hoNp 	%&CqNr 	()JsNt 	%&CD_&`uNv 	()JwNx 	7yNz 	&'G{N| 	+}N~ 	 !9N@ 	2ANB 	+CND .2%%.
 ![N Nq
 s.%/
-:F3vsT   "AC	ACAC"	AC,ACAC7ACAC!3AC! 8AC&A,AC+AC0c                4   g dd| d   dd| d    d| d    dd	| d
    d| d    dd| d    dd| d    d| d    ddt        | d          ddt        | d          ddt        | d          ddt        | 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+t        | d,          dd-| d.    dd/| d0    dd1| d2    d| d3    d| d4    dd5| d6    d| d7    d| d8    d| d9    d	d:| d;    dd<| d=    d| d>    dd?t        | d@          ddA| dB    ddC| dD    d| dE    ddF| dG    d| dH    d| dI    d| dJ    d	dK| dL    ddM| dN    ddO| dP    ddQ| dR    ddSt        | dT          ddU| dV    ddW| dX    ddY| dZ    dd[| d\    dd]t        | j                  d^             dd_t        | j                  d`      xs g        dda| db    ddc| dd    dde| df    dddgd| j                  d`      xs g D cg c]  }dh| 	 c}ddiddjdk}| dl   D ]  }dmj                  |j                  dn      xs g       xs do}|j	                  dp|j                  dq       dr|j                  ds       dt|j                  du       dt|j                  dv       dw| dx|j                  dy       dz        |j                  g d{       | d|   D ]&  }|j	                  dp|d}    dx|d~    dx|d    dz       ( |j                  g d       | j                  d      xs g D ]@  }dj                  |j                  d      xs g       }|j	                  d|d    d|        B |j                  g d       | d   D ]  }|j	                  d|j                  d
       dw|j                  d       dr|j                  d       dw|j                  d       dx|j                  d       d|j                  d       dx|j                  d       dx|j                  d       dx|j                  d       dz        |j                  g d       | d   D ]  }|j	                  d|j                  d
       dt|j                  d       dt|j                  d       dt|j                  d       dw|j                  d      xs do dx|j                  d       dx|j                  d       dz        |j                  g d       |j                  d | d   D               |j	                  d       dj                  |      S c c}w )Nz.# Save Selector Route-Pair Entry Execution GaprU  r  z
- route: `rn  z -> ro  `z- selector/root: `r@   z` / `rA   z- root table pointer: `rB   z- frontier leaf/reader: `rD   rE   z- route-pair entry indices: `rp  z)- corrected reader trace entry indices: `rq  z"- negative reader entry indices: `rr  z/- global current selector route-pair indices: `r|  z/- global current frontier leaf only negative: `r  z)- corrected trace normal-selection gap: `r  z/- corrected trace normal-selection gap found: `r  z+- opcode07 direct entry selection absent: `r  z=- opcode08 source/predecessor current root/range producers: `r  r  z/- opcode08 source/predecessor bucket summary: `r  z'- opcode08 current selector contrast: `r  z5- opcode09 source/predecessor current-range stores: `r  z2- opcode09 source/predecessor unsupported modes: `r  z/- opcode09 source/predecessor collision rows: `r  z.- source/predecessor current producer count: `r  z6- route-pair index source entry refs/text/promoting: `r  r  r  zA- route-pair index source encoded raw/branch/modeled/promoting: `r  r  r  r  z3- route-pair index source encoded classification: `r  z?- route-pair index source opcode5a fallthrough/non-code refs: `r  r  z%- route-pair index source handlers: `r  z#- route-pair index source proven: `r  z%- root table window refs/text refs: `r  r  z?- root table route entry/leaf/frontier leaf/reader text refs: `r  r  r  r  z+- root table frontier reader direct refs: `r  z.- wrapper entry current-root entry-run refs: `rC  z,- wrapper entry opcode5a fallthrough refs: `r  z,- wrapper entry fallthrough non-code refs: `r  z'- wrapper entry fallthrough handlers: `r  z"- wrapper execution proof found: `r  z&- selected-root execution ref found: `r.   z&- route-pair entry execution proven: `r  z- proof found: `r  z"- failed route-pair entry gates: `r  z- missing evidence count: `r  z- strict hotspot found: `r5   z- evidence refs: `r4   z- promotion status: `rm  z## Missing Evidence- z## Route-Pair Entriesz@| index | entry | descriptor | child | maps | corrected reader |z&| ---: | --- | --- | --- | --- | --- |r  rX   r   r`   z| r   z | `r   z` | `r   r   z` | z | r   z |)rU  z## EvidencerU  z| kind | status | detail |z| --- | --- | --- |r  rR  r   rS  )rU  z## Evidence RefsrU  r3   , r   z- `r   z`: )rU  z## Opcode 0x08 Selector BucketsrU  zZ| selector | role | range | activations | current root/range | own | script | unreadable |z5| --- | --- | --- | ---: | --- | ---: | ---: | ---: |r  z| `r  r  r  r   r)  r!  r"  r#  r$  )rU  z!## Opcode 0x09 Pointer CollisionsrU  zS| selector | va | value | mode | section | returns without store | classification |z+| --- | --- | --- | --- | --- | --- | --- |r  r,  r~   r.  r-  r1  r3  )rU  z## Remaining ProofsrU  c              3  &   K   | ]	  }d |   yw)r  Nrq   r\   items     rT   r^   zmarkdown.<locals>.<genexpr>`  s     D2dVDs   r  
)rc   r   r   ra   r   extend)summaryr  linesr   mapsr   r   s          rT   markdownr    s
   787
7 	7 		7
 WX&'tGH,=+>a@7 WZ01wy7I6J!L7 "'*?"@!AC7 $G,=$>#?uWM`EaDbbcd7 (G4K,L(M'NaP7 4C@e8f4g3hhij7 -S9U1V-W,XXYZ7 :#gFm>n:o9ppqr7 :'Bi:j9kklm7 4G<d4e3ffgh7 :'Bi:j9kklm7  6g>b6c5ddef!7" H  QF  IG  HH  HM  NU  VL  NM  MN  NO  	P#7$ :'Bj:k9llmn%7& 2':b2c1ddef'7( @H{@|?}}~)7* =SIyAz={<||}~+7, :'Bt:u9vvwx-7. 9Aj9k8llmn/70 AIsAt@uuz  |C  Dr  |s  {t  ty  zA  Bu  zv  yw  wx  	y172 LG  UT  MU  LV  V[  \c  dk  \l  [m  mr  sz  {C  sD  rE  EJ  KR  SR  KS  JT  TU  	V374 >gF|>}=~~  	A576 J'  SP  KQ  JR  RW  X_  `\  X]  W^  ^_  	`778 0G<y4z0{/||}~97: .g6h.i-jjkl;7< 08W0X/YY^_f  hK  `L  _M  MN  	O=7> J'RzJ{I|  }B  CJ  Kp  Cq  Br  rw  x  @h  xi  wj  jo  pw  xb  pc  od  de  	f?7@ 6g>d6e5ffghA7B 9Aj9k8llmnC7D 7w?h7i6jjklE7F 7w?g7h6iijkG7H 2#g>g6h2i1jjklI7J -W5Q-R,SSTUK7L 19X1Y0ZZ[\M7N 19X1Y0ZZ[\O7P 7<013Q7R -S=Z1[-\,]]^_S7T &c'++6G*H*NB&O%PPQRU7V $G,@$A#B!DW7X W%789;Y7Z  (9 :;1=[7\ 	]7^ 	_7` 	a7b #*++.?"@"FB	G$Btf+	Gc7d 	e7f 	 g7h 	i7j 	Kk7l 	1m7Ep +, 
xx 56<"=D,-.d377<3H2I J()sww7H/I.J$fC PQRRTV	

 
LL]^~& Or#f+c#h-CM?"MNO	LL-.{{>*0b 53778,23s3v;-s6(345 
LL   34 
#''*%&d3776?*;4
@S?TTXww()*#cgg6W.X-YYZww9:;3swwGe?f>ggjww9:;3swwGg?h>iikm	

 
LL   FG 
#''*%&eCGGG,<+=U377:CVBW X	"#4(?(F3'Gsww;<=SIYAZ@[[]_	

 
LL01	LLD1B)CDD	LL99Ug 
Hs   Vc                :   dj                  d | d   D              }dj                  d | d   D              }dj                  d | d   D              }dj                  d | d	   D              }dj                  d
 | d   D              }dj                  d | j                  d      xs g D              }dj                  d | j                  d      xs g D              }dj                  g ddddddddddt        j                  | d          ddt        j                  | d          dt        j                  | d          d t        j                  t	        | d!                d"t        j                  t	        | d#                d$t        j                  t	        | d%                d&d'| d(    d)| d*    d+| d,    d-| d.    d/t        j                  t        | j                  d0                   d1t        | j                  d      xs g        d2d3j                  g d4t        j                  t        | d5                d6| d7    d8| d9    d:| d;    d:| d<    d=| d>    d:| d?    d:| d@    d:| dA    dB| dC    dD| dE    d:| dF    dG| dH    d:| dI    d:| dJ    d:| dK    dL| dM    d2      dNt        j                  | dO          dPt        j                  | dQ          dRt        j                  | dS          d&dTt        j                  t	        | dU                dV| dW    dX| d7    d2dY| dZ    d2d[d\| d]d^d_|d`dadb| dcddd\| d]dedf|d`dgdh|d`did\| d]djdkd3      S )lNr  c              3    K   | ]  }d |j                  d       dt        j                  t        |j                  d                   dt        j                  t        |j                  d                   dt        j                  t        |j                  d                   dt        j                  dj	                  |j                  d	      xs g       xs d
       d|j                  d       d  yw)<tr><td>r   </td><td><code>r   </code></td><td><code>r   r   </code></td><td>rX   r   r`   	</td><td>r   
</td></tr>N)r   htmlescaper[   ra   r   s     rT   r^   zhtml_page.<locals>.<genexpr>f  s      
 	ww*+, -[[SWW\%:!;<= >[[SWW_%=!>?@ A[[SWW->%?!@AB C{{388CGG,A$B$HbIPSQR SwwGHI J	
s   C7C9r  c           
   3     K   | ]R  }d t        j                  |d          dt        j                  |d          dt        j                  |d          d T yw)r  rR  r  r   rS  r  Nr  r  r   s     rT   r^   zhtml_page.<locals>.<genexpr>q  sg       	{{3v;'( ){{3x=)* +{{3x=)* +	s   AAr  c              3    K   | ]  }d t        j                  t        |j                  d                   dt        j                  t        |j                  d                   dt        j                  t        |j                  d                   d|j                  d       d|j                  d       d	|j                  d
       d|j                  d       d|j                  d       d|j                  d       d  yw)<tr><td><code>r@   r  r  r  r  r  r  r   r)  r!  r"  r#  r$  r  Nr  r  r[   r   r   s     rT   r^   zhtml_page.<locals>.<genexpr>y  s       	[[SWWZ%8!9:; <{{3swwv/01 2[[SWWZ%8!9:; <ww()* +ww89:!7756
7 8ww567 8ww9:; <ww789 :
	s   DDr  c              3  z  K   | ]2  }d t        j                  t        |j                  d                   dt        j                  t        |j                  d                   dt        j                  t        |j                  d                   dt        j                  t        |j                  d                   dt        j                  t        |j                  d      xs d             d	|j                  d
       d	t        j                  t        |j                  d                   d 5 yw)r  r@   r  r,  r~   r.  r  r-  r`   r  r1  r3  r  Nr  r   s     rT   r^   zhtml_page.<locals>.<genexpr>  s     ( 	[[SWWZ%8!9:; <[[SWWW%5!678 9[[SWWZ%8!9:; <[[SWWY%7!89: ;{{3sww~6=#>?@ Aww;<= >{{3sww'789:; <	(s   D9D;r  c              3  N   K   | ]  }d t        j                  |       d  ywz<li></li>Nr  r  s     rT   r^   zhtml_page.<locals>.<genexpr>  s#     cd4;;t#4"5U;c   #%r  c              3  N   K   | ]  }d t        j                  |       d  ywr  r  r  s     rT   r^   zhtml_page.<locals>.<genexpr>  s(      ,0$t{{4 !'r!  r  c              3     K   | ]h  }d t        j                  |j                  d      xs d       dt        j                  dj                  |j                  d      xs g              d j yw)z
<li><code>r   rU  z	</code>: r  r   r   N)r  r  r   ra   r   s     rT   r^   zhtml_page.<locals>.<genexpr>  sf      #
 		SWWV_234I;;tyy!2!8b9:
;	#s   A.A0r3   z<!doctype html>z<html lang="en">z<head>z  <meta charset="utf-8">z=  <title>Save Selector Route-Pair Entry Execution Gap</title>a    <style>body{font-family:system-ui,sans-serif;margin:24px;line-height:1.45;max-width:1200px}table{border-collapse:collapse;width:100%;margin:16px 0}td,th{border:1px solid #ddd;padding:6px 8px;text-align:left;vertical-align:top}th{background:#f5f5f5}code{white-space:nowrap}</style>z</head>z<body>z7  <h1>Save Selector Route-Pair Entry Execution Gap</h1>z  <p>r  z</p>z  <p><b>Route:</b> <code>rn  z -&gt; ro  z</code>; selector <code>r@   z</code>; root <code>rA   z </code>; promotion status <code>rm  z</code>.</p>z(  <p>route-pair entry execution proven: r  z%; selected-root execution ref found: r.   z; strict hotspot found: r5   z; proofFound=r  z"; failedRoutePairEntryGates=<code>r  z</code>; missingEvidenceCount=z.</p>rU  zP  <p><b>Global leaf table:</b> global current selector route-pair indices <code>r|  z5</code>; global current frontier leaf only negative: r  z5; route-pair index source entry refs/text/promoting: r  r)  r  r  z@; route-pair index source encoded raw/branch/modeled/promoting: r  r  r  r  z2; route-pair index source encoded classification: r  z$; root table window refs/text refs: r  r  z3; route entry/leaf/frontier leaf/reader text refs: r  r  r  r  z+; wrapper entry opcode5a fallthrough refs: r  zY  <p><b>Opcode 0x08/0x09 current producer contrast:</b> source/predecessor buckets <code>r  z)</code>; current selector contrast <code>r  z'</code>; opcode09 collision rows <code>r  z8  <p><b>corrected trace normal-selection gap:</b> <code>r  zK</code>; corrected trace reaches the reader, but non-negative selection is r   z3 and the reader-bearing leaf remains negative-only z  <p><b>Evidence refs:</b> r4   z  <h2>Missing Evidence</h2>z  <ul>z</ul>z  <h2>Route-Pair Entries</h2>z  <table><thead><tr><th>index</th><th>entry</th><th>descriptor</th><th>child</th><th>maps</th><th>corrected reader</th></tr></thead><tbody>z  </tbody></table>z  <h2>Evidence</h2>zS  <table><thead><tr><th>kind</th><th>status</th><th>detail</th></tr></thead><tbody>z</tbody></table>z  <h2>Evidence Refs</h2>z'  <h2>Opcode 0x08 Selector Buckets</h2>z  <table><thead><tr><th>selector</th><th>role</th><th>range</th><th>activations</th><th>current root/range</th><th>own</th><th>script</th><th>unreadable</th></tr></thead><tbody>z)  <h2>Opcode 0x09 Pointer Collisions</h2>z  <table><thead><tr><th>selector</th><th>va</th><th>value</th><th>mode</th><th>section</th><th>returns without store</th><th>classification</th></tr></thead><tbody>z  <h2>Remaining Proofs</h2>z</body>z</html>)ra   r   r  r  r[   rc   r   )r
  
entry_rowsr  opcode08_rowsopcode09_collision_rowsproof_itemsmissing_itemsevidence_ref_itemss           rT   	html_pager*  e  se    
 /0
 
J II  >* M II  78 M #ii ( JK(  ))cPaHbccKII 4;KK@Q4R4XVX M  #
 ;;~.4"#  99_	
_	
_	
 _	
 '	_	

 L_	
 i_	
 _	
 _	
 F_	
 DKK 567t<_	
WX%678GT\L]@^?_ `""&++c'*2E.F"G!H I"kk#gi.@*ABC D**.++c'BS:T6U*V)WWc	e_	
& ;:;< =6:;< =)/01 2%l34 5S5R)S%TUV W((+GKK8I,J,Pb(Q'RRW	Y'_	
>M M  MS1X)Y%Z[\M]?M BCD	MEF	M EFGM HIM IJKM LMM NOPMQQM Z[\M ]^M bcdM efM cdeM fgM Z[\M]CM QRSMT5M" :;<#M" =>#M$ >?@%M$AD%M( CDE)M( FG)M* @AB+M* CD+M, CDE-M, FG-M. EFG/M.H</M2 DEF3M2 GL3M?_	
v448KKHp@q4r3s t337;;wGo?p3q2r s115WEw=x1y0z  {GHw_	
BS1Y)Z%[\] ^UGHI J!!()P!Q RRW	YC_	
N *'2D*E)FeLO_	
P *Q_	
R ]O5)S_	
T ,U_	
V ZW_	
X Y_	
Z ![_	
\ "]_	
^ bboap  qA  B__	
` 'a_	
b '(.c_	
d 6e_	
f @g_	
h i_	
j !k_	
l 8m_	
n so_	
p $q_	
r !s_	
t *u_	
v [M'w_	
x y_	
z {_	
| }_	
a arV   c                    |j                  dd       |dz  j                  t        j                  | dd      dz   d	       |d
z  j                  t	        |       d	       y )NT)parentsexist_okz1save_selector_route_pair_entry_execution_gap.jsonF   )ensure_asciiindentr  rL   rM   1save_selector_route_pair_entry_execution_gap.html)mkdir
write_textrP   dumpsr*  )r
  out_dirs     rT   write_outputsr6    sk    MM$M.BBNN

7q9D@ O  BBNN' O rV   c                    t        j                  t              } | j                  dt        t
               | j                         }t        t        |j                  dz  i       t        |j                  dz  i       t        |j                  dz  i       t        |j                  dz  i       t        |j                  dz  i       t        |j                  d	z  i       t        |j                  d
z  i       t        |j                  dz  i       t        |j                  dz  i       t        |j                  dz  i       
      }t        ||j                         t        d|j                  dz          y )N)descriptionz	--out-dir)typedefaultz#save_selector_leaf_index_space.jsonz,save_selector_leaf_table_global_context.jsonz.save_selector_opcode08_activation_windows.jsonz,save_selector_opcode07_indexed_pointers.jsonz.save_selector_opcode09_pointer_collisions.jsonz-save_selector_wrapper_descriptor_context.jsonz.save_selector_selected_root_execution_gap.jsonz.save_selector_current_root_frontier_paths.jsonz.save_selector_route_pair_index_source_gap.jsonz%save_selector_leaf_table_context.jsonz(wrote route-pair entry execution gap -> r1  )argparseArgumentParser__doc__add_argumentr   OUT
parse_argsr   rU   r5  r6  print)parserargsr
  s      rT   mainrD    s@   $$9F
$<D$,,!FFK$,,!OOQST$,,!QQSUV$,,!OOQST$,,!QQSUV$,,!PPRTU$,,!QQSUV$,,!QQSUV$,,!QQSUV$,,!HH"MG '4<<(	2<<MM
N	PrV   __main__)r   r   rS   r   returnr   )rb   zlist[Any] | NonerF  r[   )r]   
str | NonerF  
int | None)r]   rH  rF  rG  )rr   
list[dict]rs   rf   rF  dict | None)r   bytesrr   rI  r]   rH  rF  rI  )
r   rK  rr   rI  r   rH  r   rH  rF  rI  )r   rI  rF  zdict[str, int])r   rG  rF  ztuple[int | None, int | None])
r   rJ  r   rI  r   rI  r   rG  rF  r   )r   r   rF  r   )r  r   rF  r   )r&  r   rF  r   )r   r   rF  r[   )NNN)r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  rJ  r  rJ  r   rJ  rF  r   )r
  r   rF  r[   )r
  r   r5  r   rF  None)rF  rL  ),r=  
__future__r   r;  r  rP   r   pathlibr   typingr   probe_exe_scene_tablesr   __file__resolver,  r   r?  r  r  r  r  rU   rc   rh   rm   rw   r   r   r   r   r   r   r  r'  r*  r4  r8  r   r  r*  r6  rD  __name__rq   rV   rT   <module>rT     s   L "       0 H~''*
Ul		 :

 C
 E
	 C
 E
	 D

 E
 E
 E
 <

Cl` 	P 	U 	U 	NW- )"8A,	  	
 .(,]#]] %] $	]
 
]@0,^  04/3&*tt#t "&t  $	t
 "&t !%t "&t "-t "-t $t 
tnePZz 25 	. zF rV   