All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Lib.Krakatau.java.structuring.pyc Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
?
?HRc@s?ddlZddlZddlZejZddlmZddlmZddlm	Z	ddl
mZddlm
Z
mZmZmZmZmZd	efd
??YZdefd??YZej?Zd
ddddfZdefd??YZd?Zd?Zd?Zd?Zd?Zd?Zd?Z d?Z!d?Z"d?Z#d?Z$d?Z%d ?Z&d!?Z'd"efd#??YZ(d$?Z)d%?Z*d&?Z+d'?Z,d(d)?Z-d*?Z.dS(+i????Ni(t
graph_utili(t
graphproxy(t	ssa_jumps(tExceptionSet(tSEBlockItemtSEScopetSEIftSESwitchtSETrytSEWhilet
DominatorInfocBs5eZd?Zd?Zd?Zd?Zd?ZRS(cs?i|f|6|_}|g}xC|re|j?}||ksGt?x|jD]
}|||f?|j|?}?|kr?|dkr??nt?fd?|D???|?dks?t?n|dk	r)?|kst??t|?kst??d|kr ?d|ks)t?n?|krQ?||<||kr^|j|?q^qQqQWq#Wt	|j?|_
||_dS(Nc3s!|]}|?kr|VqdS(N((t.0tx(tnew(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	,si????i(t_domstpoptAssertionErrort
successorstgettNonettupletlentappendtsettnodesettroot(tselfRtdomststacktcurtchildtold((R
s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt__init__"s(		.*)
cCs|j|S(N(R(Rtnode((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt
dominators8scCsLgtt|jj|??D]$}tt|??dkr|^qddS(s!Get the common dominator of nodesii????i(tziptmapRRRR(RtnodesR((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt	dominator;scs#t?fd?|jj?D??S(Nc3s'|]\}}?|kr|VqdS(N((Rtktv(R!(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	As(RRtitems(RR!((R!s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytarea?scs4|j|??tj|?fd??}t|?S(Ncs|?krgS|jS(N(tpredecessors(R(tdom(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytEs(R&RttopologicalSortR(RR%ttemp((R,s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytextendCs(t__name__t
__module__R R"R&R*R0(((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR
!s
				tScopeConstraintcBseZd?ZRS(cCs||_||_dS(N(tlboundtubound(RR4R5((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR Js	(R1R2R (((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR3IstwhilettrytswitchtiftscopetCompoundConstraintcBs eZd?Zd?ZeZRS(cCs|tkst?||_||_||_|dk	rHt|g?nt?|_t?|_|_	t
?jg|jD]}|j^qz?|_t
?jg|jD]}|j
^q??|_
|dk	r?|jj|?|j
j|?n|j
|jks
t?tt?|_dS(N(t
_gcon_tagsRttagtscopestheadRt	frozensettheadstforcedupt
forceddownRtunionR4R5taddtnextt_counttid(RR=R?R>R:((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR Qs			'..cCs|jt|j?S(N(R=tstrRH(R((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt__str__bs(R1R2R RJt__repr__(((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR;Ps		cCs{|j|?}|j|gg|jD]}||kr%|^q%?}t|?dks_t?tddt||?g?S(NiR6(R*R0R+RRR;RR3(R,R?R5tn2R4((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytWhileCones8cCs?t|g?}t||j??}tdd|g?}t?|_t?|_||_||_||_	t
|jj?dks?t?|jjd|_
|S(NR7ii(RR3tcopyR;RRBRCttargettcsettcatchvarRRRtorig_target(ttrynodeRORPRQttryboundttryscopeR
((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytTryConks			cCs"tddt||j??g?S(NR:(R;RR3RN(R4((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt
FixedScopeCon{sc
	s?|}g}x?|r?g}t|??tj|?fd??}x?|D]?}t|?dkrgqInt|??g|D]}?j|j?sz|^qz}t|?dkr?|d}n?dGdjt|?t|??GH?fd?}	g|D]*}|tj|tj	|	|??f^q?}
x!|
D]\}}|j
|?q+Wt|
dd??\}}||ksut?d	jt|??GHt
j|??}||7}||7}|j|?|j
|?|j|?qIW|}qW|S(
Ncs&g|jD]}|?kr
|^q
S(N(R+(tblockR(R/(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-?siisRWarning, multiple entry point loop detected. Generated code may be extremely larges({} entry points, {} blocks)cs6||krgSg|jD]}|?kr|^qS(N(R(R?RXR(tscc_set(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytloopSuccessors?stkeycSs"t|d?t|dj?fS(Nii(RR+(tt((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-?ssDuplicating {} nodes(RRt	tarjanSCCRt
issupersetR+tformatR.t	functoolstpartialtremovetminRRtduplicateNodesR0R(
R%ttodotwhile_headstnewtodotsccstscctntentriesR?RZtreachest	reachabletnewnodes((RYR/s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytstructureLoopss<	
+
7




cCs?g|D]-}|jrt|jjtj?r|^q}g}xD|D]<}|jjj}|jjjd}i}g}|j||j||f?t	j
}x2|jj?D]!}	||	@s?t
?||	O}q?W||jks?t
?x?|jj?D]?\}
}	|j|
jtf}|	||<|jj|?|jj|?gt|j||j?D]\}}
||kr`|
^q`}t|?dks?t
?|r?|j?nd}g|j|D]}||kr?dn|^q?}|j|=x?|	j?D]~}t	j|	j|d?}|jg?}|jj|?|jj|?||j|<|j|?|j|||f?q?Wq?WqGW|S(Nii( RXt
isinstancetjumpRtOnExceptiontcstparamsRtmaskRtEMPTYtsetstvaluesRR)t	blockdictR[tTrueR+RbRR#toutvarstinvarsRRRt	getTopTTstfromTopstenvt
indirectEdgesteassigns(R%Rjt
thrownodestnewinfostmanagert	thrownvartmycsetst
mytryinfosR/RPthandlertentv1tv2t
caughtvarst	caughtvarR(R{tttttopR
((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytstructureExceptions?s@:
	
>2


"cs?t|??g|D]-}|jrt|jjtj?r|^q}g|D]-}|jrMt|jjtj?rM|^qM}g}x?|D]?}|j}g|D]!}|?j|?kr?|^q?}g|D]}||kr?|^q?}	?fd?|	D?}
i}xm|	D]e}g|
j	?D]$\}}
|
j
|j?s%|^q%||<|||kr||j|?qqWt
j|	|j?}i}x?|D]?}||r?t||?dko?||d|k}|o?|j||d|?|k}|s1|j|?|	j|?|
|=||=q1q?q?Wg|	D]}||kr<|^q<}g}xk|D]c}|}|j|?xG||r?|||d|ks?t?||d}|j|?q?WqgW|ddd?}x:|D]2}|j|g?}|j|?|j|?q?Wt|?t|?koQt|	?t|?kns\t?|j||f?q?Wg}x]|D]U}|j}g|D]}|j|g?^q?}|j|?|j||f?q?W||fS(Ncs"i|]}?j|?|?qS((R*(RR(R,(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys
?s	iii????(R
RXRpRqRtSwitchtIfRR"R)t
isdisjointR+RbRR.RRt
setdefaultRRR?R0(t	entryNodeR%RjtswitchnodestifnodestswitchinfosttargetsRtbadtgoodtdomainstparentsR'R(t
depthfirsttchosenChildROtisOktleavestorderedtleafRR
tifinfos((R,s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytstructureConditionals?s^::
	.%
;

*&

%




>

%
csg}x$|D]}|jt||??q
Wd?|D??t?fd??}xK|D]C\}}	}
}x.|
j?D] \}}
|||c|
8s	cs
?j?S(N(RN((tmasks(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-strepeatiR8R9(RRMtddictR)RxtkeysRVt	itertoolstproductRPRRBRERCRRRNt	forbiddenR?tallR0treversedR"R+R*R3R;tlistR(R,RftnewtryinfosR?R?tconstraintsR?tforbid_dictsRjRutcsetsttryinfostotRPtforbidR'R?ROR?tconstcontcon2R?tlastR>RtfallthroughsR4R5R?((R?s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytcreateConstraintssj

1"

.	
c Csd}tt?}t?}t|?}t|j?|ksBt?xv|D]n}|j|ksdt?|j|ksyt?x;|jD]0}|j|ks?t?|j|ks?t?q?WqIW|}	x?|	rXg}
|	dg}t|?}t?}
t?}xJ|rH|j	?}||kr0|j
|?q?n|
j|?|g|jD](}||krJ|j
|?rJ|^qJ7}|g|j
D](}||kr?|j
|?r?|^q?7}|jj|
?s?|
|jO}
|j|
?}
g|D]}|
|j@r?|^q?}|g|D](}||kr|j
|?r|^q7}q?q?W|
|ks[t?|
rv|
|j|
?ks|t?g|
D]}|jj|
?r?|^q?}g|
D]}|jj|?r?|^q?}g}x?|D]?}tt?}t}x?|
D]?}||krq?ng|jD]}|j|j@r |^q }t|?dksn|djj|j?rxt}Pn||dc|jORRERRBRCtissubsetR0R^tFalseRRzR)RARDR?tintersectionRbRW( R,R?R%tDummyParenttchildrentfrozentnode_settitemR:ReR)tqueuetisettnsetR?ti2thitstit
candidatestcscope_assignstcnodetsvalsR?tsR>texttparentR/R'R(Rtcroot((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytorderConstraintsWs?	
	
			

