+
    ,i  c                   s    ^ RI Ht ^ RIt^RIHtHtHt ^RIHt ^RI	H
t
HtHt ^RIHt ]! RRR7       ! R	 R
]4      4       t ! R R]
4      t ! R R]],          4      tR# )i    )	dataclassN)BoundsBoundsRuletypeType)DiffResultDescriptor)
DifferenceDifferenceResultWrapper)type_wrapper_factoryT)ZfrozenZorderc                   s0   a  ] tR t^t o RtV 3R ltRtV tR# )ModifiedBoundsz.Difference details for a modified bounds rule.c                s>   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )   ruleZadded_boundZremoved_bound)r   r   Zformat__classdict__   ":/usr/lib64/python3.14/site-packages/setools/diff/bounds.py__annotate__ZModifiedBounds.__annotate__   s+     
 L          N)__name__
__module____qualname____firstlineno____doc____annotate_func____static_attributes____classdictcell__r      @r   r	   r	      s      9  r   r	   c                   s   a  ] tR t^t o RtV 3R lR lt]],          ! ]4      t]],          ! ]4      t	]]
,          ! ]4      tRtRtV 3R lR ltV 3R lR ltV 3R	 ltR
tV tR# )BoundsDifferencez9Determine the difference in *bounds between two policies.c                   < V ^8  d   QhRR/# r
   returnNr   r   r   r   r   BoundsDifference.__annotate__   s     H H Hr   c                s   V P                   P                  RV P                   RV P                   24       V P                  e   V P
                  f   V P                  4        V P                  R \        P                  ! \        \        ,          V P                  4       4       R \        P                  ! \        \        ,          V P
                  4       4       R R7      w  V n        V n        p\        \        ,          ! 4       V n        V Fm  w  r#\!        VP"                  4      \!        VP"                  4      8w  g   K4  V P                  P%                  \        W#P"                  VP"                  4      4       Ko  	  R# )z@Generate the difference in typebound rules between the policies.z'Generating typebounds differences from z to Nc              3   8   "   T F  p\        V4      x  K  	  R # 5iNBoundsWrapperZ.0Zc   & r   	<genexpr>3BoundsDifference.diff_typebounds.<locals>.<genexpr>(   s     X'W!]1'W   c              3   r"   r#   r$   r&   r'   r   r(   r)   )   s     Y'X!]1'Xr*   c                 s,    \        V P                  4      # r#   )Zstrchild)Zb   &r   Z<lambda>Z2BoundsDifference.diff_typebounds.<locals>.<lambda>*   s    #agg,r   key)logZinfoleft_policyright_policy_left_typebounds_right_typebounds_create_typebound_listsZ	_set_difftypingZcastlistr   added_typeboundsremoved_typeboundsr	   modified_typeboundsr   parentappend)selfZmatched_typeboundsZ
left_boundZright_bounds   &   r   diff_typeboundsZ BoundsDifference.diff_typebounds   s%    	5d6F6F5GtDL]L]K^_	a   (D,B,B,J((*MQ^^Xv{{4<AVAV'WXYv{{4<AWAW'XY& N\ N(Jt68J
 $(#7#9 '9#J#J$5$56:N{OaOa:bb((// 2 2J4E4E1G H (:r   Nc                r   r   r   r   r   r   r   r!   >   s     _ _ _r   c                s:   . V n         V P                  P                  4        Fh  pVP                  \        P
                  8X  d   V P                   P                  V4       K?  V P                  P                  RVP                   R24       Kj  	  . V n	        V P                  P                  4        Fh  pVP                  \        P
                  8X  d   V P                  P                  V4       K?  V P                  P                  RVP                   R24       Kj  	  R# )z$Create rule lists for both policies.zUnknown rule type: z (This is an SETools bug)N)r2   r0   Zboundsruletyper   Z
typeboundsr;   r/   Zerrorr3   r1   r<   r   r'   r   r4   Z(BoundsDifference._create_typebound_lists>   s     "$$++-D}} 9 99%%,,T2!4T]]OC\]^	 . "$%%,,.D}} 9 99&&--d3!4T]]OC\]^	 /r   c                r   r   r   r   r   r   r   r!   N   s     & &T &r   c                s`    V P                   P                  R4       V =V =RV n        RV n        R# )z%Reset diff results on policy changes.z!Resetting all *bounds differencesN)r/   Zdebugr7   r8   r2   r3   r<   r,   r   _reset_diffZBoundsDifference._reset_diffN   s1    :;!# !%!%r   c                sn   < V ^8  d   Qh/ S[ S[,          R,          ;R&   S[ S[,          R,          ;R&   # )r
   Nr2   r3   )r6   r   r   r   r   r   r!      s1     < 6lT)0= > F|d*1? r   )r2   r3   r7   r9   r8   )r   r   r   r   r   r=   r   r   r7   r8   r	   r9   r2   r3   r4   rA   r   r   r   r   r   r   r   r      sr     CH H* ,F3OD-f5oF.~>O -1-1
_ _ & &i  r   r   c                   sL   a  ] tR t^Yt o RtR	tV 3R lR ltR tR tR t	Rt
V tR# )
r%   zWrap *bounds for diff purposes.c                s$   < V ^8  d   QhRS[ RR/# )r
   r   r    N)r   r   r   r   r   ZBoundsWrapper.__annotate___   s      V  r   c                s    Wn         VP                  V n        \        VP                  4      V n        \        VP                  4      V n        \        V4      V n        R # r#   )originr>   r   r:   r+   Zhashr.   r?      &&r   __init__ZBoundsWrapper.__init___   s=    *4;;7)$**5
:r   c                s    V P                   # r#   r-   r@   r,   r   __hash__ZBoundsWrapper.__hash__f   s    xxr   c                s4    V P                   VP                   8  # r#   r-   r<   ZotherrC   r   __lt__ZBoundsWrapper.__lt__i   s    xx%))##r   c                sv    V P                   VP                   8H  ;'       d    V P                  VP                  8H  # r#   )r>   r+   rF   rC   r   __eq__ZBoundsWrapper.__eq__l   s1    }}. & &JJ%++%	&r   )r+   r.   rB   r:   r>   N)r>   r:   r+   )r   r   r   r   r   Z	__slots__rD   rE   rG   rH   r   r   r   r   r   r%   r%   Y   s+     )/I $& &r   r%   )Zdataclassesr    r5   Z	policyrepr   r   r   Zdescriptorsr   Z
differencer   r   r   Ztypesr   r	   r   r%   r   r   r   <module>rI      s_    "  4 4 - = = ' $d#%  $<&z <&~&GFO &r   