<<
&@!++

,,!%:
	
%c	sii?x??j?D]?\}}xr|D]j}g|jD]}|j|j@r6|^q6}|?krvt|?dks|t?||df?|R4Rb(R?R?tpscopeRR?R>(R?R?(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytremoveFromTree?s,cs?g|jD]}|j|j@r
|^q
}||df?|R4RRRb(R?R?R?R>R:tcR?R(R?R?(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytinsertInTree?s,
-
cSsNxG|jD]<}||kr
||c|j8<||sF||=qFq
q
WdS(N(R4RP(R?tnewdownRj((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytunforbid?s

cs|j|B}|j|B}||ks,t?|j|?||@rGtS?j|j|B?}t|j?}	x|D]}
|	|
jM}	qsWx?t	}?|\}}
x?||j
dkr?|n|
jksT|j
dkr||kr?||tjt?t?|?}|sPqn||jO}||ks=||	krAtS?|\}}
q?W|r?Pq?q?x/?|D]#}|j|@rm||jO}qmqmW||	ks?tS|j
|B}|jj?}x"||jD]}?||?q?Wt|j??s?t?x?|D]?}||kr|||@r|||@}g?D]}||kr9|^q9}g|D]-}||jkr^|jj|?r^|^q^}g|D]}|j
|@r?|^q?}g|D]$}||kr?||k	r?|^q?}x?|D]?}||krq?n|j||}|j|?x|D]}?||?q,W||ksUt?||O}||j|tj?@}|s?Pq?q?W|r?||jks?||j
s?t?tSqqW|j|?s?t?t|j??s?t?x#|D]}
|
j|ks?t?q?W||_||_
||_||_||_|j?|jd_|	j?|jd_x0|jD]%}|jj|?|j|O_qoWxh|jD]]}?|j|?x%||jD]}?|j|?q?W|jj|?|j|O_q?W?|??||?t	S(NR7i(RBRCRtdiscardR?R0R4RR5RzR=RRvRPR?RNR?RxR?RERR?R>(R?t	newblockstxCSettxUpstxDownstremovedRBRCtbodyR5ttcontdoneR?R?RRPR?R?R!R?R?R?ttopndR/R
tnew2(R?R,R?R?R?t	tryExtendttryconsR?(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR??s?




'%



%:&1



"
					

R7cs|?kr?|gSgS(N((tcn(R?(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-PsR[cs&g|jD]}|?kr
|^q
S(N(R(R!R(t	backnodes(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-^scsqt?|g?}|j?jkrm|j?j|Bkrm|j?j|Bkrj|j?jsgtSqjqmntS(N(RR4RCRBRPRzR?(R?tokdiff(R?(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt
removeablels
css|]}|jVqdS(N(RO(RR?((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?scSs&i|]\}}||jd?qS(i(R(RR'R(((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys
?s	("R)R>R4RRRR=RR.tsortedtindexRcR"ROR5RRR?RBRbRPRCRER?R@RNR+RR{R?RR?RR
R(R,R?R?R%R'RsRR?R>t	topoorderR?ttryheadt
catchreachR?R?tsuccessR?R?R?t
removed_nodesR:RURjR!RR/teaR?R?((
R?R?R?R,R?R?R?R?R?R?s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytmergeExceptions?s?
,$
	$j(	
!7.(

/	


$'%%


%
+.	

!
csx|D]??jdkr"qnt?jg?}|j?j?}t||?}?jj|??j??jd}tj	?t???fd?|j
D??|_
?`|j|jB?_|j
|j
B?_
|jj
|j
?s?t?|j
j|j
?st?qWdS(NR7ic3s.|]$}??jj|??@s|VqdS(N(R?R(RR(R?RPtempty(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?s(R=RROR*R3R>RRPRRvR5R?R4R?RR?(R,R?R4R5tcscopettscope((R?RPR?s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytfixTryConstraints?s 
	
	(cCs?|j|?}||j|?M}||k}xp|s?t}x]t|?D]O}||krbqJnx4|jD])}||krlt}|j|?PqlqlWqJWq1W||j|?ks?t?|j	|?s?t?||j|?ks?t?|S(N(
R&R*RzR?tpredecessors_nlR?RbR0RR^(R,R4R5tudomR?Rty((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt_dominatorUBoundClosure?s"	
cCs?tjg|D]$}||kr
|t|ff^q
?}td?|D??}xY|r?|j?\}	}
}|
p~|	|k}|	|ko?|	|k}
|r6|	|kr?|dfSg|	jD]}||kr?|^q?}xV|D]K}|tf|kr?|j|tf?|j|t||ff?q?q?Wn|
rS||	}|t	f|kr?|j|t	f?|j|t	||ff?q?qSqSWdtd?|D??fSdS(Ncss|]}|tfVqdS(N(Rz(RRj((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?scss!|]\}}|r|VqdS(N((RRtfront((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	
s(
tcollectionstdequeRzRtpopleftRt
successors_nlRERR?(t
startnodeststartsettendsettusedtbackedgetboundRjR?tseentpostlastfwtpathtcanfwdtcanbackRRtpos2((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt_augmentingPath?s(:	
(
'
'cCs1t|?}t|?}||B}t?}i}x?t||||||?\}}|dkrm|||@BS|d|kr?|d|ks?t?x?t|d|?D]\}	}
|
|	jkr?|	|ks?t?||	|
ks&t?q?|j|	?|
||	<||	dk|	|kks?t?q?Wq4dS(Nii????(N(R@RRRRR#tnorm_suc_nlRE(RtendnodesRRRRRRtlastseenR	R?((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt_mincuts"
	!& 

cs?i}x?|j?D]t\}}xe|D]]}g|jD]!}|jj|j?r6|^q6}	t|	?dksut?|	d||+s	R[cs$??j|j?t|j?fS(N(R&R4RR5(R?(R,t	nodeorder(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-4scss=|]3}|jdks1t|jjtj?r|VqdS(N(RXRRpRqRtReturn(RRj((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	Fs(R)R>R4R?RRRR.Rt	enumerateRR?RR5R^R?RNRRR?tchainRERR@tupdateR0R(R,R?R?tisClinittparentscopeR'R(RR:tpscopesRR?trevordertfrozen_nodesR?R?R>R5totherR?R/RjtpartsRRRRtinteriortnewchildrenR?((R,Rs@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytcompleteScopes"sj
1		"		,

+>+>/
*


*	-t_mnodecBs eZd?Zd?ZeZRS(cCs"||_t?|_g|_dS(N(R?RR%R)(RR?((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR ss	cCsdt|j?dS(NtMi(RIR?(R((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyRJys(R1R2R RJRK(((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR#rs		cs`?fd?|D??x?t|d|?D]?}x?|jD]?}||krQq9ntgt?|?|?D]\}}||krl|^ql?}|r??|| ?|| ks?t??|| ?||jD]3}||kr?q?nt|_|j|j7_q?W|j|j|_x!|jdD]}t|_q:Wn|js_t?tt|j??t|j?ksVt?qVWg}xn|D]f}|js?q?nt?g}}x+|jD] }||jO}||j7}q?W|j
||f?q?Wtt j!j"t|?d??}t|?t|?krVt|?t|?ks\t?|S(Ncs"i|]}?j|?|?qS((R"(RRj(R,(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys
s	R[c3s)|]}?|d|kr|VqdS(i????N((RRj(tdomC(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?scss!|]}|t|?fVqdS(N(R#(RR'((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?si????icsGi|]=}dgg?|d D]}|?kr!|^q!|?qS(i????N(R(Rthth2(R%tmdata(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys
?s	icss|]}|jdkVqdS(R8N(R=(RR?((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?sicSs|jS(N(R?(tmn((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-?scss|]}t|j?VqdS(N(RR?(RR)((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?scSs|jt|j?|jfS(N(tdepthRtsubtreettiebreak(R)((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-?scss|]}|jVqdS(N(R*(RR)((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?scss|]\}}||VqdS(N((RR?td((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	?s(#R?RRR#RRR?tOrderedDictR%RER&R4R)RR?RbRzR?tselectedR+R*tanyR,R?RR.RxtsumtmaxRR?R?R?Rt
from_iterable(R,trno_getR?t	childconsRjRLRR?tmatchRAR?R?R&R?R't	domPrunedtmnodetmnode2Rt	successortdepthsR/RtsubnodetresultsRR%R)((R,R%R(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt
_addBreak_sub|s?B(
1%
 



&	3@,
	&	.
	
"6cCs?tj|jgd??}d?t|?D?}|j}|g}x`|r?|j?}||}g}	||?s	ii(RR.RRRRR>R4R>RR0RRWRt_checkNested(R,R?R?R?RR4RR?toldchildrenR!R:R?tsubconsR=R\R%R)R
((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytaddBreakScopes?s,			+/%



cs?d?|D?}tj|g?fd??}x?|D]z}g}x?|jD]?}|j}	|j|	?}
g}x?|
dk	r?||
}||
=|j|?g|jD]}
|
|	kr?|
^q?}t|?dks?t	?|r?|dnd}
qrWt
|?}|j|?|jt|	?ksKt	?qKW|j
d
krl||j}t|t?s_t	?||j=nd}|j
dkr?t|d?}n?|j
dkr?|d|dg}t||?}n?|j
dkrg|D]}t
|g?^q?}t||?}nc|j
dkrS|jj?}|j}t|d|d||?}n|j
d	kro|d}n|jt|j?ks?t	?|j|ks?t	?|||j?s	cs?|S(N((R?(R?(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR-?siiR9R8R6R7R:(sifsswitch(RR.R>R4R&RRRRRRR%R@R=R?RpRR	RRRPR}RQRt
entryBlockRx(R,R?R?R%tseitemsRR?tsescopesR:R?R	R)R?RjtsuctnewscopeR?R
tsescopetcatchttsRQ((R?s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytconstraintsToSETree?sV
	

(


"	 
cCs@x9|j?D]+\}}x?|D]?}|j|jks>t?|j|jksVt?g|jD]}|j|j@r`|^q`}t|?dks?t?xYtj|jd?D]B\}}|jj|j?s?t?|jj|j?s?t?q?Wq Wx;tj|d?D]'\}}|jj|j?s
t?q
Wq
WdS(Nii(	R)R4RR5R>RR?tcombinationsR?(tctree_childrenR'R?RR?R>tc1tc2((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyR?1s
,"#tcs?ddl}|jdt?}|j|?x?|D]?}xy|jD]n?d}t|jjtj	?r?t
?fd?|jjj?D??r?d}q?n|j|?d|?qBWq2W|j
dd?|jd	j|??dS(
Ni????tdirectedtblackc3s!|]}|j?jkVqdS(N(R[tbkey(Rtb(RL(s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pys	Istgreytcolortprogtdots
file{}.png(t
pygraphviztAGraphRztadd_nodes_fromRRpRXRqRRrR0tgetExceptSuccessorstadd_edgetlayouttdrawR_(R%toutntpgvtGRjRU((RLs@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt_debug_drawAs

(cCs?x:|D]1}||jkr|j|j|g??qqWg|D]-}|jrDt|jjtj?rD|^qD}|r
|r
t|?dks?t	?|d}xN|j
dD]?}|j?}|g|_
|ji||6?|j|?q?W|j
d |_
nx?|D]?}x&|j
D]}||jks!t	?q!Wx&|jD]}||j
ksJt	?qJWt
|j?t
|j?t
|j?Bkst	?qWt|?}	t|?}
t||?\}}t|?}
t|
|	|
||?}t|
||?\}}t|
|||?\}
}}t|
|?t|
||?\}}x?|D]?}t
|
j|??}|
j|?}g|jD]}||kr?|^q?|_g|j
D]}||kr?|^q?|_g|jD]}||jkr?|^q?|_qQWx`|D]X}x&|jD]}||jkst	?qWx&|jD]}||jksCt	?qCWq
Wt|?t|
|||?t|?t|
|||?t|?t |
|||?S(Nii(!RRR?RXRpRqRRRRR+tnewDuplicatetreplaceSuccessorsRR{R?RoR?R?R
R?R?R?R?R"R*RR?RR?R"RBRJ(R?R%RRjt	retblockstrettpredR
RRfR?R?R?R,R?R?RLR/ttemp2RL((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pyt	structurePsZ :


5

++2



(/R?R?R`tdefaultdictR?RORRtssaRtssa.exceptionsetRtsetreeRRRRRR	tobjectR
R3tcountRGR<R;RMRVRWRoR?R?R?R?R?R?R?RRR"R#R>RBRJR?RbRi(((s@/home/alex/projects/github/krakatau/Krakatau/java/structuring.pytsB$	.(				,	+	@	A	e	?					P
	`		8	




© 2015 - 2025 Weber Informatics LLC | Privacy Policy