diff --git a/build.txt b/build.txt index 12abeccdea7af702eee84cbe155552c61ca14a17..e0a45cc1416decb411ba87b8a7b19e6850f73608 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -12521 \ No newline at end of file +12527 \ No newline at end of file diff --git a/modeling/AVATAR/MicroWaveOven_SafetySecurity_fullMethodo.xml b/modeling/AVATAR/MicroWaveOven_SafetySecurity_fullMethodo.xml index 120a55c16f890ad8902c10922e7aec3694eea10e..88478a23c6cec072f7a62aa47dc53d15bb07d41f 100644 --- a/modeling/AVATAR/MicroWaveOven_SafetySecurity_fullMethodo.xml +++ b/modeling/AVATAR/MicroWaveOven_SafetySecurity_fullMethodo.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<TURTLEGMODELING version="0.99-beta4"> +<TURTLEGMODELING version="1.0beta"> <Modeling type="Avatar Methodology" nameTab="Methodology" > <AvatarMethodologyDiagramPanel name="AVATAR_Methodology" minX="10" maxX="1400" minY="10" maxY="900" zoom="1.0" > @@ -5281,7 +5281,7 @@ or by a maintenance station <MainCode value=""/> <MainCode value="}"/> <Optimized value="true" /> -<Validated value="" /> +<Validated value="ObserverProp1;RemotelyControlledMicrowave;RemoteControl;MicroWaveOven;Bell;ControlPanel;Controller;Magnetron;Door;WirelessInterface;" /> <Ignored value="" /> <CONNECTOR type="5002" id="2890" > @@ -10109,7 +10109,7 @@ or by a maintenance station <MainCode value=""/> <MainCode value="}"/> <Optimized value="true" /> -<Validated value="" /> +<Validated value="ObserverProp1;RemotelyControlledMicrowave;MicroWaveOven;Door;Magnetron;Controller;ControlPanel;Bell;" /> <Ignored value="" /> <CONNECTOR type="5002" id="4993" > diff --git a/modeling/DIPLODOCUS/SmartCardProtocol.xml b/modeling/DIPLODOCUS/SmartCardProtocol.xml index 2b63d09a41b2300e80d0fa29d6f4e5a5407e75c4..93f0174acc7e7e974e63f52e1532f66aaf807898 100755 --- a/modeling/DIPLODOCUS/SmartCardProtocol.xml +++ b/modeling/DIPLODOCUS/SmartCardProtocol.xml @@ -8,192 +8,192 @@ <cdparam x="522" y="390" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="522" y="390" id="60" /> -<P2 x="468" y="336" id="39" /> +<P1 x="535" y="377" id="200" /> +<P2 x="455" y="323" id="47" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="2" > <cdparam x="409" y="124" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="402" y="84" id="37" /> -<P2 x="593" y="85" id="186" /> +<P1 x="402" y="84" id="49" /> +<P2 x="593" y="85" id="82" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="3" > <cdparam x="652" y="444" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="554" id="89" /> -<P2 x="971" y="502" id="152" /> +<P1 x="805" y="544" id="179" /> +<P2 x="971" y="481" id="107" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="4" > <cdparam x="652" y="418" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="522" id="87" /> -<P2 x="922" y="482" id="154" /> +<P1 x="805" y="512" id="181" /> +<P2 x="932" y="472" id="105" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="5" > <cdparam x="602" y="327" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="752" y="408" id="79" /> -<P2 x="831" y="376" id="103" /> +<P1 x="752" y="408" id="189" /> +<P2 x="844" y="363" id="150" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="6" > <cdparam x="685" y="310" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="857" y="376" id="107" /> -<P2 x="922" y="368" id="144" /> +<P1 x="844" y="389" id="154" /> +<P2 x="932" y="358" id="115" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="7" > <cdparam x="652" y="395" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="493" id="83" /> -<P2 x="922" y="459" id="146" /> +<P1 x="805" y="483" id="185" /> +<P2 x="932" y="449" id="113" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="8" > <cdparam x="652" y="369" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="461" id="85" /> -<P2 x="922" y="432" id="148" /> +<P1 x="805" y="451" id="183" /> +<P2 x="932" y="422" id="111" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="9" > <cdparam x="737" y="314" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="922" y="403" id="150" /> -<P2 x="816" y="432" id="81" /> +<P1 x="932" y="393" id="109" /> +<P2 x="805" y="422" id="187" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="10" > <cdparam x="735" y="260" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="919" y="336" id="142" /> -<P2 x="749" y="284" id="198" /> +<P1 x="932" y="323" id="117" /> +<P2 x="736" y="271" id="70" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="11" > <cdparam x="641" y="230" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="749" y="248" id="200" /> -<P2 x="919" y="297" id="140" /> +<P1 x="736" y="235" id="68" /> +<P2 x="932" y="284" id="119" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="12" > <cdparam x="641" y="195" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="749" y="204" id="202" /> -<P2 x="919" y="254" id="138" /> +<P1 x="736" y="191" id="66" /> +<P2 x="932" y="241" id="121" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="13" > <cdparam x="740" y="353" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="831" y="376" id="102" /> -<P2 x="749" y="315" id="204" /> +<P1 x="844" y="363" id="149" /> +<P2 x="736" y="302" id="64" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="14" > <cdparam x="460" y="270" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="522" y="304" id="194" /> -<P2 x="468" y="304" id="45" /> +<P1 x="535" y="291" id="74" /> +<P2 x="455" y="291" id="41" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="15" > <cdparam x="387" y="129" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="466" y="127" id="49" /> -<P2 x="525" y="127" id="206" /> +<P1 x="455" y="117" id="37" /> +<P2 x="535" y="117" id="62" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="16" > <cdparam x="389" y="200" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="468" y="216" id="43" /> -<P2 x="522" y="216" id="192" /> +<P1 x="455" y="203" id="43" /> +<P2 x="535" y="203" id="76" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="17" > <cdparam x="460" y="236" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="522" y="261" id="190" /> -<P2 x="468" y="261" id="41" /> +<P1 x="535" y="248" id="78" /> +<P2 x="455" y="248" id="45" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="18" > <cdparam x="460" y="296" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="536" y="349" id="188" /> -<P2 x="548" y="390" id="65" /> +<P1 x="536" y="323" id="80" /> +<P2 x="535" y="403" id="205" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="19" > <cdparam x="389" y="163" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="468" y="170" id="47" /> -<P2 x="522" y="170" id="196" /> +<P1 x="455" y="157" id="39" /> +<P2 x="535" y="157" id="72" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="20" > <cdparam x="967" y="190" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="919" y="204" id="136" /> -<P2 x="749" y="125" id="184" /> +<P1 x="932" y="191" id="123" /> +<P2 x="736" y="112" id="84" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="21" > <cdparam x="1028" y="535" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="630" y="347" id="208" /> -<P2 x="671" y="408" id="91" /> +<P1 x="630" y="326" id="60" /> +<P2 x="671" y="408" id="177" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="22" > <cdparam x="1304" y="321" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1224" y="379" id="121" /> -<P2 x="1180" y="386" id="156" /> +<P1 x="1234" y="369" id="138" /> +<P2 x="1169" y="376" id="103" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="23" > <cdparam x="1168" y="455" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1180" y="421" id="158" /> -<P2 x="1224" y="414" id="123" /> +<P1 x="1169" y="411" id="101" /> +<P2 x="1234" y="404" id="136" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="26" > <cdparam x="1037" y="180" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1180" y="214" id="160" /> -<P2 x="1180" y="282" id="162" /> +<P1 x="1169" y="204" id="99" /> +<P2 x="1169" y="272" id="97" /> <Point x="1224" y="226" /> <Point x="1224" y="266" /> <AutomaticDrawing data="true" /> @@ -218,8 +218,8 @@ <cdparam x="873" y="361" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1180" y="461" id="164" /> -<P2 x="1224" y="442" id="125" /> +<P1 x="1169" y="451" id="95" /> +<P2 x="1234" y="432" id="134" /> <AutomaticDrawing data="true" /> </CONNECTOR> <COMPONENT type="1205" id="36" > @@ -267,14 +267,14 @@ </COMPONENT> <SUBCOMPONENT type="1203" id="38" > <father id="59" num="0" /> -<cdparam x="389" y="84" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="445" y="117" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="278" minY="-13" maxY="264" /> -<infoparam name="TGComponent" value="Event reset, pTS" /> +<cdrectangleparam minX="-10" maxX="281" minY="-10" maxY="267" /> +<infoparam name="TGComponent" value="Request activation" /> <TGConnectingPoint num="0" id="37" /> <extraparam> -<Prop commName="reset, pTS" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="activation" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -284,16 +284,16 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="40" > <father id="59" num="1" /> -<cdparam x="442" y="323" /> +<cdparam x="442" y="157" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="278" minY="-13" maxY="264" /> -<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> +<infoparam name="TGComponent" value="Event data_Ready" /> <TGConnectingPoint num="0" id="39" /> <extraparam> -<Prop commName="answerToReset, pTSConfirm" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> +<Prop commName="data_Ready" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="uint_16" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Type type="1" typeOther="" /> +<Type type="2" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -301,14 +301,14 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="42" > <father id="59" num="2" /> -<cdparam x="442" y="248" /> +<cdparam x="442" y="291" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="278" minY="-13" maxY="264" /> -<infoparam name="TGComponent" value="Channel fromSCtoD" /> +<infoparam name="TGComponent" value="Event data_Ready_SC" /> <TGConnectingPoint num="0" id="41" /> <extraparam> -<Prop commName="fromSCtoD" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="data_Ready_SC" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -335,14 +335,14 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="46" > <father id="59" num="4" /> -<cdparam x="442" y="291" /> +<cdparam x="442" y="248" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="278" minY="-13" maxY="264" /> -<infoparam name="TGComponent" value="Event data_Ready_SC" /> +<infoparam name="TGComponent" value="Channel fromSCtoD" /> <TGConnectingPoint num="0" id="45" /> <extraparam> -<Prop commName="data_Ready_SC" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromSCtoD" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -352,16 +352,16 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="48" > <father id="59" num="5" /> -<cdparam x="442" y="157" /> +<cdparam x="442" y="323" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="278" minY="-13" maxY="264" /> -<infoparam name="TGComponent" value="Event data_Ready" /> +<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> <TGConnectingPoint num="0" id="47" /> <extraparam> -<Prop commName="data_Ready" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="uint_16" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> -<Type type="1" typeOther="" /> -<Type type="2" typeOther="" /> +<Prop commName="answerToReset, pTSConfirm" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -369,14 +369,14 @@ </SUBCOMPONENT> <SUBCOMPONENT type="1203" id="50" > <father id="59" num="6" /> -<cdparam x="445" y="117" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="389" y="84" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="281" minY="-10" maxY="267" /> -<infoparam name="TGComponent" value="Request activation" /> +<cdrectangleparam minX="-13" maxX="278" minY="-13" maxY="264" /> +<infoparam name="TGComponent" value="Event reset, pTS" /> <TGConnectingPoint num="0" id="49" /> <extraparam> -<Prop commName="activation" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="reset, pTS" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -403,61 +403,43 @@ <info hiddeni="false" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="1201" id="78" > +<SUBCOMPONENT type="1202" id="94" > <father id="227" num="0" /> -<cdparam x="522" y="377" /> -<sizeparam width="26" height="26" minWidth="10" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="-13" maxX="923" minY="-13" maxY="517" /> -<infoparam name="Composite port" value="" /> -<TGConnectingPoint num="0" id="60" /> -<TGConnectingPoint num="1" id="61" /> -<TGConnectingPoint num="2" id="62" /> -<TGConnectingPoint num="3" id="63" /> -<TGConnectingPoint num="4" id="64" /> -<TGConnectingPoint num="5" id="65" /> -<TGConnectingPoint num="6" id="66" /> -<TGConnectingPoint num="7" id="67" /> -<TGConnectingPoint num="8" id="68" /> -<TGConnectingPoint num="9" id="69" /> -<TGConnectingPoint num="10" id="70" /> -<TGConnectingPoint num="11" id="71" /> -<TGConnectingPoint num="12" id="72" /> -<TGConnectingPoint num="13" id="73" /> -<TGConnectingPoint num="14" id="74" /> -<TGConnectingPoint num="15" id="75" /> -<TGConnectingPoint num="16" id="76" /> -<TGConnectingPoint num="17" id="77" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="101" > -<father id="227" num="1" /> -<cdparam x="565" y="418" /> -<sizeparam width="240" height="146" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="535" y="98" /> +<sizeparam width="201" height="238" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="696" minY="0" maxY="384" /> -<infoparam name="TGComponent" value="Application" /> -<TGConnectingPoint num="0" id="93" /> -<TGConnectingPoint num="1" id="94" /> -<TGConnectingPoint num="2" id="95" /> -<TGConnectingPoint num="3" id="96" /> -<TGConnectingPoint num="4" id="97" /> -<TGConnectingPoint num="5" id="98" /> -<TGConnectingPoint num="6" id="99" /> -<TGConnectingPoint num="7" id="100" /> +<cdrectangleparam minX="0" maxX="735" minY="0" maxY="292" /> +<infoparam name="TGComponent" value="SmartCard" /> +<TGConnectingPoint num="0" id="86" /> +<TGConnectingPoint num="1" id="87" /> +<TGConnectingPoint num="2" id="88" /> +<TGConnectingPoint num="3" id="89" /> +<TGConnectingPoint num="4" id="90" /> +<TGConnectingPoint num="5" id="91" /> +<TGConnectingPoint num="6" id="92" /> +<TGConnectingPoint num="7" id="93" /> <extraparam> <Data isAttacker="No" /> +<Attribute access="2" id="resetType" value="0" type="0" typeOther="" /> +<Attribute access="2" id="a" value="0" type="0" typeOther="" /> +<Attribute access="2" id="b" value="" type="4" typeOther="" /> +<Attribute access="2" id="i" value="0" type="0" typeOther="" /> +<Attribute access="2" id="j" value="0" type="0" typeOther="" /> +<Attribute access="2" id="x" value="0" type="0" typeOther="" /> +<Attribute access="2" id="tcpctrl" value="" type="5" typeOther="TCP_CTRL" /> +<Attribute access="2" id="t" value="" type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="80" > -<father id="101" num="0" /> -<cdparam x="742" y="408" /> +<SUBCOMPONENT type="1203" id="61" > +<father id="94" num="0" /> +<cdparam x="620" y="326" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> -<infoparam name="TGComponent" value="Request start_TCP_IP" /> -<TGConnectingPoint num="0" id="79" /> +<cdrectangleparam minX="-10" maxX="191" minY="-10" maxY="228" /> +<infoparam name="TGComponent" value="Request start_Application" /> +<TGConnectingPoint num="0" id="60" /> <extraparam> -<Prop commName="start_TCP_IP" commType="2" origin="true" finite="false" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="start_Application" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -465,16 +447,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="82" > -<father id="101" num="1" /> -<cdparam x="795" y="422" /> +<SUBCOMPONENT type="1203" id="63" > +<father id="94" num="1" /> +<cdparam x="525" y="117" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> -<infoparam name="TGComponent" value="Channel fromTtoA" /> -<TGConnectingPoint num="0" id="81" /> +<cdrectangleparam minX="-10" maxX="191" minY="-10" maxY="228" /> +<infoparam name="TGComponent" value="Request activation" /> +<TGConnectingPoint num="0" id="62" /> <extraparam> -<Prop commName="fromTtoA" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="activation" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -482,16 +464,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="84" > -<father id="101" num="2" /> -<cdparam x="795" y="483" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="65" > +<father id="94" num="2" /> +<cdparam x="723" y="302" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> -<infoparam name="TGComponent" value="Event send_TCP" /> -<TGConnectingPoint num="0" id="83" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Request start_TCP_IP" /> +<TGConnectingPoint num="0" id="64" /> <extraparam> -<Prop commName="send_TCP" commType="1" origin="true" finite="false" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="start_TCP_IP" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -499,16 +481,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="86" > -<father id="101" num="3" /> -<cdparam x="795" y="451" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="67" > +<father id="94" num="3" /> +<cdparam x="723" y="191" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> -<infoparam name="TGComponent" value="Event open, abort, close" /> -<TGConnectingPoint num="0" id="85" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Event receive" /> +<TGConnectingPoint num="0" id="66" /> <extraparam> -<Prop commName="open, abort, close" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="receive" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -516,16 +498,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="88" > -<father id="101" num="4" /> -<cdparam x="795" y="512" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="69" > +<father id="94" num="4" /> +<cdparam x="723" y="235" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> -<infoparam name="TGComponent" value="Event receive_Application" /> -<TGConnectingPoint num="0" id="87" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Channel fromPtoT" /> +<TGConnectingPoint num="0" id="68" /> <extraparam> -<Prop commName="receive_Application" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromPtoT" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -533,16 +515,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="90" > -<father id="101" num="5" /> -<cdparam x="795" y="544" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="71" > +<father id="94" num="5" /> +<cdparam x="723" y="271" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> -<infoparam name="TGComponent" value="Channel fromAtoT" /> -<TGConnectingPoint num="0" id="89" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Channel fromTtoP" /> +<TGConnectingPoint num="0" id="70" /> <extraparam> -<Prop commName="fromAtoT" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromTtoP" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -550,98 +532,33 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="92" > -<father id="101" num="6" /> -<cdparam x="661" y="408" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="73" > +<father id="94" num="6" /> +<cdparam x="522" y="157" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> -<infoparam name="TGComponent" value="Request start_Application" /> -<TGConnectingPoint num="0" id="91" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Event data_Ready" /> +<TGConnectingPoint num="0" id="72" /> <extraparam> -<Prop commName="start_Application" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> +<Prop commName="data_Ready" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="uint_16" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Type type="1" typeOther="" /> +<Type type="2" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1200" id="183" > -<father id="227" num="2" /> -<cdparam x="844" y="134" /> -<sizeparam width="570" height="486" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="0" maxX="366" minY="0" maxY="44" /> -<infoparam name="TGComponent" value="TCPIP Entities" /> -<TGConnectingPoint num="0" id="175" /> -<TGConnectingPoint num="1" id="176" /> -<TGConnectingPoint num="2" id="177" /> -<TGConnectingPoint num="3" id="178" /> -<TGConnectingPoint num="4" id="179" /> -<TGConnectingPoint num="5" id="180" /> -<TGConnectingPoint num="6" id="181" /> -<TGConnectingPoint num="7" id="182" /> -<extraparam> -<info hiddeni="false" /> -</extraparam> -</SUBCOMPONENT> -<SUBCOMPONENT type="1201" id="120" > -<father id="183" num="0" /> -<cdparam x="831" y="363" /> -<sizeparam width="26" height="26" minWidth="10" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="-13" maxX="557" minY="-13" maxY="473" /> -<infoparam name="Composite port" value="" /> -<TGConnectingPoint num="0" id="102" /> -<TGConnectingPoint num="1" id="103" /> -<TGConnectingPoint num="2" id="104" /> -<TGConnectingPoint num="3" id="105" /> -<TGConnectingPoint num="4" id="106" /> -<TGConnectingPoint num="5" id="107" /> -<TGConnectingPoint num="6" id="108" /> -<TGConnectingPoint num="7" id="109" /> -<TGConnectingPoint num="8" id="110" /> -<TGConnectingPoint num="9" id="111" /> -<TGConnectingPoint num="10" id="112" /> -<TGConnectingPoint num="11" id="113" /> -<TGConnectingPoint num="12" id="114" /> -<TGConnectingPoint num="13" id="115" /> -<TGConnectingPoint num="14" id="116" /> -<TGConnectingPoint num="15" id="117" /> -<TGConnectingPoint num="16" id="118" /> -<TGConnectingPoint num="17" id="119" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="135" > -<father id="183" num="1" /> -<cdparam x="1234" y="329" /> -<sizeparam width="141" height="142" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="0" maxX="429" minY="0" maxY="344" /> -<infoparam name="TGComponent" value="Timer" /> -<TGConnectingPoint num="0" id="127" /> -<TGConnectingPoint num="1" id="128" /> -<TGConnectingPoint num="2" id="129" /> -<TGConnectingPoint num="3" id="130" /> -<TGConnectingPoint num="4" id="131" /> -<TGConnectingPoint num="5" id="132" /> -<TGConnectingPoint num="6" id="133" /> -<TGConnectingPoint num="7" id="134" /> -<extraparam> -<Data isAttacker="No" /> -<Attribute access="2" id="x" value="0" type="0" typeOther="" /> -</extraparam> -</SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="122" > -<father id="135" num="0" /> -<cdparam x="1224" y="369" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="75" > +<father id="94" num="7" /> +<cdparam x="522" y="291" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="131" minY="-10" maxY="132" /> -<infoparam name="TGComponent" value="Event timeOut" /> -<TGConnectingPoint num="0" id="121" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Event data_Ready_SC" /> +<TGConnectingPoint num="0" id="74" /> <extraparam> -<Prop commName="timeOut" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="data_Ready_SC" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -649,16 +566,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="124" > -<father id="135" num="1" /> -<cdparam x="1224" y="404" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="77" > +<father id="94" num="8" /> +<cdparam x="522" y="203" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="131" minY="-10" maxY="132" /> -<infoparam name="TGComponent" value="Request req_Timer" /> -<TGConnectingPoint num="0" id="123" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Channel fromDtoSC" /> +<TGConnectingPoint num="0" id="76" /> <extraparam> -<Prop commName="req_Timer" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromDtoSC" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="uint_16" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -666,16 +583,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="126" > -<father id="135" num="2" /> -<cdparam x="1224" y="432" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="79" > +<father id="94" num="9" /> +<cdparam x="522" y="248" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="131" minY="-10" maxY="132" /> -<infoparam name="TGComponent" value="Event stop" /> -<TGConnectingPoint num="0" id="125" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Channel fromSCtoD" /> +<TGConnectingPoint num="0" id="78" /> <extraparam> -<Prop commName="stop" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromSCtoD" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -683,42 +600,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="174" > -<father id="183" num="2" /> -<cdparam x="932" y="173" /> -<sizeparam width="237" height="318" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="0" maxX="333" minY="0" maxY="168" /> -<infoparam name="TGComponent" value="TCPIP" /> -<TGConnectingPoint num="0" id="166" /> -<TGConnectingPoint num="1" id="167" /> -<TGConnectingPoint num="2" id="168" /> -<TGConnectingPoint num="3" id="169" /> -<TGConnectingPoint num="4" id="170" /> -<TGConnectingPoint num="5" id="171" /> -<TGConnectingPoint num="6" id="172" /> -<TGConnectingPoint num="7" id="173" /> -<extraparam> -<Data isAttacker="No" /> -<Attribute access="2" id="wind" value="64" type="0" typeOther="" /> -<Attribute access="2" id="seqNum" value="0" type="0" typeOther="" /> -<Attribute access="2" id="i" value="" type="0" typeOther="" /> -<Attribute access="2" id="j" value="" type="0" typeOther="" /> -<Attribute access="2" id="a" value="0" type="0" typeOther="" /> -<Attribute access="2" id="b" value="0" type="0" typeOther="" /> -<Attribute access="2" id="tcpctrl" value="" type="5" typeOther="TCP_CTRL" /> -</extraparam> -</SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="137" > -<father id="174" num="0" /> -<cdparam x="919" y="191" /> +<SUBCOMPONENT type="1203" id="81" > +<father id="94" num="10" /> +<cdparam x="523" y="323" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> -<infoparam name="TGComponent" value="Event send" /> -<TGConnectingPoint num="0" id="136" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> +<TGConnectingPoint num="0" id="80" /> <extraparam> -<Prop commName="send" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="answerToReset, pTSConfirm" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -726,16 +617,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="139" > -<father id="174" num="1" /> -<cdparam x="919" y="241" /> +<SUBCOMPONENT type="1203" id="83" > +<father id="94" num="11" /> +<cdparam x="580" y="85" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> -<infoparam name="TGComponent" value="Event receive" /> -<TGConnectingPoint num="0" id="138" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Event reset, pTS" /> +<TGConnectingPoint num="0" id="82" /> <extraparam> -<Prop commName="receive" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="reset, pTS" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -743,16 +634,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="141" > -<father id="174" num="2" /> -<cdparam x="919" y="284" /> +<SUBCOMPONENT type="1203" id="85" > +<father id="94" num="12" /> +<cdparam x="723" y="112" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> -<infoparam name="TGComponent" value="Channel fromPtoT" /> -<TGConnectingPoint num="0" id="140" /> +<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> +<infoparam name="TGComponent" value="Event send" /> +<TGConnectingPoint num="0" id="84" /> <extraparam> -<Prop commName="fromPtoT" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="send" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -760,33 +651,61 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="143" > -<father id="174" num="3" /> -<cdparam x="919" y="323" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1200" id="176" > +<father id="227" num="1" /> +<cdparam x="844" y="134" /> +<sizeparam width="570" height="486" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> -<infoparam name="TGComponent" value="Channel fromTtoP" /> -<TGConnectingPoint num="0" id="142" /> +<cdrectangleparam minX="0" maxX="366" minY="0" maxY="44" /> +<infoparam name="TGComponent" value="TCPIP Entities" /> +<TGConnectingPoint num="0" id="168" /> +<TGConnectingPoint num="1" id="169" /> +<TGConnectingPoint num="2" id="170" /> +<TGConnectingPoint num="3" id="171" /> +<TGConnectingPoint num="4" id="172" /> +<TGConnectingPoint num="5" id="173" /> +<TGConnectingPoint num="6" id="174" /> +<TGConnectingPoint num="7" id="175" /> <extraparam> -<Prop commName="fromTtoP" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> +<info hiddeni="false" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="145" > -<father id="174" num="4" /> -<cdparam x="922" y="358" /> +<SUBCOMPONENT type="1202" id="133" > +<father id="176" num="0" /> +<cdparam x="932" y="173" /> +<sizeparam width="237" height="318" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="333" minY="0" maxY="168" /> +<infoparam name="TGComponent" value="TCPIP" /> +<TGConnectingPoint num="0" id="125" /> +<TGConnectingPoint num="1" id="126" /> +<TGConnectingPoint num="2" id="127" /> +<TGConnectingPoint num="3" id="128" /> +<TGConnectingPoint num="4" id="129" /> +<TGConnectingPoint num="5" id="130" /> +<TGConnectingPoint num="6" id="131" /> +<TGConnectingPoint num="7" id="132" /> +<extraparam> +<Data isAttacker="No" /> +<Attribute access="2" id="wind" value="64" type="0" typeOther="" /> +<Attribute access="2" id="seqNum" value="0" type="0" typeOther="" /> +<Attribute access="2" id="i" value="" type="0" typeOther="" /> +<Attribute access="2" id="j" value="" type="0" typeOther="" /> +<Attribute access="2" id="a" value="0" type="0" typeOther="" /> +<Attribute access="2" id="b" value="0" type="0" typeOther="" /> +<Attribute access="2" id="tcpctrl" value="" type="5" typeOther="TCP_CTRL" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="96" > +<father id="133" num="0" /> +<cdparam x="1159" y="451" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Request start_TCP_IP" /> -<TGConnectingPoint num="0" id="144" /> +<infoparam name="TGComponent" value="Event stop" /> +<TGConnectingPoint num="0" id="95" /> <extraparam> -<Prop commName="start_TCP_IP" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="stop" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -794,16 +713,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="147" > -<father id="174" num="5" /> -<cdparam x="922" y="449" /> +<SUBCOMPONENT type="1203" id="98" > +<father id="133" num="1" /> +<cdparam x="1159" y="272" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Event send_TCP" /> -<TGConnectingPoint num="0" id="146" /> +<infoparam name="TGComponent" value="Channel temp" /> +<TGConnectingPoint num="0" id="97" /> <extraparam> -<Prop commName="send_TCP" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="temp" commType="0" origin="false" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -811,16 +730,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="149" > -<father id="174" num="6" /> -<cdparam x="922" y="422" /> +<SUBCOMPONENT type="1203" id="100" > +<father id="133" num="2" /> +<cdparam x="1159" y="204" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Event open, abort, close" /> -<TGConnectingPoint num="0" id="148" /> +<infoparam name="TGComponent" value="Channel temp" /> +<TGConnectingPoint num="0" id="99" /> <extraparam> -<Prop commName="open, abort, close" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="temp" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -828,16 +747,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="151" > -<father id="174" num="7" /> -<cdparam x="922" y="393" /> +<SUBCOMPONENT type="1203" id="102" > +<father id="133" num="3" /> +<cdparam x="1159" y="411" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Channel fromTtoA" /> -<TGConnectingPoint num="0" id="150" /> +<infoparam name="TGComponent" value="Request req_Timer" /> +<TGConnectingPoint num="0" id="101" /> <extraparam> -<Prop commName="fromTtoA" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="req_Timer" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -845,16 +764,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="153" > -<father id="174" num="8" /> -<cdparam x="961" y="481" /> +<SUBCOMPONENT type="1203" id="104" > +<father id="133" num="4" /> +<cdparam x="1159" y="376" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Channel fromAtoT" /> -<TGConnectingPoint num="0" id="152" /> +<infoparam name="TGComponent" value="Event timeOut" /> +<TGConnectingPoint num="0" id="103" /> <extraparam> -<Prop commName="fromAtoT" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="timeOut" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -862,14 +781,14 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="155" > -<father id="174" num="9" /> +<SUBCOMPONENT type="1203" id="106" > +<father id="133" num="5" /> <cdparam x="922" y="472" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> <infoparam name="TGComponent" value="Event receive_Application" /> -<TGConnectingPoint num="0" id="154" /> +<TGConnectingPoint num="0" id="105" /> <extraparam> <Prop commName="receive_Application" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> @@ -879,16 +798,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="157" > -<father id="174" num="10" /> -<cdparam x="1159" y="376" /> +<SUBCOMPONENT type="1203" id="108" > +<father id="133" num="6" /> +<cdparam x="961" y="481" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Event timeOut" /> -<TGConnectingPoint num="0" id="156" /> +<infoparam name="TGComponent" value="Channel fromAtoT" /> +<TGConnectingPoint num="0" id="107" /> <extraparam> -<Prop commName="timeOut" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromAtoT" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -896,16 +815,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="159" > -<father id="174" num="11" /> -<cdparam x="1159" y="411" /> +<SUBCOMPONENT type="1203" id="110" > +<father id="133" num="7" /> +<cdparam x="922" y="393" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Request req_Timer" /> -<TGConnectingPoint num="0" id="158" /> +<infoparam name="TGComponent" value="Channel fromTtoA" /> +<TGConnectingPoint num="0" id="109" /> <extraparam> -<Prop commName="req_Timer" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromTtoA" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -913,16 +832,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="161" > -<father id="174" num="12" /> -<cdparam x="1159" y="204" /> +<SUBCOMPONENT type="1203" id="112" > +<father id="133" num="8" /> +<cdparam x="922" y="422" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Channel temp" /> -<TGConnectingPoint num="0" id="160" /> +<infoparam name="TGComponent" value="Event open, abort, close" /> +<TGConnectingPoint num="0" id="111" /> <extraparam> -<Prop commName="temp" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="open, abort, close" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -930,16 +849,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="163" > -<father id="174" num="13" /> -<cdparam x="1159" y="272" /> +<SUBCOMPONENT type="1203" id="114" > +<father id="133" num="9" /> +<cdparam x="922" y="449" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Channel temp" /> -<TGConnectingPoint num="0" id="162" /> +<infoparam name="TGComponent" value="Event send_TCP" /> +<TGConnectingPoint num="0" id="113" /> <extraparam> -<Prop commName="temp" commType="0" origin="false" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="send_TCP" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -947,16 +866,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="165" > -<father id="174" num="14" /> -<cdparam x="1159" y="451" /> +<SUBCOMPONENT type="1203" id="116" > +<father id="133" num="10" /> +<cdparam x="922" y="358" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="227" minY="-10" maxY="308" /> -<infoparam name="TGComponent" value="Event stop" /> -<TGConnectingPoint num="0" id="164" /> +<infoparam name="TGComponent" value="Request start_TCP_IP" /> +<TGConnectingPoint num="0" id="115" /> <extraparam> -<Prop commName="stop" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="start_TCP_IP" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -964,43 +883,33 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="218" > -<father id="227" num="3" /> -<cdparam x="535" y="98" /> -<sizeparam width="201" height="238" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="118" > +<father id="133" num="11" /> +<cdparam x="919" y="323" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="735" minY="0" maxY="292" /> -<infoparam name="TGComponent" value="SmartCard" /> -<TGConnectingPoint num="0" id="210" /> -<TGConnectingPoint num="1" id="211" /> -<TGConnectingPoint num="2" id="212" /> -<TGConnectingPoint num="3" id="213" /> -<TGConnectingPoint num="4" id="214" /> -<TGConnectingPoint num="5" id="215" /> -<TGConnectingPoint num="6" id="216" /> -<TGConnectingPoint num="7" id="217" /> +<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> +<infoparam name="TGComponent" value="Channel fromTtoP" /> +<TGConnectingPoint num="0" id="117" /> <extraparam> -<Data isAttacker="No" /> -<Attribute access="2" id="resetType" value="0" type="0" typeOther="" /> -<Attribute access="2" id="a" value="0" type="0" typeOther="" /> -<Attribute access="2" id="b" value="" type="4" typeOther="" /> -<Attribute access="2" id="i" value="0" type="0" typeOther="" /> -<Attribute access="2" id="j" value="0" type="0" typeOther="" /> -<Attribute access="2" id="x" value="0" type="0" typeOther="" /> -<Attribute access="2" id="tcpctrl" value="" type="5" typeOther="TCP_CTRL" /> -<Attribute access="2" id="t" value="" type="0" typeOther="" /> +<Prop commName="fromTtoP" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="185" > -<father id="218" num="0" /> -<cdparam x="723" y="112" /> +<SUBCOMPONENT type="1203" id="120" > +<father id="133" num="12" /> +<cdparam x="919" y="284" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Event send" /> -<TGConnectingPoint num="0" id="184" /> +<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> +<infoparam name="TGComponent" value="Channel fromPtoT" /> +<TGConnectingPoint num="0" id="119" /> <extraparam> -<Prop commName="send" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromPtoT" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1008,16 +917,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="187" > -<father id="218" num="1" /> -<cdparam x="580" y="85" /> +<SUBCOMPONENT type="1203" id="122" > +<father id="133" num="13" /> +<cdparam x="919" y="241" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Event reset, pTS" /> -<TGConnectingPoint num="0" id="186" /> +<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> +<infoparam name="TGComponent" value="Event receive" /> +<TGConnectingPoint num="0" id="121" /> <extraparam> -<Prop commName="reset, pTS" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="receive" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1025,16 +934,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="189" > -<father id="218" num="2" /> -<cdparam x="523" y="323" /> +<SUBCOMPONENT type="1203" id="124" > +<father id="133" num="14" /> +<cdparam x="919" y="191" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> -<TGConnectingPoint num="0" id="188" /> +<cdrectangleparam minX="-13" maxX="224" minY="-13" maxY="305" /> +<infoparam name="TGComponent" value="Event send" /> +<TGConnectingPoint num="0" id="123" /> <extraparam> -<Prop commName="answerToReset, pTSConfirm" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="send" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1042,16 +951,36 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="191" > -<father id="218" num="3" /> -<cdparam x="522" y="248" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1202" id="148" > +<father id="176" num="1" /> +<cdparam x="1234" y="329" /> +<sizeparam width="141" height="142" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Channel fromSCtoD" /> -<TGConnectingPoint num="0" id="190" /> +<cdrectangleparam minX="0" maxX="429" minY="0" maxY="344" /> +<infoparam name="TGComponent" value="Timer" /> +<TGConnectingPoint num="0" id="140" /> +<TGConnectingPoint num="1" id="141" /> +<TGConnectingPoint num="2" id="142" /> +<TGConnectingPoint num="3" id="143" /> +<TGConnectingPoint num="4" id="144" /> +<TGConnectingPoint num="5" id="145" /> +<TGConnectingPoint num="6" id="146" /> +<TGConnectingPoint num="7" id="147" /> <extraparam> -<Prop commName="fromSCtoD" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Data isAttacker="No" /> +<Attribute access="2" id="x" value="0" type="0" typeOther="" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="135" > +<father id="148" num="0" /> +<cdparam x="1224" y="432" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="-10" maxX="131" minY="-10" maxY="132" /> +<infoparam name="TGComponent" value="Event stop" /> +<TGConnectingPoint num="0" id="134" /> +<extraparam> +<Prop commName="stop" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1059,16 +988,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="193" > -<father id="218" num="4" /> -<cdparam x="522" y="203" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="137" > +<father id="148" num="1" /> +<cdparam x="1224" y="404" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Channel fromDtoSC" /> -<TGConnectingPoint num="0" id="192" /> +<cdrectangleparam minX="-10" maxX="131" minY="-10" maxY="132" /> +<infoparam name="TGComponent" value="Request req_Timer" /> +<TGConnectingPoint num="0" id="136" /> <extraparam> -<Prop commName="fromDtoSC" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="uint_16" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="req_Timer" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1076,16 +1005,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="195" > -<father id="218" num="5" /> -<cdparam x="522" y="291" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="139" > +<father id="148" num="2" /> +<cdparam x="1224" y="369" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Event data_Ready_SC" /> -<TGConnectingPoint num="0" id="194" /> +<cdrectangleparam minX="-10" maxX="131" minY="-10" maxY="132" /> +<infoparam name="TGComponent" value="Event timeOut" /> +<TGConnectingPoint num="0" id="138" /> <extraparam> -<Prop commName="data_Ready_SC" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="timeOut" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1093,33 +1022,78 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="197" > -<father id="218" num="6" /> -<cdparam x="522" y="157" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1201" id="167" > +<father id="176" num="2" /> +<cdparam x="831" y="363" /> +<sizeparam width="26" height="26" minWidth="10" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Event data_Ready" /> -<TGConnectingPoint num="0" id="196" /> +<cdrectangleparam minX="-13" maxX="557" minY="-13" maxY="473" /> +<infoparam name="Composite port" value="" /> +<TGConnectingPoint num="0" id="149" /> +<TGConnectingPoint num="1" id="150" /> +<TGConnectingPoint num="2" id="151" /> +<TGConnectingPoint num="3" id="152" /> +<TGConnectingPoint num="4" id="153" /> +<TGConnectingPoint num="5" id="154" /> +<TGConnectingPoint num="6" id="155" /> +<TGConnectingPoint num="7" id="156" /> +<TGConnectingPoint num="8" id="157" /> +<TGConnectingPoint num="9" id="158" /> +<TGConnectingPoint num="10" id="159" /> +<TGConnectingPoint num="11" id="160" /> +<TGConnectingPoint num="12" id="161" /> +<TGConnectingPoint num="13" id="162" /> +<TGConnectingPoint num="14" id="163" /> +<TGConnectingPoint num="15" id="164" /> +<TGConnectingPoint num="16" id="165" /> +<TGConnectingPoint num="17" id="166" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="1202" id="199" > +<father id="227" num="2" /> +<cdparam x="565" y="418" /> +<sizeparam width="240" height="146" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="696" minY="0" maxY="384" /> +<infoparam name="TGComponent" value="Application" /> +<TGConnectingPoint num="0" id="191" /> +<TGConnectingPoint num="1" id="192" /> +<TGConnectingPoint num="2" id="193" /> +<TGConnectingPoint num="3" id="194" /> +<TGConnectingPoint num="4" id="195" /> +<TGConnectingPoint num="5" id="196" /> +<TGConnectingPoint num="6" id="197" /> +<TGConnectingPoint num="7" id="198" /> <extraparam> -<Prop commName="data_Ready" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="uint_16" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> -<Type type="1" typeOther="" /> -<Type type="2" typeOther="" /> +<Data isAttacker="No" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="178" > +<father id="199" num="0" /> +<cdparam x="661" y="408" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> +<infoparam name="TGComponent" value="Request start_Application" /> +<TGConnectingPoint num="0" id="177" /> +<extraparam> +<Prop commName="start_Application" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="199" > -<father id="218" num="7" /> -<cdparam x="723" y="271" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="180" > +<father id="199" num="1" /> +<cdparam x="795" y="544" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Channel fromTtoP" /> -<TGConnectingPoint num="0" id="198" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> +<infoparam name="TGComponent" value="Channel fromAtoT" /> +<TGConnectingPoint num="0" id="179" /> <extraparam> -<Prop commName="fromTtoP" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromAtoT" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1127,16 +1101,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="201" > -<father id="218" num="8" /> -<cdparam x="723" y="235" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="182" > +<father id="199" num="2" /> +<cdparam x="795" y="512" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Channel fromPtoT" /> -<TGConnectingPoint num="0" id="200" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> +<infoparam name="TGComponent" value="Event receive_Application" /> +<TGConnectingPoint num="0" id="181" /> <extraparam> -<Prop commName="fromPtoT" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="receive_Application" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1144,16 +1118,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="203" > -<father id="218" num="9" /> -<cdparam x="723" y="191" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="184" > +<father id="199" num="3" /> +<cdparam x="795" y="451" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Event receive" /> -<TGConnectingPoint num="0" id="202" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> +<infoparam name="TGComponent" value="Event open, abort, close" /> +<TGConnectingPoint num="0" id="183" /> <extraparam> -<Prop commName="receive" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="open, abort, close" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1161,16 +1135,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="205" > -<father id="218" num="10" /> -<cdparam x="723" y="302" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="186" > +<father id="199" num="4" /> +<cdparam x="795" y="483" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="188" minY="-13" maxY="225" /> -<infoparam name="TGComponent" value="Request start_TCP_IP" /> -<TGConnectingPoint num="0" id="204" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> +<infoparam name="TGComponent" value="Event send_TCP" /> +<TGConnectingPoint num="0" id="185" /> <extraparam> -<Prop commName="start_TCP_IP" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="send_TCP" commType="1" origin="true" finite="false" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1178,16 +1152,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="207" > -<father id="218" num="11" /> -<cdparam x="525" y="117" /> +<SUBCOMPONENT type="1203" id="188" > +<father id="199" num="5" /> +<cdparam x="795" y="422" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="191" minY="-10" maxY="228" /> -<infoparam name="TGComponent" value="Request activation" /> -<TGConnectingPoint num="0" id="206" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> +<infoparam name="TGComponent" value="Channel fromTtoA" /> +<TGConnectingPoint num="0" id="187" /> <extraparam> -<Prop commName="activation" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="fromTtoA" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1195,16 +1169,16 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="209" > -<father id="218" num="12" /> -<cdparam x="620" y="326" /> +<SUBCOMPONENT type="1203" id="190" > +<father id="199" num="6" /> +<cdparam x="742" y="408" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="191" minY="-10" maxY="228" /> -<infoparam name="TGComponent" value="Request start_Application" /> -<TGConnectingPoint num="0" id="208" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="136" /> +<infoparam name="TGComponent" value="Request start_TCP_IP" /> +<TGConnectingPoint num="0" id="189" /> <extraparam> -<Prop commName="start_Application" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> +<Prop commName="start_TCP_IP" commType="2" origin="true" finite="false" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="VOID" associatedEvent="VOID" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1212,6 +1186,32 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> +<SUBCOMPONENT type="1201" id="218" > +<father id="227" num="3" /> +<cdparam x="522" y="377" /> +<sizeparam width="26" height="26" minWidth="10" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="-13" maxX="923" minY="-13" maxY="517" /> +<infoparam name="Composite port" value="" /> +<TGConnectingPoint num="0" id="200" /> +<TGConnectingPoint num="1" id="201" /> +<TGConnectingPoint num="2" id="202" /> +<TGConnectingPoint num="3" id="203" /> +<TGConnectingPoint num="4" id="204" /> +<TGConnectingPoint num="5" id="205" /> +<TGConnectingPoint num="6" id="206" /> +<TGConnectingPoint num="7" id="207" /> +<TGConnectingPoint num="8" id="208" /> +<TGConnectingPoint num="9" id="209" /> +<TGConnectingPoint num="10" id="210" /> +<TGConnectingPoint num="11" id="211" /> +<TGConnectingPoint num="12" id="212" /> +<TGConnectingPoint num="13" id="213" /> +<TGConnectingPoint num="14" id="214" /> +<TGConnectingPoint num="15" id="215" /> +<TGConnectingPoint num="16" id="216" /> +<TGConnectingPoint num="17" id="217" /> +</SUBCOMPONENT> </TMLComponentTaskDiagramPanel> @@ -1688,513 +1688,386 @@ </TMLActivityDiagramPanel> -<TMLActivityDiagramPanel name="SmartCard" minX="10" maxX="1400" minY="10" maxY="900" > -<COMPONENT type="1000" id="327" > -<cdparam x="159" y="66" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<TMLActivityDiagramPanel name="Application" minX="10" maxX="1400" minY="10" maxY="900" > +<COMPONENT type="1012" id="333" > +<cdparam x="491" y="277" /> +<sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="start state" value="null" /> -<TGConnectingPoint num="0" id="326" /> +<infoparam name="choice" value="null" /> +<TGConnectingPoint num="0" id="329" /> +<TGConnectingPoint num="1" id="330" /> +<TGConnectingPoint num="2" id="331" /> +<TGConnectingPoint num="3" id="332" /> </COMPONENT> +<SUBCOMPONENT type="-1" id="326" > +<father id="333" num="0" /> +<cdparam x="466" y="287" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> +<infoparam name="guard 1" value="[ ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="327" > +<father id="333" num="1" /> +<cdparam x="526" y="287" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> +<infoparam name="guard 2" value="[ ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="328" > +<father id="333" num="2" /> +<cdparam x="511" y="322" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> +<infoparam name="guard 3" value="[ ]" /> +</SUBCOMPONENT> -<COMPONENT type="1010" id="330" > -<cdparam x="141" y="129" /> -<sizeparam width="51" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1000" id="335" > +<cdparam x="501" y="91" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="wait event" value="reset() " /> -<TGConnectingPoint num="0" id="328" /> -<TGConnectingPoint num="1" id="329" /> -<extraparam> -<Data eventName="reset" nbOfParams="5" /> -</extraparam> +<infoparam name="start state" value="null" /> +<TGConnectingPoint num="0" id="334" /> </COMPONENT> -<COMPONENT type="1008" id="333" > -<cdparam x="113" y="182" /> -<sizeparam width="106" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="338" > +<cdparam x="482" y="129" /> +<sizeparam width="52" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="answerToReset()" /> -<TGConnectingPoint num="0" id="331" /> -<TGConnectingPoint num="1" id="332" /> +<infoparam name="send event" value="open()" /> +<TGConnectingPoint num="0" id="336" /> +<TGConnectingPoint num="1" id="337" /> <extraparam> -<Data eventName="answerToReset" nbOfParams="5" /> +<Data eventName="open" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1010" id="336" > -<cdparam x="144" y="237" /> -<sizeparam width="44" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1006" id="341" > +<cdparam x="466" y="178" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="wait event" value="pTS() " /> -<TGConnectingPoint num="0" id="334" /> -<TGConnectingPoint num="1" id="335" /> +<infoparam name="write channel" value="fromAtoT(1)" /> +<TGConnectingPoint num="0" id="339" /> +<TGConnectingPoint num="1" id="340" /> <extraparam> -<Data eventName="pTS" nbOfParams="5" /> +<Data channelName="fromAtoT" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="339" > -<cdparam x="124" y="308" /> -<sizeparam width="85" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="344" > +<cdparam x="467" y="226" /> +<sizeparam width="80" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="pTSConfirm()" /> -<TGConnectingPoint num="0" id="337" /> -<TGConnectingPoint num="1" id="338" /> +<infoparam name="send event" value="send_TCP()" /> +<TGConnectingPoint num="0" id="342" /> +<TGConnectingPoint num="1" id="343" /> <extraparam> -<Data eventName="pTSConfirm" nbOfParams="5" /> +<Data eventName="send_TCP" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="356" > -<cdparam x="376" y="98" /> -<sizeparam width="233" height="39" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1001" id="346" > +<cdparam x="576" y="388" /> +<sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="UML Note" value="The first two layers of the OSI model -are used to communicate between -the smart card and the terminal -" /> -<TGConnectingPoint num="0" id="340" /> -<TGConnectingPoint num="1" id="341" /> -<TGConnectingPoint num="2" id="342" /> -<TGConnectingPoint num="3" id="343" /> -<TGConnectingPoint num="4" id="344" /> -<TGConnectingPoint num="5" id="345" /> -<TGConnectingPoint num="6" id="346" /> -<TGConnectingPoint num="7" id="347" /> -<TGConnectingPoint num="8" id="348" /> -<TGConnectingPoint num="9" id="349" /> -<TGConnectingPoint num="10" id="350" /> -<TGConnectingPoint num="11" id="351" /> -<TGConnectingPoint num="12" id="352" /> -<TGConnectingPoint num="13" id="353" /> -<TGConnectingPoint num="14" id="354" /> -<TGConnectingPoint num="15" id="355" /> -<extraparam> -<Line value="The first two layers of the OSI model " /> -<Line value="are used to communicate between " /> -<Line value="the smart card and the terminal" /> -</extraparam> +<infoparam name="stop state" value="null" /> +<TGConnectingPoint num="0" id="345" /> </COMPONENT> -<COMPONENT type="1007" id="359" > -<cdparam x="254" y="97" /> -<sizeparam width="89" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="349" > +<cdparam x="559" y="329" /> +<sizeparam width="54" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send request" value="start_TCP_IP()" /> -<TGConnectingPoint num="0" id="357" /> -<TGConnectingPoint num="1" id="358" /> +<infoparam name="send event" value="abort()" /> +<TGConnectingPoint num="0" id="347" /> +<TGConnectingPoint num="1" id="348" /> <extraparam> -<Data requestName="start_TCP_IP" nbOfParams="5" /> +<Data eventName="abort" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1007" id="362" > -<cdparam x="241" y="148" /> -<sizeparam width="114" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="352" > +<cdparam x="406" y="337" /> +<sizeparam width="53" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send request" value="start_Application()" /> -<TGConnectingPoint num="0" id="360" /> -<TGConnectingPoint num="1" id="361" /> +<infoparam name="send event" value="close()" /> +<TGConnectingPoint num="0" id="350" /> +<TGConnectingPoint num="1" id="351" /> <extraparam> -<Data requestName="start_Application" nbOfParams="5" /> +<Data eventName="close" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="364" > -<cdparam x="515" y="428" /> +<COMPONENT type="1001" id="354" > +<cdparam x="422" y="386" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="363" /> +<TGConnectingPoint num="0" id="353" /> </COMPONENT> -<COMPONENT type="1008" id="367" > -<cdparam x="309" y="350" /> -<sizeparam width="106" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="data_Ready_SC()" /> -<TGConnectingPoint num="0" id="365" /> -<TGConnectingPoint num="1" id="366" /> -<extraparam> -<Data eventName="data_Ready_SC" nbOfParams="5" /> -</extraparam> -</COMPONENT> +<CONNECTOR type="115" id="355" > +<cdparam x="509" y="94" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from start state to send event" value="null" /> +<P1 x="508" y="111" id="334" /> +<P2 x="508" y="124" id="336" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="356" > +<cdparam x="508" y="154" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send event to write channel" value="null" /> +<P1 x="508" y="154" id="337" /> +<P2 x="508" y="173" id="339" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="357" > +<cdparam x="508" y="222" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from write channel to send event" value="null" /> +<P1 x="508" y="203" id="340" /> +<P2 x="507" y="221" id="342" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="358" > +<cdparam x="586" y="354" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send event to stop state" value="null" /> +<P1 x="586" y="354" id="348" /> +<P2 x="586" y="383" id="345" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="359" > +<cdparam x="508" y="298" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send event to choice" value="null" /> +<P1 x="507" y="251" id="343" /> +<P2 x="506" y="267" id="329" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="360" > +<cdparam x="470" y="348" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from choice to send event" value="null" /> +<P1 x="466" y="292" id="330" /> +<P2 x="432" y="332" id="350" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="361" > +<cdparam x="432" y="362" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send event to stop state" value="null" /> +<P1 x="432" y="362" id="351" /> +<P2 x="432" y="381" id="353" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="362" > +<cdparam x="550" y="348" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from choice to send event" value="null" /> +<P1 x="546" y="292" id="331" /> +<P2 x="586" y="324" id="347" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> -<COMPONENT type="1001" id="369" > -<cdparam x="352" y="426" /> -<sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="368" /> -</COMPONENT> +</TMLActivityDiagramPanel> -<COMPONENT type="1009" id="372" > -<cdparam x="321" y="308" /> -<sizeparam width="83" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<TMLActivityDiagramPanel name="Timer" minX="10" maxX="1400" minY="10" maxY="900" > +<COMPONENT type="1012" id="370" > +<cdparam x="509" y="222" /> +<sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="read channel" value="fromTtoP(1) " /> -<TGConnectingPoint num="0" id="370" /> -<TGConnectingPoint num="1" id="371" /> -<extraparam> -<Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> -</extraparam> +<infoparam name="choice" value="null" /> +<TGConnectingPoint num="0" id="366" /> +<TGConnectingPoint num="1" id="367" /> +<TGConnectingPoint num="2" id="368" /> +<TGConnectingPoint num="3" id="369" /> </COMPONENT> - -<COMPONENT type="1010" id="375" > -<cdparam x="337" y="264" /> -<sizeparam width="50" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="-1" id="363" > +<father id="370" num="0" /> +<cdparam x="464" y="232" /> +<sizeparam width="52" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="wait event" value="send() " /> -<TGConnectingPoint num="0" id="373" /> -<TGConnectingPoint num="1" id="374" /> -<extraparam> -<Data eventName="send" nbOfParams="5" /> -</extraparam> -</COMPONENT> - -<COMPONENT type="1006" id="378" > -<cdparam x="319" y="392" /> -<sizeparam width="87" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> +<infoparam name="guard 1" value="[ x==0 ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="364" > +<father id="370" num="1" /> +<cdparam x="544" y="234" /> +<sizeparam width="42" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="write channel" value="fromSCtoD(1)" /> -<TGConnectingPoint num="0" id="376" /> -<TGConnectingPoint num="1" id="377" /> -<extraparam> -<Data channelName="fromSCtoD" nbOfSamples="1" secPattern="" isAttacker="No" /> -</extraparam> -</COMPONENT> - -<COMPONENT type="1008" id="381" > -<cdparam x="496" y="350" /> -<sizeparam width="59" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> +<infoparam name="guard 2" value="[ x>0 ]" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="365" > +<father id="370" num="2" /> +<cdparam x="529" y="267" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="receive()" /> -<TGConnectingPoint num="0" id="379" /> -<TGConnectingPoint num="1" id="380" /> -<extraparam> -<Data eventName="receive" nbOfParams="5" /> -</extraparam> -</COMPONENT> +<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> +<infoparam name="guard 3" value="[ ]" /> +</SUBCOMPONENT> -<COMPONENT type="1009" id="384" > -<cdparam x="480" y="311" /> -<sizeparam width="91" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1000" id="372" > +<cdparam x="517" y="87" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="read channel" value="fromDtoSC(1) " /> -<TGConnectingPoint num="0" id="382" /> -<TGConnectingPoint num="1" id="383" /> -<extraparam> -<Data channelName="fromDtoSC" nbOfSamples="1" secPattern="" isAttacker="No" /> -</extraparam> +<infoparam name="start state" value="null" /> +<TGConnectingPoint num="0" id="371" /> </COMPONENT> -<COMPONENT type="1006" id="387" > -<cdparam x="486" y="387" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1001" id="374" > +<cdparam x="417" y="367" /> +<sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="write channel" value="fromPtoT(1)" /> -<TGConnectingPoint num="0" id="385" /> -<TGConnectingPoint num="1" id="386" /> -<extraparam> -<Data channelName="fromPtoT" nbOfSamples="1" secPattern="" isAttacker="No" /> -</extraparam> +<infoparam name="stop state" value="null" /> +<TGConnectingPoint num="0" id="373" /> </COMPONENT> -<COMPONENT type="1010" id="390" > -<cdparam x="470" y="268" /> -<sizeparam width="110" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="377" > +<cdparam x="393" y="299" /> +<sizeparam width="69" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="wait event" value="data_Ready(t, b) " /> -<TGConnectingPoint num="0" id="388" /> -<TGConnectingPoint num="1" id="389" /> -<breakpoint /> +<infoparam name="send event" value="timeOut()" /> +<TGConnectingPoint num="0" id="375" /> +<TGConnectingPoint num="1" id="376" /> <extraparam> -<Data eventName="data_Ready" nbOfParams="5" /> -<Param index="0" value="t" /> -<Param index="1" value="b" /> +<Data eventName="timeOut" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1014" id="394" > -<cdparam x="236" y="202" /> -<sizeparam width="125" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1010" id="380" > +<cdparam x="596" y="300" /> +<sizeparam width="52" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="for loop" value="for(j=0;x==0;j = j)" /> -<TGConnectingPoint num="0" id="391" /> -<TGConnectingPoint num="1" id="392" /> -<TGConnectingPoint num="2" id="393" /> +<infoparam name="wait event" value="stop() " /> +<TGConnectingPoint num="0" id="378" /> +<TGConnectingPoint num="1" id="379" /> <extraparam> -<Data init="j=0" condition="x==0" increment="j = j" /> +<Data eventName="stop" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="396" > -<cdparam x="297" y="231" /> +<COMPONENT type="1001" id="382" > +<cdparam x="612" y="365" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="395" /> +<TGConnectingPoint num="0" id="381" /> </COMPONENT> -<COMPONENT type="1018" id="407" > -<cdparam x="424" y="226" /> -<sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1017" id="385" > +<cdparam x="487" y="150" /> +<sizeparam width="75" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="select" value="null" /> -<TGConnectingPoint num="0" id="397" /> -<TGConnectingPoint num="1" id="398" /> -<TGConnectingPoint num="2" id="399" /> -<TGConnectingPoint num="3" id="400" /> -<TGConnectingPoint num="4" id="401" /> -<TGConnectingPoint num="5" id="402" /> -<TGConnectingPoint num="6" id="403" /> -<TGConnectingPoint num="7" id="404" /> -<TGConnectingPoint num="8" id="405" /> -<TGConnectingPoint num="9" id="406" /> -</COMPONENT> - -<CONNECTOR type="115" id="412" > -<cdparam x="111" y="331" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to send request" value="null" /> -<P1 x="166" y="333" id="338" /> -<P2 x="298" y="92" id="357" /> -<Point x="166" y="351" /> -<Point x="231" y="351" /> -<Point x="231" y="72" /> -<Point x="298" y="72" /> -<AutomaticDrawing data="true" /> -</CONNECTOR><SUBCOMPONENT type="-1" id="408" > -<father id="412" num="0" /> -<cdparam x="166" y="351" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> -<infoparam name="point " value="null" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="409" > -<father id="412" num="1" /> -<cdparam x="231" y="351" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> -<infoparam name="point " value="null" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="410" > -<father id="412" num="2" /> -<cdparam x="231" y="72" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> -<infoparam name="point " value="null" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="411" > -<father id="412" num="3" /> -<cdparam x="298" y="72" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> -<infoparam name="point " value="null" /> -</SUBCOMPONENT> +<infoparam name="notified event" value="x=?stop()" /> +<TGConnectingPoint num="0" id="383" /> +<TGConnectingPoint num="1" id="384" /> +<extraparam> +<Data eventName="stop" variable="x" /> +</extraparam> +</COMPONENT> -<CONNECTOR type="115" id="413" > -<cdparam x="166" y="64" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from start state to wait event" value="null" /> -<P1 x="166" y="86" id="326" /> -<P2 x="166" y="124" id="328" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="414" > -<cdparam x="166" y="154" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from wait event to send event" value="null" /> -<P1 x="166" y="154" id="329" /> -<P2 x="166" y="177" id="331" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="415" > -<cdparam x="312" y="133" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send request to send request" value="null" /> -<P1 x="298" y="122" id="358" /> -<P2 x="298" y="143" id="360" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="416" > -<cdparam x="355" y="300" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from wait event to read channel" value="null" /> -<P1 x="362" y="289" id="374" /> -<P2 x="362" y="303" id="370" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="417" > -<cdparam x="355" y="365" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from read channel to send event" value="null" /> -<P1 x="362" y="333" id="371" /> -<P2 x="362" y="345" id="365" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="418" > -<cdparam x="355" y="417" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to write channel" value="null" /> -<P1 x="362" y="375" id="366" /> -<P2 x="362" y="387" id="376" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="419" > -<cdparam x="355" y="473" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from write channel to stop state" value="null" /> -<P1 x="362" y="417" id="377" /> -<P2 x="362" y="421" id="368" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="420" > -<cdparam x="541" y="358" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from read channel to send event" value="null" /> -<P1 x="525" y="336" id="383" /> -<P2 x="525" y="345" id="379" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="421" > -<cdparam x="540" y="402" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to write channel" value="null" /> -<P1 x="525" y="375" id="380" /> -<P2 x="525" y="382" id="385" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="422" > -<cdparam x="543" y="305" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from wait event to read channel" value="null" /> -<P1 x="525" y="293" id="389" /> -<P2 x="525" y="306" id="382" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="423" > -<cdparam x="540" y="464" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from write channel to stop state" value="null" /> -<P1 x="525" y="412" id="386" /> -<P2 x="525" y="423" id="363" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="424" > -<cdparam x="298" y="173" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send request to for loop" value="null" /> -<P1 x="298" y="173" id="361" /> -<P2 x="298" y="197" id="391" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="425" > -<cdparam x="328" y="232" /> +<CONNECTOR type="115" id="386" > +<cdparam x="427" y="324" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from for loop to stop state" value="null" /> -<P1 x="298" y="227" id="393" /> -<P2 x="307" y="226" id="395" /> +<infoparam name="connector from send event to stop state" value="null" /> +<P1 x="427" y="324" id="376" /> +<P2 x="427" y="362" id="373" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="426" > -<cdparam x="395" y="283" /> +<CONNECTOR type="115" id="387" > +<cdparam x="622" y="325" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from select to wait event" value="null" /> -<P1 x="399" y="241" id="398" /> -<P2 x="362" y="259" id="373" /> +<infoparam name="connector from wait event to stop state" value="null" /> +<P1 x="622" y="325" id="379" /> +<P2 x="622" y="360" id="381" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="427" > -<cdparam x="543" y="341" /> +<CONNECTOR type="115" id="388" > +<cdparam x="524" y="107" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from select to wait event" value="null" /> -<P1 x="479" y="241" id="399" /> -<P2 x="525" y="263" id="388" /> +<infoparam name="connector from start state to notified event" value="null" /> +<P1 x="524" y="107" id="371" /> +<P2 x="524" y="145" id="383" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="428" > -<cdparam x="391" y="282" /> +<CONNECTOR type="115" id="389" > +<cdparam x="524" y="175" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from for loop to select" value="null" /> -<P1 x="361" y="216" id="392" /> -<P2 x="439" y="216" id="397" /> +<infoparam name="connector from notified event to choice" value="null" /> +<P1 x="524" y="175" id="384" /> +<P2 x="524" y="212" id="366" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="429" > -<cdparam x="164" y="262" /> +<CONNECTOR type="115" id="390" > +<cdparam x="484" y="237" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from wait event to send event" value="null" /> -<P1 x="166" y="262" id="335" /> -<P2 x="166" y="303" id="337" /> +<infoparam name="connector from choice to send event" value="null" /> +<P1 x="484" y="237" id="367" /> +<P2 x="427" y="294" id="375" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="430" > -<cdparam x="166" y="207" /> +<CONNECTOR type="115" id="391" > +<cdparam x="564" y="237" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to wait event" value="null" /> -<P1 x="166" y="207" id="332" /> -<P2 x="166" y="232" id="334" /> +<infoparam name="connector from choice to wait event" value="null" /> +<P1 x="564" y="237" id="368" /> +<P2 x="622" y="295" id="378" /> <AutomaticDrawing data="true" /> </CONNECTOR> </TMLActivityDiagramPanel> <TMLActivityDiagramPanel name="TCPIP" minX="10" maxX="2900" minY="10" maxY="1900" > -<COMPONENT type="1012" id="438" > +<COMPONENT type="1012" id="399" > <cdparam x="2086" y="1378" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="434" /> -<TGConnectingPoint num="1" id="435" /> -<TGConnectingPoint num="2" id="436" /> -<TGConnectingPoint num="3" id="437" /> +<TGConnectingPoint num="0" id="395" /> +<TGConnectingPoint num="1" id="396" /> +<TGConnectingPoint num="2" id="397" /> +<TGConnectingPoint num="3" id="398" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="431" > -<father id="438" num="0" /> +<SUBCOMPONENT type="-1" id="392" > +<father id="399" num="0" /> <cdparam x="2061" y="1388" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="432" > -<father id="438" num="1" /> +<SUBCOMPONENT type="-1" id="393" > +<father id="399" num="1" /> <cdparam x="2121" y="1388" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="433" > -<father id="438" num="2" /> +<SUBCOMPONENT type="-1" id="394" > +<father id="399" num="2" /> <cdparam x="2106" y="1426" /> <sizeparam width="124" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2202,35 +2075,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ tcpctrl.state ==10 ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="446" > +<COMPONENT type="1012" id="407" > <cdparam x="2262" y="951" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="442" /> -<TGConnectingPoint num="1" id="443" /> -<TGConnectingPoint num="2" id="444" /> -<TGConnectingPoint num="3" id="445" /> +<TGConnectingPoint num="0" id="403" /> +<TGConnectingPoint num="1" id="404" /> +<TGConnectingPoint num="2" id="405" /> +<TGConnectingPoint num="3" id="406" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="439" > -<father id="446" num="0" /> +<SUBCOMPONENT type="-1" id="400" > +<father id="407" num="0" /> <cdparam x="2212" y="961" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state ==1 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="440" > -<father id="446" num="1" /> +<SUBCOMPONENT type="-1" id="401" > +<father id="407" num="1" /> <cdparam x="2297" y="961" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ tcpctrl.state ==3 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="441" > -<father id="446" num="2" /> +<SUBCOMPONENT type="-1" id="402" > +<father id="407" num="2" /> <cdparam x="2282" y="996" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2238,35 +2111,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ else ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="454" > +<COMPONENT type="1012" id="415" > <cdparam x="1981" y="1346" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="450" /> -<TGConnectingPoint num="1" id="451" /> -<TGConnectingPoint num="2" id="452" /> -<TGConnectingPoint num="3" id="453" /> +<TGConnectingPoint num="0" id="411" /> +<TGConnectingPoint num="1" id="412" /> +<TGConnectingPoint num="2" id="413" /> +<TGConnectingPoint num="3" id="414" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="447" > -<father id="454" num="0" /> +<SUBCOMPONENT type="-1" id="408" > +<father id="415" num="0" /> <cdparam x="1934" y="1356" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state ==5 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="448" > -<father id="454" num="1" /> +<SUBCOMPONENT type="-1" id="409" > +<father id="415" num="1" /> <cdparam x="2016" y="1356" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="449" > -<father id="454" num="2" /> +<SUBCOMPONENT type="-1" id="410" > +<father id="415" num="2" /> <cdparam x="2001" y="1391" /> <sizeparam width="120" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2274,35 +2147,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ tcpctrl.state == 7 ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="462" > +<COMPONENT type="1012" id="423" > <cdparam x="1811" y="1269" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="458" /> -<TGConnectingPoint num="1" id="459" /> -<TGConnectingPoint num="2" id="460" /> -<TGConnectingPoint num="3" id="461" /> +<TGConnectingPoint num="0" id="419" /> +<TGConnectingPoint num="1" id="420" /> +<TGConnectingPoint num="2" id="421" /> +<TGConnectingPoint num="3" id="422" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="455" > -<father id="462" num="0" /> +<SUBCOMPONENT type="-1" id="416" > +<father id="423" num="0" /> <cdparam x="1762" y="1279" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state ==4 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="456" > -<father id="462" num="1" /> +<SUBCOMPONENT type="-1" id="417" > +<father id="423" num="1" /> <cdparam x="1846" y="1279" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="457" > -<father id="462" num="2" /> +<SUBCOMPONENT type="-1" id="418" > +<father id="423" num="2" /> <cdparam x="1831" y="1314" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2310,35 +2183,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ tcpctrl.state ==2 ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="470" > +<COMPONENT type="1012" id="431" > <cdparam x="1716" y="1141" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="466" /> -<TGConnectingPoint num="1" id="467" /> -<TGConnectingPoint num="2" id="468" /> -<TGConnectingPoint num="3" id="469" /> +<TGConnectingPoint num="0" id="427" /> +<TGConnectingPoint num="1" id="428" /> +<TGConnectingPoint num="2" id="429" /> +<TGConnectingPoint num="3" id="430" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="463" > -<father id="470" num="0" /> +<SUBCOMPONENT type="-1" id="424" > +<father id="431" num="0" /> <cdparam x="1691" y="1151" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="464" > -<father id="470" num="1" /> +<SUBCOMPONENT type="-1" id="425" > +<father id="431" num="1" /> <cdparam x="1751" y="1151" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="465" > -<father id="470" num="2" /> +<SUBCOMPONENT type="-1" id="426" > +<father id="431" num="2" /> <cdparam x="1736" y="1186" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2346,17 +2219,17 @@ the smart card and the terminal <infoparam name="guard 3" value="[ ]" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="474" > +<COMPONENT type="1013" id="435" > <cdparam x="1524" y="1254" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="472" /> -<TGConnectingPoint num="1" id="473" /> +<TGConnectingPoint num="0" id="433" /> +<TGConnectingPoint num="1" id="434" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="471" > -<father id="474" num="0" /> +<SUBCOMPONENT type="-1" id="432" > +<father id="435" num="0" /> <cdparam x="1539" y="1274" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2364,17 +2237,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="478" > +<COMPONENT type="1013" id="439" > <cdparam x="1524" y="1064" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="476" /> -<TGConnectingPoint num="1" id="477" /> +<TGConnectingPoint num="0" id="437" /> +<TGConnectingPoint num="1" id="438" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="475" > -<father id="478" num="0" /> +<SUBCOMPONENT type="-1" id="436" > +<father id="439" num="0" /> <cdparam x="1538" y="1088" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2382,35 +2255,35 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="486" > +<COMPONENT type="1012" id="447" > <cdparam x="1592" y="1006" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="482" /> -<TGConnectingPoint num="1" id="483" /> -<TGConnectingPoint num="2" id="484" /> -<TGConnectingPoint num="3" id="485" /> +<TGConnectingPoint num="0" id="443" /> +<TGConnectingPoint num="1" id="444" /> +<TGConnectingPoint num="2" id="445" /> +<TGConnectingPoint num="3" id="446" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="479" > -<father id="486" num="0" /> +<SUBCOMPONENT type="-1" id="440" > +<father id="447" num="0" /> <cdparam x="1542" y="1016" /> <sizeparam width="124" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state == 4 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="480" > -<father id="486" num="1" /> +<SUBCOMPONENT type="-1" id="441" > +<father id="447" num="1" /> <cdparam x="1627" y="1016" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="481" > -<father id="486" num="2" /> +<SUBCOMPONENT type="-1" id="442" > +<father id="447" num="2" /> <cdparam x="1612" y="1051" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2418,35 +2291,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="494" > +<COMPONENT type="1012" id="455" > <cdparam x="1713" y="875" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="490" /> -<TGConnectingPoint num="1" id="491" /> -<TGConnectingPoint num="2" id="492" /> -<TGConnectingPoint num="3" id="493" /> +<TGConnectingPoint num="0" id="451" /> +<TGConnectingPoint num="1" id="452" /> +<TGConnectingPoint num="2" id="453" /> +<TGConnectingPoint num="3" id="454" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="487" > -<father id="494" num="0" /> +<SUBCOMPONENT type="-1" id="448" > +<father id="455" num="0" /> <cdparam x="1688" y="885" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="488" > -<father id="494" num="1" /> +<SUBCOMPONENT type="-1" id="449" > +<father id="455" num="1" /> <cdparam x="1748" y="885" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="489" > -<father id="494" num="2" /> +<SUBCOMPONENT type="-1" id="450" > +<father id="455" num="2" /> <cdparam x="1733" y="920" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2454,17 +2327,17 @@ the smart card and the terminal <infoparam name="guard 3" value="[ ]" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="498" > +<COMPONENT type="1013" id="459" > <cdparam x="1636" y="1235" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="496" /> -<TGConnectingPoint num="1" id="497" /> +<TGConnectingPoint num="0" id="457" /> +<TGConnectingPoint num="1" id="458" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="495" > -<father id="498" num="0" /> +<SUBCOMPONENT type="-1" id="456" > +<father id="459" num="0" /> <cdparam x="1655" y="1254" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2472,17 +2345,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="502" > +<COMPONENT type="1013" id="463" > <cdparam x="2213" y="1059" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="500" /> -<TGConnectingPoint num="1" id="501" /> +<TGConnectingPoint num="0" id="461" /> +<TGConnectingPoint num="1" id="462" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="499" > -<father id="502" num="0" /> +<SUBCOMPONENT type="-1" id="460" > +<father id="463" num="0" /> <cdparam x="2200" y="1083" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2490,17 +2363,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="506" > +<COMPONENT type="1013" id="467" > <cdparam x="2336" y="1024" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="504" /> -<TGConnectingPoint num="1" id="505" /> +<TGConnectingPoint num="0" id="465" /> +<TGConnectingPoint num="1" id="466" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="503" > -<father id="506" num="0" /> +<SUBCOMPONENT type="-1" id="464" > +<father id="467" num="0" /> <cdparam x="2312" y="1044" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2508,35 +2381,35 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="514" > +<COMPONENT type="1012" id="475" > <cdparam x="1193" y="1020" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="510" /> -<TGConnectingPoint num="1" id="511" /> -<TGConnectingPoint num="2" id="512" /> -<TGConnectingPoint num="3" id="513" /> +<TGConnectingPoint num="0" id="471" /> +<TGConnectingPoint num="1" id="472" /> +<TGConnectingPoint num="2" id="473" /> +<TGConnectingPoint num="3" id="474" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="507" > -<father id="514" num="0" /> +<SUBCOMPONENT type="-1" id="468" > +<father id="475" num="0" /> <cdparam x="1168" y="1030" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="508" > -<father id="514" num="1" /> +<SUBCOMPONENT type="-1" id="469" > +<father id="475" num="1" /> <cdparam x="1228" y="1030" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="509" > -<father id="514" num="2" /> +<SUBCOMPONENT type="-1" id="470" > +<father id="475" num="2" /> <cdparam x="1213" y="1065" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2544,17 +2417,17 @@ the smart card and the terminal <infoparam name="guard 3" value="[ tcpctrl.state ==6 ]" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="518" > +<COMPONENT type="1013" id="479" > <cdparam x="1203" y="1107" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="516" /> -<TGConnectingPoint num="1" id="517" /> +<TGConnectingPoint num="0" id="477" /> +<TGConnectingPoint num="1" id="478" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="515" > -<father id="518" num="0" /> +<SUBCOMPONENT type="-1" id="476" > +<father id="479" num="0" /> <cdparam x="1218" y="1127" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2562,35 +2435,35 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="526" > +<COMPONENT type="1012" id="487" > <cdparam x="557" y="712" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="522" /> -<TGConnectingPoint num="1" id="523" /> -<TGConnectingPoint num="2" id="524" /> -<TGConnectingPoint num="3" id="525" /> +<TGConnectingPoint num="0" id="483" /> +<TGConnectingPoint num="1" id="484" /> +<TGConnectingPoint num="2" id="485" /> +<TGConnectingPoint num="3" id="486" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="519" > -<father id="526" num="0" /> +<SUBCOMPONENT type="-1" id="480" > +<father id="487" num="0" /> <cdparam x="514" y="722" /> <sizeparam width="120" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state == 1 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="520" > -<father id="526" num="1" /> +<SUBCOMPONENT type="-1" id="481" > +<father id="487" num="1" /> <cdparam x="592" y="722" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="521" > -<father id="526" num="2" /> +<SUBCOMPONENT type="-1" id="482" > +<father id="487" num="2" /> <cdparam x="577" y="757" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2598,17 +2471,17 @@ the smart card and the terminal <infoparam name="guard 3" value="[ ]" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="530" > +<COMPONENT type="1013" id="491" > <cdparam x="717" y="694" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="528" /> -<TGConnectingPoint num="1" id="529" /> +<TGConnectingPoint num="0" id="489" /> +<TGConnectingPoint num="1" id="490" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="527" > -<father id="530" num="0" /> +<SUBCOMPONENT type="-1" id="488" > +<father id="491" num="0" /> <cdparam x="732" y="714" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2616,17 +2489,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="534" > +<COMPONENT type="1013" id="495" > <cdparam x="938" y="1025" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="532" /> -<TGConnectingPoint num="1" id="533" /> +<TGConnectingPoint num="0" id="493" /> +<TGConnectingPoint num="1" id="494" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="531" > -<father id="534" num="0" /> +<SUBCOMPONENT type="-1" id="492" > +<father id="495" num="0" /> <cdparam x="953" y="1045" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2634,35 +2507,35 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="542" > +<COMPONENT type="1012" id="503" > <cdparam x="1034" y="939" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="538" /> -<TGConnectingPoint num="1" id="539" /> -<TGConnectingPoint num="2" id="540" /> -<TGConnectingPoint num="3" id="541" /> +<TGConnectingPoint num="0" id="499" /> +<TGConnectingPoint num="1" id="500" /> +<TGConnectingPoint num="2" id="501" /> +<TGConnectingPoint num="3" id="502" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="535" > -<father id="542" num="0" /> +<SUBCOMPONENT type="-1" id="496" > +<father id="503" num="0" /> <cdparam x="989" y="949" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state ==4 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="536" > -<father id="542" num="1" /> +<SUBCOMPONENT type="-1" id="497" > +<father id="503" num="1" /> <cdparam x="1070" y="949" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="537" > -<father id="542" num="2" /> +<SUBCOMPONENT type="-1" id="498" > +<father id="503" num="2" /> <cdparam x="1054" y="984" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2670,17 +2543,17 @@ the smart card and the terminal <infoparam name="guard 3" value="[ tcpctrl.state == 5]" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="546" > +<COMPONENT type="1013" id="507" > <cdparam x="795" y="1009" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="544" /> -<TGConnectingPoint num="1" id="545" /> +<TGConnectingPoint num="0" id="505" /> +<TGConnectingPoint num="1" id="506" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="543" > -<father id="546" num="0" /> +<SUBCOMPONENT type="-1" id="504" > +<father id="507" num="0" /> <cdparam x="818" y="1031" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2688,35 +2561,35 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="554" > +<COMPONENT type="1012" id="515" > <cdparam x="828" y="869" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="550" /> -<TGConnectingPoint num="1" id="551" /> -<TGConnectingPoint num="2" id="552" /> -<TGConnectingPoint num="3" id="553" /> +<TGConnectingPoint num="0" id="511" /> +<TGConnectingPoint num="1" id="512" /> +<TGConnectingPoint num="2" id="513" /> +<TGConnectingPoint num="3" id="514" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="547" > -<father id="554" num="0" /> +<SUBCOMPONENT type="-1" id="508" > +<father id="515" num="0" /> <cdparam x="753" y="885" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state ==0 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="548" > -<father id="554" num="1" /> +<SUBCOMPONENT type="-1" id="509" > +<father id="515" num="1" /> <cdparam x="863" y="879" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="549" > -<father id="554" num="2" /> +<SUBCOMPONENT type="-1" id="510" > +<father id="515" num="2" /> <cdparam x="848" y="914" /> <sizeparam width="112" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2724,17 +2597,17 @@ the smart card and the terminal <infoparam name="guard 3" value="[ tcpctrl.state==0 ]" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="558" > +<COMPONENT type="1013" id="519" > <cdparam x="341" y="764" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="556" /> -<TGConnectingPoint num="1" id="557" /> +<TGConnectingPoint num="0" id="517" /> +<TGConnectingPoint num="1" id="518" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="555" > -<father id="558" num="0" /> +<SUBCOMPONENT type="-1" id="516" > +<father id="519" num="0" /> <cdparam x="354" y="785" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2742,17 +2615,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="562" > +<COMPONENT type="1013" id="523" > <cdparam x="127" y="794" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="560" /> -<TGConnectingPoint num="1" id="561" /> +<TGConnectingPoint num="0" id="521" /> +<TGConnectingPoint num="1" id="522" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="559" > -<father id="562" num="0" /> +<SUBCOMPONENT type="-1" id="520" > +<father id="523" num="0" /> <cdparam x="146" y="818" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2760,35 +2633,35 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="570" > +<COMPONENT type="1012" id="531" > <cdparam x="993" y="780" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="566" /> -<TGConnectingPoint num="1" id="567" /> -<TGConnectingPoint num="2" id="568" /> -<TGConnectingPoint num="3" id="569" /> +<TGConnectingPoint num="0" id="527" /> +<TGConnectingPoint num="1" id="528" /> +<TGConnectingPoint num="2" id="529" /> +<TGConnectingPoint num="3" id="530" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="563" > -<father id="570" num="0" /> +<SUBCOMPONENT type="-1" id="524" > +<father id="531" num="0" /> <cdparam x="949" y="793" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="564" > -<father id="570" num="1" /> +<SUBCOMPONENT type="-1" id="525" > +<father id="531" num="1" /> <cdparam x="1028" y="790" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="565" > -<father id="570" num="2" /> +<SUBCOMPONENT type="-1" id="526" > +<father id="531" num="2" /> <cdparam x="1013" y="825" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2796,17 +2669,17 @@ the smart card and the terminal <infoparam name="guard 3" value="[ ]" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="574" > +<COMPONENT type="1013" id="535" > <cdparam x="1003" y="701" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="572" /> -<TGConnectingPoint num="1" id="573" /> +<TGConnectingPoint num="0" id="533" /> +<TGConnectingPoint num="1" id="534" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="571" > -<father id="574" num="0" /> +<SUBCOMPONENT type="-1" id="532" > +<father id="535" num="0" /> <cdparam x="1018" y="721" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2814,17 +2687,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="578" > +<COMPONENT type="1013" id="539" > <cdparam x="434" y="783" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="576" /> -<TGConnectingPoint num="1" id="577" /> +<TGConnectingPoint num="0" id="537" /> +<TGConnectingPoint num="1" id="538" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="575" > -<father id="578" num="0" /> +<SUBCOMPONENT type="-1" id="536" > +<father id="539" num="0" /> <cdparam x="449" y="802" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2832,17 +2705,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="582" > +<COMPONENT type="1013" id="543" > <cdparam x="225" y="863" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="580" /> -<TGConnectingPoint num="1" id="581" /> +<TGConnectingPoint num="0" id="541" /> +<TGConnectingPoint num="1" id="542" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="579" > -<father id="582" num="0" /> +<SUBCOMPONENT type="-1" id="540" > +<father id="543" num="0" /> <cdparam x="245" y="885" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2850,17 +2723,17 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1013" id="586" > +<COMPONENT type="1013" id="547" > <cdparam x="1044" y="1057" /> <sizeparam width="10" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="execI" value="null" /> -<TGConnectingPoint num="0" id="584" /> -<TGConnectingPoint num="1" id="585" /> +<TGConnectingPoint num="0" id="545" /> +<TGConnectingPoint num="1" id="546" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="583" > -<father id="586" num="0" /> +<SUBCOMPONENT type="-1" id="544" > +<father id="547" num="0" /> <cdparam x="1059" y="1077" /> <sizeparam width="8" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2868,35 +2741,35 @@ the smart card and the terminal <infoparam name="value of the delay" value="b" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="594" > +<COMPONENT type="1012" id="555" > <cdparam x="173" y="486" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="590" /> -<TGConnectingPoint num="1" id="591" /> -<TGConnectingPoint num="2" id="592" /> -<TGConnectingPoint num="3" id="593" /> +<TGConnectingPoint num="0" id="551" /> +<TGConnectingPoint num="1" id="552" /> +<TGConnectingPoint num="2" id="553" /> +<TGConnectingPoint num="3" id="554" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="587" > -<father id="594" num="0" /> +<SUBCOMPONENT type="-1" id="548" > +<father id="555" num="0" /> <cdparam x="98" y="496" /> <sizeparam width="112" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state==0 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="588" > -<father id="594" num="1" /> +<SUBCOMPONENT type="-1" id="549" > +<father id="555" num="1" /> <cdparam x="208" y="496" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="589" > -<father id="594" num="2" /> +<SUBCOMPONENT type="-1" id="550" > +<father id="555" num="2" /> <cdparam x="193" y="531" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2904,35 +2777,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="602" > +<COMPONENT type="1012" id="563" > <cdparam x="359" y="192" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="598" /> -<TGConnectingPoint num="1" id="599" /> -<TGConnectingPoint num="2" id="600" /> -<TGConnectingPoint num="3" id="601" /> +<TGConnectingPoint num="0" id="559" /> +<TGConnectingPoint num="1" id="560" /> +<TGConnectingPoint num="2" id="561" /> +<TGConnectingPoint num="3" id="562" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="595" > -<father id="602" num="0" /> +<SUBCOMPONENT type="-1" id="556" > +<father id="563" num="0" /> <cdparam x="317" y="202" /> <sizeparam width="81" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.a>0 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="596" > -<father id="602" num="1" /> +<SUBCOMPONENT type="-1" id="557" > +<father id="563" num="1" /> <cdparam x="394" y="202" /> <sizeparam width="91" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ tcpctrl.a==0 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="597" > -<father id="602" num="2" /> +<SUBCOMPONENT type="-1" id="558" > +<father id="563" num="2" /> <cdparam x="379" y="237" /> <sizeparam width="12" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2940,35 +2813,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="610" > +<COMPONENT type="1012" id="571" > <cdparam x="449" y="582" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="606" /> -<TGConnectingPoint num="1" id="607" /> -<TGConnectingPoint num="2" id="608" /> -<TGConnectingPoint num="3" id="609" /> +<TGConnectingPoint num="0" id="567" /> +<TGConnectingPoint num="1" id="568" /> +<TGConnectingPoint num="2" id="569" /> +<TGConnectingPoint num="3" id="570" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="603" > -<father id="610" num="0" /> +<SUBCOMPONENT type="-1" id="564" > +<father id="571" num="0" /> <cdparam x="398" y="592" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state ==9 ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="604" > -<father id="610" num="1" /> +<SUBCOMPONENT type="-1" id="565" > +<father id="571" num="1" /> <cdparam x="500" y="599" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="605" > -<father id="610" num="2" /> +<SUBCOMPONENT type="-1" id="566" > +<father id="571" num="2" /> <cdparam x="469" y="627" /> <sizeparam width="252" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2976,35 +2849,35 @@ the smart card and the terminal <infoparam name="guard 3" value="[ (tcpctrl.state ==2) or (tcpctrl.state ==4) ]" /> </SUBCOMPONENT> -<COMPONENT type="1012" id="618" > +<COMPONENT type="1012" id="579" > <cdparam x="274" y="564" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="614" /> -<TGConnectingPoint num="1" id="615" /> -<TGConnectingPoint num="2" id="616" /> -<TGConnectingPoint num="3" id="617" /> +<TGConnectingPoint num="0" id="575" /> +<TGConnectingPoint num="1" id="576" /> +<TGConnectingPoint num="2" id="577" /> +<TGConnectingPoint num="3" id="578" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="611" > -<father id="618" num="0" /> +<SUBCOMPONENT type="-1" id="572" > +<father id="579" num="0" /> <cdparam x="228" y="574" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ tcpctrl.state == 1]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="612" > -<father id="618" num="1" /> +<SUBCOMPONENT type="-1" id="573" > +<father id="579" num="1" /> <cdparam x="317" y="584" /> <sizeparam width="39" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ else ]" /> </SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="613" > -<father id="618" num="2" /> +<SUBCOMPONENT type="-1" id="574" > +<father id="579" num="2" /> <cdparam x="294" y="613" /> <sizeparam width="116" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -3012,16 +2885,16 @@ the smart card and the terminal <infoparam name="guard 3" value="[ tcpctrl.state ==4 ]" /> </SUBCOMPONENT> -<COMPONENT type="1000" id="620" > +<COMPONENT type="1000" id="581" > <cdparam x="227" y="27" /> <sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="start state" value="null" /> -<TGConnectingPoint num="0" id="619" /> +<TGConnectingPoint num="0" id="580" /> </COMPONENT> -<COMPONENT type="301" id="637" > +<COMPONENT type="301" id="598" > <cdparam x="10" y="30" /> <sizeparam width="92" height="135" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -3038,22 +2911,22 @@ the smart card and the terminal 9: close wait 10:last ack " /> -<TGConnectingPoint num="0" id="621" /> -<TGConnectingPoint num="1" id="622" /> -<TGConnectingPoint num="2" id="623" /> -<TGConnectingPoint num="3" id="624" /> -<TGConnectingPoint num="4" id="625" /> -<TGConnectingPoint num="5" id="626" /> -<TGConnectingPoint num="6" id="627" /> -<TGConnectingPoint num="7" id="628" /> -<TGConnectingPoint num="8" id="629" /> -<TGConnectingPoint num="9" id="630" /> -<TGConnectingPoint num="10" id="631" /> -<TGConnectingPoint num="11" id="632" /> -<TGConnectingPoint num="12" id="633" /> -<TGConnectingPoint num="13" id="634" /> -<TGConnectingPoint num="14" id="635" /> -<TGConnectingPoint num="15" id="636" /> +<TGConnectingPoint num="0" id="582" /> +<TGConnectingPoint num="1" id="583" /> +<TGConnectingPoint num="2" id="584" /> +<TGConnectingPoint num="3" id="585" /> +<TGConnectingPoint num="4" id="586" /> +<TGConnectingPoint num="5" id="587" /> +<TGConnectingPoint num="6" id="588" /> +<TGConnectingPoint num="7" id="589" /> +<TGConnectingPoint num="8" id="590" /> +<TGConnectingPoint num="9" id="591" /> +<TGConnectingPoint num="10" id="592" /> +<TGConnectingPoint num="11" id="593" /> +<TGConnectingPoint num="12" id="594" /> +<TGConnectingPoint num="13" id="595" /> +<TGConnectingPoint num="14" id="596" /> +<TGConnectingPoint num="15" id="597" /> <extraparam> <Line value="0: closed" /> <Line value="1: Listen" /> @@ -3069,223 +2942,223 @@ the smart card and the terminal </extraparam> </COMPONENT> -<COMPONENT type="1011" id="640" > +<COMPONENT type="1011" id="601" > <cdparam x="76" y="549" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =1" /> -<TGConnectingPoint num="0" id="638" /> -<TGConnectingPoint num="1" id="639" /> +<TGConnectingPoint num="0" id="599" /> +<TGConnectingPoint num="1" id="600" /> </COMPONENT> -<COMPONENT type="1001" id="642" > +<COMPONENT type="1001" id="603" > <cdparam x="116" y="615" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="641" /> +<TGConnectingPoint num="0" id="602" /> </COMPONENT> -<COMPONENT type="1009" id="645" > +<COMPONENT type="1009" id="606" > <cdparam x="967" y="585" /> <sizeparam width="83" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="read channel" value="fromPtoT(1) " /> -<TGConnectingPoint num="0" id="643" /> -<TGConnectingPoint num="1" id="644" /> +<TGConnectingPoint num="0" id="604" /> +<TGConnectingPoint num="1" id="605" /> <extraparam> <Data channelName="fromPtoT" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1014" id="649" > +<COMPONENT type="1014" id="610" > <cdparam x="150" y="85" /> <sizeparam width="170" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="for loop" value="for(i=0;(tcpctrl.a==0);i = i)" /> -<TGConnectingPoint num="0" id="646" /> -<TGConnectingPoint num="1" id="647" /> -<TGConnectingPoint num="2" id="648" /> +<TGConnectingPoint num="0" id="607" /> +<TGConnectingPoint num="1" id="608" /> +<TGConnectingPoint num="2" id="609" /> <extraparam> <Data init="i=0" condition="(tcpctrl.a==0)" increment="i = i" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="651" > +<COMPONENT type="1001" id="612" > <cdparam x="224" y="207" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="650" /> +<TGConnectingPoint num="0" id="611" /> </COMPONENT> -<COMPONENT type="1011" id="654" > +<COMPONENT type="1011" id="615" > <cdparam x="186" y="144" /> <sizeparam width="96" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state=0" /> -<TGConnectingPoint num="0" id="652" /> -<TGConnectingPoint num="1" id="653" /> +<TGConnectingPoint num="0" id="613" /> +<TGConnectingPoint num="1" id="614" /> </COMPONENT> -<COMPONENT type="1017" id="657" > +<COMPONENT type="1017" id="618" > <cdparam x="316" y="133" /> <sizeparam width="116" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="notified event" value="tcpctrl.a=?abort()" /> -<TGConnectingPoint num="0" id="655" /> -<TGConnectingPoint num="1" id="656" /> +<TGConnectingPoint num="0" id="616" /> +<TGConnectingPoint num="1" id="617" /> <extraparam> <Data eventName="abort" variable="tcpctrl.a" /> </extraparam> </COMPONENT> -<COMPONENT type="1009" id="660" > +<COMPONENT type="1009" id="621" > <cdparam x="692" y="589" /> <sizeparam width="60" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="read channel" value="temp(1) " /> -<TGConnectingPoint num="0" id="658" /> -<TGConnectingPoint num="1" id="659" /> +<TGConnectingPoint num="0" id="619" /> +<TGConnectingPoint num="1" id="620" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1010" id="663" > +<COMPONENT type="1010" id="624" > <cdparam x="689" y="534" /> <sizeparam width="67" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="wait event" value="timeOut() " /> -<TGConnectingPoint num="0" id="661" /> -<TGConnectingPoint num="1" id="662" /> +<TGConnectingPoint num="0" id="622" /> +<TGConnectingPoint num="1" id="623" /> <extraparam> <Data eventName="timeOut" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1010" id="666" > +<COMPONENT type="1010" id="627" > <cdparam x="977" y="528" /> <sizeparam width="63" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="wait event" value="receive() " /> -<TGConnectingPoint num="0" id="664" /> -<TGConnectingPoint num="1" id="665" /> +<TGConnectingPoint num="0" id="625" /> +<TGConnectingPoint num="1" id="626" /> <extraparam> <Data eventName="receive" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1010" id="669" > +<COMPONENT type="1010" id="630" > <cdparam x="439" y="492" /> <sizeparam width="51" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="wait event" value="close() " /> -<TGConnectingPoint num="0" id="667" /> -<TGConnectingPoint num="1" id="668" /> +<TGConnectingPoint num="0" id="628" /> +<TGConnectingPoint num="1" id="629" /> <extraparam> <Data eventName="close" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1010" id="672" > +<COMPONENT type="1010" id="633" > <cdparam x="250" y="468" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="wait event" value="send_TCP() " /> -<TGConnectingPoint num="0" id="670" /> -<TGConnectingPoint num="1" id="671" /> +<TGConnectingPoint num="0" id="631" /> +<TGConnectingPoint num="1" id="632" /> <extraparam> <Data eventName="send_TCP" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1010" id="675" > +<COMPONENT type="1010" id="636" > <cdparam x="163" y="419" /> <sizeparam width="51" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="wait event" value="open() " /> -<TGConnectingPoint num="0" id="673" /> -<TGConnectingPoint num="1" id="674" /> +<TGConnectingPoint num="0" id="634" /> +<TGConnectingPoint num="1" id="635" /> <breakpoint /> <extraparam> <Data eventName="open" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1018" id="686" > +<COMPONENT type="1018" id="647" > <cdparam x="449" y="267" /> <sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="select" value="null" /> -<TGConnectingPoint num="0" id="676" /> -<TGConnectingPoint num="1" id="677" /> -<TGConnectingPoint num="2" id="678" /> -<TGConnectingPoint num="3" id="679" /> -<TGConnectingPoint num="4" id="680" /> -<TGConnectingPoint num="5" id="681" /> -<TGConnectingPoint num="6" id="682" /> -<TGConnectingPoint num="7" id="683" /> -<TGConnectingPoint num="8" id="684" /> -<TGConnectingPoint num="9" id="685" /> +<TGConnectingPoint num="0" id="637" /> +<TGConnectingPoint num="1" id="638" /> +<TGConnectingPoint num="2" id="639" /> +<TGConnectingPoint num="3" id="640" /> +<TGConnectingPoint num="4" id="641" /> +<TGConnectingPoint num="5" id="642" /> +<TGConnectingPoint num="6" id="643" /> +<TGConnectingPoint num="7" id="644" /> +<TGConnectingPoint num="8" id="645" /> +<TGConnectingPoint num="9" id="646" /> <breakpoint /> </COMPONENT> -<COMPONENT type="1001" id="688" > +<COMPONENT type="1001" id="649" > <cdparam x="226" y="529" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="687" /> +<TGConnectingPoint num="0" id="648" /> </COMPONENT> -<COMPONENT type="1001" id="690" > +<COMPONENT type="1001" id="651" > <cdparam x="343" y="614" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="689" /> +<TGConnectingPoint num="0" id="650" /> </COMPONENT> -<COMPONENT type="1010" id="693" > +<COMPONENT type="1010" id="654" > <cdparam x="275" y="228" /> <sizeparam width="53" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="wait event" value="abort() " /> -<TGConnectingPoint num="0" id="691" /> -<TGConnectingPoint num="1" id="692" /> +<TGConnectingPoint num="0" id="652" /> +<TGConnectingPoint num="1" id="653" /> <extraparam> <Data eventName="abort" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="695" > +<COMPONENT type="1001" id="656" > <cdparam x="291" y="290" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="694" /> +<TGConnectingPoint num="0" id="655" /> </COMPONENT> -<COMPONENT type="301" id="712" > +<COMPONENT type="301" id="673" > <cdparam x="602" y="86" /> <sizeparam width="360" height="51" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -3295,22 +3168,22 @@ ou depaquitiser un paquet TCP On prend b=1 comme exemple " /> -<TGConnectingPoint num="0" id="696" /> -<TGConnectingPoint num="1" id="697" /> -<TGConnectingPoint num="2" id="698" /> -<TGConnectingPoint num="3" id="699" /> -<TGConnectingPoint num="4" id="700" /> -<TGConnectingPoint num="5" id="701" /> -<TGConnectingPoint num="6" id="702" /> -<TGConnectingPoint num="7" id="703" /> -<TGConnectingPoint num="8" id="704" /> -<TGConnectingPoint num="9" id="705" /> -<TGConnectingPoint num="10" id="706" /> -<TGConnectingPoint num="11" id="707" /> -<TGConnectingPoint num="12" id="708" /> -<TGConnectingPoint num="13" id="709" /> -<TGConnectingPoint num="14" id="710" /> -<TGConnectingPoint num="15" id="711" /> +<TGConnectingPoint num="0" id="657" /> +<TGConnectingPoint num="1" id="658" /> +<TGConnectingPoint num="2" id="659" /> +<TGConnectingPoint num="3" id="660" /> +<TGConnectingPoint num="4" id="661" /> +<TGConnectingPoint num="5" id="662" /> +<TGConnectingPoint num="6" id="663" /> +<TGConnectingPoint num="7" id="664" /> +<TGConnectingPoint num="8" id="665" /> +<TGConnectingPoint num="9" id="666" /> +<TGConnectingPoint num="10" id="667" /> +<TGConnectingPoint num="11" id="668" /> +<TGConnectingPoint num="12" id="669" /> +<TGConnectingPoint num="13" id="670" /> +<TGConnectingPoint num="14" id="671" /> +<TGConnectingPoint num="15" id="672" /> <extraparam> <Line value="b est le nombre d'instructions necessaires pour paquetiser" /> <Line value="ou depaquitiser un paquet TCP" /> @@ -3319,2830 +3192,2957 @@ On prend b=1 comme exemple </extraparam> </COMPONENT> -<COMPONENT type="1009" id="715" > +<COMPONENT type="1009" id="676" > <cdparam x="188" y="808" /> <sizeparam width="84" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="read channel" value="fromAtoT(1) " /> -<TGConnectingPoint num="0" id="713" /> -<TGConnectingPoint num="1" id="714" /> +<TGConnectingPoint num="0" id="674" /> +<TGConnectingPoint num="1" id="675" /> <extraparam> <Data channelName="fromAtoT" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="718" > +<COMPONENT type="1006" id="679" > <cdparam x="191" y="1002" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="716" /> -<TGConnectingPoint num="1" id="717" /> +<TGConnectingPoint num="0" id="677" /> +<TGConnectingPoint num="1" id="678" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="720" > +<COMPONENT type="1001" id="681" > <cdparam x="219" y="1237" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="719" /> +<TGConnectingPoint num="0" id="680" /> </COMPONENT> -<COMPONENT type="1011" id="723" > +<COMPONENT type="1011" id="684" > <cdparam x="388" y="1032" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =5" /> -<TGConnectingPoint num="0" id="721" /> -<TGConnectingPoint num="1" id="722" /> +<TGConnectingPoint num="0" id="682" /> +<TGConnectingPoint num="1" id="683" /> </COMPONENT> -<COMPONENT type="1001" id="725" > +<COMPONENT type="1001" id="686" > <cdparam x="428" y="1213" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="724" /> +<TGConnectingPoint num="0" id="685" /> </COMPONENT> -<COMPONENT type="1011" id="728" > +<COMPONENT type="1011" id="689" > <cdparam x="84" y="1041" /> <sizeparam width="96" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state=3" /> -<TGConnectingPoint num="0" id="726" /> -<TGConnectingPoint num="1" id="727" /> +<TGConnectingPoint num="0" id="687" /> +<TGConnectingPoint num="1" id="688" /> </COMPONENT> -<COMPONENT type="1006" id="731" > +<COMPONENT type="1006" id="692" > <cdparam x="93" y="938" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="729" /> -<TGConnectingPoint num="1" id="730" /> +<TGConnectingPoint num="0" id="690" /> +<TGConnectingPoint num="1" id="691" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="734" > +<COMPONENT type="1011" id="695" > <cdparam x="292" y="1026" /> <sizeparam width="108" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =10" /> -<TGConnectingPoint num="0" id="732" /> -<TGConnectingPoint num="1" id="733" /> +<TGConnectingPoint num="0" id="693" /> +<TGConnectingPoint num="1" id="694" /> </COMPONENT> -<COMPONENT type="1001" id="736" > +<COMPONENT type="1001" id="697" > <cdparam x="334" y="1229" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="735" /> +<TGConnectingPoint num="0" id="696" /> </COMPONENT> -<COMPONENT type="1006" id="739" > +<COMPONENT type="1006" id="700" > <cdparam x="400" y="941" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="737" /> -<TGConnectingPoint num="1" id="738" /> +<TGConnectingPoint num="0" id="698" /> +<TGConnectingPoint num="1" id="699" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="742" > +<COMPONENT type="1006" id="703" > <cdparam x="307" y="900" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="740" /> -<TGConnectingPoint num="1" id="741" /> +<TGConnectingPoint num="0" id="701" /> +<TGConnectingPoint num="1" id="702" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="744" > +<COMPONENT type="1001" id="705" > <cdparam x="789" y="1270" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="743" /> +<TGConnectingPoint num="0" id="704" /> </COMPONENT> -<COMPONENT type="301" id="761" > +<COMPONENT type="301" id="722" > <cdparam x="998" y="850" /> <sizeparam width="50" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Fin " /> -<TGConnectingPoint num="0" id="745" /> -<TGConnectingPoint num="1" id="746" /> -<TGConnectingPoint num="2" id="747" /> -<TGConnectingPoint num="3" id="748" /> -<TGConnectingPoint num="4" id="749" /> -<TGConnectingPoint num="5" id="750" /> -<TGConnectingPoint num="6" id="751" /> -<TGConnectingPoint num="7" id="752" /> -<TGConnectingPoint num="8" id="753" /> -<TGConnectingPoint num="9" id="754" /> -<TGConnectingPoint num="10" id="755" /> -<TGConnectingPoint num="11" id="756" /> -<TGConnectingPoint num="12" id="757" /> -<TGConnectingPoint num="13" id="758" /> -<TGConnectingPoint num="14" id="759" /> -<TGConnectingPoint num="15" id="760" /> +<TGConnectingPoint num="0" id="706" /> +<TGConnectingPoint num="1" id="707" /> +<TGConnectingPoint num="2" id="708" /> +<TGConnectingPoint num="3" id="709" /> +<TGConnectingPoint num="4" id="710" /> +<TGConnectingPoint num="5" id="711" /> +<TGConnectingPoint num="6" id="712" /> +<TGConnectingPoint num="7" id="713" /> +<TGConnectingPoint num="8" id="714" /> +<TGConnectingPoint num="9" id="715" /> +<TGConnectingPoint num="10" id="716" /> +<TGConnectingPoint num="11" id="717" /> +<TGConnectingPoint num="12" id="718" /> +<TGConnectingPoint num="13" id="719" /> +<TGConnectingPoint num="14" id="720" /> +<TGConnectingPoint num="15" id="721" /> <extraparam> <Line value="Fin" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="764" > +<COMPONENT type="1011" id="725" > <cdparam x="678" y="965" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =1" /> -<TGConnectingPoint num="0" id="762" /> -<TGConnectingPoint num="1" id="763" /> +<TGConnectingPoint num="0" id="723" /> +<TGConnectingPoint num="1" id="724" /> </COMPONENT> -<COMPONENT type="1001" id="766" > +<COMPONENT type="1001" id="727" > <cdparam x="718" y="1032" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="765" /> +<TGConnectingPoint num="0" id="726" /> </COMPONENT> -<COMPONENT type="1006" id="769" > +<COMPONENT type="1006" id="730" > <cdparam x="761" y="1086" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="767" /> -<TGConnectingPoint num="1" id="768" /> +<TGConnectingPoint num="0" id="728" /> +<TGConnectingPoint num="1" id="729" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="786" > +<COMPONENT type="301" id="747" > <cdparam x="781" y="950" /> <sizeparam width="89" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Active Open " /> -<TGConnectingPoint num="0" id="770" /> -<TGConnectingPoint num="1" id="771" /> -<TGConnectingPoint num="2" id="772" /> -<TGConnectingPoint num="3" id="773" /> -<TGConnectingPoint num="4" id="774" /> -<TGConnectingPoint num="5" id="775" /> -<TGConnectingPoint num="6" id="776" /> -<TGConnectingPoint num="7" id="777" /> -<TGConnectingPoint num="8" id="778" /> -<TGConnectingPoint num="9" id="779" /> -<TGConnectingPoint num="10" id="780" /> -<TGConnectingPoint num="11" id="781" /> -<TGConnectingPoint num="12" id="782" /> -<TGConnectingPoint num="13" id="783" /> -<TGConnectingPoint num="14" id="784" /> -<TGConnectingPoint num="15" id="785" /> +<TGConnectingPoint num="0" id="731" /> +<TGConnectingPoint num="1" id="732" /> +<TGConnectingPoint num="2" id="733" /> +<TGConnectingPoint num="3" id="734" /> +<TGConnectingPoint num="4" id="735" /> +<TGConnectingPoint num="5" id="736" /> +<TGConnectingPoint num="6" id="737" /> +<TGConnectingPoint num="7" id="738" /> +<TGConnectingPoint num="8" id="739" /> +<TGConnectingPoint num="9" id="740" /> +<TGConnectingPoint num="10" id="741" /> +<TGConnectingPoint num="11" id="742" /> +<TGConnectingPoint num="12" id="743" /> +<TGConnectingPoint num="13" id="744" /> +<TGConnectingPoint num="14" id="745" /> +<TGConnectingPoint num="15" id="746" /> <extraparam> <Line value="Active Open" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="803" > +<COMPONENT type="301" id="764" > <cdparam x="715" y="907" /> <sizeparam width="97" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Passive Open " /> -<TGConnectingPoint num="0" id="787" /> -<TGConnectingPoint num="1" id="788" /> -<TGConnectingPoint num="2" id="789" /> -<TGConnectingPoint num="3" id="790" /> -<TGConnectingPoint num="4" id="791" /> -<TGConnectingPoint num="5" id="792" /> -<TGConnectingPoint num="6" id="793" /> -<TGConnectingPoint num="7" id="794" /> -<TGConnectingPoint num="8" id="795" /> -<TGConnectingPoint num="9" id="796" /> -<TGConnectingPoint num="10" id="797" /> -<TGConnectingPoint num="11" id="798" /> -<TGConnectingPoint num="12" id="799" /> -<TGConnectingPoint num="13" id="800" /> -<TGConnectingPoint num="14" id="801" /> -<TGConnectingPoint num="15" id="802" /> +<TGConnectingPoint num="0" id="748" /> +<TGConnectingPoint num="1" id="749" /> +<TGConnectingPoint num="2" id="750" /> +<TGConnectingPoint num="3" id="751" /> +<TGConnectingPoint num="4" id="752" /> +<TGConnectingPoint num="5" id="753" /> +<TGConnectingPoint num="6" id="754" /> +<TGConnectingPoint num="7" id="755" /> +<TGConnectingPoint num="8" id="756" /> +<TGConnectingPoint num="9" id="757" /> +<TGConnectingPoint num="10" id="758" /> +<TGConnectingPoint num="11" id="759" /> +<TGConnectingPoint num="12" id="760" /> +<TGConnectingPoint num="13" id="761" /> +<TGConnectingPoint num="14" id="762" /> +<TGConnectingPoint num="15" id="763" /> <extraparam> <Line value="Passive Open" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="806" > +<COMPONENT type="1011" id="767" > <cdparam x="749" y="1193" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =3" /> -<TGConnectingPoint num="0" id="804" /> -<TGConnectingPoint num="1" id="805" /> +<TGConnectingPoint num="0" id="765" /> +<TGConnectingPoint num="1" id="766" /> </COMPONENT> -<COMPONENT type="1011" id="809" > +<COMPONENT type="1011" id="770" > <cdparam x="446" y="768" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =0" /> -<TGConnectingPoint num="0" id="807" /> -<TGConnectingPoint num="1" id="808" /> +<TGConnectingPoint num="0" id="768" /> +<TGConnectingPoint num="1" id="769" /> </COMPONENT> -<COMPONENT type="1001" id="811" > +<COMPONENT type="1001" id="772" > <cdparam x="486" y="830" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="810" /> +<TGConnectingPoint num="0" id="771" /> </COMPONENT> -<COMPONENT type="1006" id="814" > +<COMPONENT type="1006" id="775" > <cdparam x="904" y="1123" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="812" /> -<TGConnectingPoint num="1" id="813" /> +<TGConnectingPoint num="0" id="773" /> +<TGConnectingPoint num="1" id="774" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="831" > +<COMPONENT type="301" id="792" > <cdparam x="884" y="1068" /> <sizeparam width="108" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of Fin " /> -<TGConnectingPoint num="0" id="815" /> -<TGConnectingPoint num="1" id="816" /> -<TGConnectingPoint num="2" id="817" /> -<TGConnectingPoint num="3" id="818" /> -<TGConnectingPoint num="4" id="819" /> -<TGConnectingPoint num="5" id="820" /> -<TGConnectingPoint num="6" id="821" /> -<TGConnectingPoint num="7" id="822" /> -<TGConnectingPoint num="8" id="823" /> -<TGConnectingPoint num="9" id="824" /> -<TGConnectingPoint num="10" id="825" /> -<TGConnectingPoint num="11" id="826" /> -<TGConnectingPoint num="12" id="827" /> -<TGConnectingPoint num="13" id="828" /> -<TGConnectingPoint num="14" id="829" /> -<TGConnectingPoint num="15" id="830" /> +<TGConnectingPoint num="0" id="776" /> +<TGConnectingPoint num="1" id="777" /> +<TGConnectingPoint num="2" id="778" /> +<TGConnectingPoint num="3" id="779" /> +<TGConnectingPoint num="4" id="780" /> +<TGConnectingPoint num="5" id="781" /> +<TGConnectingPoint num="6" id="782" /> +<TGConnectingPoint num="7" id="783" /> +<TGConnectingPoint num="8" id="784" /> +<TGConnectingPoint num="9" id="785" /> +<TGConnectingPoint num="10" id="786" /> +<TGConnectingPoint num="11" id="787" /> +<TGConnectingPoint num="12" id="788" /> +<TGConnectingPoint num="13" id="789" /> +<TGConnectingPoint num="14" id="790" /> +<TGConnectingPoint num="15" id="791" /> <extraparam> <Line value="send Ack of Fin" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="834" > +<COMPONENT type="1011" id="795" > <cdparam x="893" y="1234" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =9" /> -<TGConnectingPoint num="0" id="832" /> -<TGConnectingPoint num="1" id="833" /> +<TGConnectingPoint num="0" id="793" /> +<TGConnectingPoint num="1" id="794" /> </COMPONENT> -<COMPONENT type="1001" id="836" > +<COMPONENT type="1001" id="797" > <cdparam x="933" y="1311" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="835" /> +<TGConnectingPoint num="0" id="796" /> </COMPONENT> -<COMPONENT type="1006" id="839" > +<COMPONENT type="1006" id="800" > <cdparam x="1010" y="1155" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="837" /> -<TGConnectingPoint num="1" id="838" /> +<TGConnectingPoint num="0" id="798" /> +<TGConnectingPoint num="1" id="799" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="856" > +<COMPONENT type="301" id="817" > <cdparam x="1000" y="1094" /> <sizeparam width="108" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of Fin " /> -<TGConnectingPoint num="0" id="840" /> -<TGConnectingPoint num="1" id="841" /> -<TGConnectingPoint num="2" id="842" /> -<TGConnectingPoint num="3" id="843" /> -<TGConnectingPoint num="4" id="844" /> -<TGConnectingPoint num="5" id="845" /> -<TGConnectingPoint num="6" id="846" /> -<TGConnectingPoint num="7" id="847" /> -<TGConnectingPoint num="8" id="848" /> -<TGConnectingPoint num="9" id="849" /> -<TGConnectingPoint num="10" id="850" /> -<TGConnectingPoint num="11" id="851" /> -<TGConnectingPoint num="12" id="852" /> -<TGConnectingPoint num="13" id="853" /> -<TGConnectingPoint num="14" id="854" /> -<TGConnectingPoint num="15" id="855" /> +<TGConnectingPoint num="0" id="801" /> +<TGConnectingPoint num="1" id="802" /> +<TGConnectingPoint num="2" id="803" /> +<TGConnectingPoint num="3" id="804" /> +<TGConnectingPoint num="4" id="805" /> +<TGConnectingPoint num="5" id="806" /> +<TGConnectingPoint num="6" id="807" /> +<TGConnectingPoint num="7" id="808" /> +<TGConnectingPoint num="8" id="809" /> +<TGConnectingPoint num="9" id="810" /> +<TGConnectingPoint num="10" id="811" /> +<TGConnectingPoint num="11" id="812" /> +<TGConnectingPoint num="12" id="813" /> +<TGConnectingPoint num="13" id="814" /> +<TGConnectingPoint num="14" id="815" /> +<TGConnectingPoint num="15" id="816" /> <extraparam> <Line value="send Ack of Fin" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="859" > +<COMPONENT type="1011" id="820" > <cdparam x="999" y="1266" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =7" /> -<TGConnectingPoint num="0" id="857" /> -<TGConnectingPoint num="1" id="858" /> +<TGConnectingPoint num="0" id="818" /> +<TGConnectingPoint num="1" id="819" /> </COMPONENT> -<COMPONENT type="1001" id="861" > +<COMPONENT type="1001" id="822" > <cdparam x="1039" y="1341" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="860" /> +<TGConnectingPoint num="0" id="821" /> </COMPONENT> -<COMPONENT type="1006" id="864" > +<COMPONENT type="1006" id="825" > <cdparam x="683" y="758" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="862" /> -<TGConnectingPoint num="1" id="863" /> +<TGConnectingPoint num="0" id="823" /> +<TGConnectingPoint num="1" id="824" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="866" > +<COMPONENT type="1001" id="827" > <cdparam x="712" y="865" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="865" /> +<TGConnectingPoint num="0" id="826" /> </COMPONENT> -<COMPONENT type="1007" id="869" > +<COMPONENT type="1007" id="830" > <cdparam x="93" y="1100" /> <sizeparam width="78" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send request" value="req_Timer()" /> -<TGConnectingPoint num="0" id="867" /> -<TGConnectingPoint num="1" id="868" /> +<TGConnectingPoint num="0" id="828" /> +<TGConnectingPoint num="1" id="829" /> <extraparam> <Data requestName="req_Timer" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="872" > +<COMPONENT type="1006" id="833" > <cdparam x="104" y="1167" /> <sizeparam width="56" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="temp(1)" /> -<TGConnectingPoint num="0" id="870" /> -<TGConnectingPoint num="1" id="871" /> +<TGConnectingPoint num="0" id="831" /> +<TGConnectingPoint num="1" id="832" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="874" > +<COMPONENT type="1001" id="835" > <cdparam x="122" y="1236" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="873" /> +<TGConnectingPoint num="0" id="834" /> </COMPONENT> -<COMPONENT type="1007" id="877" > +<COMPONENT type="1007" id="838" > <cdparam x="190" y="1102" /> <sizeparam width="78" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send request" value="req_Timer()" /> -<TGConnectingPoint num="0" id="875" /> -<TGConnectingPoint num="1" id="876" /> +<TGConnectingPoint num="0" id="836" /> +<TGConnectingPoint num="1" id="837" /> <extraparam> <Data requestName="req_Timer" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="880" > +<COMPONENT type="1006" id="841" > <cdparam x="201" y="1169" /> <sizeparam width="56" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="temp(1)" /> -<TGConnectingPoint num="0" id="878" /> -<TGConnectingPoint num="1" id="879" /> +<TGConnectingPoint num="0" id="839" /> +<TGConnectingPoint num="1" id="840" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1007" id="883" > +<COMPONENT type="1007" id="844" > <cdparam x="307" y="1106" /> <sizeparam width="78" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send request" value="req_Timer()" /> -<TGConnectingPoint num="0" id="881" /> -<TGConnectingPoint num="1" id="882" /> +<TGConnectingPoint num="0" id="842" /> +<TGConnectingPoint num="1" id="843" /> <extraparam> <Data requestName="req_Timer" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="886" > +<COMPONENT type="1006" id="847" > <cdparam x="318" y="1173" /> <sizeparam width="56" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="temp(1)" /> -<TGConnectingPoint num="0" id="884" /> -<TGConnectingPoint num="1" id="885" /> +<TGConnectingPoint num="0" id="845" /> +<TGConnectingPoint num="1" id="846" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1007" id="889" > +<COMPONENT type="1007" id="850" > <cdparam x="399" y="1090" /> <sizeparam width="78" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send request" value="req_Timer()" /> -<TGConnectingPoint num="0" id="887" /> -<TGConnectingPoint num="1" id="888" /> +<TGConnectingPoint num="0" id="848" /> +<TGConnectingPoint num="1" id="849" /> <extraparam> <Data requestName="req_Timer" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="892" > +<COMPONENT type="1006" id="853" > <cdparam x="410" y="1159" /> <sizeparam width="56" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="temp(1)" /> -<TGConnectingPoint num="0" id="890" /> -<TGConnectingPoint num="1" id="891" /> +<TGConnectingPoint num="0" id="851" /> +<TGConnectingPoint num="1" id="852" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="895" > +<COMPONENT type="1011" id="856" > <cdparam x="56" y="861" /> <sizeparam width="153" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="seqNum=seqNum+wind" /> -<TGConnectingPoint num="0" id="893" /> -<TGConnectingPoint num="1" id="894" /> +<TGConnectingPoint num="0" id="854" /> +<TGConnectingPoint num="1" id="855" /> </COMPONENT> -<COMPONENT type="1011" id="898" > +<COMPONENT type="1011" id="859" > <cdparam x="154" y="940" /> <sizeparam width="153" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="seqNum=seqNum+wind" /> -<TGConnectingPoint num="0" id="896" /> -<TGConnectingPoint num="1" id="897" /> +<TGConnectingPoint num="0" id="857" /> +<TGConnectingPoint num="1" id="858" /> </COMPONENT> -<COMPONENT type="1011" id="901" > +<COMPONENT type="1011" id="862" > <cdparam x="363" y="865" /> <sizeparam width="153" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="seqNum=seqNum+wind" /> -<TGConnectingPoint num="0" id="899" /> -<TGConnectingPoint num="1" id="900" /> +<TGConnectingPoint num="0" id="860" /> +<TGConnectingPoint num="1" id="861" /> </COMPONENT> -<COMPONENT type="1011" id="904" > +<COMPONENT type="1011" id="865" > <cdparam x="270" y="831" /> <sizeparam width="153" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="seqNum=seqNum+wind" /> -<TGConnectingPoint num="0" id="902" /> -<TGConnectingPoint num="1" id="903" /> +<TGConnectingPoint num="0" id="863" /> +<TGConnectingPoint num="1" id="864" /> </COMPONENT> -<COMPONENT type="1008" id="907" > +<COMPONENT type="1008" id="868" > <cdparam x="206" y="1052" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="905" /> -<TGConnectingPoint num="1" id="906" /> +<TGConnectingPoint num="0" id="866" /> +<TGConnectingPoint num="1" id="867" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="910" > +<COMPONENT type="1008" id="871" > <cdparam x="323" y="962" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="908" /> -<TGConnectingPoint num="1" id="909" /> +<TGConnectingPoint num="0" id="869" /> +<TGConnectingPoint num="1" id="870" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="913" > +<COMPONENT type="1008" id="874" > <cdparam x="415" y="983" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="911" /> -<TGConnectingPoint num="1" id="912" /> +<TGConnectingPoint num="0" id="872" /> +<TGConnectingPoint num="1" id="873" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="916" > +<COMPONENT type="1008" id="877" > <cdparam x="109" y="986" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="914" /> -<TGConnectingPoint num="1" id="915" /> +<TGConnectingPoint num="0" id="875" /> +<TGConnectingPoint num="1" id="876" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="919" > +<COMPONENT type="1008" id="880" > <cdparam x="699" y="813" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="917" /> -<TGConnectingPoint num="1" id="918" /> +<TGConnectingPoint num="0" id="878" /> +<TGConnectingPoint num="1" id="879" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="922" > +<COMPONENT type="1008" id="883" > <cdparam x="775" y="1141" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="920" /> -<TGConnectingPoint num="1" id="921" /> +<TGConnectingPoint num="0" id="881" /> +<TGConnectingPoint num="1" id="882" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="925" > +<COMPONENT type="1008" id="886" > <cdparam x="920" y="1178" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="923" /> -<TGConnectingPoint num="1" id="924" /> +<TGConnectingPoint num="0" id="884" /> +<TGConnectingPoint num="1" id="885" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="928" > +<COMPONENT type="1008" id="889" > <cdparam x="1026" y="1211" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="926" /> -<TGConnectingPoint num="1" id="927" /> +<TGConnectingPoint num="0" id="887" /> +<TGConnectingPoint num="1" id="888" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="930" > +<COMPONENT type="1001" id="891" > <cdparam x="612" y="762" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="929" /> +<TGConnectingPoint num="0" id="890" /> </COMPONENT> -<COMPONENT type="1001" id="932" > +<COMPONENT type="1001" id="893" > <cdparam x="899" y="922" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="931" /> +<TGConnectingPoint num="0" id="892" /> </COMPONENT> -<COMPONENT type="1006" id="935" > +<COMPONENT type="1006" id="896" > <cdparam x="1169" y="1214" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="933" /> -<TGConnectingPoint num="1" id="934" /> +<TGConnectingPoint num="0" id="894" /> +<TGConnectingPoint num="1" id="895" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="952" > +<COMPONENT type="301" id="913" > <cdparam x="1159" y="1153" /> <sizeparam width="108" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of Fin " /> -<TGConnectingPoint num="0" id="936" /> -<TGConnectingPoint num="1" id="937" /> -<TGConnectingPoint num="2" id="938" /> -<TGConnectingPoint num="3" id="939" /> -<TGConnectingPoint num="4" id="940" /> -<TGConnectingPoint num="5" id="941" /> -<TGConnectingPoint num="6" id="942" /> -<TGConnectingPoint num="7" id="943" /> -<TGConnectingPoint num="8" id="944" /> -<TGConnectingPoint num="9" id="945" /> -<TGConnectingPoint num="10" id="946" /> -<TGConnectingPoint num="11" id="947" /> -<TGConnectingPoint num="12" id="948" /> -<TGConnectingPoint num="13" id="949" /> -<TGConnectingPoint num="14" id="950" /> -<TGConnectingPoint num="15" id="951" /> +<TGConnectingPoint num="0" id="897" /> +<TGConnectingPoint num="1" id="898" /> +<TGConnectingPoint num="2" id="899" /> +<TGConnectingPoint num="3" id="900" /> +<TGConnectingPoint num="4" id="901" /> +<TGConnectingPoint num="5" id="902" /> +<TGConnectingPoint num="6" id="903" /> +<TGConnectingPoint num="7" id="904" /> +<TGConnectingPoint num="8" id="905" /> +<TGConnectingPoint num="9" id="906" /> +<TGConnectingPoint num="10" id="907" /> +<TGConnectingPoint num="11" id="908" /> +<TGConnectingPoint num="12" id="909" /> +<TGConnectingPoint num="13" id="910" /> +<TGConnectingPoint num="14" id="911" /> +<TGConnectingPoint num="15" id="912" /> <extraparam> <Line value="send Ack of Fin" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="955" > +<COMPONENT type="1011" id="916" > <cdparam x="1158" y="1295" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =8" /> -<TGConnectingPoint num="0" id="953" /> -<TGConnectingPoint num="1" id="954" /> +<TGConnectingPoint num="0" id="914" /> +<TGConnectingPoint num="1" id="915" /> </COMPONENT> -<COMPONENT type="1001" id="957" > +<COMPONENT type="1001" id="918" > <cdparam x="1197" y="1471" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="956" /> +<TGConnectingPoint num="0" id="917" /> </COMPONENT> -<COMPONENT type="1011" id="960" > +<COMPONENT type="1011" id="921" > <cdparam x="1157" y="1402" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =0" /> -<TGConnectingPoint num="0" id="958" /> -<TGConnectingPoint num="1" id="959" /> +<TGConnectingPoint num="0" id="919" /> +<TGConnectingPoint num="1" id="920" /> </COMPONENT> -<COMPONENT type="1008" id="963" > +<COMPONENT type="1008" id="924" > <cdparam x="1185" y="1351" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="961" /> -<TGConnectingPoint num="1" id="962" /> +<TGConnectingPoint num="0" id="922" /> +<TGConnectingPoint num="1" id="923" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="965" > +<COMPONENT type="1001" id="926" > <cdparam x="1277" y="1070" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="964" /> +<TGConnectingPoint num="0" id="925" /> </COMPONENT> -<COMPONENT type="1001" id="967" > +<COMPONENT type="1001" id="928" > <cdparam x="1519" y="1457" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="966" /> +<TGConnectingPoint num="0" id="927" /> </COMPONENT> -<COMPONENT type="1006" id="970" > +<COMPONENT type="1006" id="931" > <cdparam x="1489" y="1132" /> <sizeparam width="80" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoA(1)" /> -<TGConnectingPoint num="0" id="968" /> -<TGConnectingPoint num="1" id="969" /> +<TGConnectingPoint num="0" id="929" /> +<TGConnectingPoint num="1" id="930" /> <extraparam> <Data channelName="fromTtoA" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="973" > +<COMPONENT type="1006" id="934" > <cdparam x="1490" y="1348" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="971" /> -<TGConnectingPoint num="1" id="972" /> +<TGConnectingPoint num="0" id="932" /> +<TGConnectingPoint num="1" id="933" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="976" > +<COMPONENT type="1008" id="937" > <cdparam x="1710" y="1026" /> <sizeparam width="43" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="stop()" /> -<TGConnectingPoint num="0" id="974" /> -<TGConnectingPoint num="1" id="975" /> +<TGConnectingPoint num="0" id="935" /> +<TGConnectingPoint num="1" id="936" /> <extraparam> <Data eventName="stop" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="993" > +<COMPONENT type="301" id="954" > <cdparam x="1759" y="1192" /> <sizeparam width="86" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Correct ack " /> -<TGConnectingPoint num="0" id="977" /> -<TGConnectingPoint num="1" id="978" /> -<TGConnectingPoint num="2" id="979" /> -<TGConnectingPoint num="3" id="980" /> -<TGConnectingPoint num="4" id="981" /> -<TGConnectingPoint num="5" id="982" /> -<TGConnectingPoint num="6" id="983" /> -<TGConnectingPoint num="7" id="984" /> -<TGConnectingPoint num="8" id="985" /> -<TGConnectingPoint num="9" id="986" /> -<TGConnectingPoint num="10" id="987" /> -<TGConnectingPoint num="11" id="988" /> -<TGConnectingPoint num="12" id="989" /> -<TGConnectingPoint num="13" id="990" /> -<TGConnectingPoint num="14" id="991" /> -<TGConnectingPoint num="15" id="992" /> +<TGConnectingPoint num="0" id="938" /> +<TGConnectingPoint num="1" id="939" /> +<TGConnectingPoint num="2" id="940" /> +<TGConnectingPoint num="3" id="941" /> +<TGConnectingPoint num="4" id="942" /> +<TGConnectingPoint num="5" id="943" /> +<TGConnectingPoint num="6" id="944" /> +<TGConnectingPoint num="7" id="945" /> +<TGConnectingPoint num="8" id="946" /> +<TGConnectingPoint num="9" id="947" /> +<TGConnectingPoint num="10" id="948" /> +<TGConnectingPoint num="11" id="949" /> +<TGConnectingPoint num="12" id="950" /> +<TGConnectingPoint num="13" id="951" /> +<TGConnectingPoint num="14" id="952" /> +<TGConnectingPoint num="15" id="953" /> <extraparam> <Line value="Correct ack" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="1010" > +<COMPONENT type="301" id="971" > <cdparam x="1635" y="1168" /> <sizeparam width="71" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="false ack " /> -<TGConnectingPoint num="0" id="994" /> -<TGConnectingPoint num="1" id="995" /> -<TGConnectingPoint num="2" id="996" /> -<TGConnectingPoint num="3" id="997" /> -<TGConnectingPoint num="4" id="998" /> -<TGConnectingPoint num="5" id="999" /> -<TGConnectingPoint num="6" id="1000" /> -<TGConnectingPoint num="7" id="1001" /> -<TGConnectingPoint num="8" id="1002" /> -<TGConnectingPoint num="9" id="1003" /> -<TGConnectingPoint num="10" id="1004" /> -<TGConnectingPoint num="11" id="1005" /> -<TGConnectingPoint num="12" id="1006" /> -<TGConnectingPoint num="13" id="1007" /> -<TGConnectingPoint num="14" id="1008" /> -<TGConnectingPoint num="15" id="1009" /> +<TGConnectingPoint num="0" id="955" /> +<TGConnectingPoint num="1" id="956" /> +<TGConnectingPoint num="2" id="957" /> +<TGConnectingPoint num="3" id="958" /> +<TGConnectingPoint num="4" id="959" /> +<TGConnectingPoint num="5" id="960" /> +<TGConnectingPoint num="6" id="961" /> +<TGConnectingPoint num="7" id="962" /> +<TGConnectingPoint num="8" id="963" /> +<TGConnectingPoint num="9" id="964" /> +<TGConnectingPoint num="10" id="965" /> +<TGConnectingPoint num="11" id="966" /> +<TGConnectingPoint num="12" id="967" /> +<TGConnectingPoint num="13" id="968" /> +<TGConnectingPoint num="14" id="969" /> +<TGConnectingPoint num="15" id="970" /> <extraparam> <Line value="false ack" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="1013" > +<COMPONENT type="1006" id="974" > <cdparam x="1602" y="1299" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="1011" /> -<TGConnectingPoint num="1" id="1012" /> +<TGConnectingPoint num="0" id="972" /> +<TGConnectingPoint num="1" id="973" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="1015" > +<COMPONENT type="1001" id="976" > <cdparam x="1632" y="1468" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1014" /> +<TGConnectingPoint num="0" id="975" /> </COMPONENT> -<COMPONENT type="301" id="1032" > +<COMPONENT type="301" id="993" > <cdparam x="1469" y="1295" /> <sizeparam width="127" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="return acknowldge " /> -<TGConnectingPoint num="0" id="1016" /> -<TGConnectingPoint num="1" id="1017" /> -<TGConnectingPoint num="2" id="1018" /> -<TGConnectingPoint num="3" id="1019" /> -<TGConnectingPoint num="4" id="1020" /> -<TGConnectingPoint num="5" id="1021" /> -<TGConnectingPoint num="6" id="1022" /> -<TGConnectingPoint num="7" id="1023" /> -<TGConnectingPoint num="8" id="1024" /> -<TGConnectingPoint num="9" id="1025" /> -<TGConnectingPoint num="10" id="1026" /> -<TGConnectingPoint num="11" id="1027" /> -<TGConnectingPoint num="12" id="1028" /> -<TGConnectingPoint num="13" id="1029" /> -<TGConnectingPoint num="14" id="1030" /> -<TGConnectingPoint num="15" id="1031" /> +<TGConnectingPoint num="0" id="977" /> +<TGConnectingPoint num="1" id="978" /> +<TGConnectingPoint num="2" id="979" /> +<TGConnectingPoint num="3" id="980" /> +<TGConnectingPoint num="4" id="981" /> +<TGConnectingPoint num="5" id="982" /> +<TGConnectingPoint num="6" id="983" /> +<TGConnectingPoint num="7" id="984" /> +<TGConnectingPoint num="8" id="985" /> +<TGConnectingPoint num="9" id="986" /> +<TGConnectingPoint num="10" id="987" /> +<TGConnectingPoint num="11" id="988" /> +<TGConnectingPoint num="12" id="989" /> +<TGConnectingPoint num="13" id="990" /> +<TGConnectingPoint num="14" id="991" /> +<TGConnectingPoint num="15" id="992" /> <extraparam> <Line value="return acknowldge" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="1049" > +<COMPONENT type="301" id="1010" > <cdparam x="1620" y="927" /> <sizeparam width="50" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="data " /> -<TGConnectingPoint num="0" id="1033" /> -<TGConnectingPoint num="1" id="1034" /> -<TGConnectingPoint num="2" id="1035" /> -<TGConnectingPoint num="3" id="1036" /> -<TGConnectingPoint num="4" id="1037" /> -<TGConnectingPoint num="5" id="1038" /> -<TGConnectingPoint num="6" id="1039" /> -<TGConnectingPoint num="7" id="1040" /> -<TGConnectingPoint num="8" id="1041" /> -<TGConnectingPoint num="9" id="1042" /> -<TGConnectingPoint num="10" id="1043" /> -<TGConnectingPoint num="11" id="1044" /> -<TGConnectingPoint num="12" id="1045" /> -<TGConnectingPoint num="13" id="1046" /> -<TGConnectingPoint num="14" id="1047" /> -<TGConnectingPoint num="15" id="1048" /> +<TGConnectingPoint num="0" id="994" /> +<TGConnectingPoint num="1" id="995" /> +<TGConnectingPoint num="2" id="996" /> +<TGConnectingPoint num="3" id="997" /> +<TGConnectingPoint num="4" id="998" /> +<TGConnectingPoint num="5" id="999" /> +<TGConnectingPoint num="6" id="1000" /> +<TGConnectingPoint num="7" id="1001" /> +<TGConnectingPoint num="8" id="1002" /> +<TGConnectingPoint num="9" id="1003" /> +<TGConnectingPoint num="10" id="1004" /> +<TGConnectingPoint num="11" id="1005" /> +<TGConnectingPoint num="12" id="1006" /> +<TGConnectingPoint num="13" id="1007" /> +<TGConnectingPoint num="14" id="1008" /> +<TGConnectingPoint num="15" id="1009" /> <extraparam> <Line value="data" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="1052" > +<COMPONENT type="1008" id="1013" > <cdparam x="1506" y="1405" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="1050" /> -<TGConnectingPoint num="1" id="1051" /> +<TGConnectingPoint num="0" id="1011" /> +<TGConnectingPoint num="1" id="1012" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="1055" > +<COMPONENT type="1008" id="1016" > <cdparam x="1619" y="1348" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="1053" /> -<TGConnectingPoint num="1" id="1054" /> +<TGConnectingPoint num="0" id="1014" /> +<TGConnectingPoint num="1" id="1015" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="1058" > +<COMPONENT type="1006" id="1019" > <cdparam x="1614" y="1404" /> <sizeparam width="56" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="temp(1)" /> -<TGConnectingPoint num="0" id="1056" /> -<TGConnectingPoint num="1" id="1057" /> +<TGConnectingPoint num="0" id="1017" /> +<TGConnectingPoint num="1" id="1018" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="1060" > +<COMPONENT type="1001" id="1021" > <cdparam x="1730" y="1335" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1059" /> +<TGConnectingPoint num="0" id="1020" /> </COMPONENT> -<COMPONENT type="1011" id="1063" > +<COMPONENT type="1011" id="1024" > <cdparam x="1776" y="1349" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =4" /> -<TGConnectingPoint num="0" id="1061" /> -<TGConnectingPoint num="1" id="1062" /> +<TGConnectingPoint num="0" id="1022" /> +<TGConnectingPoint num="1" id="1023" /> </COMPONENT> -<COMPONENT type="1001" id="1065" > +<COMPONENT type="1001" id="1026" > <cdparam x="1818" y="1457" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1064" /> +<TGConnectingPoint num="0" id="1025" /> </COMPONENT> -<COMPONENT type="1011" id="1068" > +<COMPONENT type="1011" id="1029" > <cdparam x="1870" y="1411" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =6" /> -<TGConnectingPoint num="0" id="1066" /> -<TGConnectingPoint num="1" id="1067" /> +<TGConnectingPoint num="0" id="1027" /> +<TGConnectingPoint num="1" id="1028" /> </COMPONENT> -<COMPONENT type="1001" id="1070" > +<COMPONENT type="1001" id="1031" > <cdparam x="1910" y="1481" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1069" /> +<TGConnectingPoint num="0" id="1030" /> </COMPONENT> -<COMPONENT type="1001" id="1072" > +<COMPONENT type="1001" id="1033" > <cdparam x="1986" y="1543" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1071" /> +<TGConnectingPoint num="0" id="1032" /> </COMPONENT> -<COMPONENT type="1011" id="1075" > +<COMPONENT type="1011" id="1036" > <cdparam x="2051" y="1466" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =0" /> -<TGConnectingPoint num="0" id="1073" /> -<TGConnectingPoint num="1" id="1074" /> +<TGConnectingPoint num="0" id="1034" /> +<TGConnectingPoint num="1" id="1035" /> </COMPONENT> -<COMPONENT type="1001" id="1077" > +<COMPONENT type="1001" id="1038" > <cdparam x="2091" y="1537" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1076" /> +<TGConnectingPoint num="0" id="1037" /> </COMPONENT> -<COMPONENT type="1011" id="1080" > +<COMPONENT type="1011" id="1041" > <cdparam x="1946" y="1493" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =0" /> -<TGConnectingPoint num="0" id="1078" /> -<TGConnectingPoint num="1" id="1079" /> +<TGConnectingPoint num="0" id="1039" /> +<TGConnectingPoint num="1" id="1040" /> </COMPONENT> -<COMPONENT type="1011" id="1083" > +<COMPONENT type="1011" id="1044" > <cdparam x="1946" y="1434" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =8" /> -<TGConnectingPoint num="0" id="1081" /> -<TGConnectingPoint num="1" id="1082" /> +<TGConnectingPoint num="0" id="1042" /> +<TGConnectingPoint num="1" id="1043" /> </COMPONENT> -<COMPONENT type="301" id="1100" > +<COMPONENT type="301" id="1061" > <cdparam x="1825" y="889" /> <sizeparam width="50" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Syn " /> -<TGConnectingPoint num="0" id="1084" /> -<TGConnectingPoint num="1" id="1085" /> -<TGConnectingPoint num="2" id="1086" /> -<TGConnectingPoint num="3" id="1087" /> -<TGConnectingPoint num="4" id="1088" /> -<TGConnectingPoint num="5" id="1089" /> -<TGConnectingPoint num="6" id="1090" /> -<TGConnectingPoint num="7" id="1091" /> -<TGConnectingPoint num="8" id="1092" /> -<TGConnectingPoint num="9" id="1093" /> -<TGConnectingPoint num="10" id="1094" /> -<TGConnectingPoint num="11" id="1095" /> -<TGConnectingPoint num="12" id="1096" /> -<TGConnectingPoint num="13" id="1097" /> -<TGConnectingPoint num="14" id="1098" /> -<TGConnectingPoint num="15" id="1099" /> +<TGConnectingPoint num="0" id="1045" /> +<TGConnectingPoint num="1" id="1046" /> +<TGConnectingPoint num="2" id="1047" /> +<TGConnectingPoint num="3" id="1048" /> +<TGConnectingPoint num="4" id="1049" /> +<TGConnectingPoint num="5" id="1050" /> +<TGConnectingPoint num="6" id="1051" /> +<TGConnectingPoint num="7" id="1052" /> +<TGConnectingPoint num="8" id="1053" /> +<TGConnectingPoint num="9" id="1054" /> +<TGConnectingPoint num="10" id="1055" /> +<TGConnectingPoint num="11" id="1056" /> +<TGConnectingPoint num="12" id="1057" /> +<TGConnectingPoint num="13" id="1058" /> +<TGConnectingPoint num="14" id="1059" /> +<TGConnectingPoint num="15" id="1060" /> <extraparam> <Line value="Syn" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="1117" > +<COMPONENT type="301" id="1078" > <cdparam x="1707" y="945" /> <sizeparam width="50" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="ack " /> -<TGConnectingPoint num="0" id="1101" /> -<TGConnectingPoint num="1" id="1102" /> -<TGConnectingPoint num="2" id="1103" /> -<TGConnectingPoint num="3" id="1104" /> -<TGConnectingPoint num="4" id="1105" /> -<TGConnectingPoint num="5" id="1106" /> -<TGConnectingPoint num="6" id="1107" /> -<TGConnectingPoint num="7" id="1108" /> -<TGConnectingPoint num="8" id="1109" /> -<TGConnectingPoint num="9" id="1110" /> -<TGConnectingPoint num="10" id="1111" /> -<TGConnectingPoint num="11" id="1112" /> -<TGConnectingPoint num="12" id="1113" /> -<TGConnectingPoint num="13" id="1114" /> -<TGConnectingPoint num="14" id="1115" /> -<TGConnectingPoint num="15" id="1116" /> +<TGConnectingPoint num="0" id="1062" /> +<TGConnectingPoint num="1" id="1063" /> +<TGConnectingPoint num="2" id="1064" /> +<TGConnectingPoint num="3" id="1065" /> +<TGConnectingPoint num="4" id="1066" /> +<TGConnectingPoint num="5" id="1067" /> +<TGConnectingPoint num="6" id="1068" /> +<TGConnectingPoint num="7" id="1069" /> +<TGConnectingPoint num="8" id="1070" /> +<TGConnectingPoint num="9" id="1071" /> +<TGConnectingPoint num="10" id="1072" /> +<TGConnectingPoint num="11" id="1073" /> +<TGConnectingPoint num="12" id="1074" /> +<TGConnectingPoint num="13" id="1075" /> +<TGConnectingPoint num="14" id="1076" /> +<TGConnectingPoint num="15" id="1077" /> <extraparam> <Line value="ack" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="1120" > +<COMPONENT type="1006" id="1081" > <cdparam x="2179" y="1198" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="1118" /> -<TGConnectingPoint num="1" id="1119" /> +<TGConnectingPoint num="0" id="1079" /> +<TGConnectingPoint num="1" id="1080" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="1122" > +<COMPONENT type="1001" id="1083" > <cdparam x="2207" y="1483" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1121" /> +<TGConnectingPoint num="0" id="1082" /> </COMPONENT> -<COMPONENT type="1007" id="1125" > +<COMPONENT type="1007" id="1086" > <cdparam x="2178" y="1298" /> <sizeparam width="78" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send request" value="req_Timer()" /> -<TGConnectingPoint num="0" id="1123" /> -<TGConnectingPoint num="1" id="1124" /> +<TGConnectingPoint num="0" id="1084" /> +<TGConnectingPoint num="1" id="1085" /> <extraparam> <Data requestName="req_Timer" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="1128" > +<COMPONENT type="1006" id="1089" > <cdparam x="2189" y="1365" /> <sizeparam width="56" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="temp(1)" /> -<TGConnectingPoint num="0" id="1126" /> -<TGConnectingPoint num="1" id="1127" /> +<TGConnectingPoint num="0" id="1087" /> +<TGConnectingPoint num="1" id="1088" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="1131" > +<COMPONENT type="1011" id="1092" > <cdparam x="2142" y="1136" /> <sizeparam width="153" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="seqNum=seqNum+wind" /> -<TGConnectingPoint num="0" id="1129" /> -<TGConnectingPoint num="1" id="1130" /> +<TGConnectingPoint num="0" id="1090" /> +<TGConnectingPoint num="1" id="1091" /> </COMPONENT> -<COMPONENT type="1008" id="1134" > +<COMPONENT type="1008" id="1095" > <cdparam x="2194" y="1248" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="1132" /> -<TGConnectingPoint num="1" id="1133" /> +<TGConnectingPoint num="0" id="1093" /> +<TGConnectingPoint num="1" id="1094" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="1137" > +<COMPONENT type="1011" id="1098" > <cdparam x="2167" y="1424" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =2" /> -<TGConnectingPoint num="0" id="1135" /> -<TGConnectingPoint num="1" id="1136" /> +<TGConnectingPoint num="0" id="1096" /> +<TGConnectingPoint num="1" id="1097" /> </COMPONENT> -<COMPONENT type="1006" id="1140" > +<COMPONENT type="1006" id="1101" > <cdparam x="2302" y="1122" /> <sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="write channel" value="fromTtoP(1)" /> -<TGConnectingPoint num="0" id="1138" /> -<TGConnectingPoint num="1" id="1139" /> +<TGConnectingPoint num="0" id="1099" /> +<TGConnectingPoint num="1" id="1100" /> <extraparam> <Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="301" id="1157" > +<COMPONENT type="301" id="1118" > <cdparam x="2283" y="1065" /> <sizeparam width="114" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of SYN " /> -<TGConnectingPoint num="0" id="1141" /> -<TGConnectingPoint num="1" id="1142" /> -<TGConnectingPoint num="2" id="1143" /> -<TGConnectingPoint num="3" id="1144" /> -<TGConnectingPoint num="4" id="1145" /> -<TGConnectingPoint num="5" id="1146" /> -<TGConnectingPoint num="6" id="1147" /> -<TGConnectingPoint num="7" id="1148" /> -<TGConnectingPoint num="8" id="1149" /> -<TGConnectingPoint num="9" id="1150" /> -<TGConnectingPoint num="10" id="1151" /> -<TGConnectingPoint num="11" id="1152" /> -<TGConnectingPoint num="12" id="1153" /> -<TGConnectingPoint num="13" id="1154" /> -<TGConnectingPoint num="14" id="1155" /> -<TGConnectingPoint num="15" id="1156" /> +<TGConnectingPoint num="0" id="1102" /> +<TGConnectingPoint num="1" id="1103" /> +<TGConnectingPoint num="2" id="1104" /> +<TGConnectingPoint num="3" id="1105" /> +<TGConnectingPoint num="4" id="1106" /> +<TGConnectingPoint num="5" id="1107" /> +<TGConnectingPoint num="6" id="1108" /> +<TGConnectingPoint num="7" id="1109" /> +<TGConnectingPoint num="8" id="1110" /> +<TGConnectingPoint num="9" id="1111" /> +<TGConnectingPoint num="10" id="1112" /> +<TGConnectingPoint num="11" id="1113" /> +<TGConnectingPoint num="12" id="1114" /> +<TGConnectingPoint num="13" id="1115" /> +<TGConnectingPoint num="14" id="1116" /> +<TGConnectingPoint num="15" id="1117" /> <extraparam> <Line value="send Ack of SYN" /> </extraparam> </COMPONENT> -<COMPONENT type="1011" id="1160" > +<COMPONENT type="1011" id="1121" > <cdparam x="2291" y="1267" /> <sizeparam width="100" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="action state" value="tcpctrl.state =2" /> -<TGConnectingPoint num="0" id="1158" /> -<TGConnectingPoint num="1" id="1159" /> +<TGConnectingPoint num="0" id="1119" /> +<TGConnectingPoint num="1" id="1120" /> </COMPONENT> -<COMPONENT type="1001" id="1162" > +<COMPONENT type="1001" id="1123" > <cdparam x="2330" y="1324" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1161" /> +<TGConnectingPoint num="0" id="1122" /> </COMPONENT> -<COMPONENT type="1008" id="1165" > +<COMPONENT type="1008" id="1126" > <cdparam x="2318" y="1199" /> <sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="send()" /> -<TGConnectingPoint num="0" id="1163" /> -<TGConnectingPoint num="1" id="1164" /> +<TGConnectingPoint num="0" id="1124" /> +<TGConnectingPoint num="1" id="1125" /> <extraparam> <Data eventName="send" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="1167" > +<COMPONENT type="1001" id="1128" > <cdparam x="1649" y="1057" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1166" /> +<TGConnectingPoint num="0" id="1127" /> </COMPONENT> -<COMPONENT type="1001" id="1169" > +<COMPONENT type="1001" id="1130" > <cdparam x="2168" y="1421" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1168" /> +<TGConnectingPoint num="0" id="1129" /> </COMPONENT> -<COMPONENT type="1001" id="1171" > +<COMPONENT type="1001" id="1132" > <cdparam x="2268" y="1039" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1170" /> +<TGConnectingPoint num="0" id="1131" /> </COMPONENT> -<COMPONENT type="1008" id="1174" > +<COMPONENT type="1008" id="1135" > <cdparam x="1465" y="1192" /> <sizeparam width="129" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="send event" value="receive_Application()" /> -<TGConnectingPoint num="0" id="1172" /> -<TGConnectingPoint num="1" id="1173" /> +<TGConnectingPoint num="0" id="1133" /> +<TGConnectingPoint num="1" id="1134" /> <extraparam> <Data eventName="receive_Application" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1009" id="1177" > +<COMPONENT type="1009" id="1138" > <cdparam x="1701" y="1086" /> <sizeparam width="60" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="read channel" value="temp(1) " /> -<TGConnectingPoint num="0" id="1175" /> -<TGConnectingPoint num="1" id="1176" /> +<TGConnectingPoint num="0" id="1136" /> +<TGConnectingPoint num="1" id="1137" /> <extraparam> <Data channelName="temp" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<CONNECTOR type="115" id="1178" > +<CONNECTOR type="115" id="1139" > <cdparam x="1048" y="795" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="1048" y="795" id="568" /> -<P2 x="1728" y="865" id="490" /> +<P1 x="1048" y="795" id="529" /> +<P2 x="1728" y="865" id="451" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1179" > +<CONNECTOR type="115" id="1140" > <cdparam x="1048" y="795" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="1089" y="954" id="540" /> -<P2 x="1208" y="1010" id="510" /> +<P1 x="1089" y="954" id="501" /> +<P2 x="1208" y="1010" id="471" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1180" > +<CONNECTOR type="115" id="1141" > <cdparam x="1008" y="610" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from read channel to execI" value="null" /> -<P1 x="1008" y="610" id="644" /> -<P2 x="1008" y="696" id="572" /> +<P1 x="1008" y="610" id="605" /> +<P2 x="1008" y="696" id="533" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1181" > +<CONNECTOR type="115" id="1142" > <cdparam x="722" y="614" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from read channel to execI" value="null" /> -<P1 x="722" y="614" id="659" /> -<P2 x="722" y="689" id="528" /> +<P1 x="722" y="614" id="620" /> +<P2 x="722" y="689" id="489" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1182" > +<CONNECTOR type="115" id="1143" > <cdparam x="504" y="597" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="504" y="597" id="608" /> -<P2 x="572" y="702" id="522" /> +<P1 x="504" y="597" id="569" /> +<P2 x="572" y="702" id="483" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1183" > +<CONNECTOR type="115" id="1144" > <cdparam x="464" y="637" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="464" y="637" id="609" /> -<P2 x="439" y="778" id="576" /> +<P1 x="464" y="637" id="570" /> +<P2 x="439" y="778" id="537" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1184" > +<CONNECTOR type="115" id="1145" > <cdparam x="424" y="597" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="424" y="597" id="607" /> -<P2 x="346" y="759" id="556" /> +<P1 x="424" y="597" id="568" /> +<P2 x="346" y="759" id="517" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1185" > +<CONNECTOR type="115" id="1146" > <cdparam x="289" y="619" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to read channel" value="null" /> -<P1 x="289" y="619" id="617" /> -<P2 x="230" y="803" id="713" /> +<P1 x="289" y="619" id="578" /> +<P2 x="230" y="803" id="674" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1186" > +<CONNECTOR type="115" id="1147" > <cdparam x="249" y="579" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="249" y="579" id="615" /> -<P2 x="132" y="789" id="560" /> +<P1 x="249" y="579" id="576" /> +<P2 x="132" y="789" id="521" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1187" > +<CONNECTOR type="115" id="1148" > <cdparam x="371" y="93" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from for loop to notified event" value="null" /> -<P1 x="320" y="99" id="647" /> -<P2 x="374" y="128" id="655" /> +<P1 x="320" y="99" id="608" /> +<P2 x="374" y="128" id="616" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1188" > +<CONNECTOR type="115" id="1149" > <cdparam x="234" y="169" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="234" y="169" id="653" /> -<P2 x="234" y="202" id="650" /> +<P1 x="234" y="169" id="614" /> +<P2 x="234" y="202" id="611" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1189" > +<CONNECTOR type="115" id="1150" > <cdparam x="234" y="104" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from for loop to action state" value="null" /> -<P1 x="235" y="110" id="648" /> -<P2 x="234" y="139" id="652" /> +<P1 x="235" y="110" id="609" /> +<P2 x="234" y="139" id="613" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1190" > +<CONNECTOR type="115" id="1151" > <cdparam x="234" y="47" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from start state to for loop" value="null" /> -<P1 x="234" y="47" id="619" /> -<P2 x="235" y="80" id="646" /> +<P1 x="234" y="47" id="580" /> +<P2 x="235" y="80" id="607" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1191" > +<CONNECTOR type="115" id="1152" > <cdparam x="425" y="162" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from notified event to choice" value="null" /> -<P1 x="374" y="158" id="656" /> -<P2 x="374" y="182" id="598" /> +<P1 x="374" y="158" id="617" /> +<P2 x="374" y="182" id="559" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1192" > +<CONNECTOR type="115" id="1153" > <cdparam x="564" y="482" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to wait event" value="null" /> -<P1 x="464" y="322" id="682" /> -<P2 x="722" y="529" id="661" /> +<P1 x="464" y="322" id="643" /> +<P2 x="722" y="529" id="622" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1193" > +<CONNECTOR type="115" id="1154" > <cdparam x="722" y="559" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from wait event to read channel" value="null" /> -<P1 x="722" y="559" id="662" /> -<P2 x="722" y="584" id="658" /> +<P1 x="722" y="559" id="623" /> +<P2 x="722" y="584" id="619" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1194" > +<CONNECTOR type="115" id="1155" > <cdparam x="604" y="442" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to wait event" value="null" /> -<P1 x="504" y="282" id="678" /> -<P2 x="1008" y="523" id="664" /> +<P1 x="504" y="282" id="639" /> +<P2 x="1008" y="523" id="625" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1195" > +<CONNECTOR type="115" id="1156" > <cdparam x="1007" y="553" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from wait event to read channel" value="null" /> -<P1 x="1008" y="553" id="665" /> -<P2 x="1008" y="580" id="643" /> +<P1 x="1008" y="553" id="626" /> +<P2 x="1008" y="580" id="604" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1196" > +<CONNECTOR type="115" id="1157" > <cdparam x="524" y="442" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to wait event" value="null" /> -<P1 x="464" y="322" id="679" /> -<P2 x="464" y="487" id="667" /> +<P1 x="464" y="322" id="640" /> +<P2 x="464" y="487" id="628" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1197" > +<CONNECTOR type="115" id="1158" > <cdparam x="330" y="428" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to wait event" value="null" /> -<P1 x="424" y="282" id="680" /> -<P2 x="289" y="463" id="670" /> +<P1 x="424" y="282" id="641" /> +<P2 x="289" y="463" id="631" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1198" > +<CONNECTOR type="115" id="1159" > <cdparam x="318" y="520" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from wait event to choice" value="null" /> -<P1 x="289" y="493" id="671" /> -<P2 x="289" y="554" id="614" /> +<P1 x="289" y="493" id="632" /> +<P2 x="289" y="554" id="575" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1199" > +<CONNECTOR type="115" id="1160" > <cdparam x="160" y="481" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to action state" value="null" /> -<P1 x="148" y="501" id="591" /> -<P2 x="126" y="544" id="638" /> +<P1 x="148" y="501" id="552" /> +<P2 x="126" y="544" id="599" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1200" > +<CONNECTOR type="115" id="1161" > <cdparam x="290" y="388" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to wait event" value="null" /> -<P1 x="424" y="282" id="677" /> -<P2 x="188" y="414" id="673" /> +<P1 x="424" y="282" id="638" /> +<P2 x="188" y="414" id="634" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1201" > +<CONNECTOR type="115" id="1162" > <cdparam x="229" y="467" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from wait event to choice" value="null" /> -<P1 x="188" y="444" id="674" /> -<P2 x="188" y="476" id="590" /> +<P1 x="188" y="444" id="635" /> +<P2 x="188" y="476" id="551" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1202" > +<CONNECTOR type="115" id="1163" > <cdparam x="228" y="501" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="228" y="501" id="592" /> -<P2 x="236" y="524" id="687" /> +<P1 x="228" y="501" id="553" /> +<P2 x="236" y="524" id="648" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1203" > +<CONNECTOR type="115" id="1164" > <cdparam x="334" y="207" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to wait event" value="null" /> -<P1 x="334" y="207" id="599" /> -<P2 x="301" y="223" id="691" /> +<P1 x="334" y="207" id="560" /> +<P2 x="301" y="223" id="652" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1204" > +<CONNECTOR type="115" id="1165" > <cdparam x="301" y="253" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from wait event to stop state" value="null" /> -<P1 x="301" y="253" id="692" /> -<P2 x="301" y="285" id="694" /> +<P1 x="301" y="253" id="653" /> +<P2 x="301" y="285" id="655" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1205" > +<CONNECTOR type="115" id="1166" > <cdparam x="464" y="517" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from wait event to choice" value="null" /> -<P1 x="464" y="517" id="668" /> -<P2 x="464" y="572" id="606" /> +<P1 x="464" y="517" id="629" /> +<P2 x="464" y="572" id="567" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1206" > +<CONNECTOR type="115" id="1167" > <cdparam x="329" y="579" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="329" y="579" id="616" /> -<P2 x="353" y="609" id="689" /> +<P1 x="329" y="579" id="577" /> +<P2 x="353" y="609" id="650" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1207" > +<CONNECTOR type="115" id="1168" > <cdparam x="126" y="574" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="126" y="574" id="639" /> -<P2 x="126" y="610" id="641" /> +<P1 x="126" y="574" id="600" /> +<P2 x="126" y="610" id="602" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1208" > +<CONNECTOR type="115" id="1169" > <cdparam x="414" y="207" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to select" value="null" /> -<P1 x="414" y="207" id="600" /> -<P2 x="464" y="257" id="676" /> +<P1 x="414" y="207" id="561" /> +<P2 x="464" y="257" id="637" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1209" > +<CONNECTOR type="115" id="1170" > <cdparam x="230" y="833" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from read channel to execI" value="null" /> -<P1 x="230" y="833" id="714" /> -<P2 x="230" y="858" id="580" /> +<P1 x="230" y="833" id="675" /> +<P2 x="230" y="858" id="541" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1210" > +<CONNECTOR type="115" id="1171" > <cdparam x="716" y="749" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="968" y="795" id="567" /> -<P2 x="843" y="859" id="550" /> +<P1 x="968" y="795" id="528" /> +<P2 x="843" y="859" id="511" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1211" > +<CONNECTOR type="115" id="1172" > <cdparam x="720" y="1074" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="728" y="990" id="763" /> -<P2 x="728" y="1027" id="765" /> +<P1 x="728" y="990" id="724" /> +<P2 x="728" y="1027" id="726" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1212" > +<CONNECTOR type="115" id="1173" > <cdparam x="733" y="899" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to action state" value="null" /> -<P1 x="803" y="884" id="551" /> -<P2 x="728" y="960" id="762" /> +<P1 x="803" y="884" id="512" /> +<P2 x="728" y="960" id="723" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1213" > +<CONNECTOR type="115" id="1174" > <cdparam x="800" y="938" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="843" y="924" id="553" /> -<P2 x="800" y="1004" id="544" /> +<P1 x="843" y="924" id="514" /> +<P2 x="800" y="1004" id="505" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1214" > +<CONNECTOR type="115" id="1175" > <cdparam x="800" y="1057" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="800" y="1044" id="545" /> -<P2 x="800" y="1081" id="767" /> +<P1 x="800" y="1044" id="506" /> +<P2 x="800" y="1081" id="728" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1215" > +<CONNECTOR type="115" id="1176" > <cdparam x="132" y="886" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to write channel" value="null" /> -<P1 x="132" y="886" id="894" /> -<P2 x="132" y="933" id="729" /> +<P1 x="132" y="886" id="855" /> +<P2 x="132" y="933" id="690" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1216" > +<CONNECTOR type="115" id="1177" > <cdparam x="943" y="1061" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="943" y="1060" id="533" /> -<P2 x="943" y="1118" id="812" /> +<P1 x="943" y="1060" id="494" /> +<P2 x="943" y="1118" id="773" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1217" > +<CONNECTOR type="115" id="1178" > <cdparam x="1049" y="1093" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="1049" y="1092" id="585" /> -<P2 x="1049" y="1150" id="837" /> +<P1 x="1049" y="1092" id="546" /> +<P2 x="1049" y="1150" id="798" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1218" > +<CONNECTOR type="115" id="1179" > <cdparam x="1049" y="994" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="1049" y="994" id="541" /> -<P2 x="1049" y="1052" id="584" /> +<P1 x="1049" y="994" id="502" /> +<P2 x="1049" y="1052" id="545" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1219" > +<CONNECTOR type="115" id="1180" > <cdparam x="696" y="742" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="722" y="729" id="529" /> -<P2 x="722" y="753" id="862" /> +<P1 x="722" y="729" id="490" /> +<P2 x="722" y="753" id="823" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1220" > +<CONNECTOR type="115" id="1181" > <cdparam x="132" y="1125" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send request to write channel" value="null" /> -<P1 x="132" y="1125" id="868" /> -<P2 x="132" y="1162" id="870" /> +<P1 x="132" y="1125" id="829" /> +<P2 x="132" y="1162" id="831" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1221" > +<CONNECTOR type="115" id="1182" > <cdparam x="132" y="1192" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to stop state" value="null" /> -<P1 x="132" y="1192" id="871" /> -<P2 x="132" y="1231" id="873" /> +<P1 x="132" y="1192" id="832" /> +<P2 x="132" y="1231" id="834" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1222" > +<CONNECTOR type="115" id="1183" > <cdparam x="132" y="1066" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to send request" value="null" /> -<P1 x="132" y="1066" id="727" /> -<P2 x="132" y="1095" id="867" /> +<P1 x="132" y="1066" id="688" /> +<P2 x="132" y="1095" id="828" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1223" > +<CONNECTOR type="115" id="1184" > <cdparam x="229" y="1127" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send request to write channel" value="null" /> -<P1 x="229" y="1127" id="876" /> -<P2 x="229" y="1164" id="878" /> +<P1 x="229" y="1127" id="837" /> +<P2 x="229" y="1164" id="839" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1224" > +<CONNECTOR type="115" id="1185" > <cdparam x="346" y="1131" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send request to write channel" value="null" /> -<P1 x="346" y="1131" id="882" /> -<P2 x="346" y="1168" id="884" /> +<P1 x="346" y="1131" id="843" /> +<P2 x="346" y="1168" id="845" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1225" > +<CONNECTOR type="115" id="1186" > <cdparam x="346" y="1051" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to send request" value="null" /> -<P1 x="346" y="1051" id="733" /> -<P2 x="346" y="1101" id="881" /> +<P1 x="346" y="1051" id="694" /> +<P2 x="346" y="1101" id="842" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1226" > +<CONNECTOR type="115" id="1187" > <cdparam x="437" y="1118" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send request to write channel" value="null" /> -<P1 x="438" y="1115" id="888" /> -<P2 x="438" y="1154" id="890" /> +<P1 x="438" y="1115" id="849" /> +<P2 x="438" y="1154" id="851" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1227" > +<CONNECTOR type="115" id="1188" > <cdparam x="438" y="1057" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to send request" value="null" /> -<P1 x="438" y="1057" id="722" /> -<P2 x="438" y="1085" id="887" /> +<P1 x="438" y="1057" id="683" /> +<P2 x="438" y="1085" id="848" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1228" > +<CONNECTOR type="115" id="1189" > <cdparam x="132" y="808" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to action state" value="null" /> -<P1 x="132" y="829" id="561" /> -<P2 x="132" y="856" id="893" /> +<P1 x="132" y="829" id="522" /> +<P2 x="132" y="856" id="854" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1229" > +<CONNECTOR type="115" id="1190" > <cdparam x="230" y="898" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to action state" value="null" /> -<P1 x="230" y="898" id="581" /> -<P2 x="230" y="935" id="896" /> +<P1 x="230" y="898" id="542" /> +<P2 x="230" y="935" id="857" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1230" > +<CONNECTOR type="115" id="1191" > <cdparam x="230" y="965" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to write channel" value="null" /> -<P1 x="230" y="965" id="897" /> -<P2 x="230" y="997" id="716" /> +<P1 x="230" y="965" id="858" /> +<P2 x="230" y="997" id="677" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1231" > +<CONNECTOR type="115" id="1192" > <cdparam x="346" y="799" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to action state" value="null" /> -<P1 x="346" y="799" id="557" /> -<P2 x="346" y="826" id="902" /> +<P1 x="346" y="799" id="518" /> +<P2 x="346" y="826" id="863" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1232" > +<CONNECTOR type="115" id="1193" > <cdparam x="346" y="856" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to write channel" value="null" /> -<P1 x="346" y="856" id="903" /> -<P2 x="346" y="895" id="740" /> +<P1 x="346" y="856" id="864" /> +<P2 x="346" y="895" id="701" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1233" > +<CONNECTOR type="115" id="1194" > <cdparam x="439" y="818" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to action state" value="null" /> -<P1 x="439" y="818" id="577" /> -<P2 x="439" y="860" id="899" /> +<P1 x="439" y="818" id="538" /> +<P2 x="439" y="860" id="860" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1234" > +<CONNECTOR type="115" id="1195" > <cdparam x="439" y="890" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to write channel" value="null" /> -<P1 x="439" y="890" id="900" /> -<P2 x="439" y="936" id="737" /> +<P1 x="439" y="890" id="861" /> +<P2 x="439" y="936" id="698" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1235" > +<CONNECTOR type="115" id="1196" > <cdparam x="132" y="963" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="132" y="963" id="730" /> -<P2 x="132" y="981" id="914" /> +<P1 x="132" y="963" id="691" /> +<P2 x="132" y="981" id="875" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1236" > +<CONNECTOR type="115" id="1197" > <cdparam x="132" y="1011" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to action state" value="null" /> -<P1 x="132" y="1011" id="915" /> -<P2 x="132" y="1036" id="726" /> +<P1 x="132" y="1011" id="876" /> +<P2 x="132" y="1036" id="687" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1237" > +<CONNECTOR type="115" id="1198" > <cdparam x="230" y="1027" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="230" y="1027" id="717" /> -<P2 x="229" y="1047" id="905" /> +<P1 x="230" y="1027" id="678" /> +<P2 x="229" y="1047" id="866" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1238" > +<CONNECTOR type="115" id="1199" > <cdparam x="228" y="1088" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to send request" value="null" /> -<P1 x="229" y="1077" id="906" /> -<P2 x="229" y="1097" id="875" /> +<P1 x="229" y="1077" id="867" /> +<P2 x="229" y="1097" id="836" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1239" > +<CONNECTOR type="115" id="1200" > <cdparam x="346" y="925" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="346" y="925" id="741" /> -<P2 x="346" y="957" id="908" /> +<P1 x="346" y="925" id="702" /> +<P2 x="346" y="957" id="869" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1240" > +<CONNECTOR type="115" id="1201" > <cdparam x="348" y="987" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to action state" value="null" /> -<P1 x="346" y="987" id="909" /> -<P2 x="346" y="1021" id="732" /> +<P1 x="346" y="987" id="870" /> +<P2 x="346" y="1021" id="693" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1241" > +<CONNECTOR type="115" id="1202" > <cdparam x="439" y="966" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="439" y="966" id="738" /> -<P2 x="438" y="978" id="911" /> +<P1 x="439" y="966" id="699" /> +<P2 x="438" y="978" id="872" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1242" > +<CONNECTOR type="115" id="1203" > <cdparam x="438" y="1008" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to action state" value="null" /> -<P1 x="438" y="1008" id="912" /> -<P2 x="438" y="1027" id="721" /> +<P1 x="438" y="1008" id="873" /> +<P2 x="438" y="1027" id="682" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1243" > +<CONNECTOR type="115" id="1204" > <cdparam x="722" y="783" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="722" y="783" id="863" /> -<P2 x="722" y="808" id="917" /> +<P1 x="722" y="783" id="824" /> +<P2 x="722" y="808" id="878" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1244" > +<CONNECTOR type="115" id="1205" > <cdparam x="722" y="838" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to stop state" value="null" /> -<P1 x="722" y="838" id="918" /> -<P2 x="722" y="860" id="865" /> +<P1 x="722" y="838" id="879" /> +<P2 x="722" y="860" id="826" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1245" > +<CONNECTOR type="115" id="1206" > <cdparam x="800" y="1111" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="800" y="1111" id="768" /> -<P2 x="798" y="1136" id="920" /> +<P1 x="800" y="1111" id="729" /> +<P2 x="798" y="1136" id="881" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1246" > +<CONNECTOR type="115" id="1207" > <cdparam x="798" y="1166" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to action state" value="null" /> -<P1 x="798" y="1166" id="921" /> -<P2 x="799" y="1188" id="804" /> +<P1 x="798" y="1166" id="882" /> +<P2 x="799" y="1188" id="765" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1247" > +<CONNECTOR type="115" id="1208" > <cdparam x="943" y="1148" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="943" y="1148" id="813" /> -<P2 x="943" y="1173" id="923" /> +<P1 x="943" y="1148" id="774" /> +<P2 x="943" y="1173" id="884" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1248" > +<CONNECTOR type="115" id="1209" > <cdparam x="950" y="1201" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to action state" value="null" /> -<P1 x="943" y="1203" id="924" /> -<P2 x="943" y="1229" id="832" /> +<P1 x="943" y="1203" id="885" /> +<P2 x="943" y="1229" id="793" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1249" > +<CONNECTOR type="115" id="1210" > <cdparam x="1049" y="1180" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="1049" y="1180" id="838" /> -<P2 x="1049" y="1206" id="926" /> +<P1 x="1049" y="1180" id="799" /> +<P2 x="1049" y="1206" id="887" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1250" > +<CONNECTOR type="115" id="1211" > <cdparam x="1049" y="1223" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to action state" value="null" /> -<P1 x="1049" y="1236" id="927" /> -<P2 x="1049" y="1261" id="857" /> +<P1 x="1049" y="1236" id="888" /> +<P2 x="1049" y="1261" id="818" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1251" > +<CONNECTOR type="115" id="1212" > <cdparam x="883" y="884" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="883" y="884" id="552" /> -<P2 x="909" y="917" id="931" /> +<P1 x="883" y="884" id="513" /> +<P2 x="909" y="917" id="892" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1252" > +<CONNECTOR type="115" id="1213" > <cdparam x="612" y="727" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="612" y="727" id="524" /> -<P2 x="622" y="757" id="929" /> +<P1 x="612" y="727" id="485" /> +<P2 x="622" y="757" id="890" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1253" > +<CONNECTOR type="115" id="1214" > <cdparam x="532" y="727" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to action state" value="null" /> -<P1 x="532" y="727" id="523" /> -<P2 x="496" y="763" id="807" /> +<P1 x="532" y="727" id="484" /> +<P2 x="496" y="763" id="768" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1254" > +<CONNECTOR type="115" id="1215" > <cdparam x="799" y="1218" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="799" y="1218" id="805" /> -<P2 x="799" y="1265" id="743" /> +<P1 x="799" y="1218" id="766" /> +<P2 x="799" y="1265" id="704" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1255" > +<CONNECTOR type="115" id="1216" > <cdparam x="1009" y="954" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="1009" y="954" id="539" /> -<P2 x="943" y="1020" id="532" /> +<P1 x="1009" y="954" id="500" /> +<P2 x="943" y="1020" id="493" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1256" > +<CONNECTOR type="115" id="1217" > <cdparam x="229" y="1194" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to stop state" value="null" /> -<P1 x="229" y="1194" id="879" /> -<P2 x="229" y="1232" id="719" /> +<P1 x="229" y="1194" id="840" /> +<P2 x="229" y="1232" id="680" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1257" > +<CONNECTOR type="115" id="1218" > <cdparam x="346" y="1198" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to stop state" value="null" /> -<P1 x="346" y="1198" id="885" /> -<P2 x="344" y="1224" id="735" /> +<P1 x="346" y="1198" id="846" /> +<P2 x="344" y="1224" id="696" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1258" > +<CONNECTOR type="115" id="1219" > <cdparam x="438" y="1184" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to stop state" value="null" /> -<P1 x="438" y="1184" id="891" /> -<P2 x="438" y="1208" id="724" /> +<P1 x="438" y="1184" id="852" /> +<P2 x="438" y="1208" id="685" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1259" > +<CONNECTOR type="115" id="1220" > <cdparam x="496" y="793" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="496" y="793" id="808" /> -<P2 x="496" y="825" id="810" /> +<P1 x="496" y="793" id="769" /> +<P2 x="496" y="825" id="771" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1260" > +<CONNECTOR type="115" id="1221" > <cdparam x="943" y="1259" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="943" y="1259" id="833" /> -<P2 x="943" y="1306" id="835" /> +<P1 x="943" y="1259" id="794" /> +<P2 x="943" y="1306" id="796" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1261" > +<CONNECTOR type="115" id="1222" > <cdparam x="1008" y="736" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to choice" value="null" /> -<P1 x="1008" y="736" id="573" /> -<P2 x="1008" y="770" id="566" /> +<P1 x="1008" y="736" id="534" /> +<P2 x="1008" y="770" id="527" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1262" > +<CONNECTOR type="115" id="1223" > <cdparam x="1008" y="835" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="1008" y="835" id="569" /> -<P2 x="1049" y="929" id="538" /> +<P1 x="1008" y="835" id="530" /> +<P2 x="1049" y="929" id="499" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1263" > +<CONNECTOR type="115" id="1224" > <cdparam x="1049" y="1291" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="1049" y="1291" id="858" /> -<P2 x="1049" y="1336" id="860" /> +<P1 x="1049" y="1291" id="819" /> +<P2 x="1049" y="1336" id="821" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1264" > +<CONNECTOR type="115" id="1225" > <cdparam x="1208" y="1152" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="1208" y="1142" id="517" /> -<P2 x="1208" y="1209" id="933" /> +<P1 x="1208" y="1142" id="478" /> +<P2 x="1208" y="1209" id="894" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1265" > +<CONNECTOR type="115" id="1226" > <cdparam x="1208" y="1239" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to action state" value="null" /> -<P1 x="1208" y="1239" id="934" /> -<P2 x="1208" y="1290" id="953" /> +<P1 x="1208" y="1239" id="895" /> +<P2 x="1208" y="1290" id="914" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1266" > +<CONNECTOR type="115" id="1227" > <cdparam x="1208" y="1320" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to send event" value="null" /> -<P1 x="1208" y="1320" id="954" /> -<P2 x="1208" y="1346" id="961" /> +<P1 x="1208" y="1320" id="915" /> +<P2 x="1208" y="1346" id="922" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1267" > +<CONNECTOR type="115" id="1228" > <cdparam x="1206" y="1385" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to action state" value="null" /> -<P1 x="1208" y="1376" id="962" /> -<P2 x="1207" y="1397" id="958" /> +<P1 x="1208" y="1376" id="923" /> +<P2 x="1207" y="1397" id="919" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1268" > +<CONNECTOR type="115" id="1229" > <cdparam x="1206" y="1088" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="1208" y="1075" id="513" /> -<P2 x="1208" y="1102" id="516" /> +<P1 x="1208" y="1075" id="474" /> +<P2 x="1208" y="1102" id="477" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1269" > +<CONNECTOR type="115" id="1230" > <cdparam x="1248" y="1035" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="1248" y="1035" id="512" /> -<P2 x="1287" y="1065" id="964" /> +<P1 x="1248" y="1035" id="473" /> +<P2 x="1287" y="1065" id="925" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1270" > +<CONNECTOR type="115" id="1231" > <cdparam x="1207" y="1427" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="1207" y="1427" id="959" /> -<P2 x="1207" y="1466" id="956" /> +<P1 x="1207" y="1427" id="920" /> +<P2 x="1207" y="1466" id="917" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1271" > +<CONNECTOR type="115" id="1232" > <cdparam x="1553" y="1019" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="1567" y="1021" id="483" /> -<P2 x="1529" y="1059" id="476" /> +<P1 x="1567" y="1021" id="444" /> +<P2 x="1529" y="1059" id="437" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1272" > +<CONNECTOR type="115" id="1233" > <cdparam x="1529" y="1324" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="1529" y="1289" id="473" /> -<P2 x="1529" y="1343" id="971" /> +<P1 x="1529" y="1289" id="434" /> +<P2 x="1529" y="1343" id="932" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1273" > +<CONNECTOR type="115" id="1234" > <cdparam x="1684" y="929" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to send event" value="null" /> -<P1 x="1728" y="930" id="493" /> -<P2 x="1731" y="1021" id="974" /> +<P1 x="1728" y="930" id="454" /> +<P2 x="1731" y="1021" id="935" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1274" > +<CONNECTOR type="115" id="1235" > <cdparam x="1615" y="1283" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="1641" y="1270" id="497" /> -<P2 x="1641" y="1294" id="1011" /> +<P1 x="1641" y="1270" id="458" /> +<P2 x="1641" y="1294" id="972" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1275" > +<CONNECTOR type="115" id="1236" > <cdparam x="1641" y="1324" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="1641" y="1324" id="1012" /> -<P2 x="1642" y="1343" id="1053" /> +<P1 x="1641" y="1324" id="973" /> +<P2 x="1642" y="1343" id="1014" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1276" > +<CONNECTOR type="115" id="1237" > <cdparam x="1529" y="1373" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="1529" y="1373" id="972" /> -<P2 x="1529" y="1400" id="1050" /> +<P1 x="1529" y="1373" id="933" /> +<P2 x="1529" y="1400" id="1011" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1277" > +<CONNECTOR type="115" id="1238" > <cdparam x="1529" y="1422" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to stop state" value="null" /> -<P1 x="1529" y="1430" id="1051" /> -<P2 x="1529" y="1452" id="966" /> +<P1 x="1529" y="1430" id="1012" /> +<P2 x="1529" y="1452" id="927" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1278" > +<CONNECTOR type="115" id="1239" > <cdparam x="1642" y="1373" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to write channel" value="null" /> -<P1 x="1642" y="1373" id="1054" /> -<P2 x="1642" y="1399" id="1056" /> +<P1 x="1642" y="1373" id="1015" /> +<P2 x="1642" y="1399" id="1017" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1279" > +<CONNECTOR type="115" id="1240" > <cdparam x="1956" y="1361" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to action state" value="null" /> -<P1 x="1956" y="1361" id="451" /> -<P2 x="1920" y="1406" id="1066" /> +<P1 x="1956" y="1361" id="412" /> +<P2 x="1920" y="1406" id="1027" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1280" > +<CONNECTOR type="115" id="1241" > <cdparam x="2100" y="1490" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="2101" y="1491" id="1074" /> -<P2 x="2101" y="1532" id="1076" /> +<P1 x="2101" y="1491" id="1035" /> +<P2 x="2101" y="1532" id="1037" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1281" > +<CONNECTOR type="115" id="1242" > <cdparam x="1996" y="1401" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to action state" value="null" /> -<P1 x="1996" y="1401" id="453" /> -<P2 x="1996" y="1429" id="1081" /> +<P1 x="1996" y="1401" id="414" /> +<P2 x="1996" y="1429" id="1042" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1282" > +<CONNECTOR type="115" id="1243" > <cdparam x="1996" y="1459" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to action state" value="null" /> -<P1 x="1996" y="1459" id="1082" /> -<P2 x="1996" y="1488" id="1078" /> +<P1 x="1996" y="1459" id="1043" /> +<P2 x="1996" y="1488" id="1039" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1283" > +<CONNECTOR type="115" id="1244" > <cdparam x="2021" y="1038" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="2237" y="966" id="443" /> -<P2 x="2218" y="1054" id="500" /> +<P1 x="2237" y="966" id="404" /> +<P2 x="2218" y="1054" id="461" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1284" > +<CONNECTOR type="115" id="1245" > <cdparam x="2217" y="1323" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send request to write channel" value="null" /> -<P1 x="2217" y="1323" id="1124" /> -<P2 x="2217" y="1360" id="1126" /> +<P1 x="2217" y="1323" id="1085" /> +<P2 x="2217" y="1360" id="1087" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1285" > +<CONNECTOR type="115" id="1246" > <cdparam x="2218" y="1094" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to action state" value="null" /> -<P1 x="2218" y="1094" id="501" /> -<P2 x="2218" y="1131" id="1129" /> +<P1 x="2218" y="1094" id="462" /> +<P2 x="2218" y="1131" id="1090" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1286" > +<CONNECTOR type="115" id="1247" > <cdparam x="2218" y="1161" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to write channel" value="null" /> -<P1 x="2218" y="1161" id="1130" /> -<P2 x="2218" y="1193" id="1118" /> +<P1 x="2218" y="1161" id="1091" /> +<P2 x="2218" y="1193" id="1079" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1287" > +<CONNECTOR type="115" id="1248" > <cdparam x="2218" y="1223" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="2218" y="1223" id="1119" /> -<P2 x="2217" y="1243" id="1132" /> +<P1 x="2218" y="1223" id="1080" /> +<P2 x="2217" y="1243" id="1093" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1288" > +<CONNECTOR type="115" id="1249" > <cdparam x="2216" y="1284" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to send request" value="null" /> -<P1 x="2217" y="1273" id="1133" /> -<P2 x="2217" y="1293" id="1123" /> +<P1 x="2217" y="1273" id="1094" /> +<P2 x="2217" y="1293" id="1084" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1289" > +<CONNECTOR type="115" id="1250" > <cdparam x="2217" y="1390" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to action state" value="null" /> -<P1 x="2217" y="1390" id="1127" /> -<P2 x="2217" y="1419" id="1135" /> +<P1 x="2217" y="1390" id="1088" /> +<P2 x="2217" y="1419" id="1096" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1290" > +<CONNECTOR type="115" id="1251" > <cdparam x="2341" y="1060" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="2341" y="1059" id="505" /> -<P2 x="2341" y="1117" id="1138" /> +<P1 x="2341" y="1059" id="466" /> +<P2 x="2341" y="1117" id="1099" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1291" > +<CONNECTOR type="115" id="1252" > <cdparam x="1529" y="1099" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from execI to write channel" value="null" /> -<P1 x="1529" y="1099" id="477" /> -<P2 x="1529" y="1127" id="968" /> +<P1 x="1529" y="1099" id="438" /> +<P2 x="1529" y="1127" id="929" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1292" > +<CONNECTOR type="115" id="1253" > <cdparam x="2101" y="1433" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to action state" value="null" /> -<P1 x="2101" y="1433" id="437" /> -<P2 x="2101" y="1461" id="1073" /> +<P1 x="2101" y="1433" id="398" /> +<P2 x="2101" y="1461" id="1034" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1293" > +<CONNECTOR type="115" id="1254" > <cdparam x="2158" y="1460" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="2141" y="1393" id="436" /> -<P2 x="2178" y="1416" id="1168" /> +<P1 x="2141" y="1393" id="397" /> +<P2 x="2178" y="1416" id="1129" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1294" > +<CONNECTOR type="115" id="1255" > <cdparam x="1688" y="890" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="1688" y="890" id="491" /> -<P2 x="1607" y="996" id="482" /> +<P1 x="1688" y="890" id="452" /> +<P2 x="1607" y="996" id="443" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1295" > +<CONNECTOR type="115" id="1256" > <cdparam x="1768" y="890" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="1768" y="890" id="492" /> -<P2 x="2277" y="941" id="442" /> +<P1 x="1768" y="890" id="453" /> +<P2 x="2277" y="941" id="403" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1296" > +<CONNECTOR type="115" id="1257" > <cdparam x="2317" y="966" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="2317" y="966" id="444" /> -<P2 x="2341" y="1019" id="504" /> +<P1 x="2317" y="966" id="405" /> +<P2 x="2341" y="1019" id="465" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1297" > +<CONNECTOR type="115" id="1258" > <cdparam x="2341" y="1147" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="2341" y="1147" id="1139" /> -<P2 x="2341" y="1194" id="1163" /> +<P1 x="2341" y="1147" id="1100" /> +<P2 x="2341" y="1194" id="1124" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1298" > +<CONNECTOR type="115" id="1259" > <cdparam x="2341" y="1224" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to send event" value="null" /> -<P1 x="2341" y="1224" id="1164" /> -<P2 x="2341" y="1262" id="1158" /> +<P1 x="2341" y="1224" id="1125" /> +<P2 x="2341" y="1262" id="1119" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1299" > +<CONNECTOR type="115" id="1260" > <cdparam x="1731" y="1051" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to choice" value="null" /> -<P1 x="1731" y="1051" id="975" /> -<P2 x="1731" y="1081" id="1175" /> +<P1 x="1731" y="1051" id="936" /> +<P2 x="1731" y="1081" id="1136" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1300" > +<CONNECTOR type="115" id="1261" > <cdparam x="1647" y="1021" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="1647" y="1021" id="484" /> -<P2 x="1659" y="1052" id="1166" /> +<P1 x="1647" y="1021" id="445" /> +<P2 x="1659" y="1052" id="1127" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1301" > +<CONNECTOR type="115" id="1262" > <cdparam x="1826" y="1324" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to action state" value="null" /> -<P1 x="1826" y="1324" id="461" /> -<P2 x="1826" y="1344" id="1061" /> +<P1 x="1826" y="1324" id="422" /> +<P2 x="1826" y="1344" id="1022" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1302" > +<CONNECTOR type="115" id="1263" > <cdparam x="1826" y="1374" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="1826" y="1374" id="1062" /> -<P2 x="1828" y="1452" id="1064" /> +<P1 x="1826" y="1374" id="1023" /> +<P2 x="1828" y="1452" id="1025" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1303" > +<CONNECTOR type="115" id="1264" > <cdparam x="1786" y="1284" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="1786" y="1284" id="459" /> -<P2 x="1740" y="1330" id="1059" /> +<P1 x="1786" y="1284" id="420" /> +<P2 x="1740" y="1330" id="1020" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1304" > +<CONNECTOR type="115" id="1265" > <cdparam x="1920" y="1436" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="1920" y="1436" id="1067" /> -<P2 x="1920" y="1476" id="1069" /> +<P1 x="1920" y="1436" id="1028" /> +<P2 x="1920" y="1476" id="1030" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1305" > +<CONNECTOR type="115" id="1266" > <cdparam x="1996" y="1518" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="1996" y="1518" id="1079" /> -<P2 x="1996" y="1538" id="1071" /> +<P1 x="1996" y="1518" id="1040" /> +<P2 x="1996" y="1538" id="1032" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1306" > +<CONNECTOR type="115" id="1267" > <cdparam x="2036" y="1361" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="2036" y="1361" id="452" /> -<P2 x="2101" y="1368" id="434" /> +<P1 x="2036" y="1361" id="413" /> +<P2 x="2101" y="1368" id="395" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1307" > +<CONNECTOR type="115" id="1268" > <cdparam x="1866" y="1284" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="1866" y="1284" id="460" /> -<P2 x="1996" y="1336" id="450" /> +<P1 x="1866" y="1284" id="421" /> +<P2 x="1996" y="1336" id="411" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1308" > +<CONNECTOR type="115" id="1269" > <cdparam x="2341" y="1292" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="2341" y="1292" id="1159" /> -<P2 x="2340" y="1319" id="1161" /> +<P1 x="2341" y="1292" id="1120" /> +<P2 x="2340" y="1319" id="1122" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1309" > +<CONNECTOR type="115" id="1270" > <cdparam x="2217" y="1449" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from action state to stop state" value="null" /> -<P1 x="2217" y="1449" id="1136" /> -<P2 x="2217" y="1478" id="1121" /> +<P1 x="2217" y="1449" id="1097" /> +<P2 x="2217" y="1478" id="1082" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1310" > +<CONNECTOR type="115" id="1271" > <cdparam x="2277" y="1006" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to stop state" value="null" /> -<P1 x="2277" y="1006" id="445" /> -<P2 x="2278" y="1034" id="1170" /> +<P1 x="2277" y="1006" id="406" /> +<P2 x="2278" y="1034" id="1131" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1311" > +<CONNECTOR type="115" id="1272" > <cdparam x="1642" y="1429" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to stop state" value="null" /> -<P1 x="1642" y="1429" id="1057" /> -<P2 x="1642" y="1463" id="1014" /> +<P1 x="1642" y="1429" id="1018" /> +<P2 x="1642" y="1463" id="975" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1312" > +<CONNECTOR type="115" id="1273" > <cdparam x="1529" y="1157" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from write channel to send event" value="null" /> -<P1 x="1529" y="1157" id="969" /> -<P2 x="1529" y="1187" id="1172" /> +<P1 x="1529" y="1157" id="930" /> +<P2 x="1529" y="1187" id="1133" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1313" > +<CONNECTOR type="115" id="1274" > <cdparam x="1529" y="1217" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from send event to execI" value="null" /> -<P1 x="1529" y="1217" id="1173" /> -<P2 x="1529" y="1249" id="472" /> +<P1 x="1529" y="1217" id="1134" /> +<P2 x="1529" y="1249" id="433" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1314" > +<CONNECTOR type="115" id="1275" > <cdparam x="1691" y="1156" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to execI" value="null" /> -<P1 x="1691" y="1156" id="467" /> -<P2 x="1641" y="1230" id="496" /> +<P1 x="1691" y="1156" id="428" /> +<P2 x="1641" y="1230" id="457" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1315" > +<CONNECTOR type="115" id="1276" > <cdparam x="1771" y="1156" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from choice to choice" value="null" /> -<P1 x="1771" y="1156" id="468" /> -<P2 x="1826" y="1259" id="458" /> +<P1 x="1771" y="1156" id="429" /> +<P2 x="1826" y="1259" id="419" /> <AutomaticDrawing data="true" /> </CONNECTOR> -<CONNECTOR type="115" id="1316" > +<CONNECTOR type="115" id="1277" > <cdparam x="1731" y="1111" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from read channel to choice" value="null" /> -<P1 x="1731" y="1111" id="1176" /> -<P2 x="1731" y="1131" id="466" /> +<P1 x="1731" y="1111" id="1137" /> +<P2 x="1731" y="1131" id="427" /> <AutomaticDrawing data="true" /> </CONNECTOR> </TMLActivityDiagramPanel> -<TMLActivityDiagramPanel name="Timer" minX="10" maxX="1400" minY="10" maxY="900" > -<COMPONENT type="1012" id="1324" > -<cdparam x="509" y="222" /> -<sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<TMLActivityDiagramPanel name="SmartCard" minX="10" maxX="1400" minY="10" maxY="900" > +<COMPONENT type="1000" id="1279" > +<cdparam x="159" y="66" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="1320" /> -<TGConnectingPoint num="1" id="1321" /> -<TGConnectingPoint num="2" id="1322" /> -<TGConnectingPoint num="3" id="1323" /> +<infoparam name="start state" value="null" /> +<TGConnectingPoint num="0" id="1278" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="1317" > -<father id="1324" num="0" /> -<cdparam x="464" y="232" /> -<sizeparam width="52" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> + +<COMPONENT type="1010" id="1282" > +<cdparam x="141" y="129" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> -<infoparam name="guard 1" value="[ x==0 ]" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="1318" > -<father id="1324" num="1" /> -<cdparam x="544" y="234" /> -<sizeparam width="42" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> +<infoparam name="wait event" value="reset() " /> +<TGConnectingPoint num="0" id="1280" /> +<TGConnectingPoint num="1" id="1281" /> +<extraparam> +<Data eventName="reset" nbOfParams="5" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="1008" id="1285" > +<cdparam x="113" y="182" /> +<sizeparam width="106" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> -<infoparam name="guard 2" value="[ x>0 ]" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="1319" > -<father id="1324" num="2" /> -<cdparam x="529" y="267" /> -<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> +<infoparam name="send event" value="answerToReset()" /> +<TGConnectingPoint num="0" id="1283" /> +<TGConnectingPoint num="1" id="1284" /> +<extraparam> +<Data eventName="answerToReset" nbOfParams="5" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="1010" id="1288" > +<cdparam x="144" y="237" /> +<sizeparam width="44" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> -<infoparam name="guard 3" value="[ ]" /> -</SUBCOMPONENT> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> +<infoparam name="wait event" value="pTS() " /> +<TGConnectingPoint num="0" id="1286" /> +<TGConnectingPoint num="1" id="1287" /> +<extraparam> +<Data eventName="pTS" nbOfParams="5" /> +</extraparam> +</COMPONENT> -<COMPONENT type="1000" id="1326" > -<cdparam x="517" y="87" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="1291" > +<cdparam x="124" y="308" /> +<sizeparam width="85" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="start state" value="null" /> -<TGConnectingPoint num="0" id="1325" /> +<infoparam name="send event" value="pTSConfirm()" /> +<TGConnectingPoint num="0" id="1289" /> +<TGConnectingPoint num="1" id="1290" /> +<extraparam> +<Data eventName="pTSConfirm" nbOfParams="5" /> +</extraparam> </COMPONENT> -<COMPONENT type="1001" id="1328" > -<cdparam x="417" y="367" /> -<sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="301" id="1308" > +<cdparam x="376" y="98" /> +<sizeparam width="233" height="39" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1327" /> +<infoparam name="UML Note" value="The first two layers of the OSI model +are used to communicate between +the smart card and the terminal +" /> +<TGConnectingPoint num="0" id="1292" /> +<TGConnectingPoint num="1" id="1293" /> +<TGConnectingPoint num="2" id="1294" /> +<TGConnectingPoint num="3" id="1295" /> +<TGConnectingPoint num="4" id="1296" /> +<TGConnectingPoint num="5" id="1297" /> +<TGConnectingPoint num="6" id="1298" /> +<TGConnectingPoint num="7" id="1299" /> +<TGConnectingPoint num="8" id="1300" /> +<TGConnectingPoint num="9" id="1301" /> +<TGConnectingPoint num="10" id="1302" /> +<TGConnectingPoint num="11" id="1303" /> +<TGConnectingPoint num="12" id="1304" /> +<TGConnectingPoint num="13" id="1305" /> +<TGConnectingPoint num="14" id="1306" /> +<TGConnectingPoint num="15" id="1307" /> +<extraparam> +<Line value="The first two layers of the OSI model " /> +<Line value="are used to communicate between " /> +<Line value="the smart card and the terminal" /> +</extraparam> </COMPONENT> -<COMPONENT type="1008" id="1331" > -<cdparam x="393" y="299" /> -<sizeparam width="69" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1007" id="1311" > +<cdparam x="254" y="97" /> +<sizeparam width="89" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="timeOut()" /> -<TGConnectingPoint num="0" id="1329" /> -<TGConnectingPoint num="1" id="1330" /> +<infoparam name="send request" value="start_TCP_IP()" /> +<TGConnectingPoint num="0" id="1309" /> +<TGConnectingPoint num="1" id="1310" /> <extraparam> -<Data eventName="timeOut" nbOfParams="5" /> +<Data requestName="start_TCP_IP" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1010" id="1334" > -<cdparam x="596" y="300" /> -<sizeparam width="52" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1007" id="1314" > +<cdparam x="241" y="148" /> +<sizeparam width="114" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="wait event" value="stop() " /> -<TGConnectingPoint num="0" id="1332" /> -<TGConnectingPoint num="1" id="1333" /> +<infoparam name="send request" value="start_Application()" /> +<TGConnectingPoint num="0" id="1312" /> +<TGConnectingPoint num="1" id="1313" /> <extraparam> -<Data eventName="stop" nbOfParams="5" /> +<Data requestName="start_Application" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="1336" > -<cdparam x="612" y="365" /> +<COMPONENT type="1001" id="1316" > +<cdparam x="515" y="428" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1335" /> +<TGConnectingPoint num="0" id="1315" /> </COMPONENT> -<COMPONENT type="1017" id="1339" > -<cdparam x="487" y="150" /> -<sizeparam width="75" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="1319" > +<cdparam x="309" y="350" /> +<sizeparam width="106" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="notified event" value="x=?stop()" /> -<TGConnectingPoint num="0" id="1337" /> -<TGConnectingPoint num="1" id="1338" /> +<infoparam name="send event" value="data_Ready_SC()" /> +<TGConnectingPoint num="0" id="1317" /> +<TGConnectingPoint num="1" id="1318" /> <extraparam> -<Data eventName="stop" variable="x" /> +<Data eventName="data_Ready_SC" nbOfParams="5" /> </extraparam> </COMPONENT> -<CONNECTOR type="115" id="1340" > -<cdparam x="427" y="324" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to stop state" value="null" /> -<P1 x="427" y="324" id="1330" /> -<P2 x="427" y="362" id="1327" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="1341" > -<cdparam x="622" y="325" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from wait event to stop state" value="null" /> -<P1 x="622" y="325" id="1333" /> -<P2 x="622" y="360" id="1335" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="1342" > -<cdparam x="524" y="107" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from start state to notified event" value="null" /> -<P1 x="524" y="107" id="1325" /> -<P2 x="524" y="145" id="1337" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="1343" > -<cdparam x="524" y="175" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from notified event to choice" value="null" /> -<P1 x="524" y="175" id="1338" /> -<P2 x="524" y="212" id="1320" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="1344" > -<cdparam x="484" y="237" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from choice to send event" value="null" /> -<P1 x="484" y="237" id="1321" /> -<P2 x="427" y="294" id="1329" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> -<CONNECTOR type="115" id="1345" > -<cdparam x="564" y="237" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from choice to wait event" value="null" /> -<P1 x="564" y="237" id="1322" /> -<P2 x="622" y="295" id="1332" /> -<AutomaticDrawing data="true" /> -</CONNECTOR> - -</TMLActivityDiagramPanel> - -<TMLActivityDiagramPanel name="Application" minX="10" maxX="1400" minY="10" maxY="900" > -<COMPONENT type="1012" id="1353" > -<cdparam x="491" y="277" /> -<sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1001" id="1321" > +<cdparam x="352" y="426" /> +<sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="choice" value="null" /> -<TGConnectingPoint num="0" id="1349" /> -<TGConnectingPoint num="1" id="1350" /> -<TGConnectingPoint num="2" id="1351" /> -<TGConnectingPoint num="3" id="1352" /> +<infoparam name="stop state" value="null" /> +<TGConnectingPoint num="0" id="1320" /> </COMPONENT> -<SUBCOMPONENT type="-1" id="1346" > -<father id="1353" num="0" /> -<cdparam x="466" y="287" /> -<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> -<infoparam name="guard 1" value="[ ]" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="1347" > -<father id="1353" num="1" /> -<cdparam x="526" y="287" /> -<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> -<infoparam name="guard 2" value="[ ]" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="-1" id="1348" > -<father id="1353" num="2" /> -<cdparam x="511" y="322" /> -<sizeparam width="14" height="15" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> + +<COMPONENT type="1009" id="1324" > +<cdparam x="321" y="308" /> +<sizeparam width="83" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> -<infoparam name="guard 3" value="[ ]" /> -</SUBCOMPONENT> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> +<infoparam name="read channel" value="fromTtoP(1) " /> +<TGConnectingPoint num="0" id="1322" /> +<TGConnectingPoint num="1" id="1323" /> +<extraparam> +<Data channelName="fromTtoP" nbOfSamples="1" secPattern="" isAttacker="No" /> +</extraparam> +</COMPONENT> -<COMPONENT type="1000" id="1355" > -<cdparam x="501" y="91" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1010" id="1327" > +<cdparam x="337" y="264" /> +<sizeparam width="50" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="start state" value="null" /> -<TGConnectingPoint num="0" id="1354" /> +<infoparam name="wait event" value="send() " /> +<TGConnectingPoint num="0" id="1325" /> +<TGConnectingPoint num="1" id="1326" /> +<extraparam> +<Data eventName="send" nbOfParams="5" /> +</extraparam> </COMPONENT> -<COMPONENT type="1008" id="1358" > -<cdparam x="482" y="129" /> -<sizeparam width="52" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1006" id="1330" > +<cdparam x="319" y="392" /> +<sizeparam width="87" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="open()" /> -<TGConnectingPoint num="0" id="1356" /> -<TGConnectingPoint num="1" id="1357" /> +<infoparam name="write channel" value="fromSCtoD(1)" /> +<TGConnectingPoint num="0" id="1328" /> +<TGConnectingPoint num="1" id="1329" /> <extraparam> -<Data eventName="open" nbOfParams="5" /> +<Data channelName="fromSCtoD" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1006" id="1361" > -<cdparam x="466" y="178" /> -<sizeparam width="84" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1008" id="1333" > +<cdparam x="496" y="350" /> +<sizeparam width="59" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="write channel" value="fromAtoT(1)" /> -<TGConnectingPoint num="0" id="1359" /> -<TGConnectingPoint num="1" id="1360" /> +<infoparam name="send event" value="receive()" /> +<TGConnectingPoint num="0" id="1331" /> +<TGConnectingPoint num="1" id="1332" /> <extraparam> -<Data channelName="fromAtoT" nbOfSamples="1" secPattern="" isAttacker="No" /> +<Data eventName="receive" nbOfParams="5" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="1364" > -<cdparam x="467" y="226" /> -<sizeparam width="80" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1009" id="1336" > +<cdparam x="480" y="311" /> +<sizeparam width="91" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="send_TCP()" /> -<TGConnectingPoint num="0" id="1362" /> -<TGConnectingPoint num="1" id="1363" /> +<infoparam name="read channel" value="fromDtoSC(1) " /> +<TGConnectingPoint num="0" id="1334" /> +<TGConnectingPoint num="1" id="1335" /> <extraparam> -<Data eventName="send_TCP" nbOfParams="5" /> +<Data channelName="fromDtoSC" nbOfSamples="1" secPattern="" isAttacker="No" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="1366" > -<cdparam x="576" y="388" /> -<sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1006" id="1339" > +<cdparam x="486" y="387" /> +<sizeparam width="79" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1365" /> +<infoparam name="write channel" value="fromPtoT(1)" /> +<TGConnectingPoint num="0" id="1337" /> +<TGConnectingPoint num="1" id="1338" /> +<extraparam> +<Data channelName="fromPtoT" nbOfSamples="1" secPattern="" isAttacker="No" /> +</extraparam> </COMPONENT> -<COMPONENT type="1008" id="1369" > -<cdparam x="559" y="329" /> -<sizeparam width="54" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1010" id="1342" > +<cdparam x="470" y="268" /> +<sizeparam width="110" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="abort()" /> -<TGConnectingPoint num="0" id="1367" /> -<TGConnectingPoint num="1" id="1368" /> +<infoparam name="wait event" value="data_Ready(t, b) " /> +<TGConnectingPoint num="0" id="1340" /> +<TGConnectingPoint num="1" id="1341" /> +<breakpoint /> <extraparam> -<Data eventName="abort" nbOfParams="5" /> +<Data eventName="data_Ready" nbOfParams="5" /> +<Param index="0" value="t" /> +<Param index="1" value="b" /> </extraparam> </COMPONENT> -<COMPONENT type="1008" id="1372" > -<cdparam x="406" y="337" /> -<sizeparam width="53" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<COMPONENT type="1014" id="1346" > +<cdparam x="236" y="202" /> +<sizeparam width="125" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> -<infoparam name="send event" value="close()" /> -<TGConnectingPoint num="0" id="1370" /> -<TGConnectingPoint num="1" id="1371" /> +<infoparam name="for loop" value="for(j=0;x==0;j = j)" /> +<TGConnectingPoint num="0" id="1343" /> +<TGConnectingPoint num="1" id="1344" /> +<TGConnectingPoint num="2" id="1345" /> <extraparam> -<Data eventName="close" nbOfParams="5" /> +<Data init="j=0" condition="x==0" increment="j = j" /> </extraparam> </COMPONENT> -<COMPONENT type="1001" id="1374" > -<cdparam x="422" y="386" /> +<COMPONENT type="1001" id="1348" > +<cdparam x="297" y="231" /> <sizeparam width="20" height="20" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="stop state" value="null" /> -<TGConnectingPoint num="0" id="1373" /> +<TGConnectingPoint num="0" id="1347" /> +</COMPONENT> + +<COMPONENT type="1018" id="1359" > +<cdparam x="424" y="226" /> +<sizeparam width="30" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> +<infoparam name="select" value="null" /> +<TGConnectingPoint num="0" id="1349" /> +<TGConnectingPoint num="1" id="1350" /> +<TGConnectingPoint num="2" id="1351" /> +<TGConnectingPoint num="3" id="1352" /> +<TGConnectingPoint num="4" id="1353" /> +<TGConnectingPoint num="5" id="1354" /> +<TGConnectingPoint num="6" id="1355" /> +<TGConnectingPoint num="7" id="1356" /> +<TGConnectingPoint num="8" id="1357" /> +<TGConnectingPoint num="9" id="1358" /> </COMPONENT> +<CONNECTOR type="115" id="1364" > +<cdparam x="111" y="331" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send event to send request" value="null" /> +<P1 x="166" y="333" id="1290" /> +<P2 x="298" y="92" id="1309" /> +<Point x="166" y="351" /> +<Point x="231" y="351" /> +<Point x="231" y="72" /> +<Point x="298" y="72" /> +<AutomaticDrawing data="true" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1360" > +<father id="1364" num="0" /> +<cdparam x="166" y="351" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> +<infoparam name="point " value="null" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="1361" > +<father id="1364" num="1" /> +<cdparam x="231" y="351" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> +<infoparam name="point " value="null" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="1362" > +<father id="1364" num="2" /> +<cdparam x="231" y="72" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> +<infoparam name="point " value="null" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="-1" id="1363" > +<father id="1364" num="3" /> +<cdparam x="298" y="72" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> +<infoparam name="point " value="null" /> +</SUBCOMPONENT> + +<CONNECTOR type="115" id="1365" > +<cdparam x="166" y="64" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from start state to wait event" value="null" /> +<P1 x="166" y="86" id="1278" /> +<P2 x="166" y="124" id="1280" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1366" > +<cdparam x="166" y="154" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from wait event to send event" value="null" /> +<P1 x="166" y="154" id="1281" /> +<P2 x="166" y="177" id="1283" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1367" > +<cdparam x="312" y="133" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send request to send request" value="null" /> +<P1 x="298" y="122" id="1310" /> +<P2 x="298" y="143" id="1312" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1368" > +<cdparam x="355" y="300" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from wait event to read channel" value="null" /> +<P1 x="362" y="289" id="1326" /> +<P2 x="362" y="303" id="1322" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1369" > +<cdparam x="355" y="365" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from read channel to send event" value="null" /> +<P1 x="362" y="333" id="1323" /> +<P2 x="362" y="345" id="1317" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1370" > +<cdparam x="355" y="417" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send event to write channel" value="null" /> +<P1 x="362" y="375" id="1318" /> +<P2 x="362" y="387" id="1328" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1371" > +<cdparam x="355" y="473" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from write channel to stop state" value="null" /> +<P1 x="362" y="417" id="1329" /> +<P2 x="362" y="421" id="1320" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1372" > +<cdparam x="541" y="358" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from read channel to send event" value="null" /> +<P1 x="525" y="336" id="1335" /> +<P2 x="525" y="345" id="1331" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1373" > +<cdparam x="540" y="402" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from send event to write channel" value="null" /> +<P1 x="525" y="375" id="1332" /> +<P2 x="525" y="382" id="1337" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> +<CONNECTOR type="115" id="1374" > +<cdparam x="543" y="305" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector from wait event to read channel" value="null" /> +<P1 x="525" y="293" id="1341" /> +<P2 x="525" y="306" id="1334" /> +<AutomaticDrawing data="true" /> +</CONNECTOR> <CONNECTOR type="115" id="1375" > -<cdparam x="509" y="94" /> +<cdparam x="540" y="464" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from start state to send event" value="null" /> -<P1 x="508" y="111" id="1354" /> -<P2 x="508" y="124" id="1356" /> +<infoparam name="connector from write channel to stop state" value="null" /> +<P1 x="525" y="412" id="1338" /> +<P2 x="525" y="423" id="1315" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="115" id="1376" > -<cdparam x="508" y="154" /> +<cdparam x="298" y="173" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to write channel" value="null" /> -<P1 x="508" y="154" id="1357" /> -<P2 x="508" y="173" id="1359" /> +<infoparam name="connector from send request to for loop" value="null" /> +<P1 x="298" y="173" id="1313" /> +<P2 x="298" y="197" id="1343" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="115" id="1377" > -<cdparam x="508" y="222" /> +<cdparam x="328" y="232" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from write channel to send event" value="null" /> -<P1 x="508" y="203" id="1360" /> -<P2 x="507" y="221" id="1362" /> +<infoparam name="connector from for loop to stop state" value="null" /> +<P1 x="298" y="227" id="1345" /> +<P2 x="307" y="226" id="1347" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="115" id="1378" > -<cdparam x="586" y="354" /> +<cdparam x="395" y="283" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to stop state" value="null" /> -<P1 x="586" y="354" id="1368" /> -<P2 x="586" y="383" id="1365" /> +<infoparam name="connector from select to wait event" value="null" /> +<P1 x="399" y="241" id="1350" /> +<P2 x="362" y="259" id="1325" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="115" id="1379" > -<cdparam x="508" y="298" /> +<cdparam x="543" y="341" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to choice" value="null" /> -<P1 x="507" y="251" id="1363" /> -<P2 x="506" y="267" id="1349" /> +<infoparam name="connector from select to wait event" value="null" /> +<P1 x="479" y="241" id="1351" /> +<P2 x="525" y="263" id="1340" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="115" id="1380" > -<cdparam x="470" y="348" /> +<cdparam x="391" y="282" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from choice to send event" value="null" /> -<P1 x="466" y="292" id="1350" /> -<P2 x="432" y="332" id="1370" /> +<infoparam name="connector from for loop to select" value="null" /> +<P1 x="361" y="216" id="1344" /> +<P2 x="439" y="216" id="1349" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="115" id="1381" > -<cdparam x="432" y="362" /> +<cdparam x="164" y="262" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from send event to stop state" value="null" /> -<P1 x="432" y="362" id="1371" /> -<P2 x="432" y="381" id="1373" /> +<infoparam name="connector from wait event to send event" value="null" /> +<P1 x="166" y="262" id="1287" /> +<P2 x="166" y="303" id="1289" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="115" id="1382" > -<cdparam x="550" y="348" /> +<cdparam x="166" y="207" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<infoparam name="connector from choice to send event" value="null" /> -<P1 x="546" y="292" id="1351" /> -<P2 x="586" y="324" id="1367" /> +<infoparam name="connector from send event to wait event" value="null" /> +<P1 x="166" y="207" id="1284" /> +<P2 x="166" y="232" id="1286" /> <AutomaticDrawing data="true" /> </CONNECTOR> @@ -6192,11 +6192,11 @@ On prend b=1 comme exemple </COMPONENT> <SUBCOMPONENT type="1101" id="1391" > <father id="1452" num="0" /> -<cdparam x="226" y="304" /> -<sizeparam width="109" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="92" y="154" /> +<sizeparam width="172" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="350" minY="0" maxY="271" /> -<infoparam name="TGComponent" value="AppC::Timer" /> +<cdrectangleparam minX="0" maxX="287" minY="0" maxY="271" /> +<infoparam name="TGComponent" value="AppC::InterfaceDevice" /> <TGConnectingPoint num="0" id="1383" /> <TGConnectingPoint num="1" id="1384" /> <TGConnectingPoint num="2" id="1385" /> @@ -6206,16 +6206,16 @@ On prend b=1 comme exemple <TGConnectingPoint num="6" id="1389" /> <TGConnectingPoint num="7" id="1390" /> <extraparam> -<info value="AppC::Timer" taskName="Timer" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> +<info value="AppC::InterfaceDevice" taskName="InterfaceDevice" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1400" > <father id="1452" num="1" /> -<cdparam x="290" y="234" /> -<sizeparam width="144" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="291" y="153" /> +<sizeparam width="141" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="315" minY="0" maxY="271" /> -<infoparam name="TGComponent" value="AppC::Application" /> +<cdrectangleparam minX="0" maxX="318" minY="0" maxY="271" /> +<infoparam name="TGComponent" value="AppC::SmartCard" /> <TGConnectingPoint num="0" id="1392" /> <TGConnectingPoint num="1" id="1393" /> <TGConnectingPoint num="2" id="1394" /> @@ -6225,7 +6225,7 @@ On prend b=1 comme exemple <TGConnectingPoint num="6" id="1398" /> <TGConnectingPoint num="7" id="1399" /> <extraparam> -<info value="AppC::Application" taskName="Application" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> +<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1409" > @@ -6249,11 +6249,11 @@ On prend b=1 comme exemple </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1418" > <father id="1452" num="3" /> -<cdparam x="291" y="153" /> -<sizeparam width="141" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="290" y="234" /> +<sizeparam width="144" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="318" minY="0" maxY="271" /> -<infoparam name="TGComponent" value="AppC::SmartCard" /> +<cdrectangleparam minX="0" maxX="315" minY="0" maxY="271" /> +<infoparam name="TGComponent" value="AppC::Application" /> <TGConnectingPoint num="0" id="1410" /> <TGConnectingPoint num="1" id="1411" /> <TGConnectingPoint num="2" id="1412" /> @@ -6263,16 +6263,16 @@ On prend b=1 comme exemple <TGConnectingPoint num="6" id="1416" /> <TGConnectingPoint num="7" id="1417" /> <extraparam> -<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> +<info value="AppC::Application" taskName="Application" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1427" > <father id="1452" num="4" /> -<cdparam x="92" y="154" /> -<sizeparam width="172" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="226" y="304" /> +<sizeparam width="109" height="50" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="287" minY="0" maxY="271" /> -<infoparam name="TGComponent" value="AppC::InterfaceDevice" /> +<cdrectangleparam minX="0" maxX="350" minY="0" maxY="271" /> +<infoparam name="TGComponent" value="AppC::Timer" /> <TGConnectingPoint num="0" id="1419" /> <TGConnectingPoint num="1" id="1420" /> <TGConnectingPoint num="2" id="1421" /> @@ -6282,7 +6282,7 @@ On prend b=1 comme exemple <TGConnectingPoint num="6" id="1425" /> <TGConnectingPoint num="7" id="1426" /> <extraparam> -<info value="AppC::InterfaceDevice" taskName="InterfaceDevice" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> +<info value="AppC::Timer" taskName="Timer" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> @@ -6296,6 +6296,102 @@ On prend b=1 comme exemple <Modeling type="TML Architecture" nameTab="Mapping2" > <TMLArchiDiagramPanel name="DIPLODOCUS architecture and mapping Diagram" minX="10" maxX="1400" minY="10" maxY="900" attributes="0" masterClockFrequency="200" > +<CONNECTOR type="125" id="1717" > +<cdparam x="1102" y="237" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="{info}" /> +<P1 x="1102" y="237" id="1703" /> +<P2 x="934" y="189" id="1671" /> +<AutomaticDrawing data="true" /> +<extraparam> +<info priority="0" /> +<spy value="false" /> +</extraparam> +</CONNECTOR> +<COMPONENT type="1105" id="1692" > +<cdparam x="1102" y="187" /> +<sizeparam width="200" height="200" minWidth="100" minHeight="35" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> +<infoparam name="Memory0" value="name" /> +<TGConnectingPoint num="0" id="1693" /> +<TGConnectingPoint num="1" id="1694" /> +<TGConnectingPoint num="2" id="1695" /> +<TGConnectingPoint num="3" id="1696" /> +<TGConnectingPoint num="4" id="1697" /> +<TGConnectingPoint num="5" id="1698" /> +<TGConnectingPoint num="6" id="1699" /> +<TGConnectingPoint num="7" id="1700" /> +<TGConnectingPoint num="8" id="1701" /> +<TGConnectingPoint num="9" id="1702" /> +<TGConnectingPoint num="10" id="1703" /> +<TGConnectingPoint num="11" id="1704" /> +<TGConnectingPoint num="12" id="1705" /> +<TGConnectingPoint num="13" id="1706" /> +<TGConnectingPoint num="14" id="1707" /> +<TGConnectingPoint num="15" id="1708" /> +<TGConnectingPoint num="16" id="1709" /> +<TGConnectingPoint num="17" id="1710" /> +<TGConnectingPoint num="18" id="1711" /> +<TGConnectingPoint num="19" id="1712" /> +<TGConnectingPoint num="20" id="1713" /> +<TGConnectingPoint num="21" id="1714" /> +<TGConnectingPoint num="22" id="1715" /> +<TGConnectingPoint num="23" id="1716" /> +<extraparam> +<info stereotype="MEMORY" nodeName="Memory0" /> +<attributes byteDataSize="4" clockRatio="1" bufferType="0" /> +</extraparam> +</COMPONENT> + +<CONNECTOR type="125" id="1691" > +<cdparam x="576" y="243" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="{info}" /> +<P1 x="576" y="243" id="1607" /> +<P2 x="684" y="201" id="1679" /> +<AutomaticDrawing data="true" /> +<extraparam> +<info priority="0" /> +<spy value="false" /> +</extraparam> +</CONNECTOR> +<COMPONENT type="1102" id="1666" > +<cdparam x="684" y="164" /> +<sizeparam width="250" height="50" minWidth="100" minHeight="50" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> +<infoparam name="Bus1" value="name" /> +<TGConnectingPoint num="0" id="1667" /> +<TGConnectingPoint num="1" id="1668" /> +<TGConnectingPoint num="2" id="1669" /> +<TGConnectingPoint num="3" id="1670" /> +<TGConnectingPoint num="4" id="1671" /> +<TGConnectingPoint num="5" id="1672" /> +<TGConnectingPoint num="6" id="1673" /> +<TGConnectingPoint num="7" id="1674" /> +<TGConnectingPoint num="8" id="1675" /> +<TGConnectingPoint num="9" id="1676" /> +<TGConnectingPoint num="10" id="1677" /> +<TGConnectingPoint num="11" id="1678" /> +<TGConnectingPoint num="12" id="1679" /> +<TGConnectingPoint num="13" id="1680" /> +<TGConnectingPoint num="14" id="1681" /> +<TGConnectingPoint num="15" id="1682" /> +<TGConnectingPoint num="16" id="1683" /> +<TGConnectingPoint num="17" id="1684" /> +<TGConnectingPoint num="18" id="1685" /> +<TGConnectingPoint num="19" id="1686" /> +<TGConnectingPoint num="20" id="1687" /> +<TGConnectingPoint num="21" id="1688" /> +<TGConnectingPoint num="22" id="1689" /> +<TGConnectingPoint num="23" id="1690" /> +<extraparam> +<info stereotype="BUS-RR" nodeName="Bus1" /> +<attributes byteDataSize="4" arbitrationPolicy="0" sliceTime="10000" pipelineSize="1" clockRatio="1" privacy="0" referenceAttack="null" /> +</extraparam> +</COMPONENT> + <COMPONENT type="1105" id="1477" > <cdparam x="420" y="527" /> <sizeparam width="189" height="131" minWidth="100" minHeight="50" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> @@ -6515,11 +6611,11 @@ On prend b=1 comme exemple </COMPONENT> <SUBCOMPONENT type="1101" id="1579" > <father id="1622" num="0" /> -<cdparam x="486" y="303" /> -<sizeparam width="141" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="396" y="258" /> +<sizeparam width="109" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="109" minY="0" maxY="106" /> -<infoparam name="TGComponent" value="AppC::SmartCard" /> +<cdrectangleparam minX="0" maxX="141" minY="0" maxY="106" /> +<infoparam name="TGComponent" value="AppC::TCPIP" /> <TGConnectingPoint num="0" id="1571" /> <TGConnectingPoint num="1" id="1572" /> <TGConnectingPoint num="2" id="1573" /> @@ -6529,7 +6625,7 @@ On prend b=1 comme exemple <TGConnectingPoint num="6" id="1577" /> <TGConnectingPoint num="7" id="1578" /> <extraparam> -<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> +<info value="AppC::TCPIP" taskName="TCPIP" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1588" > @@ -6553,11 +6649,11 @@ On prend b=1 comme exemple </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1597" > <father id="1622" num="2" /> -<cdparam x="396" y="258" /> -<sizeparam width="109" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="486" y="303" /> +<sizeparam width="141" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="141" minY="0" maxY="106" /> -<infoparam name="TGComponent" value="AppC::TCPIP" /> +<cdrectangleparam minX="0" maxX="109" minY="0" maxY="106" /> +<infoparam name="TGComponent" value="AppC::SmartCard" /> <TGConnectingPoint num="0" id="1589" /> <TGConnectingPoint num="1" id="1590" /> <TGConnectingPoint num="2" id="1591" /> @@ -6567,7 +6663,7 @@ On prend b=1 comme exemple <TGConnectingPoint num="6" id="1595" /> <TGConnectingPoint num="7" id="1596" /> <extraparam> -<info value="AppC::TCPIP" taskName="TCPIP" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> +<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operation="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> @@ -6668,19 +6764,19 @@ On prend b=1 comme exemple </COMPONENT> <SUBCOMPONENT type="6005" id="1637" > <father id="1645" num="0" /> -<cdparam x="523" y="361" /> +<cdparam x="523" y="346" /> <sizeparam width="10" height="10" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="605" maxX="605" minY="355" maxY="355" /> -<infoparam name="value " value="Mapping2" /> +<cdrectangleparam minX="605" maxX="605" minY="340" maxY="340" /> +<infoparam name="value " value="Mapping1" /> </SUBCOMPONENT> <SUBCOMPONENT type="6005" id="1638" > <father id="1645" num="1" /> -<cdparam x="523" y="346" /> +<cdparam x="523" y="361" /> <sizeparam width="10" height="10" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="605" maxX="605" minY="340" maxY="340" /> -<infoparam name="value " value="Mapping1" /> +<cdrectangleparam minX="605" maxX="605" minY="355" maxY="355" /> +<infoparam name="value " value="Mapping2" /> </SUBCOMPONENT> <COMPONENT type="6001" id="1652" > @@ -6696,19 +6792,19 @@ On prend b=1 comme exemple </COMPONENT> <SUBCOMPONENT type="6005" id="1646" > <father id="1652" num="0" /> -<cdparam x="855" y="155" /> +<cdparam x="855" y="140" /> <sizeparam width="10" height="10" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="855" maxX="855" minY="155" maxY="155" /> -<infoparam name="value " value="Mapping2" /> +<cdrectangleparam minX="855" maxX="855" minY="140" maxY="140" /> +<infoparam name="value " value="Mapping1" /> </SUBCOMPONENT> <SUBCOMPONENT type="6005" id="1647" > <father id="1652" num="1" /> -<cdparam x="855" y="140" /> +<cdparam x="855" y="155" /> <sizeparam width="10" height="10" minWidth="10" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="855" maxX="855" minY="140" maxY="140" /> -<infoparam name="value " value="Mapping1" /> +<cdrectangleparam minX="855" maxX="855" minY="155" maxY="155" /> +<infoparam name="value " value="Mapping2" /> </SUBCOMPONENT> <COMPONENT type="6000" id="1658" > diff --git a/src/main/java/avatartranslator/AvatarActionOnSignal.java b/src/main/java/avatartranslator/AvatarActionOnSignal.java index d3bd48aa517d4280d0a9799225f104ac374581e3..3c8d2ede313eaaea05cfef087d0f39c8c6606698 100644 --- a/src/main/java/avatartranslator/AvatarActionOnSignal.java +++ b/src/main/java/avatartranslator/AvatarActionOnSignal.java @@ -37,8 +37,6 @@ */ - - package avatartranslator; import myutil.TraceManager; @@ -92,11 +90,11 @@ public class AvatarActionOnSignal extends AvatarStateMachineElement { public boolean isSending() { return signal.isOut(); } - + public boolean getCheckLatency(){ return checkLatency; } - + public void setCheckLatency(boolean b){ checkLatency=b; } @@ -124,13 +122,13 @@ public class AvatarActionOnSignal extends AvatarStateMachineElement { public String getExtendedName() { if (getSignal() == null) { String s = getName() + " refobjt=" + referenceObject.toString(); - TraceManager.addDev("Null signal" + " res=" + s); + TraceManager.addDev("Null signal" + " res=" + s); return s; } if (getName() == null) { TraceManager.addDev("Null name"); } - + return getName() + ":" + getSignal().getName(); } diff --git a/src/main/java/avatartranslator/AvatarBinaryGuard.java b/src/main/java/avatartranslator/AvatarBinaryGuard.java index ac20cf6bfec148dee68ac74ffda7185953a78267..0c473aaafd6a07fc8d97882b40119766dab8e0b3 100644 --- a/src/main/java/avatartranslator/AvatarBinaryGuard.java +++ b/src/main/java/avatartranslator/AvatarBinaryGuard.java @@ -37,9 +37,6 @@ */ - - - package avatartranslator; import java.util.HashMap; diff --git a/src/main/java/common/ConfigurationTTool.java b/src/main/java/common/ConfigurationTTool.java index 2d49da6f06c588387b4a65a9dfaf07e9c21f1524..f4ffe8b6b9f5aa373ec72cda4beb6179ca1b0bbe 100755 --- a/src/main/java/common/ConfigurationTTool.java +++ b/src/main/java/common/ConfigurationTTool.java @@ -493,12 +493,12 @@ public class ConfigurationTTool { sb.append("LastOpenFile: " + LastOpenFile + "\n"); sb.append("LastWindowAttributesX: " + LastWindowAttributesX + "\n"); sb.append("LastWindowAttributesY: " + LastWindowAttributesY + "\n"); - sb.append("LastWindowAttributesWidth: " + LastWindowAttributesWidth + "\n"); - sb.append("LastWindowAttributesHeight: " + LastWindowAttributesHeight + "\n"); - sb.append("LastWindowAttributesMax: " + LastWindowAttributesMax + "\n"); + sb.append("LastWindowAttributesWidth: ").append(LastWindowAttributesWidth).append("\n"); + sb.append("LastWindowAttributesHeight: ").append(LastWindowAttributesHeight).append("\n"); + sb.append("LastWindowAttributesMax: ").append(LastWindowAttributesMax).append("\n"); //Huy Truong - sb.append("ExternalServer " + ExternalServer + "\n"); + sb.append("ExternalServer ").append(ExternalServer).append("\n"); return sb.toString(); diff --git a/src/main/java/common/SpecConfigTTool.java b/src/main/java/common/SpecConfigTTool.java index f026b6ceb9ab1f7ec3e11921469e653f93d3a645..ada84c570bc2e0ef8b3b43cbad5ed9b7e4fd419b 100644 --- a/src/main/java/common/SpecConfigTTool.java +++ b/src/main/java/common/SpecConfigTTool.java @@ -1,3 +1,41 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + package common; import java.io.ByteArrayInputStream; diff --git a/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java b/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java index cf514482cef7c294dfbab41045ea062b342c4b5d..dad6681a601b2ede4e945e67273212f21bcb9f35 100644 --- a/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java +++ b/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java @@ -37,8 +37,6 @@ */ - - package tmltranslator.tomappingsystemc2; import myutil.Conversion; @@ -53,19 +51,20 @@ import java.util.*; /** - * Class TML2MappingSystemC - * Creation: 03/09/2007 - * @version 1.0 03/09/2007 - * @author Daniel Knorreck + * Class TML2MappingSystemC + * Creation: 03/09/2007 + * + * @author Daniel Knorreck + * @version 1.0 03/09/2007 */ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { private final static String CR = "\n"; - // private final static String CR2 = "\n\n"; + // private final static String CR2 = "\n\n"; private final static String SCCR = ";\n"; - // private final static String EFCR = "}\n"; - // private final static String EFCR2 = "}\n\n"; - // private final static String EF = "}"; + // private final static String EFCR = "}\n"; + // private final static String EFCR2 = "}\n\n"; + // private final static String EF = "}"; //private final static int MAX_EVENT = 1024; private TMLModeling<?> tmlmodeling; @@ -83,34 +82,34 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { public TML2MappingSystemC(TMLModeling<?> _tmlm) { tmlmodeling = _tmlm; - tmlmodeling.removeForksAndJoins(); + tmlmodeling.removeForksAndJoins(); tmlmapping = tmlmodeling.getDefaultMapping(); - tepeTranslator = new SystemCTEPE(new ArrayList<TEPE>(), this); + tepeTranslator = new SystemCTEPE(new ArrayList<TEPE>(), this); } public TML2MappingSystemC(TMLMapping<?> _tmlmapping) { tmlmapping = _tmlmapping; - tmlmapping.handleCPs(); - tmlmapping.removeForksAndJoins(); + tmlmapping.handleCPs(); + tmlmapping.removeForksAndJoins(); tmlmapping.makeMinimumMapping(); - tepeTranslator = new SystemCTEPE(new ArrayList<TEPE>(), this); + tepeTranslator = new SystemCTEPE(new ArrayList<TEPE>(), this); } public TML2MappingSystemC(TMLModeling<?> _tmlm, List<EBRDD> _ebrdds, List<TEPE> _tepes) { tmlmodeling = _tmlm; //ebrdds = _ebrdds; tmlmapping = tmlmodeling.getDefaultMapping(); - tepeTranslator = new SystemCTEPE(_tepes, this); + tepeTranslator = new SystemCTEPE(_tepes, this); //tepeTranslator.generateTEPEs(); } public TML2MappingSystemC(TMLMapping<?> _tmlmapping, List<EBRDD> _ebrdds, List<TEPE> _tepes) { tmlmapping = _tmlmapping; - tmlmapping.handleCPs(); - tmlmapping.removeForksAndJoins(); + tmlmapping.handleCPs(); + tmlmapping.removeForksAndJoins(); //ebrdds = _ebrdds; tmlmapping.makeMinimumMapping(); - tepeTranslator = new SystemCTEPE(_tepes, this); + tepeTranslator = new SystemCTEPE(_tepes, this); //tepeTranslator.generateTEPEs(); } @@ -130,7 +129,7 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { debug = _debug; optimize = _optimize; tmlmapping.removeAllRandomSequences(); - tmlmapping.handleCPs(); + tmlmapping.handleCPs(); tmlmodeling = tmlmapping.getTMLModeling(); tasks = new ArrayList<MappedSystemCTask>(); //generateSystemCTasks(); @@ -149,7 +148,7 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { private void generateMakefileSrc() { src = "SRCS = "; - for(TMLTask mst: tmlmapping.getMappedTasks()) { + for (TMLTask mst : tmlmapping.getMappedTasks()) { src += mst.getName() + ".cpp "; } //for(EBRDD ebrdd: ebrdds){ @@ -170,7 +169,7 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { header += "#include <SimComponents.h>\n#include <Server.h>\n#include <SimServSyncInfo.h>\n#include <ListenersSimCmd.h>\n"; // Generate tasks header - for(TMLTask mst: tmlmapping.getMappedTasks()) { + for (TMLTask mst : tmlmapping.getMappedTasks()) { //header += "#include <" + mst.getReference() + ".h>" + CR; header += "#include <" + mst.getName() + ".h>" + CR; } @@ -185,36 +184,38 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { // Declaration of HW nodes declaration += "//Declaration of CPUs" + CR; - for(HwNode node: tmlmapping.getTMLArchitecture().getHwNodes()) { + for (HwNode node : tmlmapping.getTMLArchitecture().getHwNodes()) { if (node instanceof HwCPU) { - HwCPU exNode = (HwCPU)node; + HwCPU exNode = (HwCPU) node; if (exNode.getType().equals("CPURRPB")) declaration += "PrioScheduler* " + exNode.getName() + "_scheduler = new PrioScheduler(\"" + exNode.getName() + "_PrioSched\",0)" + SCCR; else //tmlmapping.getTMLArchitecture().getMasterClockFrequency() * exNode.sliceTime //declaration += "RRScheduler* " + exNode.getName() + "_scheduler = new RRScheduler(\"" + exNode.getName() + "_RRSched\", 0, 5, " + (int) Math.ceil(((float)exNode.execiTime)*(1+((float)exNode.branchingPredictionPenalty)/100)) + " ) " + SCCR; - declaration += "RRScheduler* " + exNode.getName() + "_scheduler = new RRScheduler(\"" + exNode.getName() + "_RRSched\", 0, " + (tmlmapping.getTMLArchitecture().getMasterClockFrequency() * exNode.sliceTime) + ", " + (int) Math.ceil((float)(exNode.clockRatio * Math.max(exNode.execiTime,exNode.execcTime) * (exNode.branchingPredictionPenalty * exNode.pipelineSize +100 - exNode.branchingPredictionPenalty))/100) + " ) " + SCCR; - TraceManager.addDev("cores " + exNode.nbOfCores); - for(int cores=0; cores<exNode.nbOfCores; cores++){ - //for(int cores=0; cores<1; cores++){ + declaration += "RRScheduler* " + exNode.getName() + "_scheduler = new RRScheduler(\"" + exNode.getName() + "_RRSched\", 0, " + (tmlmapping.getTMLArchitecture().getMasterClockFrequency() * exNode.sliceTime) + ", " + (int) Math.ceil((float) (exNode.clockRatio * Math.max(exNode.execiTime, exNode.execcTime) * (exNode.branchingPredictionPenalty * exNode.pipelineSize + 100 - exNode.branchingPredictionPenalty)) / 100) + " ) " + SCCR; + TraceManager.addDev("cores " + exNode.nbOfCores); + for (int cores = 0; cores < exNode.nbOfCores; cores++) { + //for(int cores=0; cores<1; cores++){ //if (tmlmapping.isAUsedHwNode(node)) { declaration += "CPU* " + exNode.getName() + cores + " = new SingleCoreCPU(" + exNode.getID() + ", \"" + exNode.getName() + "_" + cores + "\", " + exNode.getName() + "_scheduler" + ", "; - declaration += exNode.clockRatio + ", " + exNode.execiTime + ", " + exNode.execcTime + ", " + exNode.pipelineSize + ", " + exNode.taskSwitchingTime + ", " + exNode.branchingPredictionPenalty + ", " + exNode.goIdleTime + ", " + exNode.maxConsecutiveIdleCycles + ", " + exNode.byteDataSize + ")" + SCCR; - if (cores!=0) declaration+= node.getName() + cores + "->setScheduler(" + exNode.getName() + "_scheduler,false)" + SCCR; - declaration += "addCPU("+ node.getName() + cores +")"+ SCCR; + declaration += exNode.clockRatio + ", " + exNode.execiTime + ", " + exNode.execcTime + ", " + exNode.pipelineSize + ", " + exNode.taskSwitchingTime + ", " + exNode.branchingPredictionPenalty + ", " + exNode.goIdleTime + ", " + exNode.maxConsecutiveIdleCycles + ", " + exNode.byteDataSize + ")" + SCCR; + if (cores != 0) + declaration += node.getName() + cores + "->setScheduler(" + exNode.getName() + "_scheduler,false)" + SCCR; + declaration += "addCPU(" + node.getName() + cores + ")" + SCCR; } } if (node instanceof HwA) { - HwA hwaNode = (HwA)node; - declaration += "RRScheduler* " + hwaNode.getName() + "_scheduler = new RRScheduler(\"" + hwaNode.getName() + "_RRSched\", 0, " + (tmlmapping.getTMLArchitecture().getMasterClockFrequency() * HwA.DEFAULT_SLICE_TIME) + ", " + (int) Math.ceil((float)(hwaNode.clockRatio * Math.max(hwaNode.execiTime,hwaNode.execcTime) * (HwA.DEFAULT_BRANCHING_PREDICTION_PENALTY * HwA.DEFAULT_PIPELINE_SIZE +100 - HwA.DEFAULT_BRANCHING_PREDICTION_PENALTY))/100) + " ) " + SCCR; - for(int cores=0; cores<1; cores++){ + HwA hwaNode = (HwA) node; + declaration += "RRScheduler* " + hwaNode.getName() + "_scheduler = new RRScheduler(\"" + hwaNode.getName() + "_RRSched\", 0, " + (tmlmapping.getTMLArchitecture().getMasterClockFrequency() * HwA.DEFAULT_SLICE_TIME) + ", " + (int) Math.ceil((float) (hwaNode.clockRatio * Math.max(hwaNode.execiTime, hwaNode.execcTime) * (HwA.DEFAULT_BRANCHING_PREDICTION_PENALTY * HwA.DEFAULT_PIPELINE_SIZE + 100 - HwA.DEFAULT_BRANCHING_PREDICTION_PENALTY)) / 100) + " ) " + SCCR; + for (int cores = 0; cores < 1; cores++) { //if (tmlmapping.isAUsedHwNode(node)) { declaration += "CPU* " + hwaNode.getName() + cores + " = new SingleCoreCPU(" + hwaNode.getID() + ", \"" + hwaNode.getName() + "_" + cores + "\", " + hwaNode.getName() + "_scheduler" + ", "; - declaration += hwaNode.clockRatio + ", " + hwaNode.execiTime + ", " + hwaNode.execcTime + ", " + HwA.DEFAULT_PIPELINE_SIZE + ", " + HwA.DEFAULT_TASK_SWITCHING_TIME + ", " + HwA.DEFAULT_BRANCHING_PREDICTION_PENALTY + ", " + HwA.DEFAULT_GO_IDLE_TIME + ", " + HwA.DEFAULT_MAX_CONSECUTIVE_IDLE_CYCLES + ", " + hwaNode.byteDataSize + ")" + SCCR; - if (cores!=0) declaration+= node.getName() + cores + "->setScheduler(" + hwaNode.getName() + "_scheduler,false)" + SCCR; - declaration += "addCPU("+ node.getName() + cores +")"+ SCCR; + declaration += hwaNode.clockRatio + ", " + hwaNode.execiTime + ", " + hwaNode.execcTime + ", " + HwA.DEFAULT_PIPELINE_SIZE + ", " + HwA.DEFAULT_TASK_SWITCHING_TIME + ", " + HwA.DEFAULT_BRANCHING_PREDICTION_PENALTY + ", " + HwA.DEFAULT_GO_IDLE_TIME + ", " + HwA.DEFAULT_MAX_CONSECUTIVE_IDLE_CYCLES + ", " + hwaNode.byteDataSize + ")" + SCCR; + if (cores != 0) + declaration += node.getName() + cores + "->setScheduler(" + hwaNode.getName() + "_scheduler,false)" + SCCR; + declaration += "addCPU(" + node.getName() + cores + ")" + SCCR; } } @@ -225,14 +226,15 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { declaration += "//Declaration of Buses" + CR; //declaration+="Bus* defaultBus = new Bus(-1,\"defaultBus\",100,1,1)" + SCCR; //declaration += "addBus(defaultBus)"+ SCCR; - for(HwNode node: tmlmapping.getTMLArchitecture().getHwNodes()) { + for (HwNode node : tmlmapping.getTMLArchitecture().getHwNodes()) { if (node instanceof HwBus) { //if (tmlmapping.isAUsedHwNode(node)) { - HwBus thisBus = (HwBus)node; - for(int i=0; i< thisBus.pipelineSize; i++){ - declaration += "Bus* " + node.getName() + "_" + i + " = new Bus("+ node.getID() + ",\"" + node.getName() + "_" + i + "\",0, 100, "+ thisBus.byteDataSize + ", " + node.clockRatio + ","; - if(thisBus.arbitration==HwBus.CAN) declaration +="true"; else declaration +="false"; - declaration += ");\naddBus("+ node.getName() + "_" + i + ")"+ SCCR; + HwBus thisBus = (HwBus) node; + for (int i = 0; i < thisBus.pipelineSize; i++) { + declaration += "Bus* " + node.getName() + "_" + i + " = new Bus(" + node.getID() + ",\"" + node.getName() + "_" + i + "\",0, 100, " + thisBus.byteDataSize + ", " + node.clockRatio + ","; + if (thisBus.arbitration == HwBus.CAN) declaration += "true"; + else declaration += "false"; + declaration += ");\naddBus(" + node.getName() + "_" + i + ")" + SCCR; } //} } @@ -241,10 +243,10 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { // Declaration of Bridges declaration += "//Declaration of Bridges" + CR; - for(HwNode node: tmlmapping.getTMLArchitecture().getHwNodes()) { + for (HwNode node : tmlmapping.getTMLArchitecture().getHwNodes()) { if (node instanceof HwBridge) { - declaration+= "Bridge* " + node.getName() + " = new Bridge("+ node.getID() + ",\"" + node.getName() + "\", " + node.clockRatio + ", " + ((HwBridge)node).bufferByteSize + ")" +SCCR; - declaration += "addBridge("+ node.getName() +")"+ SCCR; + declaration += "Bridge* " + node.getName() + " = new Bridge(" + node.getID() + ",\"" + node.getName() + "\", " + node.clockRatio + ", " + ((HwBridge) node).bufferByteSize + ")" + SCCR; + declaration += "addBridge(" + node.getName() + ")" + SCCR; } } declaration += CR; @@ -253,36 +255,37 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { //declaration += "//Declaration of Memories\nMemory* defaultMemory = new Memory(-1,\"defaultMemory\",1,4)" + SCCR; //declaration += "addMem(defaultMemory)"+ SCCR; declaration += "//Declaration of Memories" + CR; - for(HwNode node: tmlmapping.getTMLArchitecture().getHwNodes()) { + for (HwNode node : tmlmapping.getTMLArchitecture().getHwNodes()) { if (node instanceof HwMemory) { - declaration+= "Memory* " + node.getName() + " = new Memory("+ node.getID() + ",\"" + node.getName() + "\", " + node.clockRatio + ", " + ((HwMemory)node).byteDataSize + ")" +SCCR; - declaration += "addMem("+ node.getName() +")"+ SCCR; + declaration += "Memory* " + node.getName() + " = new Memory(" + node.getID() + ",\"" + node.getName() + "\", " + node.clockRatio + ", " + ((HwMemory) node).byteDataSize + ")" + SCCR; + declaration += "addMem(" + node.getName() + ")" + SCCR; } } declaration += CR; //Declaration of Bus masters declaration += "//Declaration of Bus masters" + CR; - for(HwNode node: tmlmapping.getTMLArchitecture().getHwNodes()){ - if (node instanceof HwExecutionNode || node instanceof HwBridge){ - List<HwLink> nodeLinks= tmlmapping.getTMLArchitecture().getLinkByHwNode(node); - if (!nodeLinks.isEmpty()){ + for (HwNode node : tmlmapping.getTMLArchitecture().getHwNodes()) { + if (node instanceof HwExecutionNode || node instanceof HwBridge) { + List<HwLink> nodeLinks = tmlmapping.getTMLArchitecture().getLinkByHwNode(node); + if (!nodeLinks.isEmpty()) { //declaration+= "BusMaster* " + node.getName() + "2defaultBus = new BusMaster(\"" + node.getName() + "2defaultBus\", 0, defaultBus)" + SCCR; //else{ - for(HwLink link: nodeLinks){ + for (HwLink link : nodeLinks) { //declaration+= "BusMaster* " + node.getName() + "_" + link.bus.getName() + "_Master = new BusMaster(\"" + node.getName() + "_" + link.bus.getName() + "_Master\", " + link.getPriority() + ", 1, array(1, (SchedulableCommDevice*)" + link.bus.getName() + "))" + SCCR; int noOfCores; - if (node instanceof HwCPU) noOfCores= ((HwCPU)node).nbOfCores; else noOfCores=1; + if (node instanceof HwCPU) noOfCores = ((HwCPU) node).nbOfCores; + else noOfCores = 1; //noOfCores=2; - for (int cores=0; cores<noOfCores; cores++){ - String nodeName=node.getName(); - if ((node instanceof HwCPU) || (node instanceof HwA) ) - nodeName+= cores; - declaration+= "BusMaster* " + nodeName + "_" + link.bus.getName() + "_Master = new BusMaster(\"" + nodeName + "_" + link.bus.getName() + "_Master\", " + link.getPriority() + ", " + link.bus.pipelineSize + ", array(" + link.bus.pipelineSize; - for(int i=0; i< link.bus.pipelineSize; i++) - declaration+= ", (SchedulableCommDevice*)" + link.bus.getName() + "_" + i; - declaration+= "))" + SCCR; - declaration+= nodeName + "->addBusMaster(" + nodeName + "_" + link.bus.getName() + "_Master)" + SCCR; + for (int cores = 0; cores < noOfCores; cores++) { + String nodeName = node.getName(); + if ((node instanceof HwCPU) || (node instanceof HwA)) + nodeName += cores; + declaration += "BusMaster* " + nodeName + "_" + link.bus.getName() + "_Master = new BusMaster(\"" + nodeName + "_" + link.bus.getName() + "_Master\", " + link.getPriority() + ", " + link.bus.pipelineSize + ", array(" + link.bus.pipelineSize; + for (int i = 0; i < link.bus.pipelineSize; i++) + declaration += ", (SchedulableCommDevice*)" + link.bus.getName() + "_" + i; + declaration += "))" + SCCR; + declaration += nodeName + "->addBusMaster(" + nodeName + "_" + link.bus.getName() + "_Master)" + SCCR; } } } @@ -292,121 +295,122 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { // Declaration of channels TMLChannel channel; - String tmp,param; + String tmp, param; declaration += "//Declaration of channels" + CR; - for(TMLElement elem: tmlmodeling.getChannels()){ + for (TMLElement elem : tmlmodeling.getChannels()) { if (elem instanceof TMLChannel) { - channel = (TMLChannel)elem; - switch(channel.getType()) { - case TMLChannel.BRBW: - tmp = "TMLbrbwChannel"; - param= "," + channel.getMax() + ",0"; - break; - case TMLChannel.BRNBW: - tmp = "TMLbrnbwChannel"; - param= ",0"; - break; - case TMLChannel.NBRNBW: - default: - tmp = "TMLnbrnbwChannel"; - param= ""; + channel = (TMLChannel) elem; + switch (channel.getType()) { + case TMLChannel.BRBW: + tmp = "TMLbrbwChannel"; + param = "," + channel.getMax() + ",0"; + break; + case TMLChannel.BRNBW: + tmp = "TMLbrnbwChannel"; + param = ",0"; + break; + case TMLChannel.NBRNBW: + default: + tmp = "TMLnbrnbwChannel"; + param = ""; } - declaration += tmp + "* " + channel.getExtendedName() + " = new " + tmp +"(" + channel.getID() + ",\"" + channel.getName() + "\"," + channel.getSize() + ","; + declaration += tmp + "* " + channel.getExtendedName() + " = new " + tmp + "(" + channel.getID() + ",\"" + channel.getName() + "\"," + channel.getSize() + ","; //TraceManager.addDev("Channel: " + channel.getName()); //TraceManager.addDev("Channel origin node: " + channel.getOriginTask().getName() + " dest node: " + channel.getDestinationTask().getName()); //TraceManager.addDev( "the list of mapped tasks: " + tmlmapping.getMappedTasksString()); - declaration+= determineRouting(tmlmapping.getHwNodeOf(channel.getOriginTask()), tmlmapping.getHwNodeOf(channel.getDestinationTask()), elem) + param + "," + channel.getPriority(); - if (channel.isLossy() && channel.getType()!=TMLChannel.NBRNBW) declaration += "," + channel.getLossPercentage() + "," + channel.getMaxNbOfLoss(); - declaration += ")"+ SCCR; - declaration += "addChannel("+ channel.getExtendedName() +")"+ SCCR; + declaration += determineRouting(tmlmapping.getHwNodeOf(channel.getOriginTask()), tmlmapping.getHwNodeOf(channel.getDestinationTask()), elem) + param + "," + channel.getPriority(); + if (channel.isLossy() && channel.getType() != TMLChannel.NBRNBW) + declaration += "," + channel.getLossPercentage() + "," + channel.getMaxNbOfLoss(); + declaration += ")" + SCCR; + declaration += "addChannel(" + channel.getExtendedName() + ")" + SCCR; } } declaration += CR; // Declaration of events declaration += "//Declaration of events" + CR; - for(TMLEvent evt: tmlmodeling.getEvents()) { + for (TMLEvent evt : tmlmodeling.getEvents()) { if (evt.isInfinite()) { tmp = "TMLEventBChannel<ParamType," + evt.getNbOfParams() + ">"; - param= ",0,false,false"; + param = ",0,false,false"; } else { if (evt.isBlocking()) { tmp = "TMLEventFBChannel<ParamType," + evt.getNbOfParams() + ">"; - param= "," + evt.getMaxSize() + ",0"; + param = "," + evt.getMaxSize() + ",0"; } else { tmp = "TMLEventFChannel<ParamType," + evt.getNbOfParams() + ">"; - param= "," + evt.getMaxSize() + ",0"; + param = "," + evt.getMaxSize() + ",0"; } } //param += "," + evt.getNbOfParams(); - if (tmlmapping.isCommNodeMappedOn(evt,null)){ + if (tmlmapping.isCommNodeMappedOn(evt, null)) { TraceManager.addDev("Evt: " + evt.getName()); declaration += tmp + "* " + evt.getExtendedName() + " = new " + tmp + "(" + evt.getID() + ",\"" + evt.getName() + "\"," + determineRouting(tmlmapping.getHwNodeOf(evt.getOriginTask()), tmlmapping.getHwNodeOf(evt.getDestinationTask()), evt) + param; - }else{ + } else { declaration += tmp + "* " + evt.getExtendedName() + " = new " + tmp + "(" + evt.getID() + ",\"" + evt.getName() + "\",0,0,0" + param; ///old command } if (evt.isLossy()) declaration += "," + evt.getLossPercentage() + "," + evt.getMaxNbOfLoss(); declaration += ")" + SCCR; - declaration += "addEvent("+ evt.getExtendedName() +")"+ SCCR; + declaration += "addEvent(" + evt.getExtendedName() + ")" + SCCR; } declaration += CR; // Declaration of requests declaration += "//Declaration of requests" + CR; - for(TMLTask task: tmlmodeling.getTasks()) { - if (task.isRequested()){ + for (TMLTask task : tmlmodeling.getTasks()) { + if (task.isRequested()) { TMLRequest req = task.getRequest(); - if (tmlmapping.isCommNodeMappedOn(req,null)){ + if (tmlmapping.isCommNodeMappedOn(req, null)) { //declaration += "TMLEventBChannel* reqChannel_"+ task.getName() + " = new TMLEventBChannel(" + TraceManager.addDev("Request: " + req.getName()); - declaration += "TMLEventBChannel<ParamType," + req.getNbOfParams() + ">* reqChannel_"+ task.getName() + " = new TMLEventBChannel<ParamType," + req.getNbOfParams() + ">(" + - req.getID() + ",\"reqChannel"+ task.getName() + "\"," + - determineRouting(tmlmapping.getHwNodeOf(req.getOriginTasks().get(0)), //tmlmapping.getHwNodeOf(req.getDestinationTask()), req) + ",0," + req.getNbOfParams() + ",true)" + SCCR; - tmlmapping.getHwNodeOf(req.getDestinationTask()), req) + ",0,true,false"; - }else{ - declaration += "TMLEventBChannel<ParamType," + req.getNbOfParams() + ">* reqChannel_"+ task.getName() + " = new TMLEventBChannel<ParamType," + req.getNbOfParams() + ">(" + //req.getID() + ",\"reqChannel"+ task.getName() + "\",0,0,0,0," + req.getNbOfParams() + ",true)" + SCCR; - req.getID() + ",\"reqChannel"+ task.getName() + "\",0,0,0,0,true,false"; + declaration += "TMLEventBChannel<ParamType," + req.getNbOfParams() + ">* reqChannel_" + task.getName() + " = new TMLEventBChannel<ParamType," + req.getNbOfParams() + ">(" + + req.getID() + ",\"reqChannel" + task.getName() + "\"," + + determineRouting(tmlmapping.getHwNodeOf(req.getOriginTasks().get(0)), //tmlmapping.getHwNodeOf(req.getDestinationTask()), req) + ",0," + req.getNbOfParams() + ",true)" + SCCR; + tmlmapping.getHwNodeOf(req.getDestinationTask()), req) + ",0,true,false"; + } else { + declaration += "TMLEventBChannel<ParamType," + req.getNbOfParams() + ">* reqChannel_" + task.getName() + " = new TMLEventBChannel<ParamType," + req.getNbOfParams() + ">(" + //req.getID() + ",\"reqChannel"+ task.getName() + "\",0,0,0,0," + req.getNbOfParams() + ",true)" + SCCR; + req.getID() + ",\"reqChannel" + task.getName() + "\",0,0,0,0,true,false"; } if (req.isLossy()) declaration += "," + req.getLossPercentage() + "," + req.getMaxNbOfLoss(); declaration += ")" + SCCR; - declaration += "addRequest(reqChannel_"+ task.getName() +")"+ SCCR; + declaration += "addRequest(reqChannel_" + task.getName() + ")" + SCCR; } } declaration += CR; ///Set bus schedulers declaration += "//Set bus schedulers" + CR; - for(HwNode node: tmlmapping.getTMLArchitecture().getHwNodes()) { + for (HwNode node : tmlmapping.getTMLArchitecture().getHwNodes()) { if (node instanceof HwBus) { - List<HwLink> busLinks= tmlmapping.getTMLArchitecture().getLinkByBus((HwBus)node); - String devices=""; - int numDevices=0; - if (!busLinks.isEmpty()){ - for(HwLink link: busLinks){ - if (link.hwnode instanceof HwExecutionNode || link.hwnode instanceof HwBridge){ - if ((link.hwnode instanceof HwCPU) || (link.hwnode instanceof HwA)){ - for (int cores=0; cores< ((HwCPU)link.hwnode).nbOfCores; cores++){ - //for (int cores=0; cores< 1; cores++){ - devices += ", (WorkloadSource*)" + link.hwnode.getName()+ cores + "_" + node.getName() + "_Master"; + List<HwLink> busLinks = tmlmapping.getTMLArchitecture().getLinkByBus((HwBus) node); + String devices = ""; + int numDevices = 0; + if (!busLinks.isEmpty()) { + for (HwLink link : busLinks) { + if (link.hwnode instanceof HwExecutionNode || link.hwnode instanceof HwBridge) { + if ((link.hwnode instanceof HwCPU) || (link.hwnode instanceof HwA)) { + for (int cores = 0; cores < ((HwCPU) link.hwnode).nbOfCores; cores++) { + //for (int cores=0; cores< 1; cores++){ + devices += ", (WorkloadSource*)" + link.hwnode.getName() + cores + "_" + node.getName() + "_Master"; numDevices++; } - }else{ - devices += ", (WorkloadSource*)" + link.hwnode.getName()+ "_" + node.getName() + "_Master"; + } else { + devices += ", (WorkloadSource*)" + link.hwnode.getName() + "_" + node.getName() + "_Master"; numDevices++; } } } declaration += node.getName() + "_0->setScheduler((WorkloadSource*) new "; - if (((HwBus)node).arbitration==HwBus.BASIC_ROUND_ROBIN) + if (((HwBus) node).arbitration == HwBus.BASIC_ROUND_ROBIN) //declaration+="RRScheduler(\"" + node.getName() + "_RRSched\", 0, 5, " + (int) Math.ceil(((float)node.clockRatio)/((float)((HwBus)node).byteDataSize)) + ", array("; - declaration+="RRScheduler(\"" + node.getName() + "_RRSched\", 0, 5, " + (int) Math.ceil(((float)node.clockRatio)/((float)((HwBus)node).byteDataSize)) + ", array("; + declaration += "RRScheduler(\"" + node.getName() + "_RRSched\", 0, 5, " + (int) Math.ceil(((float) node.clockRatio) / ((float) ((HwBus) node).byteDataSize)) + ", array("; else - declaration+="PrioScheduler(\"" + node.getName() + "_PrioSched\", 0, array("; - declaration+= numDevices + devices + "), " + numDevices + "))" + SCCR; + declaration += "PrioScheduler(\"" + node.getName() + "_PrioSched\", 0, array("; + declaration += numDevices + devices + "), " + numDevices + "))" + SCCR; } - for(int i=1; i< ((HwBus)node).pipelineSize; i++) - declaration+=node.getName() + "_" + i + "->setScheduler(" + node.getName() + "_0->getScheduler(),false)" +SCCR; + for (int i = 1; i < ((HwBus) node).pipelineSize; i++) + declaration += node.getName() + "_" + i + "->setScheduler(" + node.getName() + "_0->getScheduler(),false)" + SCCR; } } declaration += CR; @@ -422,28 +426,28 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { ArrayList<TMLRequest> requests; int[] aStatistics = new int[8]; Set<Integer> mappedChannels = new HashSet<Integer>(); - for(TMLTask task: tmlmapping.getMappedTasks()){ - node= iterator.next(); - // int noOfCores; - declaration += task.getName() + "* task__" + task.getName() + " = new " + task.getName() + "("+ task.getID() +","+ task.getPriority() + ",\"" + task.getName() + "\", array("; + for (TMLTask task : tmlmapping.getMappedTasks()) { + node = iterator.next(); + // int noOfCores; + declaration += task.getName() + "* task__" + task.getName() + " = new " + task.getName() + "(" + task.getID() + "," + task.getPriority() + ",\"" + task.getName() + "\", array("; - if (node instanceof HwCPU){ - declaration+= ((HwCPU)node).nbOfCores; + if (node instanceof HwCPU) { + declaration += ((HwCPU) node).nbOfCores; //declaration+= 1; - for (int cores=0; cores< ((HwCPU)node).nbOfCores; cores++){ - //for (int cores=0; cores< 1; cores++){ - declaration+= "," + node.getName()+cores; + for (int cores = 0; cores < ((HwCPU) node).nbOfCores; cores++) { + //for (int cores=0; cores< 1; cores++){ + declaration += "," + node.getName() + cores; } //declaration+= ")," + ((HwCPU)node).nbOfCores + CR; - declaration+= "),1" + CR; - }else if (node instanceof HwA){ - declaration+= ((HwCPU)node).nbOfCores; + declaration += "),1" + CR; + } else if (node instanceof HwA) { + declaration += ((HwCPU) node).nbOfCores; //declaration+= 1; - for (int cores=0; cores< ((HwCPU)node).nbOfCores; cores++){ - //for (int cores=0; cores< 1; cores++){ - declaration+= "," + node.getName()+cores; + for (int cores = 0; cores < ((HwCPU) node).nbOfCores; cores++) { + //for (int cores=0; cores< 1; cores++){ + declaration += "," + node.getName() + cores; } - declaration+= ")," + ((HwCPU)node).nbOfCores + CR; + declaration += ")," + ((HwCPU) node).nbOfCores + CR; //declaration+= "),1" + CR; } else { declaration += "1," + node.getName() + "),1" + CR; @@ -459,21 +463,21 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { //mst.generateSystemC(debug, optimize, dependencies); //mst.generateSystemC(debug, optimize); tasks.add(mst); - for(TMLChannel channelb: channels) - declaration += "," + channelb.getExtendedName()+CR; + for (TMLChannel channelb : channels) + declaration += "," + channelb.getExtendedName() + CR; - for(TMLEvent evt: events) - declaration += "," + evt.getExtendedName()+CR; + for (TMLEvent evt : events) + declaration += "," + evt.getExtendedName() + CR; - for(TMLRequest req: requests) - if (req.isAnOriginTask(task)) declaration+=",reqChannel_" + req.getDestinationTask().getName()+CR; + for (TMLRequest req : requests) + if (req.isAnOriginTask(task)) declaration += ",reqChannel_" + req.getDestinationTask().getName() + CR; - if (task.isRequested()) declaration += ",reqChannel_"+task.getName()+CR; + if (task.isRequested()) declaration += ",reqChannel_" + task.getName() + CR; declaration += ")" + SCCR; - declaration += "addTask(task__"+ task.getName() +")"+ SCCR; + declaration += "addTask(task__" + task.getName() + ")" + SCCR; } //int[] aStatistics = new int[8]; - + declaration += "}\n\n"; //Declaration of TEPEs @@ -483,7 +487,7 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { declaration += tepeTranslator.getCode(); //Generation of tasks - for(MappedSystemCTask task: tasks){ + for (MappedSystemCTask task : tasks) { task.determineCheckpoints(aStatistics); task.generateSystemC(debug, optimize); } @@ -491,12 +495,13 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { //Declaration of TEPEs continued declaration += CR; declaration += "}\n};\n\n" + tepeTranslator.getEqFuncs(); - declaration +="#include <main.h>\n"; + declaration += "#include <main.h>\n"; - if (aStatistics[0]!=0) TraceManager.addDev("Global gain variables " + 100 * aStatistics[1] / aStatistics[0]); - if (aStatistics[2]!=0) TraceManager.addDev("Global gain Channels " + 100 * aStatistics[3] / aStatistics[2]); - if (aStatistics[4]!=0) TraceManager.addDev("Global gain events " + 100 * aStatistics[5] / aStatistics[4]); - if (aStatistics[6]!=0) TraceManager.addDev("Global gain checkpoints " + 100 * aStatistics[7] / aStatistics[6]); + if (aStatistics[0] != 0) TraceManager.addDev("Global gain variables " + 100 * aStatistics[1] / aStatistics[0]); + if (aStatistics[2] != 0) TraceManager.addDev("Global gain Channels " + 100 * aStatistics[3] / aStatistics[2]); + if (aStatistics[4] != 0) TraceManager.addDev("Global gain events " + 100 * aStatistics[5] / aStatistics[4]); + if (aStatistics[6] != 0) + TraceManager.addDev("Global gain checkpoints " + 100 * aStatistics[7] / aStatistics[6]); //Declaration of EBRDDs /*declaration += "//Declaration of EBRDDs" + CR; @@ -507,103 +512,101 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { } - private int extractPath(LinkedList<HwCommunicationNode> path, StrWrap masters, StrWrap slaves, HwNode startNode, HwNode destNode, boolean reverseIn){ - String firstPart=""; //lastBus=""; - int masterCount=0; - boolean reverse=reverseIn; + private int extractPath(LinkedList<HwCommunicationNode> path, StrWrap masters, StrWrap slaves, HwNode startNode, HwNode destNode, boolean reverseIn) { + String firstPart = ""; //lastBus=""; + int masterCount = 0; + boolean reverse = reverseIn; if (reverseIn) - slaves.str+=",static_cast<Slave*>(0)"; + slaves.str += ",static_cast<Slave*>(0)"; else - firstPart=startNode.getName() + "0"; + firstPart = startNode.getName() + "0"; /*TraceManager.addDev("------------------------------------------------------"); for(HwCommunicationNode commElem:path){ TraceManager.addDev("CommELem to process: " + commElem.getName()); } TraceManager.addDev("------------------------------------------------------");*/ - for(HwCommunicationNode commElem:path){ + for (HwCommunicationNode commElem : path) { //TraceManager.addDev("CommELem to process: " + commElem.getName()); //String commElemName = commElem.getName(); //if (commElem instanceof HwCPU) commElemName += "0"; //TraceManager.addDev("Next elem in path: " + commElem.getName()); - if (commElem instanceof HwMemory){ - reverse=true; - slaves.str+= ",static_cast<Slave*>(" + commElem.getName() + "),static_cast<Slave*>(" + commElem.getName() + ")"; + if (commElem instanceof HwMemory) { + reverse = true; + slaves.str += ",static_cast<Slave*>(" + commElem.getName() + "),static_cast<Slave*>(" + commElem.getName() + ")"; //firstPart=lastBus; - firstPart=""; - }else{ - if (reverse){ - if (firstPart.length()==0){ - firstPart=commElem.getName(); + firstPart = ""; + } else { + if (reverse) { + if (firstPart.length() == 0) { + firstPart = commElem.getName(); //firstPart=commElemName; - }else{ - masters.str+= "," + commElem.getName() + "_" + firstPart + "_Master"; + } else { + masters.str += "," + commElem.getName() + "_" + firstPart + "_Master"; //masters.str+= "," + commElemName + "_" + firstPart + "_Master"; masterCount++; - slaves.str+= ",static_cast<Slave*>(" + commElem.getName() + ")"; - firstPart=""; + slaves.str += ",static_cast<Slave*>(" + commElem.getName() + ")"; + firstPart = ""; } - }else{ - if (firstPart.length()==0){ - firstPart=commElem.getName(); - slaves.str+= ",static_cast<Slave*>(" + firstPart + ")"; - }else{ + } else { + if (firstPart.length() == 0) { + firstPart = commElem.getName(); + slaves.str += ",static_cast<Slave*>(" + firstPart + ")"; + } else { //lastBus=commElem.getName(); - masters.str+= "," + firstPart + "_" + commElem.getName() + "_Master"; + masters.str += "," + firstPart + "_" + commElem.getName() + "_Master"; masterCount++; - firstPart=""; + firstPart = ""; } } } } - if (reverse){ + if (reverse) { //masters.str+= "," + destNode.getName() + "_" + firstPart + "_Master"; - masters.str+= "," + destNode.getName() + "0_" + firstPart + "_Master"; - return masterCount+1; - }else{ - slaves.str+=",static_cast<Slave*>(0)"; + masters.str += "," + destNode.getName() + "0_" + firstPart + "_Master"; + return masterCount + 1; + } else { + slaves.str += ",static_cast<Slave*>(0)"; return -masterCount; } } - private String determineRouting( HwNode startNode, HwNode destNode, TMLElement commElemToRoute ){ + private String determineRouting(HwNode startNode, HwNode destNode, TMLElement commElemToRoute) { //TraceManager.addDev( "Determine routing from " + startNode.getName() + " to " + destNode.getName() ); - StrWrap masters=new StrWrap(), slaves=new StrWrap(); + StrWrap masters = new StrWrap(), slaves = new StrWrap(); LinkedList<HwCommunicationNode> path = new LinkedList<HwCommunicationNode>(); LinkedList<HwCommunicationNode> commNodes = new LinkedList<HwCommunicationNode>(); - for( HwNode node: tmlmapping.getTMLArchitecture().getHwNodes() ) { - if( node instanceof HwCommunicationNode ) { + for (HwNode node : tmlmapping.getTMLArchitecture().getHwNodes()) { + if (node instanceof HwCommunicationNode) { commNodes.add((HwCommunicationNode) node); //TraceManager.addDev( "Inserted: " + ((HwCommunicationNode)node).getName() ); } } - if( startNode == null ) { - TraceManager.addDev( "NULL REFERENCE" ); - } - else { + if (startNode == null) { + TraceManager.addDev("NULL REFERENCE"); + } else { //TraceManager.addDev( "startNode: " + startNode.getName() ); } - HwMemory memory = getMemConnectedToBusChannelMapped( commNodes, null, commElemToRoute ); - if( memory == null ) { - TraceManager.addDev( "no memories to map" ); - exploreBuses( 0, commNodes, path, startNode, destNode, commElemToRoute ); - } - else { + HwMemory memory = getMemConnectedToBusChannelMapped(commNodes, null, commElemToRoute); + if (memory == null) { + TraceManager.addDev("no memories to map"); + exploreBuses(0, commNodes, path, startNode, destNode, commElemToRoute); + } else { LinkedList<HwCommunicationNode> commNodes2 = new LinkedList<HwCommunicationNode>(commNodes); //exploreBuses(0, commNodes, path, startNode, memory, commElemToRoute); - if( !exploreBuses( 0, commNodes, path, startNode, memory, commElemToRoute ) ) { + if (!exploreBuses(0, commNodes, path, startNode, memory, commElemToRoute)) { TraceManager.addDev("NO route to " + memory.getName() + "found!!!!!!!!!!!!!!!!!!!!!!!!!!"); } - path.add( memory ); - exploreBuses( 0, commNodes2, path, memory, destNode, commElemToRoute ); + path.add(memory); + exploreBuses(0, commNodes2, path, memory, destNode, commElemToRoute); } int hopNum; - if ( (hopNum=extractPath(path, masters, slaves, startNode, destNode, false))<0){ - hopNum=extractPath(path, masters, slaves, destNode, destNode, true)-hopNum; + if ((hopNum = extractPath(path, masters, slaves, startNode, destNode, false)) < 0) { + hopNum = extractPath(path, masters, slaves, destNode, destNode, true) - hopNum; } TraceManager.addDev(commElemToRoute.getName() + " is mapped on:"); - for(HwCommunicationNode commElem:path){ + for (HwCommunicationNode commElem : path) { TraceManager.addDev(commElem.getName()); } TraceManager.addDev("number of elements: " + hopNum); @@ -612,27 +615,27 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { return hopNum + ",array(" + hopNum + masters.str + "),array(" + hopNum + slaves.str + ")"; } - private boolean exploreBuses(int depth, LinkedList<HwCommunicationNode> commNodes, LinkedList<HwCommunicationNode> path, HwNode startNode, HwNode destNode, TMLElement commElemToRoute){ + private boolean exploreBuses(int depth, LinkedList<HwCommunicationNode> commNodes, LinkedList<HwCommunicationNode> path, HwNode startNode, HwNode destNode, TMLElement commElemToRoute) { //first called with Maping:getCommunicationNodes LinkedList<HwCommunicationNode> nodesToExplore; TraceManager.addDev("No of comm nodes " + commNodes.size()); TraceManager.addDev("startNode=" + startNode); boolean busExploreMode = ((depth & 1) == 0); //if (depth % 2 == 0){ - if(busExploreMode){ + if (busExploreMode) { TraceManager.addDev("search for buses connected to " + startNode.getName()); - nodesToExplore=getBusesConnectedToNode(commNodes, startNode); - }else{ + nodesToExplore = getBusesConnectedToNode(commNodes, startNode); + } else { TraceManager.addDev("search for bridges connected to: " + startNode.getName()); - nodesToExplore=getBridgesConnectedToBus(commNodes, (HwBus)startNode); + nodesToExplore = getBridgesConnectedToBus(commNodes, (HwBus) startNode); } //HwMemory memory = null; TraceManager.addDev("no of elements found: " + nodesToExplore.size()); - for(HwCommunicationNode currNode:nodesToExplore){ + for (HwCommunicationNode currNode : nodesToExplore) { //memory = null; - if (busExploreMode){ + if (busExploreMode) { //memory = getMemConnectedToBusChannelMapped(commNodes, (HwBus)currNode, commElemToRoute); - if(isBusConnectedToNode(currNode, destNode)){ + if (isBusConnectedToNode(currNode, destNode)) { TraceManager.addDev(currNode.getName() + " is last node"); path.add(currNode); //if (memory!=null) path.add(memory); @@ -640,25 +643,25 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { return true; } } - if(tmlmapping.isCommNodeMappedOn(commElemToRoute, currNode)){ + if (tmlmapping.isCommNodeMappedOn(commElemToRoute, currNode)) { TraceManager.addDev(currNode.getName() + " mapping found for " + commElemToRoute.getName()); path.add(currNode); //if (memory!=null) path.add(memory); commNodes.remove(currNode); - if (exploreBuses(depth+1, commNodes, path, currNode, destNode, commElemToRoute)) return true; + if (exploreBuses(depth + 1, commNodes, path, currNode, destNode, commElemToRoute)) return true; path.remove(currNode); //if (memory!=null) path.remove(memory); commNodes.add(currNode); } } - for(HwCommunicationNode currNode:nodesToExplore){ + for (HwCommunicationNode currNode : nodesToExplore) { //if (busExploreMode) memory = getMemConnectedToBusChannelMapped(commNodes, (HwBus)currNode, commElemToRoute); else memory=null; path.add(currNode); //if (memory!=null) path.add(memory); commNodes.remove(currNode); //for (int i=0; i<path.size(); i++) System.out.print(" "); TraceManager.addDev(currNode.getName()); - if (exploreBuses(depth+1, commNodes, path, currNode, destNode, commElemToRoute)) return true; + if (exploreBuses(depth + 1, commNodes, path, currNode, destNode, commElemToRoute)) return true; path.remove(currNode); //if (memory!=null) path.remove(memory); commNodes.add(currNode); @@ -666,43 +669,45 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { return false; } - private HwMemory getMemConnectedToBusChannelMapped( LinkedList<HwCommunicationNode> _commNodes, HwBus _bus, TMLElement _channel ) { - for( HwCommunicationNode commNode: _commNodes ) { - if( commNode instanceof HwMemory ) { - if( _bus != null ) TraceManager.addDev(commNode.getName() + " connected to bus " + _bus.getName() + ": " + tmlmapping.getTMLArchitecture().isNodeConnectedToBus(commNode, _bus)); - TraceManager.addDev(_channel.getName() + " is mapped onto " + commNode.getName() + ": " + tmlmapping.isCommNodeMappedOn(_channel,commNode)); - if( ( _bus == null || tmlmapping.getTMLArchitecture().isNodeConnectedToBus( commNode, _bus ) ) - && tmlmapping.isCommNodeMappedOn( _channel, commNode ) ) { - return (HwMemory)commNode; + private HwMemory getMemConnectedToBusChannelMapped(LinkedList<HwCommunicationNode> _commNodes, HwBus _bus, TMLElement _channel) { + for (HwCommunicationNode commNode : _commNodes) { + if (commNode instanceof HwMemory) { + if (_bus != null) + TraceManager.addDev(commNode.getName() + " connected to bus " + _bus.getName() + ": " + tmlmapping.getTMLArchitecture().isNodeConnectedToBus(commNode, _bus)); + TraceManager.addDev(_channel.getName() + " is mapped onto " + commNode.getName() + ": " + tmlmapping.isCommNodeMappedOn(_channel, commNode)); + if ((_bus == null || tmlmapping.getTMLArchitecture().isNodeConnectedToBus(commNode, _bus)) + && tmlmapping.isCommNodeMappedOn(_channel, commNode)) { + return (HwMemory) commNode; } } } return null; } - private LinkedList<HwCommunicationNode> getBusesConnectedToNode(LinkedList<HwCommunicationNode> _commNodes, HwNode _node){ + private LinkedList<HwCommunicationNode> getBusesConnectedToNode(LinkedList<HwCommunicationNode> _commNodes, HwNode _node) { LinkedList<HwCommunicationNode> resultList = new LinkedList<HwCommunicationNode>(); - for(HwCommunicationNode commNode: _commNodes){ - if (commNode instanceof HwBus){ - if (tmlmapping.getTMLArchitecture().isNodeConnectedToBus(_node, (HwBus)commNode)) resultList.add(commNode); + for (HwCommunicationNode commNode : _commNodes) { + if (commNode instanceof HwBus) { + if (tmlmapping.getTMLArchitecture().isNodeConnectedToBus(_node, (HwBus) commNode)) + resultList.add(commNode); } } return resultList; } - private LinkedList<HwCommunicationNode> getBridgesConnectedToBus(LinkedList<HwCommunicationNode> _commNodes, HwBus _bus){ + private LinkedList<HwCommunicationNode> getBridgesConnectedToBus(LinkedList<HwCommunicationNode> _commNodes, HwBus _bus) { LinkedList<HwCommunicationNode> resultList = new LinkedList<HwCommunicationNode>(); - for(HwCommunicationNode commNode: _commNodes){ - if (commNode instanceof HwBridge){ + for (HwCommunicationNode commNode : _commNodes) { + if (commNode instanceof HwBridge) { if (tmlmapping.getTMLArchitecture().isNodeConnectedToBus(commNode, _bus)) resultList.add(commNode); } } return resultList; } - private boolean isBusConnectedToNode(HwCommunicationNode commNode, HwNode node){ - for(HwLink link: tmlmapping.getTMLArchitecture().getHwLinks()) { - if(link.bus==commNode && link.hwnode==node) return true; + private boolean isBusConnectedToNode(HwCommunicationNode commNode, HwNode node) { + for (HwLink link : tmlmapping.getTMLArchitecture().getHwLinks()) { + if (link.bus == commNode && link.hwnode == node) return true; } return false; } @@ -725,7 +730,7 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { }*/ private void generateTaskFiles(String path) throws FileException { - for(MappedSystemCTask mst: tasks) { + for (MappedSystemCTask mst : tasks) { mst.saveInFiles(path); } //for(SystemCEBRDD ebrdd: systemCebrdds) { @@ -734,8 +739,8 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { } - public MappedSystemCTask getMappedTaskByName(String iName){ - for(MappedSystemCTask task: tasks){ + public MappedSystemCTask getMappedTaskByName(String iName) { + for (MappedSystemCTask task : tasks) { if (task.getTMLTask().getName().equals(iName)) return task; } return null; diff --git a/src/main/java/ui/ErrorHighlight.java b/src/main/java/ui/ErrorHighlight.java index 6ed3651017878975316c9ab970f7fbdded26a4d5..69b4ddd655f5c45d0ebaedc6482fff056d59c431 100755 --- a/src/main/java/ui/ErrorHighlight.java +++ b/src/main/java/ui/ErrorHighlight.java @@ -37,8 +37,6 @@ */ - - package ui; @@ -49,7 +47,7 @@ package ui; * @author Ludovic APVRILLE */ public class ErrorHighlight extends Exception { - public static final int UNCHECKED = 0; + //public static final int UNCHECKED = 0; public static final int OK = 1; public static final int UNKNOWN = 2; diff --git a/src/main/java/ui/GTURTLEModeling.java b/src/main/java/ui/GTURTLEModeling.java index 4315ca9bab513ae70ac31fe19c363af242cd9fb8..923ef4279402d302b786a3ef07ab4cbfedbd3a1b 100755 --- a/src/main/java/ui/GTURTLEModeling.java +++ b/src/main/java/ui/GTURTLEModeling.java @@ -38,7 +38,6 @@ package ui; -import ui.tree.*; import avatartranslator.*; import avatartranslator.toproverif.AVATAR2ProVerif; import avatartranslator.totpn.AVATAR2TPN; @@ -86,7 +85,6 @@ import translator.touppaal.RelationTIFUPPAAL; import translator.touppaal.TURTLE2UPPAAL; import ui.ad.TActivityDiagramPanel; import ui.atd.AttackTreeDiagramPanel; -import ui.ftd.FaultTreeDiagramPanel; import ui.avatarad.AvatarADPanel; import ui.avatarbd.*; import ui.avatarcd.AvatarCDPanel; @@ -104,7 +102,9 @@ import ui.dd.TDDNode; import ui.dd.TDeploymentDiagramPanel; import ui.diplodocusmethodology.DiplodocusMethodologyDiagramPanel; import ui.ebrdd.EBRDDPanel; +import ui.ftd.FaultTreeDiagramPanel; import ui.graph.RG; +import ui.het.CAMSBlockDiagramPanel; import ui.iod.InteractionOverviewDiagramPanel; import ui.ncdd.NCDiagramPanel; import ui.osad.TURTLEOSActivityDiagramPanel; @@ -123,11 +123,7 @@ import ui.tmlcompd.*; import ui.tmlcp.TMLCPPanel; import ui.tmldd.*; import ui.tmlsd.TMLSDPanel; -import ui.het.*; -import ui.tree.GraphTree; -import ui.tree.InvariantDataTree; -import ui.tree.SearchTree; -import ui.tree.SyntaxAnalysisTree; +import ui.tree.*; import ui.ucd.UseCaseDiagramPanel; import ui.util.DefaultText; import ui.util.IconManager; @@ -135,6 +131,7 @@ import ui.window.JFrameSimulationTrace; import uppaaldesc.UPPAALSpec; import javax.swing.*; +import javax.swing.tree.TreePath; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -142,7 +139,6 @@ import java.awt.*; import java.io.*; import java.util.*; import java.util.List; -import javax.swing.tree.*; // AVATAR // AVATAR @@ -154,6 +150,7 @@ import javax.swing.tree.*; * Class GTURTLEModeling * Creation: 09/12/2003 * Version: 1.1 02/06/2014 + * * @author Ludovic APVRILLE */ public class GTURTLEModeling { @@ -253,8 +250,7 @@ public class GTURTLEModeling { private boolean undoRunning = false; - - boolean hasCrypto=false; + boolean hasCrypto = false; //private Charset chset1, chset2; public GTURTLEModeling(MainGUI _mgui, Vector<TURTLEPanel> _panels) { @@ -292,7 +288,7 @@ public class GTURTLEModeling { } public boolean isRegularTM() { - if (tm == null ){ + if (tm == null) { return false; } return tm.isARegularTIFSpec(); @@ -318,7 +314,6 @@ public class GTURTLEModeling { } - public void addInvariant(Invariant _inv) { invariants.add(_inv); TraceManager.addDev("Adding invariant: " + _inv.toString()); @@ -329,7 +324,6 @@ public class GTURTLEModeling { } - public String saveTIF() { if (tm == null) { TraceManager.addDev("NO TIF to save"); @@ -339,7 +333,7 @@ public class GTURTLEModeling { TIFExchange tif = new TIFExchange(); tif.setTURTLEModeling(tm); String ret = tif.saveInXMLTIF(); - TraceManager.addDev("TIF=\n" + ret); + TraceManager.addDev("TIF=\n" + ret); return ret; } @@ -393,7 +387,7 @@ public class GTURTLEModeling { TURTLETranslator tt = new TURTLETranslator(tm); rtlotos = tt.generateRTLOTOS(); warnings = tt.getWarnings(); - nbRTLOTOS ++; + nbRTLOTOS++; if (f != null) { saveInFile(f, rtlotos); } @@ -420,8 +414,7 @@ public class GTURTLEModeling { TraceManager.addDev("Lotos generated"); - - nbRTLOTOS ++; + nbRTLOTOS++; if (f != null) { saveInFile(f, rtlotos); } @@ -459,7 +452,7 @@ public class GTURTLEModeling { } } - public boolean generateCCode( String directory ) { + public boolean generateCCode(String directory) { //CheckingError ce; //int type; @@ -467,65 +460,62 @@ public class GTURTLEModeling { String applicationName; TMLModelCompiler CCode; - if( tmap == null ) { - JOptionPane.showMessageDialog( mgui.frame, "C code is only generated from an architecture diagram with mapping information", "Control code generation failed", JOptionPane.INFORMATION_MESSAGE ); + if (tmap == null) { + JOptionPane.showMessageDialog(mgui.frame, "C code is only generated from an architecture diagram with mapping information", "Control code generation failed", JOptionPane.INFORMATION_MESSAGE); return true; } // Get the file from DiplodocusPECPragma //List<TGComponent> components = mgui.getCurrentArchiPanel().tmlap.getComponentList(); // Parse the PEC file and the library of code snippets for each DIPLODOCUS unit applicationName = tmap.getMappedTasks().get(0).getName().split("__")[0]; // Remember that it works only for one application - CCode = new TMLModelCompiler( directory, applicationName, mgui.frame, mgui.getAllTMLCP(), tmap ); - + CCode = new TMLModelCompiler(directory, applicationName, mgui.frame, mgui.getAllTMLCP(), tmap); + // Issue #98: Use the passed directory File dir = new File(directory /*ConfigurationTTool.CCodeDirectory*/ + File.separator); - - if ( !dir.exists() ) { - dir.mkdirs(); + + if (!dir.exists()) { + dir.mkdirs(); } - + CCode.toTextFormat(); - + try { - if( directory.equals("") ) { + if (directory.equals("")) { - JOptionPane.showMessageDialog( mgui.frame, - "No directory for C code generation found in config.xml. The C code cannot be generated.", - "Control code generation failed", JOptionPane.INFORMATION_MESSAGE ); + JOptionPane.showMessageDialog(mgui.frame, + "No directory for C code generation found in config.xml. The C code cannot be generated.", + "Control code generation failed", JOptionPane.INFORMATION_MESSAGE); return true; + } else { + SpecConfigTTool.checkAndCreateCCodeDir(directory); + CCode.saveFile(directory + File.separator, applicationName); } - else { - SpecConfigTTool.checkAndCreateCCodeDir(directory); - CCode.saveFile( directory + File.separator, applicationName ); - } - } - catch( Exception e ) { - JOptionPane.showMessageDialog( mgui.frame, "The application C files could not be saved: " + e.getMessage(), "Control code generation failed", JOptionPane.INFORMATION_MESSAGE ); + } catch (Exception e) { + JOptionPane.showMessageDialog(mgui.frame, "The application C files could not be saved: " + e.getMessage(), "Control code generation failed", JOptionPane.INFORMATION_MESSAGE); return true; } return false; } - public boolean generateTMLTxt( String _title ) { - + public boolean generateTMLTxt(String _title) { + //This branch is activated if doing the syntax check from the architecture panel. //It generates the text TML for the architecture and the application + mapping information if (tmap != null) { - TMLMappingTextSpecification<TGComponent> spec = new TMLMappingTextSpecification<>( _title ); - spec.toTextFormat( tmap ); //TMLMapping + TMLMappingTextSpecification<TGComponent> spec = new TMLMappingTextSpecification<>(_title); + spec.toTextFormat(tmap); //TMLMapping try { //TraceManager.addDev( "*** " + ConfigurationTTool.TMLCodeDirectory + File.separator ); - spec.saveFile( SpecConfigTTool.TMLCodeDirectory, "spec" ); - } - catch( Exception e ) { - TraceManager.addError( "Files could not be saved: " + e.getMessage() ); + spec.saveFile(SpecConfigTTool.TMLCodeDirectory, "spec"); + } catch (Exception e) { + TraceManager.addError("Files could not be saved: " + e.getMessage()); return false; } } - if( tmlcp != null ) { //Use the data structure filled by translateToTML... and pass it to the appropriate toTextFormat() - TraceManager.addError( "About to generate the TMLText for CPs" ); - TMLCPTextSpecification specCP = new TMLCPTextSpecification( _title ); + if (tmlcp != null) { //Use the data structure filled by translateToTML... and pass it to the appropriate toTextFormat() + TraceManager.addError("About to generate the TMLText for CPs"); + TMLCPTextSpecification specCP = new TMLCPTextSpecification(_title); //get the architecture panel and the nodes TMLArchiDiagramPanel tmlap = mgui.getTMLArchiDiagramPanels().get(0).tmlap; @@ -533,49 +523,47 @@ public class GTURTLEModeling { Iterator<TGComponent> iterator = components.listIterator(); TGComponent tgc; - while(iterator.hasNext()) { + while (iterator.hasNext()) { tgc = iterator.next(); if (tgc instanceof TMLArchiCPNode) { TMLArchiCPNode node = (TMLArchiCPNode) tgc; - TraceManager.addDev( "Found CP node: " + node.getName() ); - TraceManager.addDev( "with mapping info: " + node.getMappedUnits() ); + TraceManager.addDev("Found CP node: " + node.getName()); + TraceManager.addDev("with mapping info: " + node.getMappedUnits()); } } List<TMLCommunicationPatternPanel> tmlcpPanelsList = new ArrayList<TMLCommunicationPatternPanel>(); //get the TMLCommunicationPatternPanels :) - for( int i = 0; i < mgui.tabs.size(); i++ ) { + for (int i = 0; i < mgui.tabs.size(); i++) { TURTLEPanel panel = mgui.tabs.get(i); - if( panel instanceof TMLCommunicationPatternPanel ) { - tmlcpPanelsList.add( (TMLCommunicationPatternPanel) panel ); - TraceManager.addDev( "Found TMLCommunicationPatternPanel: " + panel.toString() ); + if (panel instanceof TMLCommunicationPatternPanel) { + tmlcpPanelsList.add((TMLCommunicationPatternPanel) panel); + TraceManager.addDev("Found TMLCommunicationPatternPanel: " + panel.toString()); } } - specCP.toTextFormat( tmlcp ); // the data structure tmlcp is filled with the info concerning the CP panel + specCP.toTextFormat(tmlcp); // the data structure tmlcp is filled with the info concerning the CP panel // from which the button is pressed. If there are multiple CP panels this operation must be repeated for each panel. It // should be no difficult to implement. try { - specCP.saveFile( SpecConfigTTool.TMLCodeDirectory, "spec.tmlcp" ); - } - catch( Exception e ) { - TraceManager.addError( "Writing TMLText for CPs, file could not be saved: " + e.getMessage() ); + specCP.saveFile(SpecConfigTTool.TMLCodeDirectory, "spec.tmlcp"); + } catch (Exception e) { + TraceManager.addError("Writing TMLText for CPs, file could not be saved: " + e.getMessage()); return false; } } else if (tmap == null) { //This branch is activated if doing the syntax check from the application panel. //It only generates the application TML text - if( tmap == null ) { - TMLTextSpecification<TGComponent> spec = new TMLTextSpecification<>( _title ); - spec.toTextFormat( tmlm ); //TMLModeling + if (tmap == null) { + TMLTextSpecification<TGComponent> spec = new TMLTextSpecification<>(_title); + spec.toTextFormat(tmlm); //TMLModeling try { - spec.saveFile( SpecConfigTTool.TMLCodeDirectory, "spec.tml" ); - } - catch( Exception e ) { - TraceManager.addError( "File could not be saved: " + e.getMessage() ); + spec.saveFile(SpecConfigTTool.TMLCodeDirectory, "spec.tml"); + } catch (Exception e) { + TraceManager.addError("File could not be saved: " + e.getMessage()); return false; } } @@ -600,10 +588,10 @@ public class GTURTLEModeling { try { TraceManager.addDev("Saving specification in " + path + "\n"); - + // DB: Moved from TURTLE2UPPAAL (introduced for project management) - SpecConfigTTool.checkAndCreateUPPAALDir(path); - + SpecConfigTTool.checkAndCreateUPPAALDir(path); + turtle2uppaal.saveInFile(path); TraceManager.addDev("UPPAAL specification has been generated in " + path + "\n"); return true; @@ -661,35 +649,35 @@ public class GTURTLEModeling { return avatarspec; } - public AVATAR2UPPAAL getAvatar2Uppaal(){ + public AVATAR2UPPAAL getAvatar2Uppaal() { return avatar2uppaal; } - public ProVerifOutputAnalyzer getProVerifOutputAnalyzer () { - return this.avatar2proverif.getOutputAnalyzer (); + public ProVerifOutputAnalyzer getProVerifOutputAnalyzer() { + return this.avatar2proverif.getOutputAnalyzer(); } - public boolean generateProVerifFromAVATAR(String _path, int _stateReachability, boolean _typed, boolean allowPrivateChannelDuplication){ + public boolean generateProVerifFromAVATAR(String _path, int _stateReachability, boolean _typed, boolean allowPrivateChannelDuplication) { return generateProVerifFromAVATAR(_path, _stateReachability, _typed, allowPrivateChannelDuplication, "1"); } - public int calcSec(){ - int overhead=0; + public int calcSec() { + int overhead = 0; //count # of insecure channels? return overhead; } - public boolean channelAllowed(TMLMapping<TGComponent> map, TMLChannel chan){ + public boolean channelAllowed(TMLMapping<TGComponent> map, TMLChannel chan) { TMLTask orig = chan.getOriginTask(); TMLTask dest = chan.getDestinationTask(); - List<HwNode> path = getPath(map,orig, dest); - for (HwNode node:path){ - if (node instanceof HwBridge){ - for (String rule:((HwBridge) node).firewallRules){ + List<HwNode> path = getPath(map, orig, dest); + for (HwNode node : path) { + if (node instanceof HwBridge) { + for (String rule : ((HwBridge) node).firewallRules) { String t1 = rule.split("->")[0]; String t2 = rule.split("->")[1]; - if (t1.equals(orig.getName().replaceAll("__","::")) || t1.equals("*")){ - if (t2.equals(dest.getName().replaceAll("__","::")) || t2.equals("*")){ + if (t1.equals(orig.getName().replaceAll("__", "::")) || t1.equals("*")) { + if (t2.equals(dest.getName().replaceAll("__", "::")) || t2.equals("*")) { return false; } } @@ -699,22 +687,22 @@ public class GTURTLEModeling { return true; } - public List<HwNode> getPath(TMLMapping<TGComponent> map, TMLTask t1, TMLTask t2){ + public List<HwNode> getPath(TMLMapping<TGComponent> map, TMLTask t1, TMLTask t2) { HwNode node1 = map.getHwNodeOf(t1); HwNode node2 = map.getHwNodeOf(t2); List<HwNode> path = new ArrayList<HwNode>(); - if (node1==node2){ + if (node1 == node2) { return path; } - if (node1!=node2){ + if (node1 != node2) { //Navigate architecture for node List<HwLink> links = map.getTMLArchitecture().getHwLinks(); // HwNode last = node1; List<HwNode> found = new ArrayList<HwNode>(); List<HwNode> done = new ArrayList<HwNode>(); Map<HwNode, List<HwNode>> pathMap = new HashMap<HwNode, List<HwNode>>(); - for (HwLink link: links){ - if (link.hwnode == node1){ + for (HwLink link : links) { + if (link.hwnode == node1) { found.add(link.bus); List<HwNode> tmp = new ArrayList<HwNode>(); tmp.add(link.bus); @@ -722,23 +710,22 @@ public class GTURTLEModeling { } } outerloop: - while (found.size()>0){ + while (found.size() > 0) { HwNode curr = found.remove(0); - for (HwLink link: links){ - if (curr == link.bus){ - if (link.hwnode == node2){ + for (HwLink link : links) { + if (curr == link.bus) { + if (link.hwnode == node2) { path = pathMap.get(curr); break outerloop; } - if (!done.contains(link.hwnode) && !found.contains(link.hwnode) && link.hwnode instanceof HwBridge){ + if (!done.contains(link.hwnode) && !found.contains(link.hwnode) && link.hwnode instanceof HwBridge) { found.add(link.hwnode); List<HwNode> tmp = new ArrayList<HwNode>(pathMap.get(curr)); tmp.add(link.hwnode); pathMap.put(link.hwnode, tmp); } - } - else if (curr == link.hwnode){ - if (!done.contains(link.bus) && !found.contains(link.bus)){ + } else if (curr == link.hwnode) { + if (!done.contains(link.bus) && !found.contains(link.bus)) { found.add(link.bus); List<HwNode> tmp = new ArrayList<HwNode>(pathMap.get(curr)); tmp.add(link.bus); @@ -751,214 +738,211 @@ public class GTURTLEModeling { } return path; } - public TMLMapping<TGComponent> drawFirewall(TMLMapping<TGComponent> map){ + + public TMLMapping<TGComponent> drawFirewall(TMLMapping<TGComponent> map) { System.out.println("DRAWING FIREWALL"); - TGComponent comp= map.getTMLModeling().getTGComponent(); - TMLComponentDesignPanel tmlcdp = (TMLComponentDesignPanel) comp.getTDiagramPanel().tp; - // TMLComponentDesignPanel tmlcdp = map.getTMLCDesignPanel(); + TGComponent comp = map.getTMLModeling().getTGComponent(); + TMLComponentDesignPanel tmlcdp = (TMLComponentDesignPanel) comp.getTDiagramPanel().tp; + // TMLComponentDesignPanel tmlcdp = map.getTMLCDesignPanel(); TMLModeling<TGComponent> tmlm = map.getTMLModeling(); - TMLArchitecture archi = map.getArch(); - TURTLEPanel tmlap = map.getCorrespondanceList().getTG(archi.getFirstCPU()).getTDiagramPanel().tp; + TMLArchitecture archi = map.getArch(); + TURTLEPanel tmlap = map.getCorrespondanceList().getTG(archi.getFirstCPU()).getTDiagramPanel().tp; TMLActivityDiagramPanel firewallADP = null; TMLComponentTaskDiagramPanel tcdp = tmlcdp.tmlctdp; - if (TraceManager.devPolicy == TraceManager.TO_CONSOLE){ + if (TraceManager.devPolicy == TraceManager.TO_CONSOLE) { MainGUI gui = tmlcdp.getMainGUI(); int arch = mgui.tabs.indexOf(tmlap); - gui.cloneRenameTab(arch,"firewallArch"); - TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size()-1); + gui.cloneRenameTab(arch, "firewallArch"); + TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size() - 1); int ind = gui.tabs.indexOf(tmlcdp); String tabName = gui.getTitleAt(tmlcdp); gui.cloneRenameTab(ind, "firewallDesign"); // TMLComponentDesignPanel tcp = (TMLComponentDesignPanel) gui.tabs.get(gui.tabs.size()-1); - newarch.renameMapping(tabName, tabName+"_firewallDesign"); + newarch.renameMapping(tabName, tabName + "_firewallDesign"); } - for (HwBridge firewallNode:map.getTMLArchitecture().getFirewalls()){ + for (HwBridge firewallNode : map.getTMLArchitecture().getFirewalls()) { TraceManager.addDev("Found firewall " + firewallNode.getName()); TMLCPrimitiveComponent firewallComp = null; - TMLADStartState adStart=null; + TMLADStartState adStart = null; TMLADForEverLoop adLoop = null; - TMLADChoice adChoice =null; - TMLADReadChannel adRC=null; - TMLADExecI exec=null; - TMLADWriteChannel adWC=null; - TMLADStopState adStop =null; - + TMLADChoice adChoice = null; + TMLADReadChannel adRC = null; + TMLADExecI exec = null; + TMLADWriteChannel adWC = null; + TMLADStopState adStop = null; int links = map.getArch().getLinkByHwNode(firewallNode).size(); TraceManager.addDev("Links " + links); HwCPU cpu = new HwCPU(firewallNode.getName()); - map.getTMLArchitecture().replaceFirewall(firewallNode,cpu); - for (int link =0; link< links/2; link++){ + map.getTMLArchitecture().replaceFirewall(firewallNode, cpu); + for (int link = 0; link < links / 2; link++) { HashMap<TMLChannel, TMLChannel> inChans = new HashMap<TMLChannel, TMLChannel>(); HashMap<TMLChannel, TMLChannel> outChans = new HashMap<TMLChannel, TMLChannel>(); - if (TraceManager.devPolicy == TraceManager.TO_CONSOLE){ + if (TraceManager.devPolicy == TraceManager.TO_CONSOLE) { firewallComp = new TMLCPrimitiveComponent(0, 0, tmlcdp.tmlctdp.getMinX(), tmlcdp.tmlctdp.getMaxX(), tmlcdp.tmlctdp.getMinY(), tmlcdp.tmlctdp.getMaxY(), false, null, tmlcdp.tmlctdp); - tmlcdp.tmlctdp.addComponent(firewallComp,0,0,false,true); - firewallComp.setValueWithChange(firewallNode.getName()+link); - firewallADP = tmlcdp.getTMLActivityDiagramPanel(firewallNode.getName()+link); + tmlcdp.tmlctdp.addComponent(firewallComp, 0, 0, false, true); + firewallComp.setValueWithChange(firewallNode.getName() + link); + firewallADP = tmlcdp.getTMLActivityDiagramPanel(firewallNode.getName() + link); } List<TMLChannel> channelsCopy = tmlm.getChannels(); List<TMLChannel> toAdd = new ArrayList<TMLChannel>(); - TMLTask firewall = new TMLTask("TASK__"+firewallNode.getName()+"_"+link, firewallComp,firewallADP); + TMLTask firewall = new TMLTask("TASK__" + firewallNode.getName() + "_" + link, firewallComp, firewallADP); tmlm.addTask(firewall); - map.addTaskToHwExecutionNode(firewall,cpu); + map.addTaskToHwExecutionNode(firewall, cpu); TMLActivity act = firewall.getActivityDiagram(); TraceManager.addDev("FirewallADP " + firewallADP); - for (TMLChannel chan: channelsCopy){ + for (TMLChannel chan : channelsCopy) { TMLTask orig = chan.getOriginTask(); TMLTask dest = chan.getDestinationTask(); TMLPort origPort = chan.getOriginPort(); TMLPort destPort = chan.getDestinationPort(); - TMLChannel wr = new TMLChannel(chan.getName()+"_firewallIn"+link,chan.getReferenceObject()); + TMLChannel wr = new TMLChannel(chan.getName() + "_firewallIn" + link, chan.getReferenceObject()); //Specify new channel attributes wr.setSize(chan.getSize()); wr.setMax(chan.getMax()); - wr.setPorts(origPort,destPort); + wr.setPorts(origPort, destPort); wr.setType(TMLChannel.BRBW); wr.setPriority(chan.getPriority()); wr.setTasks(orig, firewall); - TMLChannel rd = new TMLChannel(chan.getName()+"_firewallOut"+link, chan.getReferenceObject()); - rd.setTasks(firewall,dest); + TMLChannel rd = new TMLChannel(chan.getName() + "_firewallOut" + link, chan.getReferenceObject()); + rd.setTasks(firewall, dest); rd.setSize(chan.getSize()); rd.setMax(chan.getMax()); - rd.setPorts(origPort,destPort); + rd.setPorts(origPort, destPort); rd.setType(TMLChannel.BRBW); rd.setPriority(chan.getPriority()); - inChans.put(chan,wr); - outChans.put(chan,rd); + inChans.put(chan, wr); + outChans.put(chan, rd); toAdd.add(rd); toAdd.add(wr); map.getCorrespondanceList().addCor(rd, (TGComponent) rd.getReferenceObject()); map.getCorrespondanceList().addCor(wr, (TGComponent) wr.getReferenceObject()); } tmlm.removeAllChannels(); - for (TMLChannel c:toAdd){ + for (TMLChannel c : toAdd) { tmlm.addChannel(c); } - if (TraceManager.devPolicy == TraceManager.TO_CONSOLE){ + if (TraceManager.devPolicy == TraceManager.TO_CONSOLE) { //Build activity diagram //Get start state adStart = (TMLADStartState) firewallADP.getComponentList().get(0); //add loop - adLoop = new TMLADForEverLoop(400,150,firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false,null, firewallADP); - firewallADP.addComponent(adLoop,400,150,false,true); - TGConnector tmp =new TGConnectorTMLAD(adLoop.getX(), adLoop.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null,firewallADP,adStart.getTGConnectingPointAtIndex(0),adLoop.getTGConnectingPointAtIndex(0), new Vector<Point>()); - firewallADP.addComponent(tmp, adLoop.getX(),adLoop.getY(),false,true); + adLoop = new TMLADForEverLoop(400, 150, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP); + firewallADP.addComponent(adLoop, 400, 150, false, true); + TGConnector tmp = new TGConnectorTMLAD(adLoop.getX(), adLoop.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP, adStart.getTGConnectingPointAtIndex(0), adLoop.getTGConnectingPointAtIndex(0), new Vector<Point>()); + firewallADP.addComponent(tmp, adLoop.getX(), adLoop.getY(), false, true); //add choice - adChoice = new TMLADChoice(400,300, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false,null, firewallADP); - firewallADP.addComponent(adChoice, 400,300,false,true); + adChoice = new TMLADChoice(400, 300, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP); + firewallADP.addComponent(adChoice, 400, 300, false, true); - tmp =new TGConnectorTMLAD(adChoice.getX(), adChoice.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null,firewallADP,adLoop.getTGConnectingPointAtIndex(1), adChoice.getTGConnectingPointAtIndex(0), new Vector<Point>()); - firewallADP.addComponent(tmp, adChoice.getX(),adChoice.getY(),false,true); - for (TMLChannel chan: inChans.keySet()){ + tmp = new TGConnectorTMLAD(adChoice.getX(), adChoice.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP, adLoop.getTGConnectingPointAtIndex(1), adChoice.getTGConnectingPointAtIndex(0), new Vector<Point>()); + firewallADP.addComponent(tmp, adChoice.getX(), adChoice.getY(), false, true); + for (TMLChannel chan : inChans.keySet()) { TMLChannel newChan = inChans.get(chan); TMLCChannelOutPort originPort = new TMLCChannelOutPort(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp); TMLCChannelOutPort destPort = new TMLCChannelOutPort(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp); - for (TGComponent tg: tcdp.getComponentList()){ - if (tg instanceof TMLCPrimitiveComponent){ - if (tg.getValue().equals(newChan.getOriginTask().getName().split("__")[1])){ + for (TGComponent tg : tcdp.getComponentList()) { + if (tg instanceof TMLCPrimitiveComponent) { + if (tg.getValue().equals(newChan.getOriginTask().getName().split("__")[1])) { originPort = new TMLCChannelOutPort(tg.getX(), tg.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, tg, tcdp); - originPort.commName=newChan.getName(); - tcdp.addComponent(originPort,tg.getX(), tg.getY(),true,true); - } - else if (tg.getValue().equals(firewallNode.getName())){ + originPort.commName = newChan.getName(); + tcdp.addComponent(originPort, tg.getX(), tg.getY(), true, true); + } else if (tg.getValue().equals(firewallNode.getName())) { destPort = new TMLCChannelOutPort(tg.getX(), tg.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, tg, tcdp); - destPort.isOrigin=false; - destPort.commName=newChan.getName(); - tcdp.addComponent(destPort,tg.getX(), tg.getY(),true,true); + destPort.isOrigin = false; + destPort.commName = newChan.getName(); + tcdp.addComponent(destPort, tg.getX(), tg.getY(), true, true); } } } TMLCPortConnector conn = new TMLCPortConnector(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp, originPort.getTGConnectingPointAtIndex(0), destPort.getTGConnectingPointAtIndex(0), new Vector<Point>()); - tcdp.addComponent(conn, 0,0,false,true); + tcdp.addComponent(conn, 0, 0, false, true); TMLChannel wrChan = outChans.get(chan); - for (TGComponent tg: tcdp.getComponentList()){ - if (tg instanceof TMLCPrimitiveComponent){ - if (tg.getValue().equals(firewallNode.getName())){ + for (TGComponent tg : tcdp.getComponentList()) { + if (tg instanceof TMLCPrimitiveComponent) { + if (tg.getValue().equals(firewallNode.getName())) { originPort = new TMLCChannelOutPort(tg.getX(), tg.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, tg, tcdp); - originPort.commName=wrChan.getName(); - tcdp.addComponent(originPort,tg.getX(), tg.getY(),true,true); - } - else if (tg.getValue().equals(wrChan.getDestinationTask().getName().split("__")[1])){ + originPort.commName = wrChan.getName(); + tcdp.addComponent(originPort, tg.getX(), tg.getY(), true, true); + } else if (tg.getValue().equals(wrChan.getDestinationTask().getName().split("__")[1])) { destPort = new TMLCChannelOutPort(tg.getX(), tg.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, tg, tcdp); - destPort.isOrigin=false; - destPort.commName=wrChan.getName(); - tcdp.addComponent(destPort,tg.getX(), tg.getY(),true,true); + destPort.isOrigin = false; + destPort.commName = wrChan.getName(); + tcdp.addComponent(destPort, tg.getX(), tg.getY(), true, true); } } } conn = new TMLCPortConnector(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp, originPort.getTGConnectingPointAtIndex(0), destPort.getTGConnectingPointAtIndex(0), new Vector<Point>()); - tcdp.addComponent(conn, 0,0,false,true); + tcdp.addComponent(conn, 0, 0, false, true); } - int xpos=200; - int i=1; - for (TMLChannel chan: inChans.keySet()){ + int xpos = 200; + int i = 1; + for (TMLChannel chan : inChans.keySet()) { TMLChannel newChan = inChans.get(chan); - adRC = new TMLADReadChannel(xpos,350, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false,null, firewallADP); + adRC = new TMLADReadChannel(xpos, 350, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP); adRC.setChannelName(newChan.getName()); adRC.setSamples("1"); - tmp =new TGConnectorTMLAD(adRC.getX(), adRC.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null,firewallADP,adChoice.getTGConnectingPointAtIndex(i), adRC.getTGConnectingPointAtIndex(0), new Vector<Point>()); - firewallADP.addComponent(tmp, adRC.getX(),adRC.getY(),false,true); + tmp = new TGConnectorTMLAD(adRC.getX(), adRC.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP, adChoice.getTGConnectingPointAtIndex(i), adRC.getTGConnectingPointAtIndex(0), new Vector<Point>()); + firewallADP.addComponent(tmp, adRC.getX(), adRC.getY(), false, true); - firewallADP.addComponent(adRC,xpos,350,false,true); + firewallADP.addComponent(adRC, xpos, 350, false, true); //Execute for latency value - exec = new TMLADExecI(xpos,400,firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false,null, firewallADP); + exec = new TMLADExecI(xpos, 400, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP); exec.setDelayValue(Integer.toString(firewallNode.latency)); - firewallADP.addComponent(exec,400,200,false,true); + firewallADP.addComponent(exec, 400, 200, false, true); - tmp =new TGConnectorTMLAD(exec.getX(), exec.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null,firewallADP,adRC.getTGConnectingPointAtIndex(1), exec.getTGConnectingPointAtIndex(0), new Vector<Point>()); - firewallADP.addComponent(tmp, exec.getX(),exec.getY(),false,true); + tmp = new TGConnectorTMLAD(exec.getX(), exec.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP, adRC.getTGConnectingPointAtIndex(1), exec.getTGConnectingPointAtIndex(0), new Vector<Point>()); + firewallADP.addComponent(tmp, exec.getX(), exec.getY(), false, true); - if (channelAllowed(map,chan)){ + if (channelAllowed(map, chan)) { TMLChannel wrChan = outChans.get(chan); - adWC = new TMLADWriteChannel(xpos,400, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false,null, firewallADP); + adWC = new TMLADWriteChannel(xpos, 400, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP); adWC.setChannelName(wrChan.getName()); adWC.setSamples("1"); - firewallADP.addComponent(adWC, xpos,400, false,true); + firewallADP.addComponent(adWC, xpos, 400, false, true); - tmp =new TGConnectorTMLAD(exec.getX(), exec.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null,firewallADP,exec.getTGConnectingPointAtIndex(1), adWC.getTGConnectingPointAtIndex(0), new Vector<Point>()); - firewallADP.addComponent(tmp, exec.getX(),exec.getY(),false,true); + tmp = new TGConnectorTMLAD(exec.getX(), exec.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP, exec.getTGConnectingPointAtIndex(1), adWC.getTGConnectingPointAtIndex(0), new Vector<Point>()); + firewallADP.addComponent(tmp, exec.getX(), exec.getY(), false, true); - adStop = new TMLADStopState(xpos,500, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false,null, firewallADP); - firewallADP.addComponent(adStop, xpos,500, false,true); - tmp =new TGConnectorTMLAD(adStop.getX(), adStop.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null,firewallADP,adWC.getTGConnectingPointAtIndex(1), adStop.getTGConnectingPointAtIndex(0), new Vector<Point>()); - firewallADP.addComponent(tmp, adStop.getX(),adStop.getY(),false,true); - } - else { - adStop = new TMLADStopState(xpos,500, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false,null, firewallADP); - firewallADP.addComponent(adStop, xpos,500, false,true); + adStop = new TMLADStopState(xpos, 500, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP); + firewallADP.addComponent(adStop, xpos, 500, false, true); + tmp = new TGConnectorTMLAD(adStop.getX(), adStop.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP, adWC.getTGConnectingPointAtIndex(1), adStop.getTGConnectingPointAtIndex(0), new Vector<Point>()); + firewallADP.addComponent(tmp, adStop.getX(), adStop.getY(), false, true); + } else { + adStop = new TMLADStopState(xpos, 500, firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP); + firewallADP.addComponent(adStop, xpos, 500, false, true); - tmp =new TGConnectorTMLAD(adStop.getX(), adStop.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null,firewallADP,exec.getTGConnectingPointAtIndex(1), adStop.getTGConnectingPointAtIndex(0), new Vector<Point>()); - firewallADP.addComponent(tmp, adStop.getX(),adStop.getY(),false,true); + tmp = new TGConnectorTMLAD(adStop.getX(), adStop.getY(), firewallADP.getMinX(), firewallADP.getMaxX(), firewallADP.getMinY(), firewallADP.getMaxY(), false, null, firewallADP, exec.getTGConnectingPointAtIndex(1), adStop.getTGConnectingPointAtIndex(0), new Vector<Point>()); + firewallADP.addComponent(tmp, adStop.getX(), adStop.getY(), false, true); } - xpos+=100; + xpos += 100; i++; } } TMLStartState start = new TMLStartState("start", adStart); act.setFirst(start); - map.getCorrespondanceList().addCor(start,adStart); + map.getCorrespondanceList().addCor(start, adStart); //Add infinite loop - TMLForLoop loop = new TMLForLoop("infiniteloop",adLoop); + TMLForLoop loop = new TMLForLoop("infiniteloop", adLoop); loop.setInit(""); loop.setCondition(""); loop.setIncrement(""); @@ -970,12 +954,10 @@ public class GTURTLEModeling { TMLChoice choice = new TMLChoice("chooseChannel", adChoice); act.addElement(choice); loop.addNext(choice); - map.getCorrespondanceList().addCor(choice,adChoice); - + map.getCorrespondanceList().addCor(choice, adChoice); - - for (TMLChannel chan: inChans.keySet()){ + for (TMLChannel chan : inChans.keySet()) { TMLChannel newChan = inChans.get(chan); TMLChannel wrChan = outChans.get(chan); //Add channels into firewall activity diagram @@ -994,7 +976,7 @@ public class GTURTLEModeling { act.addElement(ex); rd.addNext(ex); - if (channelAllowed(map,chan)){ + if (channelAllowed(map, chan)) { TMLWriteChannel wr = new TMLWriteChannel(wrChan.getName(), adWC); wr.setNbOfSamples("1"); @@ -1006,15 +988,14 @@ public class GTURTLEModeling { wr.addNext(stop); act.addElement(stop); - } - else { + } else { TMLStopState stop = new TMLStopState("stop", adStop); ex.addNext(stop); act.addElement(stop); } - for (TMLTask t:tmlm.getTasks()){ + for (TMLTask t : tmlm.getTasks()) { TMLActivity actd = t.getActivityDiagram(); - actd.replaceWriteChannelWith(chan,newChan); + actd.replaceWriteChannelWith(chan, newChan); actd.replaceReadChannelWith(chan, outChans.get(chan)); } } @@ -1032,40 +1013,43 @@ public class GTURTLEModeling { public String name; public boolean isOrigin; public boolean isChan; - public ChannelData(String n, boolean orig, boolean isCh){ - name=n; - isOrigin=orig; - isChan=isCh; + + public ChannelData(String n, boolean orig, boolean isCh) { + name = n; + isOrigin = orig; + isChan = isCh; } } + class HSMChannel { public String name; - public static final int SENC=0; - public static final int NONCE_ENC=1; - public static final int MAC=2; - public static final int DEC=3; - public static final int AENC=4; - public static final int NONCE=5; + public static final int SENC = 0; + public static final int NONCE_ENC = 1; + public static final int MAC = 2; + public static final int DEC = 3; + public static final int AENC = 4; + public static final int NONCE = 5; public String task; - public String securityContext=""; + public String securityContext = ""; public int secType; - public String nonceName=""; - public HSMChannel (String n, String t, int type){ - name=n; - task=t; - secType=type; + public String nonceName = ""; + + public HSMChannel(String n, String t, int type) { + name = n; + task = t; + secType = type; } } - public HashMap<String, HashSet<String>> getCPUTaskMap(){ + public HashMap<String, HashSet<String>> getCPUTaskMap() { HashMap<String, HashSet<String>> cpuTaskMap = new HashMap<String, HashSet<String>>(); - if (tmap ==null){ + if (tmap == null) { return cpuTaskMap; } - for (HwNode node: tmap.getArch().getCPUs()){ - if (tmap.getMappedTasks(node).size()>0){ + for (HwNode node : tmap.getArch().getCPUs()) { + if (tmap.getMappedTasks(node).size() > 0) { cpuTaskMap.put(node.getName(), tmap.getMappedTasks(node)); } } @@ -1073,32 +1057,32 @@ public class GTURTLEModeling { return cpuTaskMap; } - public void addHSM(MainGUI gui, Map<String, List<String>> selectedCpuTasks){ + public void addHSM(MainGUI gui, Map<String, List<String>> selectedCpuTasks) { System.out.println("Adding HSM"); - String encComp="100"; - String decComp="100"; - String overhead ="0"; - String name="hsm"; - if (tmap==null){ + String encComp = "100"; + String decComp = "100"; + String overhead = "0"; + String name = "hsm"; + if (tmap == null) { return; } //Clone diagrams - TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; + TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; int arch = gui.tabs.indexOf(tmlap); - gui.cloneRenameTab(arch,"hsm"); - TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size()-1); + gui.cloneRenameTab(arch, "hsm"); + TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size() - 1); - TGComponent tgcomp= tmap.getTMLModeling().getTGComponent(); - TMLComponentDesignPanel tmlcdp= (TMLComponentDesignPanel) tgcomp.getTDiagramPanel().tp; + TGComponent tgcomp = tmap.getTMLModeling().getTGComponent(); + TMLComponentDesignPanel tmlcdp = (TMLComponentDesignPanel) tgcomp.getTDiagramPanel().tp; // TMLComponentDesignPanel tmlcdp = tmap.getTMLCDesignPanel(); int ind = gui.tabs.indexOf(tmlcdp); String tabName = gui.getTitleAt(tmlcdp); gui.cloneRenameTab(ind, name); - TMLComponentDesignPanel t = (TMLComponentDesignPanel) gui.tabs.get(gui.tabs.size()-1); + TMLComponentDesignPanel t = (TMLComponentDesignPanel) gui.tabs.get(gui.tabs.size() - 1); TMLComponentTaskDiagramPanel tcdp = t.tmlctdp; //Create clone of architecture panel and map tasks to it - newarch.renameMapping(tabName, tabName+"_"+name); + newarch.renameMapping(tabName, tabName + "_" + name); //ProVerif analysis @@ -1110,32 +1094,31 @@ public class GTURTLEModeling { TGConnector fromStart; Map<String, HSMChannel> secChannels = new HashMap<String, HSMChannel>(); //Add a HSM for each selected CPU on the component diagram - for (String cpuName: selectedCpuTasks.keySet()){ + for (String cpuName : selectedCpuTasks.keySet()) { Map<String, HSMChannel> hsmChannels = new HashMap<String, HSMChannel>(); TMLCPrimitiveComponent hsm = new TMLCPrimitiveComponent(0, 500, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxY(), false, null, tcdp); TAttribute isEnc = new TAttribute(2, "isEnc", "true", 4); hsm.getAttributes().add(isEnc); - tcdp.addComponent(hsm, 0,500,false,true); - hsm.setValueWithChange("HSM_"+cpuName); + tcdp.addComponent(hsm, 0, 500, false, true); + hsm.setValueWithChange("HSM_" + cpuName); //Find all associated components List<TMLCPrimitiveComponent> comps = new ArrayList<TMLCPrimitiveComponent>(); //Find the component to add a HSM to - for (TGComponent tg: tcdp.getComponentList()){ - if (tg instanceof TMLCPrimitiveComponent){ - for (String compName: selectedCpuTasks.get(cpuName)){ - if (tg.getValue().equals(compName)){ + for (TGComponent tg : tcdp.getComponentList()) { + if (tg instanceof TMLCPrimitiveComponent) { + for (String compName : selectedCpuTasks.get(cpuName)) { + if (tg.getValue().equals(compName)) { comps.add((TMLCPrimitiveComponent) tg); break; } } - } - else if (tg instanceof TMLCCompositeComponent){ + } else if (tg instanceof TMLCCompositeComponent) { TMLCCompositeComponent cc = (TMLCCompositeComponent) tg; - List<TMLCPrimitiveComponent> pcomps =cc.getAllPrimitiveComponents(); - for (TMLCPrimitiveComponent pc: pcomps){ - for (String compName: selectedCpuTasks.get(cpuName)){ - if (pc.getValue().equals(compName)){ + List<TMLCPrimitiveComponent> pcomps = cc.getAllPrimitiveComponents(); + for (TMLCPrimitiveComponent pc : pcomps) { + for (String compName : selectedCpuTasks.get(cpuName)) { + if (pc.getValue().equals(compName)) { comps.add(pc); break; } @@ -1143,16 +1126,16 @@ public class GTURTLEModeling { } } } - if (comps.size()==0){ + if (comps.size() == 0) { //System.out.println("No Components found"); continue; } // System.out.println("nonAuthChans " + nonAuthChans); //System.out.println("nonSecChans "+ nonSecChans); - for (TMLCPrimitiveComponent comp: comps){ + for (TMLCPrimitiveComponent comp : comps) { Map<String, HSMChannel> compChannels = new HashMap<String, HSMChannel>(); - String compName=comp.getValue(); + String compName = comp.getValue(); TMLActivityDiagramPanel tad = t.getTMLActivityDiagramPanel(compName); Set<TGComponent> channelInstances = new HashSet<TGComponent>(); Set<TGComponent> secOperators = new HashSet<TGComponent>(); @@ -1161,90 +1144,84 @@ public class GTURTLEModeling { //Find all unsecured channels //For previously secured channels, relocate encryption to the hsm - for (TGComponent tg: tad.getComponentList()){ - if (tg instanceof TMLADWriteChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADWriteChannel) { TMLADWriteChannel writeChannel = (TMLADWriteChannel) tg; - if (writeChannel.getSecurityContext().equals("")){ - String nonceName=""; - int type=-1; - if (nonSecChans.contains(compName+"__"+writeChannel.getChannelName()+"_chData")){ - type=HSMChannel.SENC; - if (nonAuthChans.contains(compName+"__"+writeChannel.getChannelName())){ - nonceName="nonce_"+writeChannel.getChannelName(); + if (writeChannel.getSecurityContext().equals("")) { + String nonceName = ""; + int type = -1; + if (nonSecChans.contains(compName + "__" + writeChannel.getChannelName() + "_chData")) { + type = HSMChannel.SENC; + if (nonAuthChans.contains(compName + "__" + writeChannel.getChannelName())) { + nonceName = "nonce_" + writeChannel.getChannelName(); } + } else if (nonAuthChans.contains(compName + "__" + writeChannel.getChannelName())) { + type = HSMChannel.MAC; } - else if (nonAuthChans.contains(compName+"__"+writeChannel.getChannelName())){ - type=HSMChannel.MAC; - } - HSMChannel ch=new HSMChannel(writeChannel.getChannelName(), compName, type); - ch.securityContext="hsmSec_"+writeChannel.getChannelName(); - ch.nonceName=nonceName; + HSMChannel ch = new HSMChannel(writeChannel.getChannelName(), compName, type); + ch.securityContext = "hsmSec_" + writeChannel.getChannelName(); + ch.nonceName = nonceName; fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ - if (type!=-1){ - compChannels.put(writeChannel.getChannelName(),ch); + if (fromStart != null) { + if (type != -1) { + compChannels.put(writeChannel.getChannelName(), ch); channelInstances.add(tg); } } - } - else { + } else { //System.out.println("security context:"+writeChannel.securityContext); fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); SecurityPattern sp = tmap.getSecurityPatternByName(writeChannel.getSecurityContext()); - int type=-1; - if (sp.type.equals("Symmetric Encryption")){ - type=HSMChannel.SENC; - } - else if (sp.type.equals("Asymmetric Encryption")){ - type=HSMChannel.AENC; - } - else if (sp.type.equals("MAC")){ - type=HSMChannel.MAC; - } - else if (sp.type.equals("Nonce")){ - type=HSMChannel.NONCE; + int type = -1; + if (sp.type.equals("Symmetric Encryption")) { + type = HSMChannel.SENC; + } else if (sp.type.equals("Asymmetric Encryption")) { + type = HSMChannel.AENC; + } else if (sp.type.equals("MAC")) { + type = HSMChannel.MAC; + } else if (sp.type.equals("Nonce")) { + type = HSMChannel.NONCE; } HSMChannel ch = new HSMChannel(writeChannel.getChannelName(), compName, type); - ch.securityContext=writeChannel.getSecurityContext(); - compChannels.put(writeChannel.getChannelName(),ch); + ch.securityContext = writeChannel.getSecurityContext(); + compChannels.put(writeChannel.getChannelName(), ch); //chanNames.add(writeChannel.getChannelName()+compName); } } } - if (tg instanceof TMLADReadChannel){ + if (tg instanceof TMLADReadChannel) { TMLADReadChannel readChannel = (TMLADReadChannel) tg; - if (readChannel.getSecurityContext().equals("")){ + if (readChannel.getSecurityContext().equals("")) { fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ - if(nonSecChans.contains(compName+"__"+readChannel.getChannelName()+"_chData") || nonAuthChans.contains(compName+"__"+readChannel.getChannelName())){ + if (fromStart != null) { + if (nonSecChans.contains(compName + "__" + readChannel.getChannelName() + "_chData") || nonAuthChans.contains(compName + "__" + readChannel.getChannelName())) { channelInstances.add(tg); HSMChannel ch = new HSMChannel(readChannel.getChannelName(), compName, HSMChannel.DEC); - ch.securityContext="hsmSec_"+readChannel.getChannelName(); - compChannels.put(readChannel.getChannelName(),ch); - if (nonSecChans.contains(compName+"__"+readChannel.getChannelName()+"_chData") && nonAuthChans.contains(compName+"__"+readChannel.getChannelName())){ - ch.nonceName="nonce_"+readChannel.getChannelName(); + ch.securityContext = "hsmSec_" + readChannel.getChannelName(); + compChannels.put(readChannel.getChannelName(), ch); + if (nonSecChans.contains(compName + "__" + readChannel.getChannelName() + "_chData") && nonAuthChans.contains(compName + "__" + readChannel.getChannelName())) { + ch.nonceName = "nonce_" + readChannel.getChannelName(); } } } - } - else { + } else { fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); HSMChannel ch = new HSMChannel(readChannel.getChannelName(), compName, HSMChannel.DEC); - ch.securityContext=readChannel.getSecurityContext(); - compChannels.put(readChannel.getChannelName(),ch); + ch.securityContext = readChannel.getSecurityContext(); + compChannels.put(readChannel.getChannelName(), ch); } } } - if (tg instanceof TMLADEncrypt){ + if (tg instanceof TMLADEncrypt) { // TMLADEncrypt enc = (TMLADEncrypt) tg; secOperators.add(tg); //} } - if (tg instanceof TMLADDecrypt){ + if (tg instanceof TMLADDecrypt) { // TMLADDecrypt dec = (TMLADDecrypt) tg; secOperators.add(tg); //} @@ -1252,59 +1229,59 @@ public class GTURTLEModeling { } //System.out.println("compchannels " +compChannels); List<ChannelData> hsmChans = new ArrayList<ChannelData>(); - ChannelData chd = new ChannelData("startHSM_"+cpuName,false,false); + ChannelData chd = new ChannelData("startHSM_" + cpuName, false, false); hsmChans.add(chd); - for (String s: compChannels.keySet()){ - hsmChannels.put(s,compChannels.get(s)); - chd = new ChannelData("data_"+s+"_"+compChannels.get(s).task,false,true); + for (String s : compChannels.keySet()) { + hsmChannels.put(s, compChannels.get(s)); + chd = new ChannelData("data_" + s + "_" + compChannels.get(s).task, false, true); hsmChans.add(chd); - chd = new ChannelData("retData_"+s+"_"+compChannels.get(s).task,true,true); + chd = new ChannelData("retData_" + s + "_" + compChannels.get(s).task, true, true); hsmChans.add(chd); } - for (ChannelData hsmChan: hsmChans){ - TMLCChannelOutPort originPort =new TMLCChannelOutPort(comp.getX(), comp.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, hsm, tcdp); + for (ChannelData hsmChan : hsmChans) { + TMLCChannelOutPort originPort = new TMLCChannelOutPort(comp.getX(), comp.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, hsm, tcdp); TMLCChannelOutPort destPort = new TMLCChannelOutPort(comp.getX(), comp.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, comp, tcdp); - originPort.commName=hsmChan.name; - originPort.isOrigin=hsmChan.isOrigin; - tcdp.addComponent(originPort,hsm.getX(), hsm.getY(),true,true); - destPort.commName=hsmChan.name; - if (!hsmChan.isChan){ - originPort.typep=2; - destPort.typep=2; + originPort.commName = hsmChan.name; + originPort.isOrigin = hsmChan.isOrigin; + tcdp.addComponent(originPort, hsm.getX(), hsm.getY(), true, true); + destPort.commName = hsmChan.name; + if (!hsmChan.isChan) { + originPort.typep = 2; + destPort.typep = 2; originPort.setParam(0, new TType(2)); } - destPort.isOrigin=!hsmChan.isOrigin; + destPort.isOrigin = !hsmChan.isOrigin; - tcdp.addComponent(destPort,comp.getX(), comp.getY(),true,true); + tcdp.addComponent(destPort, comp.getX(), comp.getY(), true, true); TMLCPortConnector conn = new TMLCPortConnector(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp, originPort.getTGConnectingPointAtIndex(0), destPort.getTGConnectingPointAtIndex(0), new Vector<Point>()); - tcdp.addComponent(conn, 0,0,false,true); + tcdp.addComponent(conn, 0, 0, false, true); } - int xpos=0; - int ypos=0; + int xpos = 0; + int ypos = 0; //Remove existing security elements - for (TGComponent op: secOperators){ + for (TGComponent op : secOperators) { TGConnector prev = tad.findTGConnectorEndingAt(op.getTGConnectingPointAtIndex(0)); //TGConnectingPoint point = prev.getTGConnectingPointP1(); TGConnector end = tad.findTGConnectorStartingAt(op.getTGConnectingPointAtIndex(1)); TGConnectingPoint point2 = end.getTGConnectingPointP2(); tad.removeComponent(op); tad.removeComponent(end); - tad.addComponent(prev,0,0,false,true); + tad.addComponent(prev, 0, 0, false, true); prev.setP2(point2); } //Modify component activity diagram to add read/write to HSM //Add actions before Write Channel - for (TGComponent chan: channelInstances){ - String chanName=""; - if (!(chan instanceof TMLADWriteChannel)){ + for (TGComponent chan : channelInstances) { + String chanName = ""; + if (!(chan instanceof TMLADWriteChannel)) { continue; } TMLADWriteChannel writeChannel = (TMLADWriteChannel) chan; - chanName=writeChannel.getChannelName(); + chanName = writeChannel.getChannelName(); HSMChannel ch = hsmChannels.get(chanName); writeChannel.setSecurityContext(ch.securityContext); xpos = chan.getX(); @@ -1313,165 +1290,158 @@ public class GTURTLEModeling { TGConnectingPoint point = fromStart.getTGConnectingPointP2(); //set isEnc to true - int yShift=50; + int yShift = 50; - TMLADSendRequest req = new TMLADSendRequest(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - req.setRequestName("startHSM_"+cpuName); - req.setParam(0,"isEnc"); - tad.addComponent(req, xpos, ypos+yShift, false,true); + TMLADSendRequest req = new TMLADSendRequest(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + req.setRequestName("startHSM_" + cpuName); + req.setParam(0, "isEnc"); + tad.addComponent(req, xpos, ypos + yShift, false, true); fromStart.setP2(req.getTGConnectingPointAtIndex(0)); tad.addComponent(fromStart, xpos, ypos, false, true); //Add connection - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(req.getTGConnectingPointAtIndex(1)); - TMLADWriteChannel wr =new TMLADWriteChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + TMLADWriteChannel wr = new TMLADWriteChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - yShift+=50; + yShift += 50; //Add write channel operator - wr = new TMLADWriteChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - wr.setChannelName("data_"+chanName+"_"+compName); + wr = new TMLADWriteChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + wr.setChannelName("data_" + chanName + "_" + compName); wr.setSecurityContext(ch.securityContext); - tad.addComponent(wr, xpos, ypos+yShift, false,true); + tad.addComponent(wr, xpos, ypos + yShift, false, true); fromStart.setP2(wr.getTGConnectingPointAtIndex(0)); tad.addComponent(fromStart, xpos, ypos, false, true); - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(wr.getTGConnectingPointAtIndex(1)); - - - - - //Add read channel operator - yShift+=60; - TMLADReadChannel rd = new TMLADReadChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - rd.setChannelName("retData_"+chanName+"_"+compName); + yShift += 60; + TMLADReadChannel rd = new TMLADReadChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + rd.setChannelName("retData_" + chanName + "_" + compName); rd.setSecurityContext(ch.securityContext); - tad.addComponent(rd, xpos, ypos+yShift, false,true); + tad.addComponent(rd, xpos, ypos + yShift, false, true); fromStart.setP2(rd.getTGConnectingPointAtIndex(0)); - yShift+=50; + yShift += 50; //Add connector - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); - yShift+=50; + yShift += 50; //Direct the last TGConnector back to the start of the write channel operator fromStart.setP2(point); //Shift components down to make room for the added ones, and add security contexts to write channels - for (TGComponent tg:tad.getComponentList()){ - if (tg.getY() >= ypos && tg !=wr && tg!=req && tg!=rd){ - tg.setCd(tg.getX(), tg.getY()+yShift); + for (TGComponent tg : tad.getComponentList()) { + if (tg.getY() >= ypos && tg != wr && tg != req && tg != rd) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); tad.repaint(); } //Add actions after Read Channel - for (TGComponent chan: channelInstances){ - String chanName=""; + for (TGComponent chan : channelInstances) { + String chanName = ""; if (!(chan instanceof TMLADReadChannel)) { continue; } TMLADReadChannel readChannel = (TMLADReadChannel) chan; - chanName=readChannel.getChannelName(); - HSMChannel ch= hsmChannels.get(chanName); + chanName = readChannel.getChannelName(); + HSMChannel ch = hsmChannels.get(chanName); readChannel.setSecurityContext(ch.securityContext); - xpos = chan.getX()+10; + xpos = chan.getX() + 10; ypos = chan.getY(); fromStart = tad.findTGConnectorStartingAt(chan.getTGConnectingPointAtIndex(1)); - if (fromStart==null){ - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + if (fromStart == null) { + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(chan.getTGConnectingPointAtIndex(1)); - tad.addComponent(fromStart, xpos,ypos,false,true); + tad.addComponent(fromStart, xpos, ypos, false, true); } TGConnectingPoint point = fromStart.getTGConnectingPointP2(); //Set isEnc to false - int yShift=50; - TMLADActionState act = new TMLADActionState(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + int yShift = 50; + TMLADActionState act = new TMLADActionState(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); act.setValue("isEnc=false"); - tad.addComponent(act, xpos, ypos+yShift, false,true); + tad.addComponent(act, xpos, ypos + yShift, false, true); fromStart.setP2(act.getTGConnectingPointAtIndex(0)); //Add send request operator - yShift+=50; - TMLADSendRequest req = new TMLADSendRequest(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - req.setRequestName("startHSM_"+cpuName); - req.setParam(0,"isEnc"); + yShift += 50; + TMLADSendRequest req = new TMLADSendRequest(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + req.setRequestName("startHSM_" + cpuName); + req.setParam(0, "isEnc"); req.makeValue(); - tad.addComponent(req, xpos, ypos+yShift, false,true); + tad.addComponent(req, xpos, ypos + yShift, false, true); //Add connection - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(act.getTGConnectingPointAtIndex(1)); fromStart.setP2(req.getTGConnectingPointAtIndex(0)); tad.addComponent(fromStart, xpos, ypos, false, true); - - - yShift+=50; + yShift += 50; //Add write channel operator - TMLADWriteChannel wr = new TMLADWriteChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - wr.setChannelName("data_"+chanName+"_"+compName); + TMLADWriteChannel wr = new TMLADWriteChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + wr.setChannelName("data_" + chanName + "_" + compName); wr.setSecurityContext(ch.securityContext); - tad.addComponent(wr, xpos, ypos+yShift, false,true); + tad.addComponent(wr, xpos, ypos + yShift, false, true); //Add connection - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(req.getTGConnectingPointAtIndex(1)); fromStart.setP2(wr.getTGConnectingPointAtIndex(0)); tad.addComponent(fromStart, xpos, ypos, false, true); //Add read channel operator - yShift+=60; - TMLADReadChannel rd = new TMLADReadChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - rd.setChannelName("retData_"+chanName+"_"+compName); + yShift += 60; + TMLADReadChannel rd = new TMLADReadChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + rd.setChannelName("retData_" + chanName + "_" + compName); rd.setSecurityContext(ch.securityContext); - tad.addComponent(rd, xpos, ypos+yShift, false,true); + tad.addComponent(rd, xpos, ypos + yShift, false, true); - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(wr.getTGConnectingPointAtIndex(1)); fromStart.setP2(rd.getTGConnectingPointAtIndex(0)); - yShift+=50; + yShift += 50; - if (point!=null){ - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + if (point != null) { + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); //Direct the last TGConnector back to the start of the write channel operator fromStart.setP2(point); } - yShift+=50; + yShift += 50; //Shift components down to make room for the added ones, and add security contexts to write channels - for (TGComponent tg:tad.getComponentList()){ - if (tg.getY() >= ypos && tg !=wr && tg!=req && tg!=rd && tg!=chan && tg!=act){ - tg.setCd(tg.getX(), tg.getY()+yShift); + for (TGComponent tg : tad.getComponentList()) { + if (tg.getY() >= ypos && tg != wr && tg != req && tg != rd && tg != chan && tg != act) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); tad.repaint(); } //for (String chan: chanNames){ @@ -1479,208 +1449,197 @@ public class GTURTLEModeling { //} } - int xpos=0; - int ypos=0; - + int xpos = 0; + int ypos = 0; //Build HSM Activity diagram - TMLActivityDiagramPanel tad = t.getTMLActivityDiagramPanel("HSM_"+cpuName); + TMLActivityDiagramPanel tad = t.getTMLActivityDiagramPanel("HSM_" + cpuName); TMLADStartState start = (TMLADStartState) tad.getComponentList().get(0); fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); TMLADReadRequestArg req = new TMLADReadRequestArg(300, 100, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - tad.addComponent(req, 300,100,false,true); + tad.addComponent(req, 300, 100, false, true); req.setParam(0, "isEnc"); req.makeValue(); //Connect start and readrequest fromStart.setP1(start.getTGConnectingPointAtIndex(0)); fromStart.setP2(req.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); - + tad.addComponent(fromStart, 300, 200, false, true); TMLADChoice choice = new TMLADChoice(300, 200, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - tad.addComponent(choice, 300,200,false,true); + tad.addComponent(choice, 300, 200, false, true); //Connect readrequest and choice fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(req.getTGConnectingPointAtIndex(1)); fromStart.setP2(choice.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); int xc = 150; //Allows 9 channels max to simplify the diagram //If more than 3 channels, build 2 levels of choices - TMLADChoice choice2= new TMLADChoice(xc, 400, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - if (hsmChannels.keySet().size()>3){ - int i=0; - for (String chan: hsmChannels.keySet()){ + TMLADChoice choice2 = new TMLADChoice(xc, 400, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + if (hsmChannels.keySet().size() > 3) { + int i = 0; + for (String chan : hsmChannels.keySet()) { HSMChannel ch = hsmChannels.get(chan); - if (i%3==0){ + if (i % 3 == 0) { //Add a new choice every third channel - choice2= new TMLADChoice(xc, 250, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - tad.addComponent(choice2, xc, 400,false,true); + choice2 = new TMLADChoice(xc, 250, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + tad.addComponent(choice2, xc, 400, false, true); //Connect new choice operator to top choice fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); - fromStart.setP1(choice.getTGConnectingPointAtIndex(i/3+1)); + fromStart.setP1(choice.getTGConnectingPointAtIndex(i / 3 + 1)); fromStart.setP2(choice2.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); } TMLADReadChannel rd = new TMLADReadChannel(xc, 300, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - rd.setChannelName("data_"+chan+"_"+hsmChannels.get(chan).task); + rd.setChannelName("data_" + chan + "_" + hsmChannels.get(chan).task); rd.setSecurityContext(ch.securityContext); - tad.addComponent(rd, xc,300,false,true); + tad.addComponent(rd, xc, 300, false, true); //Connect choice and readchannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); - fromStart.setP1(choice2.getTGConnectingPointAtIndex(i%3+1)); + fromStart.setP1(choice2.getTGConnectingPointAtIndex(i % 3 + 1)); fromStart.setP2(rd.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); TMLADWriteChannel wr = new TMLADWriteChannel(xc, 600, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - wr.setChannelName("retData_"+chan+"_"+hsmChannels.get(chan).task); - tad.addComponent(wr, xc, 600,false,true); + wr.setChannelName("retData_" + chan + "_" + hsmChannels.get(chan).task); + tad.addComponent(wr, xc, 600, false, true); wr.setSecurityContext(ch.securityContext); - if (hsmChannels.get(chan).secType==HSMChannel.DEC){ + if (hsmChannels.get(chan).secType == HSMChannel.DEC) { TMLADDecrypt dec = new TMLADDecrypt(xc, 500, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - dec.securityContext = ch.securityContext; - tad.addComponent(dec, xc, 500,false,true); + dec.securityContext = ch.securityContext; + tad.addComponent(dec, xc, 500, false, true); fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); fromStart.setP2(dec.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); fromStart.setP2(dec.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); //Connect encrypt and writechannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(dec.getTGConnectingPointAtIndex(1)); fromStart.setP2(wr.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); - } - else { + tad.addComponent(fromStart, 300, 200, false, true); + } else { TMLADEncrypt enc = new TMLADEncrypt(xc, 500, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); enc.securityContext = ch.securityContext; - if (hsmChannels.get(chan).secType==HSMChannel.SENC){ + if (hsmChannels.get(chan).secType == HSMChannel.SENC) { enc.type = "Symmetric Encryption"; - } - else if (hsmChannels.get(chan).secType==HSMChannel.AENC){ - enc.type="Asymmetric Encryption"; - } - else if (hsmChannels.get(chan).secType==HSMChannel.MAC){ - enc.type="MAC"; - } - else if (hsmChannels.get(chan).secType==HSMChannel.NONCE){ - enc.type="Nonce"; + } else if (hsmChannels.get(chan).secType == HSMChannel.AENC) { + enc.type = "Asymmetric Encryption"; + } else if (hsmChannels.get(chan).secType == HSMChannel.MAC) { + enc.type = "MAC"; + } else if (hsmChannels.get(chan).secType == HSMChannel.NONCE) { + enc.type = "Nonce"; } enc.message_overhead = overhead; - enc.encTime= encComp; - enc.decTime=decComp; - enc.nonce=hsmChannels.get(chan).nonceName; - tad.addComponent(enc, xc, 500,false,true); + enc.encTime = encComp; + enc.decTime = decComp; + enc.nonce = hsmChannels.get(chan).nonceName; + tad.addComponent(enc, xc, 500, false, true); //Connect encrypt and readchannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); fromStart.setP2(enc.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); //Connect encrypt and writechannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(enc.getTGConnectingPointAtIndex(1)); fromStart.setP2(wr.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); } - xc+=300; + xc += 300; i++; } - } - else { + } else { - int i=1; + int i = 1; - for (String chan: hsmChannels.keySet()){ + for (String chan : hsmChannels.keySet()) { HSMChannel ch = hsmChannels.get(chan); TMLADReadChannel rd = new TMLADReadChannel(xc, 300, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - rd.setChannelName("data_"+chan+"_"+hsmChannels.get(chan).task); + rd.setChannelName("data_" + chan + "_" + hsmChannels.get(chan).task); rd.setSecurityContext(ch.securityContext); - tad.addComponent(rd, xc,300,false,true); + tad.addComponent(rd, xc, 300, false, true); //Connect choice and readchannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(choice.getTGConnectingPointAtIndex(i)); fromStart.setP2(rd.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); TMLADWriteChannel wr = new TMLADWriteChannel(xc, 600, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - wr.setChannelName("retData_"+chan+"_"+hsmChannels.get(chan).task); - tad.addComponent(wr, xc, 600,false,true); + wr.setChannelName("retData_" + chan + "_" + hsmChannels.get(chan).task); + tad.addComponent(wr, xc, 600, false, true); wr.setSecurityContext(ch.securityContext); - if (hsmChannels.get(chan).secType==HSMChannel.DEC){ + if (hsmChannels.get(chan).secType == HSMChannel.DEC) { TMLADDecrypt dec = new TMLADDecrypt(xc, 500, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); dec.securityContext = ch.securityContext; - tad.addComponent(dec, xc, 500,false,true); + tad.addComponent(dec, xc, 500, false, true); fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); fromStart.setP2(dec.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); //Connect encrypt and writechannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(dec.getTGConnectingPointAtIndex(1)); fromStart.setP2(wr.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); - } - else { + tad.addComponent(fromStart, 300, 200, false, true); + } else { TMLADEncrypt enc = new TMLADEncrypt(xc, 500, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); enc.securityContext = ch.securityContext; - if (hsmChannels.get(chan).secType==HSMChannel.SENC){ + if (hsmChannels.get(chan).secType == HSMChannel.SENC) { enc.type = "Symmetric Encryption"; - } - else if (hsmChannels.get(chan).secType==HSMChannel.AENC){ - enc.type="Asymmetric Encryption"; - } - else if (hsmChannels.get(chan).secType==HSMChannel.MAC){ - enc.type="MAC"; - } - else if (hsmChannels.get(chan).secType==HSMChannel.NONCE){ - enc.type="Nonce"; + } else if (hsmChannels.get(chan).secType == HSMChannel.AENC) { + enc.type = "Asymmetric Encryption"; + } else if (hsmChannels.get(chan).secType == HSMChannel.MAC) { + enc.type = "MAC"; + } else if (hsmChannels.get(chan).secType == HSMChannel.NONCE) { + enc.type = "Nonce"; } enc.message_overhead = overhead; - enc.encTime= encComp; - enc.decTime=decComp; - tad.addComponent(enc, xc, 500,false,true); + enc.encTime = encComp; + enc.decTime = decComp; + tad.addComponent(enc, xc, 500, false, true); //Connect encrypt and readchannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); fromStart.setP2(enc.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); //Connect encrypt and writechannel fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(enc.getTGConnectingPointAtIndex(1)); fromStart.setP2(wr.getTGConnectingPointAtIndex(0)); - tad.addComponent(fromStart, 300,200,false,true); + tad.addComponent(fromStart, 300, 200, false, true); } @@ -1746,7 +1705,7 @@ public class GTURTLEModeling { tad.addComponent(wr2, xc+75, 600,false,true); */ - xc+=300; + xc += 300; i++; } @@ -1755,47 +1714,47 @@ public class GTURTLEModeling { secChannels.putAll(hsmChannels); } //For all the tasks that receive encrypted data, decrypt it, assuming it has no associated HSM - for (TMLTask task: tmap.getTMLModeling().getTasks()){ + for (TMLTask task : tmap.getTMLModeling().getTasks()) { int xpos, ypos; //System.out.println("loop 2"); TMLActivityDiagramPanel tad = t.getTMLActivityDiagramPanel(task.getName()); HashSet<TGComponent> channelInstances = new HashSet<TGComponent>(); - for (String chan: secChannels.keySet()){ + for (String chan : secChannels.keySet()) { HSMChannel ch = secChannels.get(chan); channelInstances.clear(); - for (TGComponent tg: tad.getComponentList()){ - if (tg instanceof TMLADReadChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADReadChannel) { TMLADReadChannel readChannel = (TMLADReadChannel) tg; - if (readChannel.getChannelName().equals(chan) && readChannel.getSecurityContext().equals("")){ + if (readChannel.getChannelName().equals(chan) && readChannel.getSecurityContext().equals("")) { fromStart = tad.findTGConnectorStartingAt(tg.getTGConnectingPointAtIndex(1)); - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); } } } } - for (TGComponent chI: channelInstances){ + for (TGComponent chI : channelInstances) { TMLADReadChannel readChannel = (TMLADReadChannel) chI; readChannel.setSecurityContext(ch.securityContext); xpos = chI.getX(); - ypos = chI.getY()+10; + ypos = chI.getY() + 10; fromStart = tad.findTGConnectorStartingAt(chI.getTGConnectingPointAtIndex(1)); - if (fromStart==null){ - fromStart=new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + if (fromStart == null) { + fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); fromStart.setP1(chI.getTGConnectingPointAtIndex(1)); - tad.addComponent(fromStart, xpos,ypos,false,true); + tad.addComponent(fromStart, xpos, ypos, false, true); } TGConnectingPoint point = fromStart.getTGConnectingPointP2(); //Add decryption operator - int yShift=100; - TMLADDecrypt dec = new TMLADDecrypt(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + int yShift = 100; + TMLADDecrypt dec = new TMLADDecrypt(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); dec.securityContext = ch.securityContext; - tad.addComponent(dec, xpos,ypos+yShift, false, true); + tad.addComponent(dec, xpos, ypos + yShift, false, true); fromStart.setP2(dec.getTGConnectingPointAtIndex(0)); - if (point!=null){ - fromStart=new TGConnectorTMLAD(dec.getX(), dec.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + if (point != null) { + fromStart = new TGConnectorTMLAD(dec.getX(), dec.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(dec.getTGConnectingPointAtIndex(1)); @@ -1804,53 +1763,53 @@ public class GTURTLEModeling { fromStart.setP2(point); } //Shift components down to make room for the added ones, and add security contexts to write channels - for (TGComponent tg:tad.getComponentList()){ - if (tg.getY() >= ypos && tg!=dec){ - tg.setCd(tg.getX(), tg.getY()+yShift); + for (TGComponent tg : tad.getComponentList()) { + if (tg.getY() >= ypos && tg != dec) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); tad.repaint(); } } //Next find channels that send encrypted data, and add the encryption operator - for (String chan: secChannels.keySet()){ + for (String chan : secChannels.keySet()) { channelInstances.clear(); HSMChannel ch = secChannels.get(chan); - for (TGComponent tg: tad.getComponentList()){ - if (tg instanceof TMLADWriteChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADWriteChannel) { TMLADWriteChannel writeChannel = (TMLADWriteChannel) tg; - if (writeChannel.getChannelName().equals(chan) && writeChannel.getSecurityContext().equals("")){ + if (writeChannel.getChannelName().equals(chan) && writeChannel.getSecurityContext().equals("")) { fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); } } } } - for (TGComponent chI: channelInstances){ + for (TGComponent chI : channelInstances) { TMLADWriteChannel writeChannel = (TMLADWriteChannel) chI; writeChannel.setSecurityContext(ch.securityContext); xpos = chI.getX(); - ypos = chI.getY()-10; + ypos = chI.getY() - 10; fromStart = tad.findTGConnectorEndingAt(chI.getTGConnectingPointAtIndex(0)); TGConnectingPoint point = fromStart.getTGConnectingPointP2(); //Add encryption operator - int yShift=100; + int yShift = 100; TMLADEncrypt enc = new TMLADEncrypt(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - tad.addComponent(enc,xpos, ypos, false,true); + tad.addComponent(enc, xpos, ypos, false, true); enc.securityContext = ch.securityContext; enc.type = "Symmetric Encryption"; enc.message_overhead = overhead; - enc.encTime= encComp; - enc.decTime=decComp; - enc.size=overhead; + enc.encTime = encComp; + enc.decTime = decComp; + enc.size = overhead; fromStart.setP2(enc.getTGConnectingPointAtIndex(0)); - fromStart=new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(enc.getTGConnectingPointAtIndex(1)); @@ -1858,161 +1817,159 @@ public class GTURTLEModeling { fromStart.setP2(point); //Shift components down to make room for the added ones, and add security contexts to write channels - for (TGComponent tg:tad.getComponentList()){ - if (tg.getY() >= ypos && tg !=enc){ - tg.setCd(tg.getX(), tg.getY()+yShift); + for (TGComponent tg : tad.getComponentList()) { + if (tg.getY() >= ypos && tg != enc) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); tad.repaint(); } } } - for (String cpuName: selectedCpuTasks.keySet()){ + for (String cpuName : selectedCpuTasks.keySet()) { //Add a private bus to Hardware Accelerator with the task for hsm //Find the CPU the task is mapped to TMLArchiDiagramPanel archPanel = newarch.tmlap; - TMLArchiCPUNode cpu=null; - String refTask=""; - for (TGComponent tg: archPanel.getComponentList()){ - if (tg instanceof TMLArchiCPUNode){ - if (tg.getName().equals(cpuName)){ - cpu=(TMLArchiCPUNode) tg; + TMLArchiCPUNode cpu = null; + String refTask = ""; + for (TGComponent tg : archPanel.getComponentList()) { + if (tg instanceof TMLArchiCPUNode) { + if (tg.getName().equals(cpuName)) { + cpu = (TMLArchiCPUNode) tg; TMLArchiArtifact art = cpu.getArtifactList().get(0); - refTask=art.getReferenceTaskName(); + refTask = art.getReferenceTaskName(); break; } } } - if (cpu==null){ + if (cpu == null) { return; } //Add new memory - TMLArchiMemoryNode mem = new TMLArchiMemoryNode(cpu.getX()+100, cpu.getY()+100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel); - archPanel.addComponent(mem, cpu.getX()+100, cpu.getY()+100, false, true); - mem.setName("HSMMemory_"+cpuName); + TMLArchiMemoryNode mem = new TMLArchiMemoryNode(cpu.getX() + 100, cpu.getY() + 100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel); + archPanel.addComponent(mem, cpu.getX() + 100, cpu.getY() + 100, false, true); + mem.setName("HSMMemory_" + cpuName); //Add Hardware Accelerator - TMLArchiHWANode hwa = new TMLArchiHWANode(cpu.getX()+100, cpu.getY()+100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel); - archPanel.addComponent(hwa, cpu.getX()+100, cpu.getY()+100, false, true); - hwa.setName("HSM_"+cpuName); + TMLArchiHWANode hwa = new TMLArchiHWANode(cpu.getX() + 100, cpu.getY() + 100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel); + archPanel.addComponent(hwa, cpu.getX() + 100, cpu.getY() + 100, false, true); + hwa.setName("HSM_" + cpuName); //Add hsm task to hwa - TMLArchiArtifact hsmArt = new TMLArchiArtifact(cpu.getX()+100, cpu.getY()+100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, hwa, archPanel); - archPanel.addComponent(hsmArt, cpu.getX()+100, cpu.getY()+100, true, true); - hsmArt.setFullName("HSM_"+cpuName, refTask); + TMLArchiArtifact hsmArt = new TMLArchiArtifact(cpu.getX() + 100, cpu.getY() + 100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, hwa, archPanel); + archPanel.addComponent(hsmArt, cpu.getX() + 100, cpu.getY() + 100, true, true); + hsmArt.setFullName("HSM_" + cpuName, refTask); //Add bus connecting the cpu and HWA - TMLArchiBUSNode bus = new TMLArchiBUSNode(cpu.getX()+100, cpu.getY()+100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel); + TMLArchiBUSNode bus = new TMLArchiBUSNode(cpu.getX() + 100, cpu.getY() + 100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel); bus.setPrivacy(1); - bus.setName("HSMBus_"+cpuName); - archPanel.addComponent(bus, cpu.getX()+200, cpu.getY()+200, false, true); + bus.setName("HSMBus_" + cpuName); + archPanel.addComponent(bus, cpu.getX() + 200, cpu.getY() + 200, false, true); //Connect Bus and CPU - TMLArchiConnectorNode connect =new TMLArchiConnectorNode(cpu.getX()+100, cpu.getY()+100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel, null, null, new Vector<Point>()); - TGConnectingPoint p1 = bus.findFirstFreeTGConnectingPoint(true,true); + TMLArchiConnectorNode connect = new TMLArchiConnectorNode(cpu.getX() + 100, cpu.getY() + 100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel, null, null, new Vector<Point>()); + TGConnectingPoint p1 = bus.findFirstFreeTGConnectingPoint(true, true); p1.setFree(false); connect.setP2(p1); - - TGConnectingPoint p2 = cpu.findFirstFreeTGConnectingPoint(true,true); + TGConnectingPoint p2 = cpu.findFirstFreeTGConnectingPoint(true, true); p1.setFree(false); connect.setP1(p2); - archPanel.addComponent(connect, cpu.getX()+100, cpu.getY()+100, false, true); + archPanel.addComponent(connect, cpu.getX() + 100, cpu.getY() + 100, false, true); //Connect Bus and HWA - connect = new TMLArchiConnectorNode(cpu.getX()+100, cpu.getY()+100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel, null, null, new Vector<Point>()); - p1 = bus.findFirstFreeTGConnectingPoint(true,true); + connect = new TMLArchiConnectorNode(cpu.getX() + 100, cpu.getY() + 100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel, null, null, new Vector<Point>()); + p1 = bus.findFirstFreeTGConnectingPoint(true, true); p1.setFree(false); connect.setP2(p1); - p2 = hwa.findFirstFreeTGConnectingPoint(true,true); + p2 = hwa.findFirstFreeTGConnectingPoint(true, true); p1.setFree(false); connect.setP1(p2); - archPanel.addComponent(connect, cpu.getX()+100, cpu.getY()+100, false, true); + archPanel.addComponent(connect, cpu.getX() + 100, cpu.getY() + 100, false, true); //Connect Bus and Memory - connect = new TMLArchiConnectorNode(cpu.getX()+100, cpu.getY()+100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel, null, null, new Vector<Point>()); - p1 = bus.findFirstFreeTGConnectingPoint(true,true); + connect = new TMLArchiConnectorNode(cpu.getX() + 100, cpu.getY() + 100, archPanel.getMinX(), archPanel.getMaxX(), archPanel.getMinY(), archPanel.getMaxY(), true, null, archPanel, null, null, new Vector<Point>()); + p1 = bus.findFirstFreeTGConnectingPoint(true, true); p1.setFree(false); connect.setP2(p1); - p2 = mem.findFirstFreeTGConnectingPoint(true,true); + p2 = mem.findFirstFreeTGConnectingPoint(true, true); p1.setFree(false); connect.setP1(p2); - archPanel.addComponent(connect, cpu.getX()+100, cpu.getY()+100, false, true); + archPanel.addComponent(connect, cpu.getX() + 100, cpu.getY() + 100, false, true); } } - - public TMLMapping<TGComponent> autoSecure(MainGUI gui, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth){ + public TMLMapping<TGComponent> autoSecure(MainGUI gui, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth) { //TODO add more options // - if (tmap==null){ + if (tmap == null) { return null; } - TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; + TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; int arch = gui.tabs.indexOf(tmlap); - gui.cloneRenameTab(arch,"enc"); - TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size()-1); - - return autoSecure(gui, "enc", tmap,newarch,autoConf,autoWeakAuth, autoStrongAuth); + gui.cloneRenameTab(arch, "enc"); + TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size() - 1); + + return autoSecure(gui, "enc", tmap, newarch, autoConf, autoWeakAuth, autoStrongAuth); } - - public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch){ - return autoSecure(gui,name,map,newarch,"100","0","100",true,false,false); + + public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch) { + return autoSecure(gui, name, map, newarch, "100", "0", "100", true, false, false); } - - public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth){ - return autoSecure(gui,name,map,newarch,"100","0","100",autoConf,autoWeakAuth, autoStrongAuth); + + public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth) { + return autoSecure(gui, name, map, newarch, "100", "0", "100", autoConf, autoWeakAuth, autoStrongAuth); } - public TMLMapping<TGComponent> autoSecure(MainGUI gui, String encComp, String overhead, String decComp){ - if (tmap==null){ + public TMLMapping<TGComponent> autoSecure(MainGUI gui, String encComp, String overhead, String decComp) { + if (tmap == null) { return null; } - TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; + TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; int arch = gui.tabs.indexOf(tmlap); - gui.cloneRenameTab(arch,"enc"); - TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size()-1); - return autoSecure(gui,"enc", tmap,newarch,encComp, overhead,decComp,true,false,false); + gui.cloneRenameTab(arch, "enc"); + TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size() - 1); + return autoSecure(gui, "enc", tmap, newarch, encComp, overhead, decComp, true, false, false); } - public TMLMapping<TGComponent> autoSecure(MainGUI gui, String encComp, String overhead, String decComp, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth){ - if (tmap==null){ + public TMLMapping<TGComponent> autoSecure(MainGUI gui, String encComp, String overhead, String decComp, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth) { + if (tmap == null) { return null; } - TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; + TURTLEPanel tmlap = tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel().tp; int arch = gui.tabs.indexOf(tmlap); - gui.cloneRenameTab(arch,"enc"); - TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size()-1); - return autoSecure(gui,"enc", tmap,newarch,encComp, overhead,decComp,autoConf,autoWeakAuth, autoStrongAuth); + gui.cloneRenameTab(arch, "enc"); + TMLArchiPanel newarch = (TMLArchiPanel) gui.tabs.get(gui.tabs.size() - 1); + return autoSecure(gui, "enc", tmap, newarch, encComp, overhead, decComp, autoConf, autoWeakAuth, autoStrongAuth); } - - public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch, String encComp, String overhead, String decComp){ - return autoSecure(gui,name, tmap,newarch,encComp, overhead,decComp,true,false, false); + + public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch, String encComp, String overhead, String decComp) { + return autoSecure(gui, name, tmap, newarch, encComp, overhead, decComp, true, false, false); } - public void proverifAnalysis(TMLMapping<TGComponent> map, List<String> nonAuthChans, List<String> nonSecChans){ - if (map==null){ + public void proverifAnalysis(TMLMapping<TGComponent> map, List<String> nonAuthChans, List<String> nonSecChans) { + if (map == null) { TraceManager.addDev("No mapping"); return; } //Perform ProVerif Analysis - TML2Avatar t2a = new TML2Avatar(map,false,true); + TML2Avatar t2a = new TML2Avatar(map, false, true); AvatarSpecification avatarspec = t2a.generateAvatarSpec("1"); - if (avatarspec == null){ + if (avatarspec == null) { TraceManager.addDev("No avatar spec"); return; } @@ -2022,7 +1979,7 @@ public class GTURTLEModeling { proverif = avatar2proverif.generateProVerif(true, true, 1, true, false); warnings = avatar2proverif.getWarnings(); - if (!avatar2proverif.saveInFile("pvspec")){ + if (!avatar2proverif.saveInFile("pvspec")) { return; } @@ -2030,40 +1987,38 @@ public class GTURTLEModeling { rshc.setCmd(ConfigurationTTool.ProVerifVerifierPath + " -in pitype pvspec"); rshc.sendExecuteCommandRequest(); - Reader data = rshc.getDataReaderFromProcess(); + Reader data = rshc.getDataReaderFromProcess(); - ProVerifOutputAnalyzer pvoa = getProVerifOutputAnalyzer (); + ProVerifOutputAnalyzer pvoa = getProVerifOutputAnalyzer(); pvoa.analyzeOutput(data, true); HashMap<AvatarPragmaSecret, ProVerifQueryResult> confResults = pvoa.getConfidentialityResults(); - for (AvatarPragmaSecret pragma: confResults.keySet()) { - if (confResults.get(pragma).isProved() && !confResults.get(pragma).isSatisfied()) - { - nonSecChans.add(pragma.getArg().getBlock().getName() + "__" + pragma.getArg().getName()); - TraceManager.addDev(pragma.getArg().getBlock().getName() + "." + pragma.getArg().getName()+ " is not secret"); - TMLChannel chan = map.getTMLModeling().getChannelByShortName(pragma.getArg().getName().replaceAll("_chData","")); - for (String block:chan.getTaskNames()){ - nonSecChans.add(block+"__"+pragma.getArg().getName()); - } + for (AvatarPragmaSecret pragma : confResults.keySet()) { + if (confResults.get(pragma).isProved() && !confResults.get(pragma).isSatisfied()) { + nonSecChans.add(pragma.getArg().getBlock().getName() + "__" + pragma.getArg().getName()); + TraceManager.addDev(pragma.getArg().getBlock().getName() + "." + pragma.getArg().getName() + " is not secret"); + TMLChannel chan = map.getTMLModeling().getChannelByShortName(pragma.getArg().getName().replaceAll("_chData", "")); + for (String block : chan.getTaskNames()) { + nonSecChans.add(block + "__" + pragma.getArg().getName()); } + } } HashMap<AvatarPragmaAuthenticity, ProVerifQueryAuthResult> authResults = pvoa.getAuthenticityResults(); - for (AvatarPragmaAuthenticity pragma: authResults.keySet()) { + for (AvatarPragmaAuthenticity pragma : authResults.keySet()) { if (authResults.get(pragma).isProved() && !authResults.get(pragma).isSatisfied()) { nonAuthChans.add(pragma.getAttrA().getAttribute().getBlock().getName() + "__" + pragma.getAttrA().getAttribute().getName().replaceAll("_chData", "")); nonAuthChans.add(pragma.getAttrB().getAttribute().getBlock().getName() + "__" + pragma.getAttrB().getAttribute().getName().replaceAll("_chData", "")); } } - TraceManager.addDev("nonsecchans " + nonSecChans); - TraceManager.addDev("nonauthchans " + nonAuthChans); + TraceManager.addDev("nonsecchans " + nonSecChans); + TraceManager.addDev("nonauthchans " + nonAuthChans); TraceManager.addDev("all results displayed"); - } - catch (Exception e){ + } catch (Exception e) { System.out.println("ProVerif Analysis Failed " + e); } } - public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch, String encComp, String overhead, String decComp, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth){ + public TMLMapping<TGComponent> autoSecure(MainGUI gui, String name, TMLMapping<TGComponent> map, TMLArchiPanel newarch, String encComp, String overhead, String decComp, boolean autoConf, boolean autoWeakAuth, boolean autoStrongAuth) { Map<TMLTask, List<TMLTask>> toSecure = new HashMap<TMLTask, List<TMLTask>>(); Map<TMLTask, List<TMLTask>> toSecureRev = new HashMap<TMLTask, List<TMLTask>>(); Map<TMLTask, List<String>> secOutChannels = new HashMap<TMLTask, List<String>>(); @@ -2082,31 +2037,31 @@ public class GTURTLEModeling { TMLModeling<TGComponent> tmlmodel = map.getTMLModeling(); List<TMLChannel> channels = tmlmodel.getChannels(); - for (TMLChannel channel: channels){ - for (TMLCPrimitivePort p: channel.ports){ + for (TMLChannel channel : channels) { + for (TMLCPrimitivePort p : channel.ports) { channel.checkConf = channel.checkConf || p.checkConf; channel.checkAuth = channel.checkAuth || p.checkAuth; } } //Create clone of Component Diagram + Activity diagrams to secure - TGComponent tgcomp= map.getTMLModeling().getTGComponent(); - TMLComponentDesignPanel tmlcdp= (TMLComponentDesignPanel) tgcomp.getTDiagramPanel().tp; + TGComponent tgcomp = map.getTMLModeling().getTGComponent(); + TMLComponentDesignPanel tmlcdp = (TMLComponentDesignPanel) tgcomp.getTDiagramPanel().tp; // TMLComponentDesignPanel tmlcdp = map.getTMLCDesignPanel(); int ind = gui.tabs.indexOf(tmlcdp); - if (ind==-1){ + if (ind == -1) { TraceManager.addDev("No Component Design Panel"); return null; } String tabName = gui.getTitleAt(tmlcdp); gui.cloneRenameTab(ind, name); - TMLComponentDesignPanel t = (TMLComponentDesignPanel) gui.tabs.get(gui.tabs.size()-1); + TMLComponentDesignPanel t = (TMLComponentDesignPanel) gui.tabs.get(gui.tabs.size() - 1); TMLComponentTaskDiagramPanel tcdp = t.tmlctdp; //Create clone of architecture panel and map tasks to it - newarch.renameMapping(tabName, tabName+"_"+name); + newarch.renameMapping(tabName, tabName + "_" + name); - for (TMLTask task: map.getTMLModeling().getTasks()){ + for (TMLTask task : map.getTMLModeling().getTasks()) { List<String> tmp = new ArrayList<String>(); List<String> tmp2 = new ArrayList<String>(); List<TMLTask> tmp3 = new ArrayList<TMLTask>(); @@ -2119,47 +2074,46 @@ public class GTURTLEModeling { List<String> tmp10 = new ArrayList<String>(); secInChannels.put(task, tmp); secOutChannels.put(task, tmp2); - toSecure.put(task,tmp3); - toSecureRev.put(task,tmp4); - nonceInChannels.put(task,tmp5); - nonceOutChannels.put(task,tmp6); - macInChannels.put(task,tmp7); - macOutChannels.put(task,tmp8); - macNonceOutChannels.put(task,tmp9); - macNonceInChannels.put(task,tmp10); + toSecure.put(task, tmp3); + toSecureRev.put(task, tmp4); + nonceInChannels.put(task, tmp5); + nonceOutChannels.put(task, tmp6); + macInChannels.put(task, tmp7); + macOutChannels.put(task, tmp8); + macNonceOutChannels.put(task, tmp9); + macNonceInChannels.put(task, tmp10); } //With the proverif results, check which channels need to be secured - for (TMLTask task: map.getTMLModeling().getTasks()){ + for (TMLTask task : map.getTMLModeling().getTasks()) { //Check if all channel operators are secured TMLActivityDiagramPanel tad = t.getTMLActivityDiagramPanel(task.getName()); - for (TGComponent tg:tad.getComponentList()){ - if (tg instanceof TMLADWriteChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADWriteChannel) { TMLADWriteChannel writeChannel = (TMLADWriteChannel) tg; - if (writeChannel.getSecurityContext().equals("")){ + if (writeChannel.getSecurityContext().equals("")) { - TMLChannel chan = tmlmodel.getChannelByName(tabName+"__"+writeChannel.getChannelName()); + TMLChannel chan = tmlmodel.getChannelByName(tabName + "__" + writeChannel.getChannelName()); //System.out.println("channel " + chan); - if (chan!=null){ - if (chan.checkConf && autoConf){ + if (chan != null) { + if (chan.checkConf && autoConf) { // System.out.println(chan.getOriginTask().getName().split("__")[1]); - if (nonSecChans.contains(chan.getOriginTask().getName().split("__")[1]+"__"+writeChannel.getChannelName()+"_chData") && !secInChannels.get(chan.getDestinationTask()).contains(writeChannel.getChannelName())){ + if (nonSecChans.contains(chan.getOriginTask().getName().split("__")[1] + "__" + writeChannel.getChannelName() + "_chData") && !secInChannels.get(chan.getDestinationTask()).contains(writeChannel.getChannelName())) { // if (!securePath(map, chan.getOriginTask(), chan.getDestinationTask())){ secOutChannels.get(chan.getOriginTask()).add(writeChannel.getChannelName()); secInChannels.get(chan.getDestinationTask()).add(writeChannel.getChannelName()); toSecure.get(chan.getOriginTask()).add(chan.getDestinationTask()); - if (chan.checkAuth && autoStrongAuth){ + if (chan.checkAuth && autoStrongAuth) { toSecureRev.get(chan.getDestinationTask()).add(chan.getOriginTask()); nonceOutChannels.get(chan.getOriginTask()).add(writeChannel.getChannelName()); nonceInChannels.get(chan.getDestinationTask()).add(writeChannel.getChannelName()); } } - } - else if (chan.checkAuth && autoWeakAuth){ - if (nonAuthChans.contains(chan.getDestinationTask().getName().split("__")[1]+"__"+writeChannel.getChannelName())){ + } else if (chan.checkAuth && autoWeakAuth) { + if (nonAuthChans.contains(chan.getDestinationTask().getName().split("__")[1] + "__" + writeChannel.getChannelName())) { toSecure.get(chan.getOriginTask()).add(chan.getDestinationTask()); macOutChannels.get(chan.getOriginTask()).add(writeChannel.getChannelName()); macInChannels.get(chan.getDestinationTask()).add(writeChannel.getChannelName()); - if (autoStrongAuth){ + if (autoStrongAuth) { toSecureRev.get(chan.getDestinationTask()).add(chan.getOriginTask()); macNonceInChannels.get(chan.getDestinationTask()).add(writeChannel.getChannelName()); macNonceOutChannels.get(chan.getOriginTask()).add(writeChannel.getChannelName()); @@ -2172,129 +2126,127 @@ public class GTURTLEModeling { } } } - TraceManager.addDev("macoutchans "+ macOutChannels); - TraceManager.addDev("macinchans " +macInChannels); - TraceManager.addDev("nonsecin " +secInChannels); - TraceManager.addDev("nonsecout " +secOutChannels); - TraceManager.addDev("noncein " +nonceInChannels); - TraceManager.addDev("nonceout " +nonceOutChannels); + TraceManager.addDev("macoutchans " + macOutChannels); + TraceManager.addDev("macinchans " + macInChannels); + TraceManager.addDev("nonsecin " + secInChannels); + TraceManager.addDev("nonsecout " + secOutChannels); + TraceManager.addDev("noncein " + nonceInChannels); + TraceManager.addDev("nonceout " + nonceOutChannels); // System.out.println(secOutChanannels.toString()); // int num=0; //int nonceNum=0; //Create reverse channels on component diagram to send nonces if they don't already exist - for (TMLTask task: toSecureRev.keySet()){ + for (TMLTask task : toSecureRev.keySet()) { TraceManager.addDev("Adding nonces to " + task.getName()); List<TMLChannel> chans = tmlmodel.getChannelsFromMe(task); - for (TMLTask task2: toSecureRev.get(task)){ + for (TMLTask task2 : toSecureRev.get(task)) { boolean addChan = true; - for (TMLChannel chan:chans){ - if (chan.getDestinationTask()==task2){ - addChan=false; + for (TMLChannel chan : chans) { + if (chan.getDestinationTask() == task2) { + addChan = false; } } - if (addChan){ + if (addChan) { TMLCChannelOutPort originPort = new TMLCChannelOutPort(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp); TMLCChannelOutPort destPort = new TMLCChannelOutPort(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp); - for (TGComponent tg: tcdp.getComponentList()){ - if (tg instanceof TMLCPrimitiveComponent){ - if (tg.getValue().equals(task.getName().split("__")[1])){ + for (TGComponent tg : tcdp.getComponentList()) { + if (tg instanceof TMLCPrimitiveComponent) { + if (tg.getValue().equals(task.getName().split("__")[1])) { originPort = new TMLCChannelOutPort(tg.getX(), tg.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, tg, tcdp); - originPort.commName="nonceCh"+task.getName().split("__")[1] + "_"+task2.getName().split("__")[1]; - tcdp.addComponent(originPort,tg.getX(), tg.getY(),true,true); - } - else if (tg.getValue().equals(task2.getName().split("__")[1])){ + originPort.commName = "nonceCh" + task.getName().split("__")[1] + "_" + task2.getName().split("__")[1]; + tcdp.addComponent(originPort, tg.getX(), tg.getY(), true, true); + } else if (tg.getValue().equals(task2.getName().split("__")[1])) { destPort = new TMLCChannelOutPort(tg.getX(), tg.getY(), tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, tg, tcdp); - destPort.isOrigin=false; - destPort.commName="nonceCh"+task.getName().split("__")[1] + "_"+ task2.getName().split("__")[1]; - tcdp.addComponent(destPort,tg.getX(), tg.getY(),true,true); + destPort.isOrigin = false; + destPort.commName = "nonceCh" + task.getName().split("__")[1] + "_" + task2.getName().split("__")[1]; + tcdp.addComponent(destPort, tg.getX(), tg.getY(), true, true); } } } - tmlmodel.addChannel(new TMLChannel("nonceCh"+task.getName().split("__")[1] + "_"+ task2.getName().split("__")[1], originPort)); + tmlmodel.addChannel(new TMLChannel("nonceCh" + task.getName().split("__")[1] + "_" + task2.getName().split("__")[1], originPort)); //Add connection TMLCPortConnector conn = new TMLCPortConnector(0, 0, tcdp.getMinX(), tcdp.getMaxX(), tcdp.getMinY(), tcdp.getMaxX(), true, null, tcdp, originPort.getTGConnectingPointAtIndex(0), destPort.getTGConnectingPointAtIndex(0), new Vector<Point>()); - tcdp.addComponent(conn, 0,0,false,true); + tcdp.addComponent(conn, 0, 0, false, true); } } } // } //Add encryption/nonces to activity diagram - for (TMLTask task:toSecure.keySet()){ + for (TMLTask task : toSecure.keySet()) { String title = task.getName().split("__")[0]; TraceManager.addDev("Securing task " + task.getName()); TMLActivityDiagramPanel tad = t.getTMLActivityDiagramPanel(task.getName()); //Get start state position, shift everything down - int xpos=0; - int ypos=0; - TGConnector fromStart= new TGConnectorTMLAD(0, 0, 0, 0, 0, 0, false, null, tad, null, null, new Vector<Point>()); + int xpos = 0; + int ypos = 0; + TGConnector fromStart = new TGConnectorTMLAD(0, 0, 0, 0, 0, 0, false, null, tad, null, null, new Vector<Point>()); TGConnectingPoint point = new TGConnectingPoint(null, 0, 0, false, false); //Find states immediately before the write channel operator //For each occurence of a write channel operator, add encryption/nonces before it - for (String channel: secOutChannels.get(task)){ + for (String channel : secOutChannels.get(task)) { Set<TGComponent> channelInstances = new HashSet<TGComponent>(); - int yShift=50; - TMLChannel tmlc = tmlmodel.getChannelByName(title +"__"+channel); + int yShift = 50; + TMLChannel tmlc = tmlmodel.getChannelByName(title + "__" + channel); //First, find the connector that points to it. We will add the encryption, nonce operators directly before the write channel operator - for (TGComponent tg: tad.getComponentList()){ - if (tg instanceof TMLADWriteChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADWriteChannel) { TMLADWriteChannel writeChannel = (TMLADWriteChannel) tg; - if (writeChannel.getChannelName().equals(channel) && writeChannel.getSecurityContext().equals("")){ + if (writeChannel.getChannelName().equals(channel) && writeChannel.getSecurityContext().equals("")) { - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); } } } } - for (TGComponent comp: channelInstances){ + for (TGComponent comp : channelInstances) { //TMLADWriteChannel writeChannel = (TMLADWriteChannel) comp; xpos = comp.getX(); ypos = comp.getY(); fromStart = tad.findTGConnectorEndingAt(comp.getTGConnectingPointAtIndex(0)); point = fromStart.getTGConnectingPointP2(); //Add encryption operator - TMLADEncrypt enc = new TMLADEncrypt(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - TMLADReadChannel rd=new TMLADReadChannel(0, 0, 0, 0, 0, 0, false, null, tad); - if (nonceOutChannels.get(task).contains(channel)){ + TMLADEncrypt enc = new TMLADEncrypt(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + TMLADReadChannel rd = new TMLADReadChannel(0, 0, 0, 0, 0, 0, false, null, tad); + if (nonceOutChannels.get(task).contains(channel)) { //Receive any nonces if ensuring authenticity - rd = new TMLADReadChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + rd = new TMLADReadChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); List<TMLChannel> matches = tmlmodel.getChannels(tmlc.getDestinationTask(), tmlc.getOriginTask()); - if (matches.size()>0){ - rd.setChannelName(matches.get(0).getName().replaceAll(title+"__","")); - } - else { - rd.setChannelName("nonceCh"+tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); + if (matches.size() > 0) { + rd.setChannelName(matches.get(0).getName().replaceAll(title + "__", "")); + } else { + rd.setChannelName("nonceCh" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); } - rd.setSecurityContext("nonce_"+ tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); - tad.addComponent(rd, xpos, ypos+yShift, false,true); + rd.setSecurityContext("nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); + tad.addComponent(rd, xpos, ypos + yShift, false, true); fromStart.setP2(rd.getTGConnectingPointAtIndex(0)); - fromStart=new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); - yShift+=60; + yShift += 60; //Move encryption operator after receive nonce component - enc.setCd(xpos, ypos+yShift); - if (tmlc!=null){ - enc.nonce= "nonce_"+ tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]; + enc.setCd(xpos, ypos + yShift); + if (tmlc != null) { + enc.nonce = "nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]; } } - enc.securityContext = "autoEncrypt_"+channel; + enc.securityContext = "autoEncrypt_" + channel; enc.type = "Symmetric Encryption"; enc.message_overhead = overhead; - enc.encTime= encComp; - enc.decTime=decComp; - tad.addComponent(enc, xpos ,ypos+yShift, false, true); - yShift+=60; + enc.encTime = encComp; + enc.decTime = decComp; + tad.addComponent(enc, xpos, ypos + yShift, false, true); + yShift += 60; fromStart.setP2(enc.getTGConnectingPointAtIndex(0)); - fromStart=new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(enc.getTGConnectingPointAtIndex(1)); @@ -2302,92 +2254,91 @@ public class GTURTLEModeling { fromStart.setP2(point); //Shift components down to make room for the added ones, and add security contexts to write channels - for (TGComponent tg:tad.getComponentList()){ - if (tg instanceof TMLADWriteChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADWriteChannel) { TMLADWriteChannel wChannel = (TMLADWriteChannel) tg; TraceManager.addDev("Inspecting write channel " + wChannel.getChannelName()); - if (channel.equals(wChannel.getChannelName()) && wChannel.getSecurityContext().equals("")){ + if (channel.equals(wChannel.getChannelName()) && wChannel.getSecurityContext().equals("")) { TraceManager.addDev("Securing write channel " + wChannel.getChannelName()); - wChannel.setSecurityContext("autoEncrypt_"+wChannel.getChannelName()); + wChannel.setSecurityContext("autoEncrypt_" + wChannel.getChannelName()); } } - if (tg.getY() >= ypos && tg !=enc && tg!=rd){ - tg.setCd(tg.getX(), tg.getY()+yShift); + if (tg.getY() >= ypos && tg != enc && tg != rd) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); tad.repaint(); } } - for (String channel: macOutChannels.get(task)){ + for (String channel : macOutChannels.get(task)) { //Add MAC before writechannel - int yShift=50; - TMLChannel tmlc = tmlmodel.getChannelByName(title +"__"+channel); + int yShift = 50; + TMLChannel tmlc = tmlmodel.getChannelByName(title + "__" + channel); //First, find the connector that points to it. We will add the encryption, nonce operators directly before the write channel operator Set<TGComponent> channelInstances = new HashSet<TGComponent>(); - for (TGComponent tg: tad.getComponentList()){ - if (tg instanceof TMLADWriteChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADWriteChannel) { TMLADWriteChannel writeChannel = (TMLADWriteChannel) tg; - if (writeChannel.getChannelName().equals(channel) && writeChannel.getSecurityContext().equals("")){ + if (writeChannel.getChannelName().equals(channel) && writeChannel.getSecurityContext().equals("")) { xpos = tg.getX(); ypos = tg.getY(); fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); } } } } - for (TGComponent comp: channelInstances){ + for (TGComponent comp : channelInstances) { //TMLADWriteChannel writeChannel = (TMLADWriteChannel) comp; xpos = comp.getX(); ypos = comp.getY(); fromStart = tad.findTGConnectorEndingAt(comp.getTGConnectingPointAtIndex(0)); point = fromStart.getTGConnectingPointP2(); - TMLADEncrypt enc = new TMLADEncrypt(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + TMLADEncrypt enc = new TMLADEncrypt(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); //If we need to receive a nonce - TMLADReadChannel rd=new TMLADReadChannel(0, 0, 0, 0, 0, 0, false, null, tad); - if (macNonceOutChannels.get(task).contains(channel)){ + TMLADReadChannel rd = new TMLADReadChannel(0, 0, 0, 0, 0, 0, false, null, tad); + if (macNonceOutChannels.get(task).contains(channel)) { //Receive any nonces if ensuring authenticity - rd = new TMLADReadChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + rd = new TMLADReadChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); List<TMLChannel> matches = tmlmodel.getChannels(tmlc.getDestinationTask(), tmlc.getOriginTask()); - if (matches.size()>0){ - rd.setChannelName(matches.get(0).getName().replaceAll(title+"__","")); - } - else { - rd.setChannelName("nonceCh"+tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); + if (matches.size() > 0) { + rd.setChannelName(matches.get(0).getName().replaceAll(title + "__", "")); + } else { + rd.setChannelName("nonceCh" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); } - rd.setSecurityContext("nonce_"+ tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); - tad.addComponent(rd, xpos, ypos+yShift, false,true); + rd.setSecurityContext("nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); + tad.addComponent(rd, xpos, ypos + yShift, false, true); fromStart.setP2(rd.getTGConnectingPointAtIndex(0)); - fromStart=new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(rd.getTGConnectingPointAtIndex(1)); - yShift+=60; + yShift += 60; //Move encryption operator after receive nonce component - enc.setCd(xpos, ypos+yShift); - if (tmlc!=null){ - enc.nonce= "nonce_"+ tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]; + enc.setCd(xpos, ypos + yShift); + if (tmlc != null) { + enc.nonce = "nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]; } } //Add encryption operator - enc.securityContext = "autoEncrypt_"+channel; + enc.securityContext = "autoEncrypt_" + channel; enc.type = "MAC"; enc.message_overhead = overhead; - enc.encTime= encComp; - enc.decTime=decComp; - enc.size=overhead; - tad.addComponent(enc, xpos ,ypos+yShift, false, true); - yShift+=60; + enc.encTime = encComp; + enc.decTime = decComp; + enc.size = overhead; + tad.addComponent(enc, xpos, ypos + yShift, false, true); + yShift += 60; fromStart.setP2(enc.getTGConnectingPointAtIndex(0)); - fromStart=new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + fromStart = new TGConnectorTMLAD(enc.getX(), enc.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); fromStart.setP1(enc.getTGConnectingPointAtIndex(1)); @@ -2395,37 +2346,37 @@ public class GTURTLEModeling { fromStart.setP2(point); //Shift components down to make room for the added ones, and add security contexts to write channels - for (TGComponent tg:tad.getComponentList()){ - if (tg instanceof TMLADWriteChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADWriteChannel) { TMLADWriteChannel wChannel = (TMLADWriteChannel) tg; TraceManager.addDev("Inspecting write channel " + wChannel.getChannelName()); - if (channel.equals(wChannel.getChannelName()) && wChannel.getSecurityContext().equals("")){ + if (channel.equals(wChannel.getChannelName()) && wChannel.getSecurityContext().equals("")) { TraceManager.addDev("Securing write channel " + wChannel.getChannelName()); - wChannel.setSecurityContext("autoEncrypt_"+wChannel.getChannelName()); + wChannel.setSecurityContext("autoEncrypt_" + wChannel.getChannelName()); tad.repaint(); } } - if (tg.getY() >= ypos && tg !=enc && tg!=rd){ - tg.setCd(tg.getX(), tg.getY()+yShift); + if (tg.getY() >= ypos && tg != enc && tg != rd) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); } } - for (String channel: macInChannels.get(task)){ + for (String channel : macInChannels.get(task)) { //Add decryptmac after readchannel - int yShift=50; + int yShift = 50; Set<TGComponent> channelInstances = new HashSet<TGComponent>(); - TGConnector conn =new TGConnectorTMLAD(0, 0, 0, 0, 0, 0, false, null, tad, null, null, new Vector<Point>()); + TGConnector conn = new TGConnectorTMLAD(0, 0, 0, 0, 0, 0, false, null, tad, null, null, new Vector<Point>()); TGConnectingPoint next = new TGConnectingPoint(null, 0, 0, false, false); //Find read channel operator - for (TGComponent tg: tad.getComponentList()){ - if (tg instanceof TMLADReadChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADReadChannel) { TMLADReadChannel readChannel = (TMLADReadChannel) tg; - if (readChannel.getChannelName().equals(channel) && readChannel.getSecurityContext().equals("")){ + if (readChannel.getChannelName().equals(channel) && readChannel.getSecurityContext().equals("")) { fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); } } @@ -2433,61 +2384,60 @@ public class GTURTLEModeling { } - for (TGComponent comp: channelInstances){ + for (TGComponent comp : channelInstances) { fromStart = tad.findTGConnectorEndingAt(comp.getTGConnectingPointAtIndex(0)); point = fromStart.getTGConnectingPointP2(); conn = tad.findTGConnectorStartingAt(comp.getTGConnectingPointAtIndex(1)); - next= conn.getTGConnectingPointP2(); + next = conn.getTGConnectingPointP2(); xpos = fromStart.getX(); ypos = fromStart.getY(); TMLADReadChannel readChannel = (TMLADReadChannel) comp; TraceManager.addDev("Securing read channel " + readChannel.getChannelName()); - readChannel.setSecurityContext("autoEncrypt_"+readChannel.getChannelName()); + readChannel.setSecurityContext("autoEncrypt_" + readChannel.getChannelName()); tad.repaint(); TMLADWriteChannel wr = new TMLADWriteChannel(0, 0, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); //Create nonce and send it - TMLChannel tmlc = tmlmodel.getChannelByName(title +"__"+channel); - if (macNonceInChannels.get(task).contains(channel)){ + TMLChannel tmlc = tmlmodel.getChannelByName(title + "__" + channel); + if (macNonceInChannels.get(task).contains(channel)) { //Create a nonce operator and a write channel operator - TMLADEncrypt nonce = new TMLADEncrypt(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - nonce.securityContext = "nonce_"+ tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]; + TMLADEncrypt nonce = new TMLADEncrypt(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + nonce.securityContext = "nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]; nonce.type = "Nonce"; nonce.message_overhead = overhead; - nonce.encTime= encComp; - nonce.decTime=decComp; - tad.addComponent(nonce, xpos ,ypos+yShift, false, true); + nonce.encTime = encComp; + nonce.decTime = decComp; + tad.addComponent(nonce, xpos, ypos + yShift, false, true); fromStart.setP2(nonce.getTGConnectingPointAtIndex(0)); - yShift+=50; - wr = new TMLADWriteChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + yShift += 50; + wr = new TMLADWriteChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); //Send nonce along channel, the newly created nonce channel or an existing channel with the matching sender and receiver //Find matching channels List<TMLChannel> matches = tmlmodel.getChannels(tmlc.getDestinationTask(), tmlc.getOriginTask()); - if (matches.size()>0){ - wr.setChannelName(matches.get(0).getName().replaceAll(title+"__","")); - } - else { - wr.setChannelName("nonceCh"+tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); + if (matches.size() > 0) { + wr.setChannelName(matches.get(0).getName().replaceAll(title + "__", "")); + } else { + wr.setChannelName("nonceCh" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); } //send the nonce along the channel - wr.setSecurityContext("nonce_"+tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); - tad.addComponent(wr,xpos,ypos+yShift,false,true); + wr.setSecurityContext("nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); + tad.addComponent(wr, xpos, ypos + yShift, false, true); wr.makeValue(); - TGConnector tmp =new TGConnectorTMLAD(wr.getX(), wr.getY()+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null,tad,nonce.getTGConnectingPointAtIndex(1), wr.getTGConnectingPointAtIndex(0), new Vector<Point>()); - tad.addComponent(tmp, xpos,ypos,false,true); - fromStart=new TGConnectorTMLAD(wr.getX(), wr.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, wr.getTGConnectingPointAtIndex(1), null, new Vector<Point>()); + TGConnector tmp = new TGConnectorTMLAD(wr.getX(), wr.getY() + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, nonce.getTGConnectingPointAtIndex(1), wr.getTGConnectingPointAtIndex(0), new Vector<Point>()); + tad.addComponent(tmp, xpos, ypos, false, true); + fromStart = new TGConnectorTMLAD(wr.getX(), wr.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, wr.getTGConnectingPointAtIndex(1), null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); //Connect created write channel operator to start of read channel operator fromStart.setP1(wr.getTGConnectingPointAtIndex(1)); fromStart.setP2(point); //Shift everything from the read channel on down - for (TGComponent tg:tad.getComponentList()){ - if (tg.getY() >= ypos && tg!=nonce && tg!=wr){ - tg.setCd(tg.getX(), tg.getY()+yShift); + for (TGComponent tg : tad.getComponentList()) { + if (tg.getY() >= ypos && tg != nonce && tg != wr) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } } @@ -2496,60 +2446,60 @@ public class GTURTLEModeling { xpos = conn.getX(); ypos = conn.getY(); - TMLADDecrypt dec = new TMLADDecrypt(xpos+10, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + TMLADDecrypt dec = new TMLADDecrypt(xpos + 10, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); dec.securityContext = "autoEncrypt_" + readChannel.getChannelName(); tad.addComponent(dec, dec.getX(), dec.getY(), false, true); conn.setP2(dec.getTGConnectingPointAtIndex(0)); - yShift+=60; - conn = new TGConnectorTMLAD(xpos,ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, dec.getTGConnectingPointAtIndex(1), next, new Vector<Point>()); + yShift += 60; + conn = new TGConnectorTMLAD(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, dec.getTGConnectingPointAtIndex(1), next, new Vector<Point>()); conn.setP1(dec.getTGConnectingPointAtIndex(1)); conn.setP2(next); - tad.addComponent(conn, conn.getX(), conn.getY(), false,true); + tad.addComponent(conn, conn.getX(), conn.getY(), false, true); //Shift everything down - for (TGComponent tg:tad.getComponentList()){ - if (tg instanceof TMLADReadChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADReadChannel) { readChannel = (TMLADReadChannel) tg; TraceManager.addDev("Inspecting read channel " + readChannel.getChannelName()); - if (channel.equals(readChannel.getChannelName()) && readChannel.getSecurityContext().equals("")){ + if (channel.equals(readChannel.getChannelName()) && readChannel.getSecurityContext().equals("")) { TraceManager.addDev("Securing read channel " + readChannel.getChannelName()); - readChannel.setSecurityContext("autoEncrypt_"+readChannel.getChannelName()); + readChannel.setSecurityContext("autoEncrypt_" + readChannel.getChannelName()); } } - if (tg.getY() > ypos && tg!=dec && tg!=comp){ + if (tg.getY() > ypos && tg != dec && tg != comp) { - tg.setCd(tg.getX(), tg.getY()+yShift); + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); tad.repaint(); } } - for (String channel: secInChannels.get(task)){ - TraceManager.addDev("securing channel "+channel); - int yShift=20; + for (String channel : secInChannels.get(task)) { + TraceManager.addDev("securing channel " + channel); + int yShift = 20; // String title = task.getName().split("__")[0]; - TMLChannel tmlc = tmlmodel.getChannelByName(title +"__"+channel); - TGConnector conn =new TGConnectorTMLAD(0, 0, 0, 0, 0, 0, false, null, tad, null, null, new Vector<Point>()); + TMLChannel tmlc = tmlmodel.getChannelByName(title + "__" + channel); + TGConnector conn = new TGConnectorTMLAD(0, 0, 0, 0, 0, 0, false, null, tad, null, null, new Vector<Point>()); TGConnectingPoint next = new TGConnectingPoint(null, 0, 0, false, false); //Find read channel operator - TMLADReadChannel readChannel = new TMLADReadChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + TMLADReadChannel readChannel = new TMLADReadChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); HashSet<TGComponent> channelInstances = new HashSet<TGComponent>(); - for (TGComponent tg: tad.getComponentList()){ - if (tg instanceof TMLADReadChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADReadChannel) { readChannel = (TMLADReadChannel) tg; - if (readChannel.getChannelName().equals(channel) && readChannel.getSecurityContext().equals("")){ + if (readChannel.getChannelName().equals(channel) && readChannel.getSecurityContext().equals("")) { fromStart = tad.findTGConnectorEndingAt(tg.getTGConnectingPointAtIndex(0)); - if (fromStart!=null){ + if (fromStart != null) { channelInstances.add(tg); } } } } - for (TGComponent comp: channelInstances){ + for (TGComponent comp : channelInstances) { fromStart = tad.findTGConnectorEndingAt(comp.getTGConnectingPointAtIndex(0)); point = fromStart.getTGConnectingPointP2(); @@ -2558,101 +2508,99 @@ public class GTURTLEModeling { xpos = fromStart.getX(); ypos = fromStart.getY(); TMLADWriteChannel wr = new TMLADWriteChannel(0, 0, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - if (nonceInChannels.get(task).contains(channel)){ + if (nonceInChannels.get(task).contains(channel)) { //Create a nonce operator and a write channel operator - TMLADEncrypt nonce = new TMLADEncrypt(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); - nonce.securityContext = "nonce_"+ tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]; + TMLADEncrypt nonce = new TMLADEncrypt(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + nonce.securityContext = "nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]; nonce.type = "Nonce"; nonce.message_overhead = overhead; - nonce.encTime= encComp; - nonce.decTime=decComp; - tad.addComponent(nonce, xpos ,ypos+yShift, false, true); + nonce.encTime = encComp; + nonce.decTime = decComp; + tad.addComponent(nonce, xpos, ypos + yShift, false, true); fromStart.setP2(nonce.getTGConnectingPointAtIndex(0)); - yShift+=50; - wr = new TMLADWriteChannel(xpos, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + yShift += 50; + wr = new TMLADWriteChannel(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); //Send nonce along channel, the newly created nonce channel or an existing channel with the matching sender and receiver //Find matching channels List<TMLChannel> matches = tmlmodel.getChannels(tmlc.getDestinationTask(), tmlc.getOriginTask()); - if (matches.size()>0){ - wr.setChannelName(matches.get(0).getName().replaceAll(title+"__","")); - } - else { - wr.setChannelName("nonceCh"+tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); + if (matches.size() > 0) { + wr.setChannelName(matches.get(0).getName().replaceAll(title + "__", "")); + } else { + wr.setChannelName("nonceCh" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); } //send the nonce along the channel - wr.setSecurityContext("nonce_"+tmlc.getDestinationTask().getName().split("__")[1] + "_"+tmlc.getOriginTask().getName().split("__")[1]); - tad.addComponent(wr,xpos,ypos+yShift,false,true); + wr.setSecurityContext("nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); + tad.addComponent(wr, xpos, ypos + yShift, false, true); wr.makeValue(); - TGConnector tmp =new TGConnectorTMLAD(wr.getX(), wr.getY()+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null,tad,nonce.getTGConnectingPointAtIndex(1), wr.getTGConnectingPointAtIndex(0), new Vector<Point>()); - tad.addComponent(tmp, xpos,ypos,false,true); - fromStart=new TGConnectorTMLAD(wr.getX(), wr.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, wr.getTGConnectingPointAtIndex(1), null, new Vector<Point>()); + TGConnector tmp = new TGConnectorTMLAD(wr.getX(), wr.getY() + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, nonce.getTGConnectingPointAtIndex(1), wr.getTGConnectingPointAtIndex(0), new Vector<Point>()); + tad.addComponent(tmp, xpos, ypos, false, true); + fromStart = new TGConnectorTMLAD(wr.getX(), wr.getY(), tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, wr.getTGConnectingPointAtIndex(1), null, new Vector<Point>()); tad.addComponent(fromStart, xpos, ypos, false, true); //Connect created write channel operator to start of read channel operator fromStart.setP1(wr.getTGConnectingPointAtIndex(1)); fromStart.setP2(point); //Shift everything from the read channel on down - for (TGComponent tg:tad.getComponentList()){ - if (tg.getY() >= ypos && tg!=nonce && tg!=wr){ - tg.setCd(tg.getX(), tg.getY()+yShift); + for (TGComponent tg : tad.getComponentList()) { + if (tg.getY() >= ypos && tg != nonce && tg != wr) { + tg.setCd(tg.getX(), tg.getY() + yShift); } } } //tad.repaint(); //Now add the decrypt operator - yShift=40; + yShift = 40; TraceManager.addDev("Securing read channel " + readChannel.getChannelName()); - readChannel.setSecurityContext("autoEncrypt_"+readChannel.getChannelName()); + readChannel.setSecurityContext("autoEncrypt_" + readChannel.getChannelName()); tad.repaint(); //Add decryption operator if it does not already exist xpos = readChannel.getX(); ypos = readChannel.getY(); - TMLADDecrypt dec = new TMLADDecrypt(xpos+10, ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); + TMLADDecrypt dec = new TMLADDecrypt(xpos + 10, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad); dec.securityContext = "autoEncrypt_" + readChannel.getChannelName(); tad.addComponent(dec, dec.getX(), dec.getY(), false, true); conn.setP2(dec.getTGConnectingPointAtIndex(0)); - yShift+=100; - conn = new TGConnectorTMLAD(xpos,ypos+yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, dec.getTGConnectingPointAtIndex(1), next, new Vector<Point>()); + yShift += 100; + conn = new TGConnectorTMLAD(xpos, ypos + yShift, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, dec.getTGConnectingPointAtIndex(1), next, new Vector<Point>()); conn.setP1(dec.getTGConnectingPointAtIndex(1)); conn.setP2(next); - tad.addComponent(conn, conn.getX(), conn.getY(), false,true); + tad.addComponent(conn, conn.getX(), conn.getY(), false, true); //Shift everything down - for (TGComponent tg:tad.getComponentList()){ - if (tg instanceof TMLADReadChannel){ + for (TGComponent tg : tad.getComponentList()) { + if (tg instanceof TMLADReadChannel) { readChannel = (TMLADReadChannel) tg; TraceManager.addDev("Inspecting read channel " + readChannel.getChannelName()); - if (channel.equals(readChannel.getChannelName()) && readChannel.getSecurityContext().equals("")){ + if (channel.equals(readChannel.getChannelName()) && readChannel.getSecurityContext().equals("")) { TraceManager.addDev("Securing read channel " + readChannel.getChannelName()); - readChannel.setSecurityContext("autoEncrypt_"+readChannel.getChannelName()); + readChannel.setSecurityContext("autoEncrypt_" + readChannel.getChannelName()); } } - if (tg.getY() > ypos && tg!=dec){ + if (tg.getY() > ypos && tg != dec) { - tg.setCd(tg.getX(), tg.getY()+yShift); + tg.setCd(tg.getX(), tg.getY() + yShift); } } - tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY()+yShift); + tad.setMaxPanelSize(tad.getMaxX(), tad.getMaxY() + yShift); tad.repaint(); } } } GTMLModeling gtm = new GTMLModeling(t, false); - TMLModeling<TGComponent> newmodel = gtm.translateToTMLModeling(false,false); - for (TMLTask task:newmodel.getTasks()){ - task.setName(tabName+"_"+name+"__"+task.getName()); - } - for (TMLTask task: tmlmodel.getTasks()){ - HwExecutionNode node =(HwExecutionNode) map.getHwNodeOf(task); - if (newmodel.getTMLTaskByName(task.getName().replace(tabName,tabName+"_"+name))!=null){ - map.addTaskToHwExecutionNode(newmodel.getTMLTaskByName(task.getName().replace(tabName,tabName+"_"+name)), node); + TMLModeling<TGComponent> newmodel = gtm.translateToTMLModeling(false, false); + for (TMLTask task : newmodel.getTasks()) { + task.setName(tabName + "_" + name + "__" + task.getName()); + } + for (TMLTask task : tmlmodel.getTasks()) { + HwExecutionNode node = (HwExecutionNode) map.getHwNodeOf(task); + if (newmodel.getTMLTaskByName(task.getName().replace(tabName, tabName + "_" + name)) != null) { + map.addTaskToHwExecutionNode(newmodel.getTMLTaskByName(task.getName().replace(tabName, tabName + "_" + name)), node); map.removeTask(task); - } - else { + } else { System.out.println("Can't find " + task.getName()); } } @@ -2664,9 +2612,9 @@ public class GTURTLEModeling { } - public boolean securePath(TMLMapping<TGComponent> map, TMLTask t1, TMLTask t2){ + public boolean securePath(TMLMapping<TGComponent> map, TMLTask t1, TMLTask t2) { //Check if a path between two tasks is secure - boolean secure=true; + boolean secure = true; List<HwLink> links = map.getTMLArchitecture().getHwLinks(); HwExecutionNode node1 = (HwExecutionNode) map.getHwNodeOf(t1); HwExecutionNode node2 = (HwExecutionNode) map.getHwNodeOf(t2); @@ -2675,11 +2623,11 @@ public class GTURTLEModeling { List<HwNode> path = new ArrayList<HwNode>(); Map<HwNode, List<HwNode>> pathMap = new HashMap<HwNode, List<HwNode>>(); TraceManager.addDev("Links " + links); - if (node1==node2){ + if (node1 == node2) { return true; } - for (HwLink link: links){ - if (link.hwnode == node1){ + for (HwLink link : links) { + if (link.hwnode == node1) { found.add(link.bus); List<HwNode> tmp = new ArrayList<HwNode>(); tmp.add(link.bus); @@ -2687,23 +2635,22 @@ public class GTURTLEModeling { } } outerloop: - while (found.size()>0){ + while (found.size() > 0) { HwNode curr = found.remove(0); - for (HwLink link: links){ - if (curr == link.bus){ - if (link.hwnode == node2){ + for (HwLink link : links) { + if (curr == link.bus) { + if (link.hwnode == node2) { path = pathMap.get(curr); break outerloop; } - if (!done.contains(link.hwnode) && !found.contains(link.hwnode) && link.hwnode instanceof HwBridge){ + if (!done.contains(link.hwnode) && !found.contains(link.hwnode) && link.hwnode instanceof HwBridge) { found.add(link.hwnode); List<HwNode> tmp = new ArrayList<HwNode>(pathMap.get(curr)); tmp.add(link.hwnode); pathMap.put(link.hwnode, tmp); } - } - else if (curr == link.hwnode){ - if (!done.contains(link.bus) && !found.contains(link.bus)){ + } else if (curr == link.hwnode) { + if (!done.contains(link.bus) && !found.contains(link.bus)) { found.add(link.bus); List<HwNode> tmp = new ArrayList<HwNode>(pathMap.get(curr)); tmp.add(link.bus); @@ -2713,17 +2660,16 @@ public class GTURTLEModeling { } done.add(curr); } - if (path.size() ==0){ + if (path.size() == 0) { System.out.println("no path"); return true; - } - else { + } else { HwBus bus; //Check if all buses and bridges are private - for (HwNode n: path){ - if (n instanceof HwBus){ + for (HwNode n : path) { + if (n instanceof HwBus) { bus = (HwBus) n; - if (bus.privacy ==0){ + if (bus.privacy == 0) { return false; } } @@ -2732,81 +2678,79 @@ public class GTURTLEModeling { return secure; } - public void autoMapKeys(){ + public void autoMapKeys() { TraceManager.addDev("auto map keys"); - if (tmap==null){ + if (tmap == null) { return; } List<HwLink> links = tmap.getArch().getHwLinks(); //Find all Security Patterns, if they don't have an associated memory at encrypt and decrypt, map them TMLModeling<TGComponent> tmlm = tmap.getTMLModeling(); - if (tmlm.securityTaskMap ==null){ + if (tmlm.securityTaskMap == null) { return; } // System.out.println(tmlm.securityTaskMap); - for (SecurityPattern sp: tmlm.securityTaskMap.keySet()){ - if (sp.type.contains("Symmetric Encryption") || sp.type.equals("MAC")){ - TraceManager.addDev("Adding keys for "+sp.name); - for (TMLTask t:tmlm.securityTaskMap.get(sp)){ + for (SecurityPattern sp : tmlm.securityTaskMap.keySet()) { + if (sp.type.contains("Symmetric Encryption") || sp.type.equals("MAC")) { + TraceManager.addDev("Adding keys for " + sp.name); + for (TMLTask t : tmlm.securityTaskMap.get(sp)) { ArrayList<HwMemory> mems = new ArrayList<HwMemory>(); - boolean keyFound=false; + boolean keyFound = false; HwExecutionNode node1 = (HwExecutionNode) tmap.getHwNodeOf(t); //Try to find memory using only private buses List<HwNode> toVisit = new ArrayList<HwNode>(); // List<HwNode> toMemory = new ArrayList<HwNode>(); List<HwNode> complete = new ArrayList<HwNode>(); - for (HwLink link:links){ - if (link.hwnode==node1){ - if (link.bus.privacy==1){ + for (HwLink link : links) { + if (link.hwnode == node1) { + if (link.bus.privacy == 1) { toVisit.add(link.bus); } } } memloop: - while (toVisit.size()>0){ + while (toVisit.size() > 0) { HwNode curr = toVisit.remove(0); - for (HwLink link: links){ - if (curr == link.bus){ - if (link.hwnode instanceof HwMemory){ + for (HwLink link : links) { + if (curr == link.bus) { + if (link.hwnode instanceof HwMemory) { mems.add((HwMemory) link.hwnode); - TMLArchiMemoryNode memNode= (TMLArchiMemoryNode) listE.getTG(link.hwnode); + TMLArchiMemoryNode memNode = (TMLArchiMemoryNode) listE.getTG(link.hwnode); ArrayList<TMLArchiKey> keys = memNode.getKeyList(); - String patternString= ""; - for (TMLArchiKey key: keys){ - if (key.getValue().equals(sp.name)){ + String patternString = ""; + for (TMLArchiKey key : keys) { + if (key.getValue().equals(sp.name)) { - keyFound=true; + keyFound = true; break memloop; } patternString += key.getValue(); patternString += " "; } - TraceManager.addDev("Memory "+ link.hwnode.getName() + " has currently mapped: " + patternString); + TraceManager.addDev("Memory " + link.hwnode.getName() + " has currently mapped: " + patternString); } - if (!complete.contains(link.hwnode) && !toVisit.contains(link.hwnode) && link.hwnode instanceof HwBridge){ + if (!complete.contains(link.hwnode) && !toVisit.contains(link.hwnode) && link.hwnode instanceof HwBridge) { toVisit.add(link.hwnode); } - } - else if (curr == link.hwnode){ - if (!complete.contains(link.bus) && !toVisit.contains(link.bus)){ + } else if (curr == link.hwnode) { + if (!complete.contains(link.bus) && !toVisit.contains(link.bus)) { toVisit.add(link.bus); } } } complete.add(curr); } - if (!keyFound){ - if (mems.size()>0){ - TMLArchiMemoryNode memNode= (TMLArchiMemoryNode) listE.getTG(mems.get(0)); + if (!keyFound) { + if (mems.size() > 0) { + TMLArchiMemoryNode memNode = (TMLArchiMemoryNode) listE.getTG(mems.get(0)); TMLArchiKey key = new TMLArchiKey(memNode.x, memNode.y, memNode.tdp.getMinX(), memNode.tdp.getMaxX(), memNode.tdp.getMinY(), memNode.tdp.getMaxY(), false, memNode, memNode.tdp); key.setReferenceKey(sp.name); key.makeFullValue(); - TraceManager.addDev("Adding " +sp.name+ " key to " +memNode.getName()); - TraceManager.addDev("Adding " +sp + " key to " +memNode.getName()); - memNode.tdp.addComponent(key, memNode.x, memNode.y, true,true); + TraceManager.addDev("Adding " + sp.name + " key to " + memNode.getName()); + TraceManager.addDev("Adding " + sp + " key to " + memNode.getName()); + memNode.tdp.addComponent(key, memNode.x, memNode.y, true, true); memNode.tdp.repaint(); - } - else { + } else { System.out.println("Can't map key to memory for " + sp.name + " on task " + t.getName()); UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Cannot map key in memory for " + sp.name + " on task " + t.getName()); ce.setTDiagramPanel(tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel()); @@ -2815,68 +2759,65 @@ public class GTURTLEModeling { } } } - } - else if (sp.type.contains("Asymmetric Encryption")){ - for (TMLTask t:tmlm.securityTaskMap.get(sp)){ + } else if (sp.type.contains("Asymmetric Encryption")) { + for (TMLTask t : tmlm.securityTaskMap.get(sp)) { ArrayList<HwMemory> mems = new ArrayList<HwMemory>(); - boolean keyFound=false; + boolean keyFound = false; HwExecutionNode node1 = (HwExecutionNode) tmap.getHwNodeOf(t); //Try to find memory using only private buses List<HwNode> toVisit = new ArrayList<HwNode>(); // List<HwNode> toMemory = new ArrayList<HwNode>(); List<HwNode> complete = new ArrayList<HwNode>(); - for (HwLink link:links){ - if (link.hwnode==node1){ - if (link.bus.privacy==1){ + for (HwLink link : links) { + if (link.hwnode == node1) { + if (link.bus.privacy == 1) { toVisit.add(link.bus); } } } memloop: - while (toVisit.size()>0){ + while (toVisit.size() > 0) { HwNode curr = toVisit.remove(0); - for (HwLink link: links){ - if (curr == link.bus){ - if (link.hwnode instanceof HwMemory){ + for (HwLink link : links) { + if (curr == link.bus) { + if (link.hwnode instanceof HwMemory) { mems.add((HwMemory) link.hwnode); - TMLArchiMemoryNode memNode= (TMLArchiMemoryNode) listE.getTG(link.hwnode); + TMLArchiMemoryNode memNode = (TMLArchiMemoryNode) listE.getTG(link.hwnode); ArrayList<TMLArchiKey> keys = memNode.getKeyList(); - String patternString= ""; - for (TMLArchiKey key: keys){ - if (key.getValue().equals(sp.name)){ + String patternString = ""; + for (TMLArchiKey key : keys) { + if (key.getValue().equals(sp.name)) { - keyFound=true; + keyFound = true; break memloop; } patternString += key.getValue(); patternString += " "; } - TraceManager.addDev("Memory "+ link.hwnode.getName() + " has currently mapped: " + patternString); + TraceManager.addDev("Memory " + link.hwnode.getName() + " has currently mapped: " + patternString); } - if (!complete.contains(link.hwnode) && !toVisit.contains(link.hwnode) && link.hwnode instanceof HwBridge){ + if (!complete.contains(link.hwnode) && !toVisit.contains(link.hwnode) && link.hwnode instanceof HwBridge) { toVisit.add(link.hwnode); } - } - else if (curr == link.hwnode){ - if (!complete.contains(link.bus) && !toVisit.contains(link.bus)){ + } else if (curr == link.hwnode) { + if (!complete.contains(link.bus) && !toVisit.contains(link.bus)) { toVisit.add(link.bus); } } } complete.add(curr); } - if (!keyFound){ - if (mems.size()>0){ - TMLArchiMemoryNode memNode= (TMLArchiMemoryNode) listE.getTG(mems.get(0)); + if (!keyFound) { + if (mems.size() > 0) { + TMLArchiMemoryNode memNode = (TMLArchiMemoryNode) listE.getTG(mems.get(0)); TMLArchiKey key = new TMLArchiKey(memNode.x, memNode.y, memNode.tdp.getMinX(), memNode.tdp.getMaxX(), memNode.tdp.getMinY(), memNode.tdp.getMaxY(), false, memNode, memNode.tdp); key.setReferenceKey(sp.name); key.makeFullValue(); - TraceManager.addDev("Adding " +sp.name+ " key to " +memNode.getName()); - TraceManager.addDev("Adding " +sp + " key to " +memNode.getName()); - memNode.tdp.addComponent(key, memNode.x, memNode.y, true,true); + TraceManager.addDev("Adding " + sp.name + " key to " + memNode.getName()); + TraceManager.addDev("Adding " + sp + " key to " + memNode.getName()); + memNode.tdp.addComponent(key, memNode.x, memNode.y, true, true); memNode.tdp.repaint(); - } - else { + } else { System.out.println("Can't map key to memory for " + sp.name + " on task " + t.getName()); UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Cannot map key in memory for " + sp.name + " on task " + t.getName()); ce.setTDiagramPanel(tmap.getCorrespondanceList().getTG(tmap.getArch().getFirstCPU()).getTDiagramPanel()); @@ -2890,15 +2831,14 @@ public class GTURTLEModeling { TraceManager.addDev("Mapping finished"); } - public void generateAvatarFromTML(boolean mc, boolean security){ + public void generateAvatarFromTML(boolean mc, boolean security) { TraceManager.addDev("Generating Avatar from TML"); - if (tmlm!=null && tmap==null){ + if (tmlm != null && tmap == null) { tmap = tmlm.getDefaultMapping(); } - if (avatarspec!=null){ + if (avatarspec != null) { return; - } - else if (tmap!=null){ + } else if (tmap != null) { t2a = new TML2Avatar(tmap, mc, security); TraceManager.addDev("Avatar spec generation"); avatarspec = t2a.generateAvatarSpec("1"); @@ -2908,23 +2848,20 @@ public class GTURTLEModeling { public boolean generateProVerifFromAVATAR(String _path, int _stateReachability, boolean _typed, boolean allowPrivateChannelDuplication, String loopLimit) { // System.out.println(avatarspec); - if (avatarspec !=null){ + if (avatarspec != null) { //use avspec - } - else if (tmap!=null){ - t2a = new TML2Avatar(tmap,false,true); + } else if (tmap != null) { + t2a = new TML2Avatar(tmap, false, true); avatarspec = t2a.generateAvatarSpec(loopLimit); drawPanel(avatarspec, mgui.getFirstAvatarDesignPanelFound()); - } - else if (tmlm!=null){ + } else if (tmlm != null) { //Generate default mapping tmap = tmlm.getDefaultMapping(); - - t2a=new TML2Avatar(tmap,false,true); + + t2a = new TML2Avatar(tmap, false, true); avatarspec = t2a.generateAvatarSpec(loopLimit); - } - else if (avatarspec == null){ + } else if (avatarspec == null) { return false; } @@ -2937,7 +2874,7 @@ public class GTURTLEModeling { mgui.setMode(MainGUI.EDIT_PROVERIF_OK); //uppaalTable = tml2uppaal.getRelationTIFUPPAAL(_debug); try { - if (avatar2proverif.saveInFile(_path)){ + if (avatar2proverif.saveInFile(_path)) { TraceManager.addDev("Specification generated in " + _path); return true; } @@ -2982,18 +2919,18 @@ public class GTURTLEModeling { } public ArrayList<TGComponentAndUPPAALQuery> getUPPAALQueries(TURTLEPanel tp) { - return getUPPAALQueries(tp, false); + return getUPPAALQueries(tp, false); } public ArrayList<TGComponentAndUPPAALQuery> getUPPAALQueries(TURTLEPanel tp, boolean considerAll) { TraceManager.addDev("Searching for queries on " + mgui.getTabName(tp)); ArrayList<TGComponent> list = new ArrayList<TGComponent>(); ArrayList<TClass> tclasses; - if (considerAll) { - tp.getAllCheckableTGComponent(list); - } else { - tp.getAllCheckedTGComponent(list); - } + if (considerAll) { + tp.getAllCheckableTGComponent(list); + } else { + tp.getAllCheckedTGComponent(list); + } TGComponentAndUPPAALQuery tmpQ; ArrayList<TGComponentAndUPPAALQuery> listQ = new ArrayList<TGComponentAndUPPAALQuery>(); @@ -3009,16 +2946,16 @@ public class GTURTLEModeling { TClass t; String s; - for(ADComponent adc:listAD) { + for (ADComponent adc : listAD) { if (adc != null) { t = tm.findTClass(adc); //TraceManager.addDev("Found class:" + t.getName()); - if (t!= null) { + if (t != null) { tclasses = new ArrayList<TClass>(); tclasses.add(t); // For handling tobjects tm.addAllTClassesEndingWith(tclasses, "_" + t.getName()); - for(TClass tc: tclasses) { + for (TClass tc : tclasses) { //TraceManager.addDev("Analyzing class:" + tc.getName()); s = uppaalTIFTable.getRQuery(tc, adc); if (s != null) { @@ -3040,16 +2977,16 @@ public class GTURTLEModeling { TMLTask task; String s; - for(TMLActivityElement elt:listAE) { + for (TMLActivityElement elt : listAE) { if (elt != null) { task = tmlm.findTMLTask(elt); - if (task!= null) { + if (task != null) { s = uppaalTMLTable.getRQuery(task, elt); if (s != null) { //TraceManager.addDev("Adding query:" + s); // Object ref; if (elt.getReferenceObject() instanceof TGComponent) { - tmpQ = new TGComponentAndUPPAALQuery((TGComponent)(elt.getReferenceObject()), s + "$" + elt); + tmpQ = new TGComponentAndUPPAALQuery((TGComponent) (elt.getReferenceObject()), s + "$" + elt); } else { tmpQ = new TGComponentAndUPPAALQuery(null, s + "$" + elt); } @@ -3061,11 +2998,11 @@ public class GTURTLEModeling { } else if ((avatar2uppaal != null) && (tp instanceof AvatarDesignPanel)) { TraceManager.addDev("Making UPPAAL queries"); - for(TGComponent tgc: list) { + for (TGComponent tgc : list) { TraceManager.addDev("Making UPPAAL query for " + tgc); String s = avatar2uppaal.getUPPAALIdentification(tgc); TraceManager.addDev("Query: " + s); - if ((s!= null) && (s.length() > 0)) { + if ((s != null) && (s.length() > 0)) { AvatarBlock block = avatar2uppaal.getBlockFromReferenceObject(tgc); listQ.add(new TGComponentAndUPPAALQuery(tgc, s + "$" + block.getName() + "." + tgc)); } else { @@ -3074,11 +3011,11 @@ public class GTURTLEModeling { } } else if ((avatar2uppaal != null) && (tp instanceof AttackTreePanel)) { TraceManager.addDev("Making UPPAAL queries"); - for(TGComponent tgc: list) { + for (TGComponent tgc : list) { TraceManager.addDev("Making UPPAAL query for " + tgc); String s = avatar2uppaal.getUPPAALIdentification(tgc); TraceManager.addDev("Query: " + s); - if ((s!= null) && (s.length() > 0)) { + if ((s != null) && (s.length() > 0)) { AvatarBlock block = avatar2uppaal.getBlockFromReferenceObject(tgc); listQ.add(new TGComponentAndUPPAALQuery(tgc, s + "$" + block.getName() + "." + tgc)); } else { @@ -3086,7 +3023,7 @@ public class GTURTLEModeling { } } } - + return listQ; } @@ -3245,7 +3182,7 @@ public class GTURTLEModeling { JFrameSimulationTrace jfst = new JFrameSimulationTrace("Last simulation trace", sim, type); jfst.setIconImage(IconManager.img8); // jfst.setSize(900, 600); - GraphicLib.centerOnParent( jfst, 900, 600 ); + GraphicLib.centerOnParent(jfst, 900, 600); jfst.setVisible(true); } } @@ -3301,7 +3238,7 @@ public class GTURTLEModeling { public static String runDOTTY(String data) { String fileName = "graph" + graphId + ".dot"; - graphId ++; + graphId++; RemoteExecutionThread ret = new RemoteExecutionThread(ConfigurationTTool.DOTTYHost, fileName, data, ConfigurationTTool.DOTTYPath + " " + fileName); ret.start(); @@ -3332,13 +3269,13 @@ public class GTURTLEModeling { try { FileOutputStream fos = new FileOutputStream(file); - while(index1<length) { - index2 = Math.min(index1+step, length); + while (index1 < length) { + index2 = Math.min(index1 + step, length); fos.write(s.substring(index1, index2).getBytes()); index1 += step; } fos.close(); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(mgui.frame, "Specification could not be saved " + e.getMessage(), "Lotos File Error", JOptionPane.INFORMATION_MESSAGE); TraceManager.addError("Specification could not be saved " + e.getMessage()); } @@ -3354,7 +3291,7 @@ public class GTURTLEModeling { } public String getLastRTLOTOSSpecification() { - return rtlotos; + return rtlotos; } public String getLastTextualDTA() { @@ -3583,7 +3520,6 @@ public class GTURTLEModeling { } - public TURTLEModeling getTURTLEModeling() { return tm; } @@ -3595,9 +3531,11 @@ public class GTURTLEModeling { public TMLModeling<TGComponent> getTMLModeling() { return tmlm; } - public TML2Avatar getTML2Avatar(){ + + public TML2Avatar getTML2Avatar() { return t2a; } + public TMLMapping<TGComponent> getArtificialTMLMapping() { return artificialtmap; } @@ -3611,20 +3549,34 @@ public class GTURTLEModeling { } // TREE MANAGEMENT - public void expandToErrors() { - if (mcvdt != null) { - SyntaxAnalysisErrorTree saet = mcvdt.getSyntaxAnalysisErrorTree(); - if (saet != null) { - Object []obj = new Object[3]; - obj[0] = mgui.dtree.getModel().getRoot(); - obj[1] = mcvdt; - obj[2] = saet; - TraceManager.addDev("Expanding Path because of errors"); - mgui.dtree.expandMyPath(new TreePath(obj)); - mgui.dtree.forceUpdate(); - } - } + if ((mcvdt != null) && (checkingErrors != null) && (checkingErrors.size() > 0)){ + SyntaxAnalysisErrorTree saet = mcvdt.getSyntaxAnalysisErrorTree(); + if (saet != null) { + Object[] obj = new Object[3]; + obj[0] = mgui.dtree.getModel().getRoot(); + obj[1] = mcvdt; + obj[2] = saet; + TraceManager.addDev("Expanding Path because of errors"); + mgui.dtree.expandMyPath(new TreePath(obj)); + mgui.dtree.forceUpdate(); + } + } + } + + public void expandToWarnings() { + if ((mcvdt != null) && (warnings != null) && (warnings.size() > 0)) { + SyntaxAnalysisWarningTree sawt = mcvdt.getSyntaxAnalysisWarningTree(); + if (sawt != null) { + Object[] obj = new Object[3]; + obj[0] = mgui.dtree.getModel().getRoot(); + obj[1] = mcvdt; + obj[2] = sawt; + TraceManager.addDev("Expanding Path because of warnings"); + mgui.dtree.expandMyPath(new TreePath(obj)); + mgui.dtree.forceUpdate(); + } + } } public String toString() { @@ -3642,7 +3594,7 @@ public class GTURTLEModeling { return mcvdt; } else if (index == (panels.size() + 1)) { return gt; - } else if (index == (panels.size() + 2)) { + } else if (index == (panels.size() + 2)) { return idt; } else { return st; @@ -3668,7 +3620,7 @@ public class GTURTLEModeling { return panels.size() + 2; } - return panels.size()+3; + return panels.size() + 3; } // Projection management @@ -3688,7 +3640,7 @@ public class GTURTLEModeling { MasterGateManager mgm = new MasterGateManager(tm, 1); // Gate g; GroupOfGates gog; - Hashtable <String, GroupOfGates> hashtable = new Hashtable<String, GroupOfGates>(); + Hashtable<String, GroupOfGates> hashtable = new Hashtable<String, GroupOfGates>(); // int cpt = 0; @@ -3696,7 +3648,7 @@ public class GTURTLEModeling { // Fill Hashtable // int j; - for (TClassAndGateDS tag: gates) { + for (TClassAndGateDS tag : gates) { //TraceManager.addDev("TClass:" + tag.getTClassName() + " Gate:" + tag.getGateName()); //actionName = tag.getGateName(); //g = mgm.getGate(tag.getTClassName(), actionName); @@ -3717,7 +3669,7 @@ public class GTURTLEModeling { } try { - while((s = br.readLine()) != null) { + while ((s = br.readLine()) != null) { /*if (cpt % 10000 == 0) { TraceManager.addDev("cpt=" + cpt); }*/ @@ -3808,31 +3760,31 @@ public class GTURTLEModeling { int index1, index2, index3, index4; Gate g; String g0, g1, g2; - int cpt, transi=0; + int cpt, transi = 0; MasterGateManager mgm = new MasterGateManager(tm, 1); Map<String, Gate> ht = mgm.getGatesUpperCaseHashTable(); - warnings = new LinkedList<CheckingError> (); + warnings = new LinkedList<CheckingError>(); //TraceManager.addDev("input data=" + inputData); // int cpt1 = 0; try { - while((s = br.readLine()) != null) { + while ((s = br.readLine()) != null) { // cpt1 ++; //if (cpt1 % 100000 == 0) { //TraceManager.addDev("=" + cpt1 + " / " + transi); //} if (s.charAt(0) == '(') { index1 = s.indexOf(","); - if ((index1 > -1) && ((index1+1) < s.length())) { + if ((index1 > -1) && ((index1 + 1) < s.length())) { g1 = s.substring(0, index1 + 1); - s = s.substring(index1+1, s.length()); + s = s.substring(index1 + 1, s.length()); //TraceManager.addDev("g1=" + g1 + " s=" + s); index2 = s.indexOf(","); - if ((index2 > -1) && ((index2+1) < s.length())) { + if ((index2 > -1) && ((index2 + 1) < s.length())) { g2 = s.substring(index2, s.length()); s = s.substring(0, index2); s = s.trim(); @@ -3847,17 +3799,17 @@ public class GTURTLEModeling { g0 = ""; } else { // Extract action name - actionName = s.substring(index3+1, s.indexOf('!')).trim(); + actionName = s.substring(index3 + 1, s.indexOf('!')).trim(); // Format data g0 = "<"; cpt = 0; - while((index4 = s.indexOf('!')) > -1) { - s = s.substring(index4+1, s.length()); + while ((index4 = s.indexOf('!')) > -1) { + s = s.substring(index4 + 1, s.length()); if (cpt > 0) { g0 += ","; } - cpt ++; + cpt++; index4 = s.indexOf('!'); if (index4 > -1) { g0 += s.substring(0, index4); @@ -3890,7 +3842,7 @@ public class GTURTLEModeling { } } else if (s.startsWith("des")) { index1 = s.indexOf(","); - s1 = s.substring(index1+1, s.length()); + s1 = s.substring(index1 + 1, s.length()); index1 = s1.indexOf(","); s1 = s1.substring(0, index1).trim(); //TraceManager.addDev("nb of transitions=" + s); @@ -3913,10 +3865,10 @@ public class GTURTLEModeling { int i, j; TClassAndGateDS tcg; String nameTClass, nameGate; - for(i=0; i<gog.size(); i++) { + for (i = 0; i < gog.size(); i++) { nameTClass = gog.getTClassAt(i).getName(); nameGate = gog.getGateAt(i).getName(); - for(j=0; j<gates.size(); j++) { + for (j = 0; j < gates.size(); j++) { tcg = gates.elementAt(j); if ((tcg.getTClassName().compareTo(nameTClass) == 0) && (tcg.getGateName().compareTo(nameGate) == 0)) { @@ -3934,14 +3886,14 @@ public class GTURTLEModeling { int index1, index2; index1 = s.indexOf("i("); index2 = s.indexOf(")"); - return s.substring(0, index1-1) + "i" + s.substring(index2+2, s.length()); + return s.substring(0, index1 - 1) + "i" + s.substring(index2 + 2, s.length()); } public String makeAction(String s, String actionName) { int index1, index2; index1 = s.indexOf("i("); index2 = s.indexOf(")"); - return s.substring(0, index1) + actionName + s.substring(index2+1, s.length()); + return s.substring(0, index1) + actionName + s.substring(index2 + 1, s.length()); } public void enableUndo(boolean b) { @@ -3967,17 +3919,17 @@ public class GTURTLEModeling { if ((pointerOperation > -1) && (pointerOperation < savedOperations.size() - 1)) { // some save operations must be erased - for (int i = pointerOperation +1; i<savedOperations.size(); i++) { + for (int i = pointerOperation + 1; i < savedOperations.size(); i++) { savedOperations.removeElementAt(i); savedPanels.removeElementAt(i); - i --; + i--; } } // save actions on tab int size = savedPanels.size(); if (size > 0) { - Point p1 = savedPanels.elementAt(size - 1); // panels are saved under the form of a point -> x = analysis/design, y = panel + Point p1 = savedPanels.elementAt(size - 1); // panels are saved under the form of a point -> x = analysis/design, y = panel if (p == null) p = p1; /*if ((p1.x != p.x) || (p1.y != p.y)){ @@ -4005,7 +3957,7 @@ public class GTURTLEModeling { public void backward() { undoRunning = true; TraceManager.addDev("Nb Of saved operations:" + savedOperations.size() + " pointer=" + pointerOperation); - if ((pointerOperation < 1) || (savedOperations.size() < 2)) { + if ((pointerOperation < 1) || (savedOperations.size() < 2)) { TraceManager.addDev("Undo not possible"); undoRunning = false; return; @@ -4015,10 +3967,10 @@ public class GTURTLEModeling { mgui.reinitMainTabbedPane(); // Issue #42: the selected tabs should be memorized before decrementing the pointer - final Point prevSelectedTabs = savedPanels.elementAt( pointerOperation ); + final Point prevSelectedTabs = savedPanels.elementAt(pointerOperation); try { - pointerOperation --; + pointerOperation--; TraceManager.addDev("Decrementing pointer =" + pointerOperation); loadModelingFromXML(savedOperations.elementAt(pointerOperation)); @@ -4031,9 +3983,9 @@ public class GTURTLEModeling { // Issue #42: //Point p = savedPanels.elementAt(pointerOperation); - if ( prevSelectedTabs != null ) { + if (prevSelectedTabs != null) { TraceManager.addDev("Selecting tab panel=" + prevSelectedTabs.getX() + " diagram=" + prevSelectedTabs.getY()); - TDiagramPanel tdp = mgui.selectTab( prevSelectedTabs ); + TDiagramPanel tdp = mgui.selectTab(prevSelectedTabs); tdp.mode = TDiagramPanel.NORMAL; tdp.setDraw(true); tdp.repaint(); @@ -4045,7 +3997,7 @@ public class GTURTLEModeling { } public void selectBackwardMode() { - if (pointerOperation <0) { + if (pointerOperation < 0) { mgui.setMode(MainGUI.NO_BACKWARD); mgui.setMode(MainGUI.NO_FORWARD); } else { @@ -4053,7 +4005,7 @@ public class GTURTLEModeling { // forward if (pointerOperation < savedOperations.size() - 1) { mgui.setMode(MainGUI.FORWARD); - } else { + } else { mgui.setMode(MainGUI.NO_FORWARD); } @@ -4068,7 +4020,7 @@ public class GTURTLEModeling { public void forward() { - if ((pointerOperation < 0) || (pointerOperation > savedOperations.size() - 2)) { + if ((pointerOperation < 0) || (pointerOperation > savedOperations.size() - 2)) { return; } @@ -4077,18 +4029,18 @@ public class GTURTLEModeling { mgui.reinitMainTabbedPane(); // Issue #42: the selected tabs should be memorized before incrementing the pointer - final Point prevSelectedTabs = savedPanels.elementAt( pointerOperation ); + final Point prevSelectedTabs = savedPanels.elementAt(pointerOperation); try { - pointerOperation ++; + pointerOperation++; loadModelingFromXML(savedOperations.elementAt(pointerOperation)); } catch (Exception e) { TraceManager.addError("Exception in forward: " + e.getMessage()); } //Point prevSelectedTabs = savedPanels.elementAt(pointerOperation); - if ( prevSelectedTabs != null ) { - TDiagramPanel tdp = mgui.selectTab( prevSelectedTabs ); + if (prevSelectedTabs != null) { + TDiagramPanel tdp = mgui.selectTab(prevSelectedTabs); tdp.mode = TDiagramPanel.NORMAL; tdp.setDraw(true); tdp.repaint(); @@ -4116,7 +4068,7 @@ public class GTURTLEModeling { listE = dpt.getCorrespondanceTGElement(); checkingErrors = dpt.getErrors(); warnings = dpt.getWarnings(); - if ((checkingErrors != null) && (checkingErrors.size() >0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } @@ -4128,7 +4080,7 @@ public class GTURTLEModeling { checkingErrors = tmc.syntaxAnalysisChecking(); warnings.addAll(tmc.getWarnings()); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { analyzeErrors(); return false; } else { @@ -4195,7 +4147,7 @@ public class GTURTLEModeling { AvatarDesignPanel adp = null; try { - adp = (AvatarDesignPanel)(avatarspec.getInformationSource()); + adp = (AvatarDesignPanel) (avatarspec.getInformationSource()); } catch (Exception e) { TraceManager.addDev("Exception gtm: " + e.getMessage()); return -1; @@ -4205,7 +4157,7 @@ public class GTURTLEModeling { LinkedList<TGComponent> compInMutex = adp.getListOfComponentsInMutex(); TraceManager.addDev("Nb of elements in mutex:" + compInMutex.size()); - if (compInMutex.size() ==0) { + if (compInMutex.size() == 0) { return -2; } @@ -4214,12 +4166,12 @@ public class GTURTLEModeling { int nbOfFound; int cpt = 0; // Go thru invariants, and see whether one contains - for(Invariant inv: invariants) { + for (Invariant inv : invariants) { comps = inv.getComponents(); nbOfFound = 0; - for(TGComponent tgc_mutex: compInMutex) { + for (TGComponent tgc_mutex : compInMutex) { found = false; - for(TGComponent tgc_inv: comps) { + for (TGComponent tgc_inv : comps) { if (tgc_mutex == tgc_inv) { found = true; break; @@ -4228,20 +4180,20 @@ public class GTURTLEModeling { if (!found) { break; } - nbOfFound ++; + nbOfFound++; } if (nbOfFound == compInMutex.size()) { TraceManager.addDev("Mutex found in inv:" + cpt); - for(TGComponent tgc: compInMutex) { + for (TGComponent tgc : compInMutex) { tgc.setMutexResult(TGComponent.MUTEX_OK); } return cpt; } - cpt ++; + cpt++; } - for(TGComponent tgc: compInMutex) { + for (TGComponent tgc : compInMutex) { tgc.setMutexResult(TGComponent.MUTEX_UNKNOWN); } @@ -4258,7 +4210,7 @@ public class GTURTLEModeling { AvatarDesignPanel adp = null; try { - adp = (AvatarDesignPanel)(avatarspec.getInformationSource()); + adp = (AvatarDesignPanel) (avatarspec.getInformationSource()); } catch (Exception e) { TraceManager.addDev("Exception gtm: " + e.getMessage()); return; @@ -4271,7 +4223,6 @@ public class GTURTLEModeling { adp.removeAllMutualExclusionWithMasterMutex(); - } @@ -4286,10 +4237,10 @@ public class GTURTLEModeling { return -1; } - for(Invariant inv: invariants) { + for (Invariant inv : invariants) { if (inv.containsComponent(state)) { // All other states are in mutual exclusion - for(TGComponent tgc: inv.getComponents()) { + for (TGComponent tgc : inv.getComponents()) { if ((tgc instanceof AvatarSMDState) && (tgc != state)) { if (tgc.getTDiagramPanel() != state.getTDiagramPanel()) { if (!(list.contains(tgc))) { @@ -4325,16 +4276,16 @@ public class GTURTLEModeling { return; } - AvatarDesignPanel adp = (AvatarDesignPanel)(tp); + AvatarDesignPanel adp = (AvatarDesignPanel) (tp); adp.reinitMutualExclusionStates(); // First step: build a list of all states being in invariants Vector<AvatarSMDState> v = new Vector<AvatarSMDState>(); - for(Invariant inv: invariants) { - for(TGComponent tgc: inv.getComponents()) { + for (Invariant inv : invariants) { + for (TGComponent tgc : inv.getComponents()) { if (tgc instanceof AvatarSMDState) { if (!(v.contains(tgc))) { - v.add((AvatarSMDState)tgc); + v.add((AvatarSMDState) tgc); } } } @@ -4342,15 +4293,15 @@ public class GTURTLEModeling { // Then, add to all states its list of mutually exclusive states - for(AvatarSMDState s: v) { + for (AvatarSMDState s : v) { Vector<AvatarSMDState> v0 = new Vector<AvatarSMDState>(); - for(Invariant inv: invariants) { + for (Invariant inv : invariants) { if (inv.containsComponent(s)) { - for(TGComponent tgc: inv.getComponents()) { + for (TGComponent tgc : inv.getComponents()) { if ((tgc instanceof AvatarSMDState) && (tgc != s)) { if (tgc.getTDiagramPanel() != s.getTDiagramPanel()) { if (!(v0.contains(tgc))) { - v0.add((AvatarSMDState)tgc); + v0.add((AvatarSMDState) tgc); } } } @@ -4359,7 +4310,7 @@ public class GTURTLEModeling { } TraceManager.addDev("State " + s.getStateName() + " has " + v0.size() + " mutually eclusive states"); - for(AvatarSMDState s0: v0) { + for (AvatarSMDState s0 : v0) { s.addMutexState(s0); } } @@ -4377,7 +4328,7 @@ public class GTURTLEModeling { checkingErrors = tmc.syntaxAnalysisChecking(); warnings.addAll(tmc.getWarnings()); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { analyzeErrors(); return false; } else { @@ -4437,7 +4388,7 @@ public class GTURTLEModeling { return null; } - tmp = tmp.substring(index2+1, tmp.length()); + tmp = tmp.substring(index2 + 1, tmp.length()); return modeling + tmp; } @@ -4461,15 +4412,15 @@ public class GTURTLEModeling { if (tgc instanceof AvatarBDBlock) { AvatarSMDPanel asmdp = mgui.getAvatarSMDPanel(mgui.getCurrentSelectedIndex(), tgc.getValue()); s.append(asmdp.saveInXML()); - LinkedList<AvatarBDBlock> list = ((AvatarBDBlock)tgc).getFullBlockList(); - for(AvatarBDBlock b:list) { + LinkedList<AvatarBDBlock> list = ((AvatarBDBlock) tgc).getFullBlockList(); + for (AvatarBDBlock b : list) { asmdp = mgui.getAvatarSMDPanel(mgui.getCurrentSelectedIndex(), b.getValue()); s.append(asmdp.saveInXML()); } } if (tgc instanceof AvatarBDLibraryFunction) { - AvatarSMDPanel asmdp = mgui.getAvatarSMDPanel(mgui.getCurrentSelectedIndex(), ((AvatarBDLibraryFunction) tgc).getFunctionName ()); + AvatarSMDPanel asmdp = mgui.getAvatarSMDPanel(mgui.getCurrentSelectedIndex(), ((AvatarBDLibraryFunction) tgc).getFunctionName()); s.append(asmdp.saveInXML()); } @@ -4495,10 +4446,10 @@ public class GTURTLEModeling { if (tgc instanceof TMLCCompositeComponent) { TMLActivityDiagramPanel tmladp3; - List<TMLCPrimitiveComponent> list = ((TMLCCompositeComponent)tgc).getAllPrimitiveComponents(); + List<TMLCPrimitiveComponent> list = ((TMLCCompositeComponent) tgc).getAllPrimitiveComponents(); - for (TMLCPrimitiveComponent comp: list) { - tmladp3 = mgui.getTMLActivityDiagramPanel(mgui.getCurrentSelectedIndex(), comp.getValue()); + for (TMLCPrimitiveComponent comp : list) { + tmladp3 = mgui.getTMLActivityDiagramPanel(mgui.getCurrentSelectedIndex(), comp.getValue()); s.append(tmladp3.saveInXML()); } } @@ -4539,7 +4490,7 @@ public class GTURTLEModeling { if ((classes != null) && (classes.size() > 0)) { TCDTClass t; TActivityDiagramPanel tadp; - for(int i=0; i<classes.size(); i++) { + for (int i = 0; i < classes.size(); i++) { t = classes.elementAt(i); tadp = mgui.getActivityDiagramPanel(mgui.getCurrentSelectedIndex(), t.getValue()); s.append(tadp.saveInXML()); @@ -4549,15 +4500,15 @@ public class GTURTLEModeling { //Added by Solange //bug removed by Emil if (tdp instanceof ProactiveCSDPanel) { - final Vector<ProCSDComponent> comp =((ProactiveCSDPanel)tdp).selectedProCSDComponent(null); + final Vector<ProCSDComponent> comp = ((ProactiveCSDPanel) tdp).selectedProCSDComponent(null); if ((comp != null) && (comp.size() > 0)) { ProCSDComponent t; ProactiveSMDPanel psmd; - for(int i=0; i<comp.size(); i++) { + for (int i = 0; i < comp.size(); i++) { t = comp.elementAt(i); psmd = mgui.getSMDPanel(mgui.getCurrentSelectedIndex(), t.getValue()); - if (psmd!=null) + if (psmd != null) s.append(psmd.saveInXML()); } } @@ -4571,7 +4522,7 @@ public class GTURTLEModeling { //TraceManager.addDev("Saving TURTLEOS activity diagram Panel..."); TOSClass t; TURTLEOSActivityDiagramPanel tosadp; - for(int i=0; i<toClasses.size(); i++) { + for (int i = 0; i < toClasses.size(); i++) { t = toClasses.elementAt(i); tosadp = mgui.getTURTLEOSActivityDiagramPanel(mgui.getCurrentSelectedIndex(), t.getValue()); s.append(tosadp.saveInXML()); @@ -4583,7 +4534,7 @@ public class GTURTLEModeling { //TraceManager.addDev("Saving TML activity diagram Panel..."); TMLTaskOperator t; TMLActivityDiagramPanel tmladp; - for(int i=0; i<operators.size(); i++) { + for (int i = 0; i < operators.size(); i++) { t = operators.elementAt(i); tmladp = mgui.getTMLActivityDiagramPanel(mgui.getCurrentSelectedIndex(), t.getValue()); s.append(tmladp.saveInXML()); @@ -4595,7 +4546,7 @@ public class GTURTLEModeling { //TraceManager.addDev("Saving TML activity diagram Panel..."); AvatarBDBlock abdb; AvatarSMDPanel asmdp; - for(int i=0; i<blocks.size(); i++) { + for (int i = 0; i < blocks.size(); i++) { abdb = blocks.elementAt(i); asmdp = mgui.getAvatarSMDPanel(mgui.getCurrentSelectedIndex(), abdb.getBlockName()); s.append(asmdp.saveInXML()); @@ -4609,7 +4560,7 @@ public class GTURTLEModeling { //TraceManager.addDev("Saving TML activity diagram Panel..."); TMLCPrimitiveComponent ct; TMLActivityDiagramPanel tmladp; - for(int i=0; i<primComps.size(); i++) { + for (int i = 0; i < primComps.size(); i++) { ct = primComps.elementAt(i); tmladp = mgui.getTMLActivityDiagramPanel(mgui.getCurrentSelectedIndex(), ct.getValue()); s.append(tmladp.saveInXML()); @@ -4670,7 +4621,7 @@ public class GTURTLEModeling { TURTLEPanel tp; int i; // search for diagram panels (Design) - for(i=0; i<panels.size(); i++) { + for (i = 0; i < panels.size(); i++) { if ((index == -1) || (i == index)) { tp = panels.elementAt(i); s = tp.saveInXML(extensionToName); @@ -4695,9 +4646,9 @@ public class GTURTLEModeling { int i, j; Vector<TDiagramPanel> panelss; // search for diagram panels - for(i=0; i<panels.size(); i++) { + for (i = 0; i < panels.size(); i++) { panelss = (panels.elementAt(i).panels); - for(j=0; j<panelss.size(); j++) { + for (j = 0; j < panelss.size(); j++) { tdp = panelss.elementAt(j); tdp.removeAll(); } @@ -4724,7 +4675,7 @@ public class GTURTLEModeling { int beginIndex = tdp.getComponentList().size(); //Added by Solange - int cuenta=1; + int cuenta = 1; s = decodeString(s); @@ -4755,7 +4706,7 @@ public class GTURTLEModeling { Node adn; Element elt; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -4777,10 +4728,10 @@ public class GTURTLEModeling { } - TClassDiagramPanel tcdp = (TClassDiagramPanel)tdp; + TClassDiagramPanel tcdp = (TClassDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -4824,9 +4775,9 @@ public class GTURTLEModeling { return; } - TActivityDiagramPanel tadp = (TActivityDiagramPanel)tdp; + TActivityDiagramPanel tadp = (TActivityDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -4866,9 +4817,9 @@ public class GTURTLEModeling { return; } - InteractionOverviewDiagramPanel iodp = (InteractionOverviewDiagramPanel)tdp; + InteractionOverviewDiagramPanel iodp = (InteractionOverviewDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -4906,11 +4857,11 @@ public class GTURTLEModeling { return; } - ui.sd.SequenceDiagramPanel sdp = (ui.sd.SequenceDiagramPanel)tdp; + ui.sd.SequenceDiagramPanel sdp = (ui.sd.SequenceDiagramPanel) tdp; //TraceManager.addDev("Sequence diagram!"); - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -4948,11 +4899,11 @@ public class GTURTLEModeling { return; } - ui.sd2.SequenceDiagramPanel sdp = (ui.sd2.SequenceDiagramPanel)tdp; + ui.sd2.SequenceDiagramPanel sdp = (ui.sd2.SequenceDiagramPanel) tdp; //TraceManager.addDev("Sequence diagram!"); - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -4990,9 +4941,9 @@ public class GTURTLEModeling { return; } - UseCaseDiagramPanel ucdp = (UseCaseDiagramPanel)tdp; + UseCaseDiagramPanel ucdp = (UseCaseDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5029,9 +4980,9 @@ public class GTURTLEModeling { return; } - TDeploymentDiagramPanel tddp = (TDeploymentDiagramPanel)tdp; + TDeploymentDiagramPanel tddp = (TDeploymentDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5068,9 +5019,9 @@ public class GTURTLEModeling { return; } - NCDiagramPanel ncdp = (NCDiagramPanel)tdp; + NCDiagramPanel ncdp = (NCDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5107,9 +5058,9 @@ public class GTURTLEModeling { return; } - RequirementDiagramPanel rdp = (RequirementDiagramPanel)tdp; + RequirementDiagramPanel rdp = (RequirementDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5141,9 +5092,9 @@ public class GTURTLEModeling { return; } - EBRDDPanel ebrddp = (EBRDDPanel)tdp; + EBRDDPanel ebrddp = (EBRDDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5175,9 +5126,9 @@ public class GTURTLEModeling { return; } - AttackTreeDiagramPanel atdp = (AttackTreeDiagramPanel)tdp; + AttackTreeDiagramPanel atdp = (AttackTreeDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5203,16 +5154,16 @@ public class GTURTLEModeling { } } - } else if (tdp instanceof FaultTreeDiagramPanel) { + } else if (tdp instanceof FaultTreeDiagramPanel) { nl = doc.getElementsByTagName("FaultTreeDiagramPanelCopy"); if (nl == null) { return; } - FaultTreeDiagramPanel ftdp = (FaultTreeDiagramPanel)tdp; + FaultTreeDiagramPanel ftdp = (FaultTreeDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5248,10 +5199,10 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel)tdp; + TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5288,7 +5239,7 @@ public class GTURTLEModeling { //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading done"); } } - }else if (tdp instanceof DiplodocusMethodologyDiagramPanel) { + } else if (tdp instanceof DiplodocusMethodologyDiagramPanel) { nl = doc.getElementsByTagName("DiplodocusMethodologyDiagramPanelCopy"); docCopy = doc; @@ -5299,10 +5250,10 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - DiplodocusMethodologyDiagramPanel tmltdp = (DiplodocusMethodologyDiagramPanel)tdp; + DiplodocusMethodologyDiagramPanel tmltdp = (DiplodocusMethodologyDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5341,7 +5292,7 @@ public class GTURTLEModeling { } - }else if (tdp instanceof AvatarMethodologyDiagramPanel) { + } else if (tdp instanceof AvatarMethodologyDiagramPanel) { nl = doc.getElementsByTagName("AvatarMethodologyDiagramPanelCopy"); docCopy = doc; @@ -5352,10 +5303,10 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - AvatarMethodologyDiagramPanel amdp = (AvatarMethodologyDiagramPanel)tdp; + AvatarMethodologyDiagramPanel amdp = (AvatarMethodologyDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5392,7 +5343,7 @@ public class GTURTLEModeling { //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading done"); } } - }else if (tdp instanceof SysmlsecMethodologyDiagramPanel) { + } else if (tdp instanceof SysmlsecMethodologyDiagramPanel) { nl = doc.getElementsByTagName("SysmlsecMethodologyDiagramPanelCopy"); docCopy = doc; @@ -5403,10 +5354,10 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - SysmlsecMethodologyDiagramPanel amdp = (SysmlsecMethodologyDiagramPanel)tdp; + SysmlsecMethodologyDiagramPanel amdp = (SysmlsecMethodologyDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5443,7 +5394,7 @@ public class GTURTLEModeling { //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading done"); } } - } else if (tdp instanceof TMLComponentTaskDiagramPanel) { + } else if (tdp instanceof TMLComponentTaskDiagramPanel) { nl = doc.getElementsByTagName("TMLComponentTaskDiagramPanelCopy"); docCopy = doc; @@ -5454,11 +5405,11 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - TMLComponentTaskDiagramPanel tmlctdp = (TMLComponentTaskDiagramPanel)tdp; + TMLComponentTaskDiagramPanel tmlctdp = (TMLComponentTaskDiagramPanel) tdp; //tmlctdp.updateReferences(); - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5505,9 +5456,9 @@ public class GTURTLEModeling { return; } - TMLActivityDiagramPanel tmladp = (TMLActivityDiagramPanel)tdp; + TMLActivityDiagramPanel tmladp = (TMLActivityDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5539,7 +5490,7 @@ public class GTURTLEModeling { makePostLoading(tmladp, beginIndex); } } - } else if (tdp instanceof TMLCPPanel) { + } else if (tdp instanceof TMLCPPanel) { nl = doc.getElementsByTagName("CommunicationPatternDiagramPanelCopy"); docCopy = doc; @@ -5549,9 +5500,9 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - TMLCPPanel tmlcpp = (TMLCPPanel)tdp; + TMLCPPanel tmlcpp = (TMLCPPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5598,9 +5549,9 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - TMLSDPanel tmlsdp = (TMLSDPanel)tdp; + TMLSDPanel tmlsdp = (TMLSDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5647,9 +5598,9 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - TMLArchiDiagramPanel tmadp = (TMLArchiDiagramPanel)tdp; + TMLArchiDiagramPanel tmadp = (TMLArchiDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5694,9 +5645,9 @@ public class GTURTLEModeling { return; } - TURTLEOSClassDiagramPanel toscdp = (TURTLEOSClassDiagramPanel)tdp; + TURTLEOSClassDiagramPanel toscdp = (TURTLEOSClassDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5738,9 +5689,9 @@ public class GTURTLEModeling { return; } - TURTLEOSActivityDiagramPanel tosadp = (TURTLEOSActivityDiagramPanel)tdp; + TURTLEOSActivityDiagramPanel tosadp = (TURTLEOSActivityDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5774,102 +5725,94 @@ public class GTURTLEModeling { } } else if (tdp instanceof ProactiveCSDPanel) { //cuenta=beginIndex+1; - cuenta=mgui.tabs.size()-1; + cuenta = mgui.tabs.size() - 1; nl = doc.getElementsByTagName("ProactiveCSDPanelCopy"); - if (nl.getLength()==0) - { - nl=doc.getElementsByTagName("ProactiveCSDPanel"); - } + if (nl.getLength() == 0) { + nl = doc.getElementsByTagName("ProactiveCSDPanel"); + } docCopy = doc; - if (nl == null) - { - return; - } - ProactiveCSDPanel pcsdp = (ProactiveCSDPanel)tdp; - for(i=0; i<nl.getLength(); i++) - { - adn = nl.item(i); - if (adn.getNodeType() == Node.ELEMENT_NODE) - { - elt = (Element) adn; - if (pcsdp == null) - { - throw new MalformedModelingException(); - } + if (nl == null) { + return; + } + ProactiveCSDPanel pcsdp = (ProactiveCSDPanel) tdp; + for (i = 0; i < nl.getLength(); i++) { + adn = nl.item(i); + if (adn.getNodeType() == Node.ELEMENT_NODE) { + elt = (Element) adn; + if (pcsdp == null) { + throw new MalformedModelingException(); + } - // int xSel = Integer.decode(elt.getAttribute("xSel")).intValue(); - //int ySel = Integer.decode(elt.getAttribute("ySel")).intValue(); - //int widthSel = Integer.decode(elt.getAttribute("widthSel")).intValue(); - //int heightSel = Integer.decode(elt.getAttribute("heightSel")).intValue(); - - decX = _decX; - decY = _decY; - - //pcsdp.loadExtraParameters(elt); - //TraceManager.addDev("Toto 2"); - //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " components"); - makeXMLComponents(elt.getElementsByTagName("COMPONENT"), pcsdp); - //TraceManager.addDev("Toto 3"); - makePostProcessing(pcsdp); - //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " connectors"); - makeXMLConnectors(elt.getElementsByTagName("CONNECTOR"), pcsdp); - //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " subcomponents"); - makeXMLComponents(elt.getElementsByTagName("SUBCOMPONENT"), pcsdp); - //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " real points"); - connectConnectorsToRealPoints(pcsdp); - pcsdp.structureChanged(); - //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading " + beginIndex); - makePostLoading(pcsdp, beginIndex); - //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading done"); - } + // int xSel = Integer.decode(elt.getAttribute("xSel")).intValue(); + //int ySel = Integer.decode(elt.getAttribute("ySel")).intValue(); + //int widthSel = Integer.decode(elt.getAttribute("widthSel")).intValue(); + //int heightSel = Integer.decode(elt.getAttribute("heightSel")).intValue(); + + decX = _decX; + decY = _decY; + + //pcsdp.loadExtraParameters(elt); + //TraceManager.addDev("Toto 2"); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " components"); + makeXMLComponents(elt.getElementsByTagName("COMPONENT"), pcsdp); + //TraceManager.addDev("Toto 3"); + makePostProcessing(pcsdp); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " connectors"); + makeXMLConnectors(elt.getElementsByTagName("CONNECTOR"), pcsdp); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " subcomponents"); + makeXMLComponents(elt.getElementsByTagName("SUBCOMPONENT"), pcsdp); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " real points"); + connectConnectorsToRealPoints(pcsdp); + pcsdp.structureChanged(); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading " + beginIndex); + makePostLoading(pcsdp, beginIndex); + //TraceManager.addDev("TML task diagram : " + tmltdp.getName() + " post loading done"); } + } // Added by Solange nl = doc.getElementsByTagName("ProactiveSMDPanel"); - if (nl == null) - { - return; - } - String name=""; + if (nl == null) { + return; + } + String name = ""; ProactiveSMDPanel psmdp; - for(i=0; i<nl.getLength(); i++) //Erased cuenta++ by Solange at the end condition of the for - { - adn = nl.item(i); - if (adn.getNodeType() == Node.ELEMENT_NODE) - { - elt = (Element) adn; - name=elt.getAttribute("name"); - //Added by Solange name at the beginning and cuenta - name=mgui.createProActiveSMD(cuenta,name); - psmdp=mgui.getSMDPanel(cuenta, name); - if (psmdp == null) - { - throw new MalformedModelingException(); - } + for (i = 0; i < nl.getLength(); i++) //Erased cuenta++ by Solange at the end condition of the for + { + adn = nl.item(i); + if (adn.getNodeType() == Node.ELEMENT_NODE) { + elt = (Element) adn; + name = elt.getAttribute("name"); + //Added by Solange name at the beginning and cuenta + name = mgui.createProActiveSMD(cuenta, name); + psmdp = mgui.getSMDPanel(cuenta, name); + if (psmdp == null) { + throw new MalformedModelingException(); + } - // int xSel = Integer.decode(elt.getAttribute("minX")).intValue(); - //int ySel = Integer.decode(elt.getAttribute("maxX")).intValue(); // - mgui.getCurrentTDiagramPanel().currentX; - // int widthSel = Integer.decode(elt.getAttribute("minY")).intValue(); // - mgui.getCurrentTDiagramPanel().currentY;; - // int heightSel = Integer.decode(elt.getAttribute("maxY")).intValue(); // - mgui.getCurrentTDiagramPanel().currentY;; - - decX = _decX; - decY = _decY; - - //tmladp.loadExtraParameters(elt); - //TraceManager.addDev("Activity diagram : " + tadp.getName() + " components"); - makeXMLComponents(elt.getElementsByTagName("COMPONENT"), psmdp); - //TraceManager.addDev("Activity diagram : " + tadp.getName() + " connectors"); - makeXMLConnectors(elt.getElementsByTagName("CONNECTOR"), psmdp); - //TraceManager.addDev("Activity diagram : " + tadp.getName() + " subcomponents"); - makeXMLComponents(elt.getElementsByTagName("SUBCOMPONENT"), psmdp); - //TraceManager.addDev("Activity diagram : " + tadp.getName() + " real points"); - connectConnectorsToRealPoints(psmdp); - psmdp.structureChanged(); - //TraceManager.addDev("Activity diagram : " + tadp.getName() + " post loading"); - makePostLoading(psmdp, beginIndex); - //until here - } + // int xSel = Integer.decode(elt.getAttribute("minX")).intValue(); + //int ySel = Integer.decode(elt.getAttribute("maxX")).intValue(); // - mgui.getCurrentTDiagramPanel().currentX; + // int widthSel = Integer.decode(elt.getAttribute("minY")).intValue(); // - mgui.getCurrentTDiagramPanel().currentY;; + // int heightSel = Integer.decode(elt.getAttribute("maxY")).intValue(); // - mgui.getCurrentTDiagramPanel().currentY;; + + decX = _decX; + decY = _decY; + + //tmladp.loadExtraParameters(elt); + //TraceManager.addDev("Activity diagram : " + tadp.getName() + " components"); + makeXMLComponents(elt.getElementsByTagName("COMPONENT"), psmdp); + //TraceManager.addDev("Activity diagram : " + tadp.getName() + " connectors"); + makeXMLConnectors(elt.getElementsByTagName("CONNECTOR"), psmdp); + //TraceManager.addDev("Activity diagram : " + tadp.getName() + " subcomponents"); + makeXMLComponents(elt.getElementsByTagName("SUBCOMPONENT"), psmdp); + //TraceManager.addDev("Activity diagram : " + tadp.getName() + " real points"); + connectConnectorsToRealPoints(psmdp); + psmdp.structureChanged(); + //TraceManager.addDev("Activity diagram : " + tadp.getName() + " post loading"); + makePostLoading(psmdp, beginIndex); + //until here } + } } else if (tdp instanceof ProactiveSMDPanel) { //Changed by Solange, before it was like the first line //nl = doc.getElementsByTagName("ProactiveSMDPanelCopy"); @@ -5879,9 +5822,9 @@ public class GTURTLEModeling { return; } - ProactiveSMDPanel psmdp = (ProactiveSMDPanel)tdp; + ProactiveSMDPanel psmdp = (ProactiveSMDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5926,10 +5869,10 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - AvatarBDPanel abdp = (AvatarBDPanel)tdp; + AvatarBDPanel abdp = (AvatarBDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -5979,10 +5922,10 @@ public class GTURTLEModeling { //TraceManager.addDev("Toto 1"); - ADDDiagramPanel addp = (ADDDiagramPanel)tdp; + ADDDiagramPanel addp = (ADDDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6027,9 +5970,9 @@ public class GTURTLEModeling { return; } - AvatarSMDPanel asmdp = (AvatarSMDPanel)tdp; + AvatarSMDPanel asmdp = (AvatarSMDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6068,9 +6011,9 @@ public class GTURTLEModeling { return; } - AvatarRDPanel ardp = (AvatarRDPanel)tdp; + AvatarRDPanel ardp = (AvatarRDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6103,9 +6046,9 @@ public class GTURTLEModeling { return; } - AvatarMADPanel amadp = (AvatarMADPanel)tdp; + AvatarMADPanel amadp = (AvatarMADPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6138,9 +6081,9 @@ public class GTURTLEModeling { return; } - AvatarPDPanel apdp = (AvatarPDPanel)tdp; + AvatarPDPanel apdp = (AvatarPDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6173,9 +6116,9 @@ public class GTURTLEModeling { return; } - AvatarCDPanel acdp = (AvatarCDPanel)tdp; + AvatarCDPanel acdp = (AvatarCDPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6201,16 +6144,16 @@ public class GTURTLEModeling { } } - } else if (tdp instanceof CAMSBlockDiagramPanel) { //ajout CD 24.07----mark + } else if (tdp instanceof CAMSBlockDiagramPanel) { //ajout CD 24.07----mark nl = doc.getElementsByTagName("CAMSBlockDiagramPanelCopy"); if (nl == null) { return; } - CAMSBlockDiagramPanel camsp = (CAMSBlockDiagramPanel)tdp; + CAMSBlockDiagramPanel camsp = (CAMSBlockDiagramPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6229,7 +6172,7 @@ public class GTURTLEModeling { camsp.structureChanged(); makePostLoading(camsp, beginIndex); } - } + } } else if (tdp instanceof AvatarADPanel) { nl = doc.getElementsByTagName("AvatarADPanelCopy"); @@ -6238,9 +6181,9 @@ public class GTURTLEModeling { return; } - AvatarADPanel aadp = (AvatarADPanel)tdp; + AvatarADPanel aadp = (AvatarADPanel) tdp; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { adn = nl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -6282,7 +6225,7 @@ public class GTURTLEModeling { index2 = s.indexOf("<InteractionOverviewDiagramPanel "); index3 = s.indexOf("</TURTLEGMODELING>"); - if ((index1 <0) ||(index3 < 0)){ + if ((index1 < 0) || (index3 < 0)) { return null; } @@ -6360,7 +6303,7 @@ public class GTURTLEModeling { //TraceManager.addDev("nb de design=" + designPanelNl.getLength() + " nb d'analyse=" + analysisNl.getLength()); boolean error = false; - for(i=0; i<panelNl.getLength(); i++) { + for (i = 0; i < panelNl.getLength(); i++) { node = panelNl.item(i); //TraceManager.addDev("Node = " + dnd); @@ -6371,7 +6314,7 @@ public class GTURTLEModeling { } catch (MalformedModelingException mme) { Element elt = (Element) node; String type = elt.getAttribute("type"); - TraceManager.addError("Error when loading diagram: " + elt + " " +type, mme); + TraceManager.addError("Error when loading diagram: " + elt + " " + type, mme); error = true; } } @@ -6396,7 +6339,7 @@ public class GTURTLEModeling { //TraceManager.addDev("IDs done"); } - public void loadModeling(Node node) throws MalformedModelingException, SAXException { + public void loadModeling(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String type = elt.getAttribute("type"); // AVATAR @@ -6425,7 +6368,7 @@ public class GTURTLEModeling { loadRequirement(node); } else if (type.compareTo("AttackTree") == 0) { loadAttackTree(node); - } else if (type.compareTo("FaultTree") == 0) { + } else if (type.compareTo("FaultTree") == 0) { loadFaultTree(node); } else if (type.compareTo("Diplodocus Methodology") == 0) { loadDiplodocusMethodology(node); @@ -6433,8 +6376,8 @@ public class GTURTLEModeling { loadAvatarMethodology(node); } else if (type.compareTo("Sysmlsec Methodology") == 0) { loadSysmlsecMethodology(node); - } else if (type.compareTo("SystemC-AMS") == 0) { - loadSystemCAMS(node); + } else if (type.compareTo("SystemC-AMS") == 0) { + loadSystemCAMS(node); } else if (type.compareTo("TML Design") == 0) { loadTMLDesign(node); } else if (type.compareTo("TML Component Design") == 0) { @@ -6452,7 +6395,7 @@ public class GTURTLEModeling { } } - public void loadAvatarDesign(Node node) throws MalformedModelingException, SAXException { + public void loadAvatarDesign(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6470,7 +6413,7 @@ public class GTURTLEModeling { * informations provided by blocks. For instance we can check * that an attribute used in a state machine really exists. */ - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) node; @@ -6479,7 +6422,7 @@ public class GTURTLEModeling { loadAvatarBD(elt, indexDesign); } } - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) node; @@ -6490,7 +6433,7 @@ public class GTURTLEModeling { } } - public void loadAvatarDeployment(Node node) throws MalformedModelingException, SAXException { + public void loadAvatarDeployment(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6505,21 +6448,21 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Deployment nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("ADDDiagramPanel") == 0) { TraceManager.addDev("Loading ADD 1"); loadADDDiagram(elt, indexReq, cpt_req); - cpt_req ++; + cpt_req++; } } } } - public void loadAvatarRequirement(Node node) throws MalformedModelingException, SAXException { + public void loadAvatarRequirement(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6533,23 +6476,23 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Deployment nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("AvatarRDPanel") == 0) { loadAvatarRD(elt, indexReq, cpt_req); - cpt_req ++; + cpt_req++; } else if (elt.getTagName().compareTo("AvatarPDPanel") == 0) { loadAvatarPD(elt, indexReq, cpt_req); - cpt_req ++; + cpt_req++; } } } } - public void loadAttackTree(Node node) throws MalformedModelingException, SAXException { + public void loadAttackTree(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6563,20 +6506,20 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Deployment nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("AttackTreeDiagramPanel") == 0) { loadAttackTreeDiagram(elt, indexTree, cpttdp); - cpttdp ++; + cpttdp++; } } } } - public void loadFaultTree(Node node) throws MalformedModelingException, SAXException { + public void loadFaultTree(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6590,20 +6533,20 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Deployment nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("FaultTreeDiagramPanel") == 0) { loadFaultTreeDiagram(elt, indexTree, cpttdp); - cpttdp ++; + cpttdp++; } } } } - public void loadAvatarMADs(Node node) throws MalformedModelingException, SAXException { + public void loadAvatarMADs(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6619,20 +6562,20 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { TraceManager.addDev("MADs nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("AvatarMADPanel") == 0) { loadAvatarMAD(elt, indexReq, cpt_req); - cpt_req ++; + cpt_req++; } } } } - public void loadDesign(Node node) throws MalformedModelingException, SAXException { + public void loadDesign(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6645,11 +6588,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("TClassDiagramPanel") == 0) { // Class diagram loadTClassDiagram(elt, indexDesign); @@ -6663,7 +6606,7 @@ public class GTURTLEModeling { } } - public void loadAnalysis(Node node) throws MalformedModelingException, SAXException { + public void loadAnalysis(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6676,26 +6619,26 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("InteractionOverviewDiagramPanel") == 0) { // IOD loadIODiagram(elt, indexAnalysis); - cpt ++; + cpt++; } else { // Managing sequence diagrams if (elt.getTagName().compareTo("SequenceDiagramPanel") == 0) { loadSequenceDiagram(elt, indexAnalysis); - cpt ++; + cpt++; } else if (elt.getTagName().compareTo("SequenceDiagramPanelZV") == 0) { loadSequenceDiagramZV(elt, indexAnalysis); - cpt ++; + cpt++; } else if (elt.getTagName().compareTo("UseCaseDiagramPanel") == 0) { // Managing use case diagrams loadUseCaseDiagram(elt, indexAnalysis, cpt); - cpt ++; + cpt++; } /*else if (elt.getTagName().compareTo("AvatarCDPanel") == 0) { // Managing use case diagrams loadAvatarCD(elt, indexAnalysis, cpt); @@ -6710,7 +6653,7 @@ public class GTURTLEModeling { } } - public void loadTMLCP(Node node) throws MalformedModelingException, SAXException { + public void loadTMLCP(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6723,11 +6666,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("CommunicationPatternDiagramPanel") == 0) { // CP loadTMLCPDiagram(elt, indexTMLCP); @@ -6742,7 +6685,7 @@ public class GTURTLEModeling { } } - public void loadAvatarAnalysis(Node node) throws MalformedModelingException, SAXException { + public void loadAvatarAnalysis(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6757,48 +6700,48 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("SequenceDiagramPanel") == 0) { //TraceManager.addDev("Loading seq diag"); loadSequenceDiagram(elt, indexAnalysis); //TraceManager.addDev("Loading seq diag done"); - cpt ++; + cpt++; } else if (elt.getTagName().compareTo("SequenceDiagramPanelZV") == 0) { //TraceManager.addDev("Loading seq diag"); loadSequenceDiagramZV(elt, indexAnalysis); //TraceManager.addDev("Loading seq diag done"); - cpt ++; + cpt++; } else if (elt.getTagName().compareTo("UseCaseDiagramPanel") == 0) { // Managing use case diagrams //TraceManager.addDev("Loading ucd diag"); loadUseCaseDiagram(elt, indexAnalysis, cpt); //TraceManager.addDev("Loading ucd diag done"); - cpt ++; + cpt++; } else if (elt.getTagName().compareTo("AvatarCDPanel") == 0) { // Managing use case diagrams //TraceManager.addDev("Loading cd diag"); loadAvatarCD(elt, indexAnalysis, cpt); //TraceManager.addDev("Loading cd diag done"); - cpt ++; + cpt++; } else if (elt.getTagName().compareTo("AvatarADPanel") == 0) { // Managing use case diagrams //TraceManager.addDev("Loading ad diag"); loadAvatarAD(elt, indexAnalysis, cpt); //TraceManager.addDev("Loading ad diag done"); - cpt ++; + cpt++; } } } } - public void loadDeployment(Node node) throws MalformedModelingException, SAXException { + public void loadDeployment(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6811,11 +6754,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Deployment nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("TDeploymentDiagramPanel") == 0) { // IOD loadTDeploymentDiagram(elt, indexAnalysis); @@ -6824,7 +6767,7 @@ public class GTURTLEModeling { } } - public void loadNC(Node node) throws MalformedModelingException, SAXException { + public void loadNC(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6837,11 +6780,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Deployment nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("NCDiagramPanel") == 0) { // IOD loadNCDiagram(elt, indexAnalysis); @@ -6850,7 +6793,7 @@ public class GTURTLEModeling { } } - public void loadRequirement(Node node) throws MalformedModelingException, SAXException { + public void loadRequirement(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6864,25 +6807,24 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Deployment nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("TRequirementDiagramPanel") == 0) { loadRequirementDiagram(elt, indexReq, cpt_req); - cpt_req ++; + cpt_req++; } else if (elt.getTagName().compareTo("EBRDDPanel") == 0) { loadEBRDD(elt, indexReq, cpt_req); - cpt_req ++; + cpt_req++; } } } } - - public void loadDiplodocusMethodology(Node node) throws MalformedModelingException, SAXException { + public void loadDiplodocusMethodology(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6895,11 +6837,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("DiplodocusMethodologyDiagramPanel") == 0) { // Class diagram //TraceManager.addDev("Loading TML CD"); @@ -6910,7 +6852,7 @@ public class GTURTLEModeling { } } - public void loadAvatarMethodology(Node node) throws MalformedModelingException, SAXException { + public void loadAvatarMethodology(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6923,11 +6865,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("AvatarMethodologyDiagramPanel") == 0) { // Class diagram TraceManager.addDev("Loading Avatar methodo"); @@ -6938,7 +6880,7 @@ public class GTURTLEModeling { } } - public void loadSysmlsecMethodology(Node node) throws MalformedModelingException, SAXException { + public void loadSysmlsecMethodology(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6951,11 +6893,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("SysmlsecMethodologyDiagramPanel") == 0) { // Class diagram TraceManager.addDev("Loading SysMLSec methodo"); @@ -6966,7 +6908,7 @@ public class GTURTLEModeling { } } - public void loadSystemCAMS(Node node) throws MalformedModelingException, SAXException { + public void loadSystemCAMS(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -6979,11 +6921,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("SystemCAMSDiagramPanel") == 0) { // Class diagram TraceManager.addDev("Loading SystemC-AMS"); @@ -6994,7 +6936,7 @@ public class GTURTLEModeling { } } - public void loadTMLDesign(Node node) throws MalformedModelingException, SAXException { + public void loadTMLDesign(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -7007,11 +6949,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("TMLTaskDiagramPanel") == 0) { // Class diagram //TraceManager.addDev("Loading TML CD"); @@ -7028,7 +6970,7 @@ public class GTURTLEModeling { } } - public void loadTMLComponentDesign(Node node) throws MalformedModelingException, SAXException { + public void loadTMLComponentDesign(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -7041,11 +6983,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("TMLComponentTaskDiagramPanel") == 0) { // Component diagram //TraceManager.addDev("Loading TML Component diagram"); @@ -7062,7 +7004,7 @@ public class GTURTLEModeling { } } - public void loadTMLArchitecture(Node node) throws MalformedModelingException, SAXException { + public void loadTMLArchitecture(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -7075,11 +7017,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("TML Architecture nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("TMLArchiDiagramPanel") == 0) { //TraceManager.addDev("Loading TML DD" + elt.getTagName() ); loadTMLArchitectureDiagram(elt, indexDesign); @@ -7089,7 +7031,7 @@ public class GTURTLEModeling { } } - public void loadTURTLEOSDesign(Node node) throws MalformedModelingException, SAXException { + public void loadTURTLEOSDesign(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -7101,11 +7043,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("TURTLEOSClassDiagramPanel") == 0) { // Class diagram //TraceManager.addDev("Loading TURTLEOS CD"); @@ -7122,7 +7064,7 @@ public class GTURTLEModeling { } } - public void loadProActiveDesign(Node node) throws MalformedModelingException, SAXException { + public void loadProActiveDesign(Node node) throws MalformedModelingException, SAXException { Element elt = (Element) node; String nameTab; NodeList diagramNl; @@ -7136,11 +7078,11 @@ public class GTURTLEModeling { diagramNl = node.getChildNodes(); - for(int j=0; j<diagramNl.getLength(); j++) { + for (int j = 0; j < diagramNl.getLength(); j++) { //TraceManager.addDev("Design nodes: " + j); node = diagramNl.item(j); if (node.getNodeType() == Node.ELEMENT_NODE) { - elt = (Element)node; + elt = (Element) node; if (elt.getTagName().compareTo("ProactiveCSDPanel") == 0) { // Class diagram //TraceManager.addDev("Loading TML CD"); @@ -7157,7 +7099,7 @@ public class GTURTLEModeling { } } - public void loadDiagram(Element elt, TDiagramPanel tdp) throws MalformedModelingException, SAXException { + public void loadDiagram(Element elt, TDiagramPanel tdp) throws MalformedModelingException, SAXException { int x, y; double zoom = 0; try { @@ -7181,28 +7123,28 @@ public class GTURTLEModeling { // for TClassdiagram Panel if (tdp instanceof TClassDiagramPanel) { - ((TClassDiagramPanel)tdp).loadExtraParameters(elt); + ((TClassDiagramPanel) tdp).loadExtraParameters(elt); } if (tdp instanceof TActivityDiagramPanel) { - ((TActivityDiagramPanel)tdp).loadExtraParameters(elt); + ((TActivityDiagramPanel) tdp).loadExtraParameters(elt); } if (tdp instanceof TMLTaskDiagramPanel) { - ((TMLTaskDiagramPanel)tdp).loadExtraParameters(elt); + ((TMLTaskDiagramPanel) tdp).loadExtraParameters(elt); } if (tdp instanceof TMLComponentTaskDiagramPanel) { - ((TMLComponentTaskDiagramPanel)tdp).loadExtraParameters(elt); + ((TMLComponentTaskDiagramPanel) tdp).loadExtraParameters(elt); } if (tdp instanceof TMLArchiDiagramPanel) { - ((TMLArchiDiagramPanel)tdp).loadExtraParameters(elt); + ((TMLArchiDiagramPanel) tdp).loadExtraParameters(elt); } if (tdp instanceof AvatarBDPanel) { - ((AvatarBDPanel)tdp).loadExtraParameters(elt); + ((AvatarBDPanel) tdp).loadExtraParameters(elt); } //TraceManager.addDev("Element" + elt.toString()); @@ -7225,57 +7167,57 @@ public class GTURTLEModeling { //TraceManager.addDev("Test connectors"); if (tdp instanceof TMLComponentTaskDiagramPanel) { //TraceManager.addDev("Connectors..."); - ((TMLComponentTaskDiagramPanel)tdp).setConnectorsToFront(); + ((TMLComponentTaskDiagramPanel) tdp).setConnectorsToFront(); } if (tdp instanceof EBRDDPanel) { //TraceManager.addDev("Connectors..."); - ((EBRDDPanel)tdp).setConnectorsToFront(); + ((EBRDDPanel) tdp).setConnectorsToFront(); } if (tdp instanceof AttackTreeDiagramPanel) { //TraceManager.addDev("Connectors..."); - ((AttackTreeDiagramPanel)tdp).setConnectorsToFront(); + ((AttackTreeDiagramPanel) tdp).setConnectorsToFront(); } - if (tdp instanceof FaultTreeDiagramPanel) { + if (tdp instanceof FaultTreeDiagramPanel) { //TraceManager.addDev("Connectors..."); - ((FaultTreeDiagramPanel)tdp).setConnectorsToFront(); + ((FaultTreeDiagramPanel) tdp).setConnectorsToFront(); } if (tdp instanceof AvatarBDPanel) { //TraceManager.addDev("Connectors..."); - ((AvatarBDPanel)tdp).setConnectorsToFront(); + ((AvatarBDPanel) tdp).setConnectorsToFront(); } if (tdp instanceof AvatarSMDPanel) { //TraceManager.addDev("Connectors..."); - ((AvatarSMDPanel)tdp).setConnectorsToFront(); + ((AvatarSMDPanel) tdp).setConnectorsToFront(); } if (tdp instanceof AvatarPDPanel) { //TraceManager.addDev("Connectors..."); - ((AvatarPDPanel)tdp).setConnectorsToFront(); + ((AvatarPDPanel) tdp).setConnectorsToFront(); } if (tdp instanceof AvatarCDPanel) { //TraceManager.addDev("Connectors..."); - ((AvatarCDPanel)tdp).setConnectorsToFront(); + ((AvatarCDPanel) tdp).setConnectorsToFront(); } if (tdp instanceof AvatarADPanel) { //TraceManager.addDev("Connectors..."); - ((AvatarADPanel)tdp).setConnectorsToFront(); + ((AvatarADPanel) tdp).setConnectorsToFront(); } - if (tdp instanceof CAMSBlockDiagramPanel) { + if (tdp instanceof CAMSBlockDiagramPanel) { //TraceManager.addDev("Connectors..."); - ((CAMSBlockDiagramPanel)tdp).setConnectorsToFront(); - } + ((CAMSBlockDiagramPanel) tdp).setConnectorsToFront(); + } } // AVATAR - public void loadAvatarBD(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadAvatarBD(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7288,7 +7230,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadAvatarSMD(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadAvatarSMD(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7301,12 +7243,12 @@ public class GTURTLEModeling { asmdp.removeAll(); - mgui.selectDummyTab (indexDesign); + mgui.selectDummyTab(indexDesign); loadDiagram(elt, asmdp); - mgui.forgetDummyTab (); + mgui.forgetDummyTab(); } - public void loadAvatarRD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadAvatarRD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7323,7 +7265,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadAvatarMAD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadAvatarMAD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); mgui.createAvatarMAD(indexAnalysis, name); @@ -7336,7 +7278,7 @@ public class GTURTLEModeling { } - public void loadADDDiagram(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadADDDiagram(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7364,7 +7306,7 @@ public class GTURTLEModeling { TraceManager.addDev("ADD 5"); } - public void loadAvatarPD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadAvatarPD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7380,7 +7322,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadAvatarCD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadAvatarCD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7396,7 +7338,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadAvatarAD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadAvatarAD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7413,7 +7355,7 @@ public class GTURTLEModeling { } // TURTLE Design - public void loadTClassDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTClassDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7426,7 +7368,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadTActivityDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTActivityDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7441,7 +7383,7 @@ public class GTURTLEModeling { loadDiagram(elt, tadp); } - public void loadDiplodocusMethodologyDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadDiplodocusMethodologyDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7457,7 +7399,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadAvatarMethodologyDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadAvatarMethodologyDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7473,7 +7415,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadSysmlsecMethodologyDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadSysmlsecMethodologyDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7489,8 +7431,8 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadSystemCAMSDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { - //ajout CD + public void loadSystemCAMSDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + //ajout CD String name; TDiagramPanel tdp; @@ -7505,7 +7447,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadTMLTaskDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTMLTaskDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7520,7 +7462,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadTMLComponentTaskDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTMLComponentTaskDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7534,11 +7476,11 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); - ((TMLComponentTaskDiagramPanel)tdp).hideConnectors(); - ((TMLComponentTaskDiagramPanel)tdp).updatePorts(); + ((TMLComponentTaskDiagramPanel) tdp).hideConnectors(); + ((TMLComponentTaskDiagramPanel) tdp).updatePorts(); } - public void loadTMLArchitectureDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTMLArchitectureDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7553,7 +7495,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadTMLActivityDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTMLActivityDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7573,7 +7515,7 @@ public class GTURTLEModeling { loadDiagram(elt, tmladp); } - public void loadTURTLEOSClassDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTURTLEOSClassDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7585,7 +7527,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadTURTLEOSActivityDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadTURTLEOSActivityDiagram(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7600,7 +7542,7 @@ public class GTURTLEModeling { loadDiagram(elt, tosadp); } - public void loadProactiveCSD(Element elt, int indexDesign) throws MalformedModelingException, SAXException { + public void loadProactiveCSD(Element elt, int indexDesign) throws MalformedModelingException, SAXException { String name; TDiagramPanel tdp; @@ -7610,13 +7552,12 @@ public class GTURTLEModeling { // mgui.setProacticeCSDName(indexDesign, name); tdp = mgui.getMainTDiagramPanel(indexDesign); //ProactiveDesignPanel pdp=(ProactiveDesignPanel) mgui.getCurrentTURTLEPanel(); - ProactiveDesignPanel pdp=(ProactiveDesignPanel) tdp.tp; - if (!tdp.getName().equals(name)) - { + ProactiveDesignPanel pdp = (ProactiveDesignPanel) tdp.tp; + if (!tdp.getName().equals(name)) { - //tdp=pdp.addCompositeStructureDiagram(name); - tdp=pdp.addProActiveCompSpecificationPanel(name); - } + //tdp=pdp.addCompositeStructureDiagram(name); + tdp = pdp.addProActiveCompSpecificationPanel(name); + } //TraceManager.addDev("tdp=" + tdp.getName()); @@ -7624,7 +7565,7 @@ public class GTURTLEModeling { } - public void loadProactiveSMD(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { + public void loadProactiveSMD(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7642,7 +7583,7 @@ public class GTURTLEModeling { loadDiagram(elt, smd); } - public void loadIODiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { + public void loadIODiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7661,7 +7602,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadTMLCPDiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { + public void loadTMLCPDiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7679,7 +7620,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadTMLSDDiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { + public void loadTMLSDDiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7697,7 +7638,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadRequirementDiagram(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadRequirementDiagram(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7714,7 +7655,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadEBRDD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadEBRDD(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7731,7 +7672,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadAttackTreeDiagram(Element elt, int indexDiag, int indexTab) throws MalformedModelingException, SAXException { + public void loadAttackTreeDiagram(Element elt, int indexDiag, int indexTab) throws MalformedModelingException, SAXException { String name; //TraceManager.addDev("indexDiag=" + indexDiag); @@ -7749,7 +7690,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadFaultTreeDiagram(Element elt, int indexDiag, int indexTab) throws MalformedModelingException, SAXException { + public void loadFaultTreeDiagram(Element elt, int indexDiag, int indexTab) throws MalformedModelingException, SAXException { String name; //TraceManager.addDev("indexDiag=" + indexDiag); @@ -7767,7 +7708,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadSequenceDiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { + public void loadSequenceDiagram(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7778,27 +7719,25 @@ public class GTURTLEModeling { ui.sd.SequenceDiagramPanel sdp = mgui.getSequenceDiagramPanel(indexAnalysis, name); //TraceManager.addDev("Loading seq diag2"); ui.sd2.SequenceDiagramPanel sdp2 = mgui.getSequenceDiagramPanelZV(indexAnalysis, name); - + if (sdp != null) { - sdp.removeAll(); + sdp.removeAll(); //TraceManager.addDev("Loading seq diag4"); loadDiagram(elt, sdp); //TraceManager.addDev("Loading seq diag5"); - } - else if (sdp2 != null) { - sdp2.removeAll(); + } else if (sdp2 != null) { + sdp2.removeAll(); loadDiagram(elt, sdp2); - } - else - throw new MalformedModelingException(); + } else + throw new MalformedModelingException(); //TraceManager.addDev("Loading seq diag3"); - + } - public void loadSequenceDiagramZV(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { + public void loadSequenceDiagramZV(Element elt, int indexAnalysis) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7821,7 +7760,7 @@ public class GTURTLEModeling { //TraceManager.addDev("Loading seq diag5"); } - public void loadUseCaseDiagram(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { + public void loadUseCaseDiagram(Element elt, int indexAnalysis, int indexTab) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7839,7 +7778,7 @@ public class GTURTLEModeling { loadDiagram(elt, ucdp); } - public void loadTDeploymentDiagram(Element elt, int indexDeployment) throws MalformedModelingException, SAXException { + public void loadTDeploymentDiagram(Element elt, int indexDeployment) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7849,7 +7788,7 @@ public class GTURTLEModeling { loadDiagram(elt, tdp); } - public void loadNCDiagram(Element elt, int indexNC) throws MalformedModelingException, SAXException { + public void loadNCDiagram(Element elt, int indexNC) throws MalformedModelingException, SAXException { String name; name = elt.getAttribute("name"); @@ -7866,9 +7805,9 @@ public class GTURTLEModeling { int i, j; TURTLEPanel tp; // search for diagram panels - for(i=0; i<panels.size(); i++) { + for (i = 0; i < panels.size(); i++) { tp = panels.elementAt(i); - for(j=0; j<tp.panels.size(); j++) { + for (j = 0; j < tp.panels.size(); j++) { tdp = tp.panels.elementAt(j); id = tdp.makeLovelyIds(id); //TraceManager.addDev("Lovely id =" + id); @@ -7878,7 +7817,7 @@ public class GTURTLEModeling { TGComponent.setGeneralId(id + 1); } - public void loadDiagramInformation(Element elt, TDiagramPanel tdp) throws MalformedModelingException { + public void loadDiagramInformation(Element elt, TDiagramPanel tdp) throws MalformedModelingException { int x, y; double zoom = 0; try { @@ -7901,7 +7840,7 @@ public class GTURTLEModeling { } if (tdp instanceof TActivityDiagramPanel) { - ((TActivityDiagramPanel)tdp).loadExtraParameters(elt); + ((TActivityDiagramPanel) tdp).loadExtraParameters(elt); } } @@ -7911,7 +7850,7 @@ public class GTURTLEModeling { NodeList activityDiagramNl = docCopy.getElementsByTagName("TActivityDiagramPanel"); TraceManager.addDev("Loading activity diagram of " + newValue + "Before : " + oldValue); - TraceManager.addDev(""+docCopy); + TraceManager.addDev("" + docCopy); if (activityDiagramNl == null) { throw new MalformedModelingException(); @@ -7925,7 +7864,7 @@ public class GTURTLEModeling { int decYTmp = decY; int decIdTmp = decId; - for(int i=0; i<activityDiagramNl.getLength(); i++) { + for (int i = 0; i < activityDiagramNl.getLength(); i++) { adn = activityDiagramNl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -7950,8 +7889,9 @@ public class GTURTLEModeling { //TraceManager.addDev("Panel ok"); - decX = 0; decY = 0; decId = 0; - + decX = 0; + decY = 0; + decId = 0; tadp.removeAll(); @@ -8002,7 +7942,7 @@ public class GTURTLEModeling { int decYTmp = decY; int decIdTmp = decId; - for(int i=0; i<smdNl.getLength(); i++) { + for (int i = 0; i < smdNl.getLength(); i++) { adn = smdNl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -8027,7 +7967,9 @@ public class GTURTLEModeling { TraceManager.addDev("Panel ok"); - decX = 0; decY = 0; decId = 0; + decX = 0; + decY = 0; + decId = 0; asmdp.removeAll(); @@ -8080,7 +8022,7 @@ public class GTURTLEModeling { int decYTmp = decY; int decIdTmp = decId; - for(int i=0; i<activityDiagramNl.getLength(); i++) { + for (int i = 0; i < activityDiagramNl.getLength(); i++) { adn = activityDiagramNl.item(i); if (adn.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) adn; @@ -8105,7 +8047,9 @@ public class GTURTLEModeling { //TraceManager.addDev("Panel ok"); - decX = 0; decY = 0; decId = 0; + decX = 0; + decY = 0; + decId = 0; tmladp.removeAll(); @@ -8134,14 +8078,14 @@ public class GTURTLEModeling { } } - public void makePostLoading(TDiagramPanel tdp, int beginIndex) throws MalformedModelingException{ + public void makePostLoading(TDiagramPanel tdp, int beginIndex) throws MalformedModelingException { TGComponent tgc; //TraceManager.addDev("Post loading of diagram " + tdp.toString()); List<TGComponent> list = tdp.getComponentList(); - for(int i=0; i<list.size()-beginIndex; i++) { + for (int i = 0; i < list.size() - beginIndex; i++) { tgc = list.get(i); //TraceManager.addDev(tgc.getName()); //TraceManager.addDev(tgc.getValue()); @@ -8171,7 +8115,7 @@ public class GTURTLEModeling { try { - for(int i=0; i<nl.getLength(); i++) { + for (int i = 0; i < nl.getLength(); i++) { n = nl.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { try { @@ -8189,7 +8133,7 @@ public class GTURTLEModeling { if (type > 0) { t = "" + type; } - TraceManager.addDev ("A badly formed component could not be created in the diagram"); + TraceManager.addDev("A badly formed component could not be created in the diagram"); UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "A component could not be correctly loaded - type=" + t); ce.setTDiagramPanel(tdp); @@ -8217,9 +8161,9 @@ public class GTURTLEModeling { public int getTypeOfComponentNode(Node n) { try { //NodeList nl = n.getChildNodes(); - Element elt = (Element)n; + Element elt = (Element) n; return Integer.decode(elt.getAttribute("type")).intValue(); - } catch (Exception e){ + } catch (Exception e) { } return -1; } @@ -8230,20 +8174,20 @@ public class GTURTLEModeling { Element elt1; TGComponent tgc = null; TGComponent father; - // TGComponent reference; + // TGComponent reference; // try { NodeList nl = n.getChildNodes(); - elt = (Element)n; + elt = (Element) n; elt1 = elt; //TraceManager.addDev("elt=" + elt); int myType = Integer.decode(elt.getAttribute("type")).intValue(); int myId = Integer.decode(elt.getAttribute("id")).intValue() + decId; - int myX = -1, myY = -1, myWidth = -1, myHeight =-1; + int myX = -1, myY = -1, myWidth = -1, myHeight = -1; int myMinWidth = -1, myMinHeight = -1, myMinDesiredWidth = -1, myMinDesiredHeight = -1; int myMinX = -1, myMaxX = -1, myMinY = -1, myMaxY = -1; String myName = null, myValue = null; @@ -8251,7 +8195,7 @@ public class GTURTLEModeling { Point p; int i, x, y; int fatherId = -1, fatherNum = -1; - int referenceId=-1; + int referenceId = -1; String pre = "", post = ""; String internalComment = ""; boolean accessibility = false; @@ -8262,7 +8206,7 @@ public class GTURTLEModeling { boolean masterMutex = false; boolean enable = true; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { n = nl.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) n; @@ -8323,9 +8267,9 @@ public class GTURTLEModeling { //TraceManager.addDev("Making TGComponent of type " + myType + " and of name " + myName); //TGComponent is ready to be built - - if(fatherId != -1) { + + if (fatherId != -1) { fatherId += decId; // internal component //TraceManager.addDev("I am " + myName); @@ -8350,7 +8294,7 @@ public class GTURTLEModeling { //TraceManager.addDev("2 Must add the component to its father:" + tgc); if (tgc instanceof SwallowedTGComponent) { //TraceManager.addDev("3 Must add the component to its father:"); - ((SwallowTGComponent)father).addSwallowedTGComponent(tgc, myX, myY); + ((SwallowTGComponent) father).addSwallowedTGComponent(tgc, myX, myY); //TraceManager.addDev("Swallowed to father = " + father.getValue() + ". My name=" + myName + " decId=" + decId); } else { throw new MalformedModelingException(); @@ -8379,16 +8323,16 @@ public class GTURTLEModeling { } - if (referenceId !=-1){ - referenceId += decId; - for (TURTLEPanel turtlepanel: panels){ - for (TDiagramPanel tdpanel: turtlepanel.panels){ - if (tdpanel.findComponentWithId(referenceId) !=null){ - tgc.reference=tdpanel.findComponentWithId(referenceId); - break; - } - } - } + if (referenceId != -1) { + referenceId += decId; + for (TURTLEPanel turtlepanel : panels) { + for (TDiagramPanel tdpanel : turtlepanel.panels) { + if (tdpanel.findComponentWithId(referenceId) != null) { + tgc.reference = tdpanel.findComponentWithId(referenceId); + break; + } + } + } } tgc.setEnabled(enable); @@ -8400,62 +8344,61 @@ public class GTURTLEModeling { String oldClassName = myValue; //TraceManager.addDev("Old class name=" + oldClassName); //Added by Solange - if ((myValue != null) && (!myValue.equals(null))){ - if (tgc instanceof ProCSDComponent) - { - //Added by Solange - //And removed by emil - //myValue=generateNameIfInUse(myValue); - // tgc.setValueWithChange(myValue); - //TraceManager.addDev("myValue=" + myValue); - } + if ((myValue != null) && (!myValue.equals(null))) { + if (tgc instanceof ProCSDComponent) { + //Added by Solange + //And removed by emil + //myValue=generateNameIfInUse(myValue); + // tgc.setValueWithChange(myValue); + //TraceManager.addDev("myValue=" + myValue); + } //until here - if ((tgc instanceof TCDTClass) && (decId >0)){ + if ((tgc instanceof TCDTClass) && (decId > 0)) { if (tdp.isAlreadyATClassName(myValue)) { - myValue = tdp.findTClassName(myValue+"_"); + myValue = tdp.findTClassName(myValue + "_"); } } - if ((tgc instanceof TMLTaskOperator) && (decId >0)){ + if ((tgc instanceof TMLTaskOperator) && (decId > 0)) { if (tdp.isAlreadyATMLTaskName(myValue)) { - myValue = tdp.findTMLTaskName(myValue+"_"); + myValue = tdp.findTMLTaskName(myValue + "_"); } } - if ((tgc instanceof AvatarBDBlock) && (decId >0)){ + if ((tgc instanceof AvatarBDBlock) && (decId > 0)) { if (tdp.isAlreadyAnAvatarBDBlockName(myValue)) { - myValue = tdp.findAvatarBDBlockName(myValue+"_"); + myValue = tdp.findAvatarBDBlockName(myValue + "_"); } } - if ((tgc instanceof TMLCPrimitiveComponent) && (decId >0)){ + if ((tgc instanceof TMLCPrimitiveComponent) && (decId > 0)) { if (tdp.isAlreadyATMLPrimitiveComponentName(myValue)) { - myValue = tdp.findTMLPrimitiveComponentName(myValue+"_"); + myValue = tdp.findTMLPrimitiveComponentName(myValue + "_"); } //TraceManager.addDev("MyValue=" + myValue); } - if ((tgc instanceof TOSClass) && (decId >0)){ + if ((tgc instanceof TOSClass) && (decId > 0)) { if (tdp.isAlreadyATOSClassName(myValue)) { - myValue = tdp.findTOSClassName(myValue+"_"); + myValue = tdp.findTOSClassName(myValue + "_"); } } //TraceManager.addDev("myValue=" + myValue); tgc.setValueWithChange(myValue); //TraceManager.addDev("value done"); - if ((tgc instanceof TCDTClass) && (decId >0)){ + if ((tgc instanceof TCDTClass) && (decId > 0)) { loadActivityDiagram(tdp, oldClassName, myValue); } - if ((tgc instanceof AvatarBDBlock) && (decId >0)){ + if ((tgc instanceof AvatarBDBlock) && (decId > 0)) { //TraceManager.addDev("Going to load ad of task " + oldClassName + " myValue=" + myValue); loadAvatarSMD(tdp, oldClassName, myValue); } - if ((tgc instanceof TMLTaskOperator) && (decId >0)){ + if ((tgc instanceof TMLTaskOperator) && (decId > 0)) { //TraceManager.addDev("Going to load ad of task " + oldClassName + " myValue=" + myValue); loadTMLActivityDiagram(tdp, oldClassName, myValue); } - if ((tgc instanceof TMLCPrimitiveComponent) && (decId >0)){ + if ((tgc instanceof TMLCPrimitiveComponent) && (decId > 0)) { //TraceManager.addDev("Going to load ad of component " + oldClassName + " myValue=" + myValue); loadTMLActivityDiagram(tdp, oldClassName, myValue); } @@ -8510,7 +8453,7 @@ public class GTURTLEModeling { // TraceManager.addDev("Extra param ok"); if ((tgc instanceof TCDTObject) && (decId > 0)) { - TCDTObject to = (TCDTObject)tgc; + TCDTObject to = (TCDTObject) tgc; //TraceManager.addDev("Setting TObject name to: " + to.getObjectName()); //TraceManager.addDev("Setting TObject name to: " + tdp.findTObjectName(to.getObjectName())); to.setObjectName(tdp.findTObjectName(to.getObjectName())); @@ -8519,7 +8462,7 @@ public class GTURTLEModeling { //TraceManager.addDev(tgc.toString()); //TraceManager.addDev("Making connecting points " + tgcpList.size()); - for(i=0; i<tgcpList.size(); i++) { + for (i = 0; i < tgcpList.size(); i++) { p = tgcpList.elementAt(i); if (!tgc.setIdTGConnectingPoint(p.x, p.y)) { //TraceManager.addDev("Warning: a connecting point has been removed"); @@ -8528,7 +8471,7 @@ public class GTURTLEModeling { } //TraceManager.addDev("Not yet except!"); - if (decId >0) { + if (decId > 0) { tdp.bringToFront(tgc); } //TraceManager.addDev("Connecting points done " + myType); @@ -8546,30 +8489,26 @@ public class GTURTLEModeling { //method added by Solange - public String generateNameIfInUse(String myName) - { - if (!(mgui.getCurrentTURTLEPanel().nameInUse(myName))) - { - return myName; - } + public String generateNameIfInUse(String myName) { + if (!(mgui.getCurrentTURTLEPanel().nameInUse(myName))) { + return myName; + } String other; - for(int w=0; w<100000; w++) - { - other = myName + "_" + w; - if (!(mgui.getCurrentTURTLEPanel().nameInUse(other))) - { - return other; - } + for (int w = 0; w < 100000; w++) { + other = myName + "_" + w; + if (!(mgui.getCurrentTURTLEPanel().nameInUse(other))) { + return other; } + } return null; } //until here - public void makePostProcessing(TDiagramPanel tdp) throws MalformedModelingException{ + public void makePostProcessing(TDiagramPanel tdp) throws MalformedModelingException { //TraceManager.addDev("Make post processing!"); if (tdp instanceof TClassDiagramPanel) { - ((TClassDiagramPanel)tdp).makePostLoadingProcessing(); + ((TClassDiagramPanel) tdp).makePostLoadingProcessing(); } //TraceManager.addDev("Post processing is over"); } @@ -8584,7 +8523,7 @@ public class GTURTLEModeling { throw new MalformedModelingException(); } - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { n = nl.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { tgco = makeXMLConnector(n, tdp); @@ -8612,25 +8551,25 @@ public class GTURTLEModeling { //connect connectors to their real connecting point //TraceManager.addDev("Valid connectors ?"); - for(i=0; i<list.size(); i++) { + for (i = 0; i < list.size(); i++) { tgc = list.get(i); if (tgc instanceof TGConnector) { - tgco = (TGConnector)tgc; + tgco = (TGConnector) tgc; p1 = tgco.getTGConnectingPointP1(); p2 = tgco.getTGConnectingPointP2(); - if ((p1 instanceof TGConnectingPointTmp) && (p2 instanceof TGConnectingPointTmp)){ + if ((p1 instanceof TGConnectingPointTmp) && (p2 instanceof TGConnectingPointTmp)) { //TraceManager.addDev("Searching for id " + p1.getId()); p3 = tdp.findConnectingPoint(p1.getId()); //TraceManager.addDev("Searching for id " + p2.getId()); p4 = tdp.findConnectingPoint(p2.getId()); - if (((p3 ==null) || (p4 == null)) &&(decId != 0)) { + if (((p3 == null) || (p4 == null)) && (decId != 0)) { if (list.remove(tgc)) { - i --; + i--; } else { throw new MalformedModelingException(); } } else { - if ((p3 == null) ||(p4 == null)) { + if ((p3 == null) || (p4 == null)) { //warning = true; if (p3 == null) { //TraceManager.addDev("Error on first id"); @@ -8679,19 +8618,19 @@ public class GTURTLEModeling { TGConnectingPoint p1, p2, p3, p4; TDiagramPanel tdp; TGConnector tgco; - for(TGConnectorInfo info: pendingConnectors) { + for (TGConnectorInfo info : pendingConnectors) { tgco = info.connector; if (tgco != null) { tdp = tgco.getTDiagramPanel(); if (tdp != null) { p1 = tgco.getTGConnectingPointP1(); p2 = tgco.getTGConnectingPointP2(); - if ((p1 instanceof TGConnectingPointTmp) && (p2 instanceof TGConnectingPointTmp)){ + if ((p1 instanceof TGConnectingPointTmp) && (p2 instanceof TGConnectingPointTmp)) { TraceManager.addDev("Searching for id " + p1.getId()); p3 = tdp.findConnectingPoint(p1.getId()); TraceManager.addDev("Searching for id " + p2.getId()); p4 = tdp.findConnectingPoint(p2.getId()); - if ((p3 == null) ||(p4 == null)) { + if ((p3 == null) || (p4 == null)) { //warning = true; if (p3 == null) { TraceManager.addDev("Error on first id"); @@ -8724,18 +8663,18 @@ public class GTURTLEModeling { try { NodeList nl = n.getChildNodes(); - elt = (Element)n; + elt = (Element) n; elt1 = elt; int myType = Integer.decode(elt.getAttribute("type")).intValue(); int myId = Integer.decode(elt.getAttribute("id")).intValue() + decId; - int myX = -1, myY = -1, myWidth = -1, myHeight =-1; + int myX = -1, myY = -1, myWidth = -1, myHeight = -1; int myMinWidth = -1, myMinHeight = -1, myMinDesiredWidth = -1, myMinDesiredHeight = -1; int myMaxWidth = -1, myMaxHeight = -1; String myName = null, myValue = null; int tmpx, tmpy, tmpid; - TGConnectingPoint p1 = null, p2=null; + TGConnectingPoint p1 = null, p2 = null; Vector<Point> pointList = new Vector<Point>(); Vector<Point> tgcpList = new Vector<Point>(); @@ -8744,7 +8683,7 @@ public class GTURTLEModeling { //int fatherId = -1, fatherNum = -1; boolean automaticDrawing = true; - for(i=0; i<nl.getLength(); i++) { + for (i = 0; i < nl.getLength(); i++) { n = nl.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { elt = (Element) n; @@ -8808,7 +8747,7 @@ public class GTURTLEModeling { //TraceManager.addDev("TGConnector built " + myType); if (tgco == null) { - TraceManager.addDev( "TGCO is null myType: " + myType ); + TraceManager.addDev("TGCO is null myType: " + myType); throw new MalformedModelingException(); } @@ -8817,7 +8756,7 @@ public class GTURTLEModeling { if (myName != null) { tgco.setName(myName); } - if ((myValue != null) && (!myValue.equals(null))){ + if ((myValue != null) && (!myValue.equals(null))) { tgco.setValueWithChange(myValue); } @@ -8832,14 +8771,14 @@ public class GTURTLEModeling { tgco.loadExtraParam(elt1.getElementsByTagName("extraparam"), decX, decY, decId); //TraceManager.addDev("Making connecting points " + myType); - for(i=0; i<tgcpList.size(); i++) { + for (i = 0; i < tgcpList.size(); i++) { p = tgcpList.elementAt(i); if (!tgco.setIdTGConnectingPoint(p.x, p.y)) { throw new MalformedModelingException(); } } - if (decId >0) { + if (decId > 0) { tdp.bringToFront(tgco); } @@ -8853,12 +8792,11 @@ public class GTURTLEModeling { } - public boolean buildTURTLEModelingFromAnalysis(AnalysisPanel ap) throws AnalysisSyntaxException { HMSC h; //listE = new CorrespondanceTGElement(); - checkingErrors = new LinkedList<CheckingError> (); + checkingErrors = new LinkedList<CheckingError>(); AnalysisPanelTranslator apt = new AnalysisPanelTranslator(ap, mgui); @@ -8877,17 +8815,17 @@ public class GTURTLEModeling { SDTranslator sd = new SDTranslator(h); checkingErrors = null; - warnings = new LinkedList<CheckingError> (); + warnings = new LinkedList<CheckingError>(); //TraceManager.addDev("Step 02"); - mgui.setMode( MainGUI.VIEW_SUGG_DESIGN_KO); + mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); //TraceManager.addDev("Step 1"); try { tm = sd.toTURTLEModeling(); tmState = 0; } catch (SDTranslationException e) { - checkingErrors = new LinkedList<CheckingError> (); + checkingErrors = new LinkedList<CheckingError>(); CheckingError error = new CheckingError(CheckingError.STRUCTURE_ERROR, e.getMessage()); checkingErrors.add(error); @@ -8907,7 +8845,7 @@ public class GTURTLEModeling { checkingErrors = tmc.syntaxAnalysisChecking(); //TraceManager.addDev("Step 4"); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); return false; } else { @@ -8922,7 +8860,7 @@ public class GTURTLEModeling { public void generateDesign(TURTLEModeling tm) { //TURTLEPanel tp = mgui.getCurrentTURTLEPanel(); - nbSuggestedDesign ++; + nbSuggestedDesign++; TURTLEModelingDrawer tmd = new TURTLEModelingDrawer(mgui); tmd.setTURTLEModeling(tm); tmd.draw(nbSuggestedDesign); @@ -8934,15 +8872,15 @@ public class GTURTLEModeling { mscd.setHMSC(_hmsc); mscd.setMSC(_msc); mscd.drawFromMSC(nbSuggestedDesign); - nbSuggestedDesign ++; + nbSuggestedDesign++; mgui.changeMade(null, -1); } public boolean translateDeployment(DeploymentPanel dp) { // Builds a TURTLE modeling from a deployment diagram TraceManager.addDev("deployement"); - checkingErrors = new LinkedList<CheckingError> (); - warnings = new LinkedList<CheckingError> (); + checkingErrors = new LinkedList<CheckingError>(); + warnings = new LinkedList<CheckingError>(); mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); tm = new TURTLEModeling(); tmState = 0; @@ -8967,18 +8905,18 @@ public class GTURTLEModeling { DesignPanelTranslator dpt; // Loop on nodes - while(iterator.hasNext()) { + while (iterator.hasNext()) { node = iterator.next(); // Loop on artifact artifacts = node.getArtifactList(); - for(i=0; i<artifacts.size(); i++) { + for (i = 0; i < artifacts.size(); i++) { art = artifacts.elementAt(i); dp2 = art.getDesignPanel(); final Iterator<TGComponent> iterator2 = dp2.tcdp.getComponentList().listIterator(); - LinkedList<TClassInterface> tclasses = new LinkedList<TClassInterface> (); - while(iterator2.hasNext()) { + LinkedList<TClassInterface> tclasses = new LinkedList<TClassInterface>(); + while (iterator2.hasNext()) { tgc = iterator2.next(); if (tgc instanceof TClassInterface) { TraceManager.addDev("Found tclass: " + tgc.getValue()); @@ -8988,19 +8926,19 @@ public class GTURTLEModeling { if (tclasses.size() > 0) { name = node.getNodeName() + "__" + art.getValue() + "__"; dpt = new DesignPanelTranslator(dp2); - dpt.addTClasses(dp2, tclasses, name,tm); - dpt.addRelations(dp2, name,tm); + dpt.addTClasses(dp2, tclasses, name, tm); + dpt.addRelations(dp2, name, tm); listE.merge(dpt.getCorrespondanceTGElement()); checkingErrors.addAll(dpt.getErrors()); // Set package name of tclasses - for(int j=0; j<tclasses.size(); j++) { - tgc = (TGComponent) tclasses.get (j); + for (int j = 0; j < tclasses.size(); j++) { + tgc = (TGComponent) tclasses.get(j); t = listE.getTClass(tgc); if (t != null) { TraceManager.addDev("Setting package name of " + t.getName() + " to " + node.getNodeName()); - t.setPackageName(node.getNodeName()+"_"+art.getValue()); + t.setPackageName(node.getNodeName() + "_" + art.getValue()); } } } @@ -9022,7 +8960,7 @@ public class GTURTLEModeling { mgui.setMode(MainGUI.GEN_DESIGN_OK); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } @@ -9031,7 +8969,7 @@ public class GTURTLEModeling { TURTLEModelChecker tmc = new TURTLEModelChecker(tm); checkingErrors = tmc.syntaxAnalysisChecking(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } else { mgui.setMode(MainGUI.GEN_DESIGN_OK); @@ -9041,10 +8979,11 @@ public class GTURTLEModeling { public boolean translateAttackTreePanel(AttackTreePanel atp) { AttackTreePanelTranslator att = new AttackTreePanelTranslator(atp); - /*attackTree =*/ att.translateToAttackTreeDataStructure(); + /*attackTree =*/ + att.translateToAttackTreeDataStructure(); checkingErrors = att.getCheckingErrors(); warnings = att.getWarnings(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } avatarspec = att.generateAvatarSpec(); @@ -9054,8 +8993,8 @@ public class GTURTLEModeling { public boolean translateNC(NCPanel ncp) { TraceManager.addDev("Translating NC"); - checkingErrors = new LinkedList<CheckingError> (); - warnings = new LinkedList<CheckingError> (); + checkingErrors = new LinkedList<CheckingError>(); + warnings = new LinkedList<CheckingError>(); mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); GNCModeling gncm = new GNCModeling(ncp); @@ -9066,16 +9005,16 @@ public class GTURTLEModeling { warnings = gncm.getCheckingWarnings(); TraceManager.addDev("errors:" + checkingErrors.size() + " warnings:" + warnings.size()); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } else { // Generate XML file try { - if (SpecConfigTTool.NCDirectory != null) { - File dir = new File(SpecConfigTTool.NCDirectory); - if (!dir.exists()) - dir.mkdirs(); - } + if (SpecConfigTTool.NCDirectory != null) { + File dir = new File(SpecConfigTTool.NCDirectory); + if (!dir.exists()) + dir.mkdirs(); + } String fileName = "network.xml"; if (SpecConfigTTool.NCDirectory != null) { fileName = SpecConfigTTool.NCDirectory + fileName; @@ -9109,7 +9048,7 @@ public class GTURTLEModeling { public boolean translateTMLDesign(Vector<? extends TGComponent> tasksToTakeIntoAccount, TMLDesignPanel tmldp, boolean optimize) { nullifyTMLModeling(); // List<TMLError> warningsOptimize = new ArrayList<TMLError>(); - warnings = new LinkedList<CheckingError> (); + warnings = new LinkedList<CheckingError>(); mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); GTMLModeling gtmlm = new GTMLModeling(tmldp, true); @@ -9128,7 +9067,7 @@ public class GTURTLEModeling { checkingErrors = gtmlm.getCheckingErrors(); warnings = gtmlm.getCheckingWarnings(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { analyzeErrors(); return false; @@ -9146,11 +9085,11 @@ public class GTURTLEModeling { } } - public Vector<CheckingError> convertToCheckingErrorTMLErrors( List<TMLError> warningsOptimize, TDiagramPanel _tdp) { + public Vector<CheckingError> convertToCheckingErrorTMLErrors(List<TMLError> warningsOptimize, TDiagramPanel _tdp) { Vector<CheckingError> v = new Vector<CheckingError>(); UICheckingError warning; - for(TMLError error: warningsOptimize) { + for (TMLError error : warningsOptimize) { warning = new UICheckingError(CheckingError.BEHAVIOR_ERROR, error.message); warning.setTDiagramPanel(_tdp); v.add(warning); @@ -9162,7 +9101,7 @@ public class GTURTLEModeling { public boolean translateTMLComponentDesign(Vector<? extends TGComponent> componentsToTakeIntoAccount, TMLComponentDesignPanel tmlcdp, boolean optimize) { nullifyTMLModeling(); // ArrayList<TMLError> warningsOptimize = new ArrayList<TMLError>(); - warnings = new LinkedList<CheckingError> (); + warnings = new LinkedList<CheckingError>(); mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); GTMLModeling gctmlm = new GTMLModeling(tmlcdp, true); @@ -9182,11 +9121,10 @@ public class GTURTLEModeling { checkingErrors = gctmlm.getCheckingErrors(); warnings = gctmlm.getCheckingWarnings(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { analyzeErrors(); return false; - } - else { + } else { // if (optimize) { // //TraceManager.addDev("OPTIMIZE"); // warningsOptimize = tmlm.optimize(); @@ -9204,7 +9142,7 @@ public class GTURTLEModeling { public boolean translateTMLModeling() { TML2TURTLE tt = new TML2TURTLE(tmlm); tm = tt.generateTURTLEModeling(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { TraceManager.addDev("Error in TURTLE generation"); analyzeErrors(); return false; @@ -9215,7 +9153,7 @@ public class GTURTLEModeling { TraceManager.addDev("Optimize done"); TURTLEModelChecker tmc = new TURTLEModelChecker(tm); checkingErrors = tmc.syntaxAnalysisChecking(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { analyzeErrors(); return false; } else { @@ -9226,41 +9164,41 @@ public class GTURTLEModeling { } public boolean checkSyntaxSystemCAMS(Vector<TGComponent> blocksToTakeIntoAccount, SystemCAMSPanel scp, boolean optimize) { //ajout CD 04/07 FIXME - // List<TMLError> warningsOptimize = new ArrayList<TMLError>(); - // warnings = new LinkedList<CheckingError> (); - // mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); - // GTMLModeling gtmlm = new GTMLModeling(scp, true); - - // // gtmlm.setBlocks(blocksToTakeIntoAccount); //simply transforms the parameter from a Vector to LinkedList - // nullifyTMLModeling(); - // tmlm = null; - // tm = null; - // tmState = 1; - // // scp = gtmlm.translateToSystemCAMS(); - - // listE = gtmlm.getCorrespondanceTable(); - - // checkingErrors = gtmlm.getCheckingErrors(); - // avatarspec = gtmlm.avspec; - // if ((checkingErrors != null) && (checkingErrors.size() > 0)){ - // analyzeErrors(); - // warnings = gtmlm.getCheckingWarnings(); - // return false; - // } else { - // if (optimize) { - // warningsOptimize = tmap.optimize(); - // } - // // warnings.addAll(convertToCheckingErrorTMLErrors(warningsOptimize, scp.scp)); - // mgui.resetAllDIPLOIDs(); - // listE.useDIPLOIDs(); - // mgui.setMode(MainGUI.GEN_DESIGN_OK); - return true; - // } + // List<TMLError> warningsOptimize = new ArrayList<TMLError>(); + // warnings = new LinkedList<CheckingError> (); + // mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); + // GTMLModeling gtmlm = new GTMLModeling(scp, true); + + // // gtmlm.setBlocks(blocksToTakeIntoAccount); //simply transforms the parameter from a Vector to LinkedList + // nullifyTMLModeling(); + // tmlm = null; + // tm = null; + // tmState = 1; + // // scp = gtmlm.translateToSystemCAMS(); + + // listE = gtmlm.getCorrespondanceTable(); + + // checkingErrors = gtmlm.getCheckingErrors(); + // avatarspec = gtmlm.avspec; + // if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + // analyzeErrors(); + // warnings = gtmlm.getCheckingWarnings(); + // return false; + // } else { + // if (optimize) { + // warningsOptimize = tmap.optimize(); + // } + // // warnings.addAll(convertToCheckingErrorTMLErrors(warningsOptimize, scp.scp)); + // mgui.resetAllDIPLOIDs(); + // listE.useDIPLOIDs(); + // mgui.setMode(MainGUI.GEN_DESIGN_OK); + return true; + // } } public boolean checkSyntaxTMLMapping(Vector<TGComponent> nodesToTakeIntoAccount, TMLArchiPanel tmlap, boolean optimize) { List<TMLError> warningsOptimize = new ArrayList<TMLError>(); - warnings = new LinkedList<CheckingError> (); + warnings = new LinkedList<CheckingError>(); mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); //TraceManager.addDev("New TML Mapping"); GTMLModeling gtmlm = new GTMLModeling(tmlap, true); @@ -9279,7 +9217,7 @@ public class GTURTLEModeling { warnings = gtmlm.getCheckingWarnings(); avatarspec = gtmlm.avspec; - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { analyzeErrors(); return false; } else { @@ -9298,15 +9236,15 @@ public class GTURTLEModeling { //Newly introduced to perform Syntax check of CP diagrams. Actually the mapping of CPs onto the architecture is done via SDs, //onto the application is done onto blocks in the architecture. It would be better to have all the mapping information in one //diagram. Up to now, not taking the mapping information into account - public boolean checkSyntaxTMLCP( Vector<TGComponent> nodesToTakeIntoAccount, TMLCommunicationPatternPanel tmlcpp, boolean optimize ) { + public boolean checkSyntaxTMLCP(Vector<TGComponent> nodesToTakeIntoAccount, TMLCommunicationPatternPanel tmlcpp, boolean optimize) { //nodesToTakeIntoAccount is the list of SDs and ADs corresponding that compose the CP selected for syntax checking // List<TMLError> warningsOptimize = new ArrayList<TMLError>(); - warnings = new LinkedList<CheckingError> (); - mgui.setMode( MainGUI.VIEW_SUGG_DESIGN_KO ); - GTMLModeling gtmlm = new GTMLModeling( tmlcpp, true ); + warnings = new LinkedList<CheckingError>(); + mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); + GTMLModeling gtmlm = new GTMLModeling(tmlcpp, true); - TraceManager.addDev( "NodesToTakeIntoAccount :" + nodesToTakeIntoAccount.toString() ); + TraceManager.addDev("NodesToTakeIntoAccount :" + nodesToTakeIntoAccount.toString()); //Useless because nodesToTakeIntoAccount does not include the mainCP! //gtmlm.setDiagramPanels( nodesToTakeIntoAccount ); //passes the list of nodes (SDs and ADs) to gtml as a LinkedList @@ -9315,21 +9253,21 @@ public class GTURTLEModeling { tmState = 1; nullifyTMLModeling(); //tmlcp is the data structure for a CP corresponding to the graphical description with diagrams - tmlcp = gtmlm.translateToTMLCPDataStructure( tmlcpp.getName() ); + tmlcp = gtmlm.translateToTMLCPDataStructure(tmlcpp.getName()); //tmlcp.toString(); /*TraceManager.addDev( "I AM ABOUT TO GENERATE THE TMLtxt CODE!" ); mgui.generateTMLTxt(); //Now generating the TMLtxt code TraceManager.addDev( "TMLtxt CODE GENERATION DONE" );*/ listE = gtmlm.getCorrespondanceTable(); //for( CorrespondanceTGElement element : listE.getNames() ) { - TraceManager.addDev( "Printing listE.getNames: " + listE.getNames().toString() ); - TraceManager.addDev( "Printing listE.getTG: " + listE.getTG().toString() ); - TraceManager.addDev( "Printing listE.getPanelNames: " + listE.getPanelNames().toString() ); - TraceManager.addDev( "Printing listE.getData: " + listE.getData().toString() ); + TraceManager.addDev("Printing listE.getNames: " + listE.getNames().toString()); + TraceManager.addDev("Printing listE.getTG: " + listE.getTG().toString()); + TraceManager.addDev("Printing listE.getPanelNames: " + listE.getPanelNames().toString()); + TraceManager.addDev("Printing listE.getData: " + listE.getData().toString()); //} checkingErrors = gtmlm.getCheckingErrors(); - if( (checkingErrors != null) && (checkingErrors.size() > 0) ) { + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { //analyzeErrors(); return false; @@ -9379,7 +9317,7 @@ public class GTURTLEModeling { TraceManager.addDev("tm generated from TMAP"); checkingErrors = m2tif.getCheckingErrors(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } mgui.setMode(MainGUI.GEN_DESIGN_OK); @@ -9393,7 +9331,7 @@ public class GTURTLEModeling { // public boolean translateTURTLEOSDesign(TURTLEOSDesignPanel tosdp) { - warnings = new LinkedList<CheckingError> (); + warnings = new LinkedList<CheckingError>(); mgui.setMode(MainGUI.VIEW_SUGG_DESIGN_KO); //TraceManager.addDev("New TML Modeling"); GTURTLEOSModeling gosm = new GTURTLEOSModeling(tosdp); @@ -9407,7 +9345,7 @@ public class GTURTLEModeling { tmState = 0; checkingErrors = gosm.getCheckingErrors(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } else { @@ -9416,7 +9354,7 @@ public class GTURTLEModeling { //TraceManager.addDev("Optimize done"); TURTLEModelChecker tmc = new TURTLEModelChecker(tm); checkingErrors = tmc.syntaxAnalysisChecking(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } else { warnings = gosm.getCheckingWarnings(); @@ -9444,7 +9382,7 @@ public class GTURTLEModeling { TURTLEModelChecker tmc = new TURTLEModelChecker(tm); checkingErrors = tmc.syntaxAnalysisChecking(); warnings = tmc.getWarnings(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } else { //A faire: @@ -9458,14 +9396,14 @@ public class GTURTLEModeling { } - public void addStates(AvatarStateMachineElement asme, int x, int y, AvatarSMDPanel smp, AvatarBDBlock bl, Map<AvatarStateMachineElement, TGComponent> SMDMap, Map<AvatarStateMachineElement, TGComponent> locMap, Map<AvatarTransition, AvatarStateMachineElement> tranDestMap, Map<AvatarTransition, TGComponent> tranSourceMap){ + public void addStates(AvatarStateMachineElement asme, int x, int y, AvatarSMDPanel smp, AvatarBDBlock bl, Map<AvatarStateMachineElement, TGComponent> SMDMap, Map<AvatarStateMachineElement, TGComponent> locMap, Map<AvatarTransition, AvatarStateMachineElement> tranDestMap, Map<AvatarTransition, TGComponent> tranSourceMap) { // TGConnectingPoint tp = new TGConnectingPoint(null, x, y, false, false); //Create dummy tgcomponent - TGComponent tgcomp = new AvatarSMDStartState(x,y,smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(),false,null,smp); - if (asme==null){ + TGComponent tgcomp = new AvatarSMDStartState(x, y, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null, smp); + if (asme == null) { return; } - if (asme instanceof AvatarStartState){ + if (asme instanceof AvatarStartState) { AvatarSMDStartState smdss = new AvatarSMDStartState(x, y, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null, smp); tgcomp = smdss; smp.addComponent(smdss, x, y, false, true); @@ -9473,33 +9411,33 @@ public class GTURTLEModeling { // tp = smdss.tgconnectingPointAtIndex(0); locMap.put(asme, smdss); } - if (asme instanceof AvatarTransition){ + if (asme instanceof AvatarTransition) { // } - if (asme instanceof AvatarRandom){ + if (asme instanceof AvatarRandom) { AvatarSMDRandom smdr = new AvatarSMDRandom(x, y, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null, smp); - smdr.setVariable(((AvatarRandom)asme).getVariable()); + smdr.setVariable(((AvatarRandom) asme).getVariable()); smp.addComponent(smdr, x, y, false, true); - tgcomp=smdr; + tgcomp = smdr; SMDMap.put(asme, smdr); locMap.put(asme, smdr); } - if (asme instanceof AvatarActionOnSignal){ + if (asme instanceof AvatarActionOnSignal) { avatartranslator.AvatarSignal sig = ((AvatarActionOnSignal) asme).getSignal(); - if (sig.isIn()){ + if (sig.isIn()) { AvatarSMDReceiveSignal smdrs = new AvatarSMDReceiveSignal(x, y, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null, smp); - tgcomp=smdrs; + tgcomp = smdrs; smp.addComponent(smdrs, x, y, false, true); // String name=sig.minString(); //System.out.println("signal values" +((AvatarActionOnSignal)asme).getValues()); - String parameters=""; - if (((AvatarActionOnSignal)asme).getValues().size()>0){ - parameters+=((AvatarActionOnSignal)asme).getValues().get(0); - for (int i=1; i < ((AvatarActionOnSignal)asme).getValues().size(); i++){ - parameters=parameters+","+((AvatarActionOnSignal)asme).getValues().get(i); + String parameters = ""; + if (((AvatarActionOnSignal) asme).getValues().size() > 0) { + parameters += ((AvatarActionOnSignal) asme).getValues().get(0); + for (int i = 1; i < ((AvatarActionOnSignal) asme).getValues().size(); i++) { + parameters = parameters + "," + ((AvatarActionOnSignal) asme).getValues().get(i); } } - String name=sig.getName()+"("+parameters+")"; + String name = sig.getName() + "(" + parameters + ")"; smdrs.setValue(name); // sig.setName(name); smdrs.recalculateSize(); @@ -9507,23 +9445,22 @@ public class GTURTLEModeling { // tp = smdrs.getFreeTGConnectingPoint(x+smdrs.getWidth()/2,y+smdrs.getHeight()); // TGConnectingPoint tp2 = smdrs.getFreeTGConnectingPoint(x+smdrs.getWidth()/2,y); locMap.put(asme, smdrs); - if (bl.getAvatarSignalFromName(name) ==null){ + if (bl.getAvatarSignalFromName(name) == null) { //bl.addSignal(new ui.AvatarSignal(0, name, new String[0], new String[0])); } - } - else { + } else { AvatarSMDSendSignal smdss = new AvatarSMDSendSignal(x, y, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null, smp); - tgcomp=smdss; + tgcomp = smdss; smp.addComponent(smdss, x, y, false, true); - String parameters=""; - if (((AvatarActionOnSignal)asme).getValues().size()>0){ - parameters+=((AvatarActionOnSignal)asme).getValues().get(0); - for (int i=1; i < ((AvatarActionOnSignal)asme).getValues().size(); i++){ - parameters=parameters+","+((AvatarActionOnSignal)asme).getValues().get(i); + String parameters = ""; + if (((AvatarActionOnSignal) asme).getValues().size() > 0) { + parameters += ((AvatarActionOnSignal) asme).getValues().get(0); + for (int i = 1; i < ((AvatarActionOnSignal) asme).getValues().size(); i++) { + parameters = parameters + "," + ((AvatarActionOnSignal) asme).getValues().get(i); } } - String name=sig.getName()+"("+parameters+")"; + String name = sig.getName() + "(" + parameters + ")"; //String name=sig.minString(); smdss.setValue(name); smdss.recalculateSize(); @@ -9531,21 +9468,21 @@ public class GTURTLEModeling { // tp = smdss.getFreeTGConnectingPoint(x+smdss.getWidth()/2,y+smdss.getHeight()); // TGConnectingPoint tp2 = smdss.getFreeTGConnectingPoint(x+smdss.getWidth()/2,y); locMap.put(asme, smdss); - if (bl.getAvatarSignalFromName(name) == null){ + if (bl.getAvatarSignalFromName(name) == null) { // bl.addSignal(new ui.AvatarSignal(1, name, new String[0], new String[0])); } } } - if (asme instanceof AvatarStopState){ + if (asme instanceof AvatarStopState) { AvatarSMDStopState smdstop = new AvatarSMDStopState(x, y, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null, smp); - tgcomp=smdstop; + tgcomp = smdstop; SMDMap.put(asme, smdstop); smp.addComponent(smdstop, x, y, false, true); // tp = smdstop.tgconnectingPointAtIndex(0); locMap.put(asme, smdstop); } - if (asme instanceof AvatarState){ + if (asme instanceof AvatarState) { //check if empty checker state /* if (asme.getName().contains("signalstate_")){ //don't add the state, ignore next transition, @@ -9562,7 +9499,7 @@ public class GTURTLEModeling { } }*/ AvatarSMDState smdstate = new AvatarSMDState(x, y, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null, smp); - tgcomp=smdstate; + tgcomp = smdstate; smp.addComponent(smdstate, x, y, false, true); smdstate.setValue(asme.getName()); smdstate.recalculateSize(); @@ -9571,92 +9508,91 @@ public class GTURTLEModeling { // TGConnectingPoint tp2 = smdstate.getFreeTGConnectingPoint(x+smdstate.getWidth()/2,y); locMap.put(asme, smdstate); } - int i=0; - int diff=300; - int ydiff=50; + int i = 0; + int diff = 300; + int ydiff = 50; //int num = asme.nbOfNexts(); - if (!(asme instanceof AvatarTransition)){ - for (AvatarStateMachineElement el:asme.getNexts()){ - if (!(el instanceof AvatarTransition)){ + if (!(asme instanceof AvatarTransition)) { + for (AvatarStateMachineElement el : asme.getNexts()) { + if (!(el instanceof AvatarTransition)) { System.out.println("ERROR: non-Transition " + asme + " connected to non-Transition " + el); } } } - for (AvatarStateMachineElement el:asme.getNexts()){ - if (el instanceof AvatarTransition){ + for (AvatarStateMachineElement el : asme.getNexts()) { + if (el instanceof AvatarTransition) { tranSourceMap.put((AvatarTransition) el, tgcomp); - } - else { - if (asme instanceof AvatarTransition){ + } else { + if (asme instanceof AvatarTransition) { AvatarTransition t = (AvatarTransition) asme; tranDestMap.put(t, el); } } - if (!SMDMap.containsKey(el)){ - addStates(el, x+diff*i, y+ydiff, smp, bl, SMDMap, locMap, tranDestMap, tranSourceMap); + if (!SMDMap.containsKey(el)) { + addStates(el, x + diff * i, y + ydiff, smp, bl, SMDMap, locMap, tranDestMap, tranSourceMap); } i++; } return; } - public void drawBlockProperties(AvatarBlock ab, AvatarBDBlock bl){ - for (avatartranslator.AvatarSignal sig:ab.getSignals()){ - String name=sig.getName().split("__")[sig.getName().split("__").length-1]; + public void drawBlockProperties(AvatarBlock ab, AvatarBDBlock bl) { + for (avatartranslator.AvatarSignal sig : ab.getSignals()) { + String name = sig.getName().split("__")[sig.getName().split("__").length - 1]; // sig.setName(name); String[] types = new String[sig.getListOfAttributes().size()]; String[] typeIds = new String[sig.getListOfAttributes().size()]; - int i=0; - for (AvatarAttribute attr: sig.getListOfAttributes()){ - types[i]=attr.getType().getStringType(); - typeIds[i]=attr.getName(); + int i = 0; + for (AvatarAttribute attr : sig.getListOfAttributes()) { + types[i] = attr.getType().getStringType(); + typeIds[i] = attr.getName(); i++; } - TraceManager.addDev("Adding signal "+sig); + TraceManager.addDev("Adding signal " + sig); bl.addSignal(new ui.AvatarSignal(sig.getInOut(), name, types, typeIds)); } - bl.setValueWithChange(ab.getName().split("__")[ab.getName().split("__").length-1]); + bl.setValueWithChange(ab.getName().split("__")[ab.getName().split("__").length - 1]); - for (AvatarAttribute attr: ab.getAttributes()){ - int type=5; - if (attr.getType()==AvatarType.BOOLEAN){ - type=4; + for (AvatarAttribute attr : ab.getAttributes()) { + int type = 5; + if (attr.getType() == AvatarType.BOOLEAN) { + type = 4; } - if (attr.getType()==AvatarType.INTEGER){ - type=0; + if (attr.getType() == AvatarType.INTEGER) { + type = 0; } - if (attr.hasInitialValue()){ + if (attr.hasInitialValue()) { bl.addAttribute(new TAttribute(0, attr.getName(), attr.getInitialValue(), type)); - } - else { + } else { bl.addAttribute(new TAttribute(0, attr.getName(), attr.getType().getDefaultInitialValue(), type)); } - if (attr.getName().contains("key_") || attr.getName().contains("privKey_")){ - hasCrypto=true; + if (attr.getName().contains("key_") || attr.getName().contains("privKey_")) { + hasCrypto = true; bl.addCryptoElements(); } } - for (avatartranslator.AvatarMethod method: ab.getMethods()){ - bl.addMethodIfApplicable(method.toString().replaceAll(" = 0","")); + for (avatartranslator.AvatarMethod method : ab.getMethods()) { + bl.addMethodIfApplicable(method.toString().replaceAll(" = 0", "")); } } - public void drawPanel(AvatarSpecification avspec, AvatarDesignPanel adp){ + + public void drawPanel(AvatarSpecification avspec, AvatarDesignPanel adp) { //System.out.println(avspec.toString()); - hasCrypto=false; + hasCrypto = false; Map<String, Set<String>> originDestMap = new HashMap<String, Set<String>>(); Map<String, AvatarBDBlock> blockMap = new HashMap<String, AvatarBDBlock>(); - if (adp ==null){ + if (adp == null) { return; } - if (avspec==null){ + if (avspec == null) { return; } AvatarBDPanel abd = adp.abdp; //Find all blocks, create nested blocks starting from top left - int xpos=10; - int ypos=40; + int xpos = 10; + int ypos = 40; //Create blocks recursively, starting from top level ones with no father //Lowest level blocks should be 100x100, next should be 100x(number of children*100+50)...etc, @@ -9664,113 +9600,111 @@ public class GTURTLEModeling { Map<AvatarBlock, Integer> blockLevelMap = new HashMap<AvatarBlock, Integer>(); Map<AvatarBlock, Integer> blockSizeMap = new HashMap<AvatarBlock, Integer>(); Map<AvatarBlock, Integer> blockIncMap = new HashMap<AvatarBlock, Integer>(); - int maxLevel=0; - for (AvatarBlock ab: avspec.getListOfBlocks()){ - int level=0; - AvatarBlock block=ab; - while (block.getFather()!=null){ - if (blockSizeMap.containsKey(block.getFather())){ - blockSizeMap.put(block.getFather(), blockSizeMap.get(block.getFather())+1); - } - else { - blockSizeMap.put(block.getFather(),1); + int maxLevel = 0; + for (AvatarBlock ab : avspec.getListOfBlocks()) { + int level = 0; + AvatarBlock block = ab; + while (block.getFather() != null) { + if (blockSizeMap.containsKey(block.getFather())) { + blockSizeMap.put(block.getFather(), blockSizeMap.get(block.getFather()) + 1); + } else { + blockSizeMap.put(block.getFather(), 1); blockIncMap.put(block.getFather(), 10); } level++; - block=block.getFather(); + block = block.getFather(); } - if (level>maxLevel){ - maxLevel=level; + if (level > maxLevel) { + maxLevel = level; } - if (!blockSizeMap.containsKey(block)){ + if (!blockSizeMap.containsKey(block)) { blockSizeMap.put(block, 0); - blockIncMap.put(block,10); + blockIncMap.put(block, 10); } blockLevelMap.put(ab, level); } - for (int level=0; level<maxLevel+1; level++){ - for (AvatarBlock ab:avspec.getListOfBlocks()){ - if (blockLevelMap.get(ab)==level){ - if (level==0){ + for (int level = 0; level < maxLevel + 1; level++) { + for (AvatarBlock ab : avspec.getListOfBlocks()) { + if (blockLevelMap.get(ab) == level) { + if (level == 0) { AvatarBDBlock bl = new AvatarBDBlock(xpos, ypos, abd.getMinX(), abd.getMaxX(), abd.getMinY(), abd.getMaxY(), false, null, abd); abd.addComponent(bl, xpos, ypos, false, true); - bl.resize(100*blockSizeMap.get(ab)+100, 100+(maxLevel-level)*50); - drawBlockProperties(ab,bl); + bl.resize(100 * blockSizeMap.get(ab) + 100, 100 + (maxLevel - level) * 50); + drawBlockProperties(ab, bl); AvatarSMDPanel smp = adp.getAvatarSMDPanel(bl.getValue()); buildStateMachine(ab, bl, smp); - blockMap.put(bl.getValue().split("__")[bl.getValue().split("__").length-1], bl); - xpos+=100*blockSizeMap.get(ab)+200; - } - else { + blockMap.put(bl.getValue().split("__")[bl.getValue().split("__").length - 1], bl); + xpos += 100 * blockSizeMap.get(ab) + 200; + } else { - AvatarBDBlock father= blockMap.get(ab.getFather().getName().split("__")[ab.getFather().getName().split("__").length-1]); + AvatarBDBlock father = blockMap.get(ab.getFather().getName().split("__")[ab.getFather().getName().split("__").length - 1]); //System.out.println("blockmap " + blockMap); - if (father==null){ + if (father == null) { //System.out.println("Missing father block " + ab.getFather().getName()); continue; } - AvatarBDBlock bl = new AvatarBDBlock(father.getX()+blockIncMap.get(ab.getFather()), father.getY()+10, abd.getMinX(), abd.getMaxX(), abd.getMinY(), abd.getMaxY(), false, father, abd); - abd.addComponent(bl, father.getX()+blockIncMap.get(ab.getFather()), father.getY()+10, false, true); - int size=100; - if (blockSizeMap.containsKey(ab)){ - size=100*blockSizeMap.get(ab)+50; + AvatarBDBlock bl = new AvatarBDBlock(father.getX() + blockIncMap.get(ab.getFather()), father.getY() + 10, abd.getMinX(), abd.getMaxX(), abd.getMinY(), abd.getMaxY(), false, father, abd); + abd.addComponent(bl, father.getX() + blockIncMap.get(ab.getFather()), father.getY() + 10, false, true); + int size = 100; + if (blockSizeMap.containsKey(ab)) { + size = 100 * blockSizeMap.get(ab) + 50; } - bl.resize(size, 100+(maxLevel-level)*50); - drawBlockProperties(ab,bl); + bl.resize(size, 100 + (maxLevel - level) * 50); + drawBlockProperties(ab, bl); abd.attach(bl); AvatarSMDPanel smp = adp.getAvatarSMDPanel(bl.getValue()); buildStateMachine(ab, bl, smp); - blockMap.put(bl.getValue().split("__")[bl.getValue().split("__").length-1], bl); - blockIncMap.put(ab.getFather(), blockIncMap.get(ab.getFather())+size+10); + blockMap.put(bl.getValue().split("__")[bl.getValue().split("__").length - 1], bl); + blockIncMap.put(ab.getFather(), blockIncMap.get(ab.getFather()) + size + 10); } } } } - for (AvatarRelation ar: avspec.getRelations()){ + for (AvatarRelation ar : avspec.getRelations()) { String bl1 = ar.block1.getName(); String bl2 = ar.block2.getName(); - if (originDestMap.containsKey(bl1.split("__")[bl1.split("__").length-1])){ - originDestMap.get(bl1.split("__")[bl1.split("__").length-1]).add(bl2.split("__")[bl2.split("__").length-1]); - } else if (originDestMap.containsKey(bl2.split("__")[bl2.split("__").length-1])){ - originDestMap.get(bl2.split("__")[bl2.split("__").length-1]).add(bl1.split("__")[bl1.split("__").length-1]); + if (originDestMap.containsKey(bl1.split("__")[bl1.split("__").length - 1])) { + originDestMap.get(bl1.split("__")[bl1.split("__").length - 1]).add(bl2.split("__")[bl2.split("__").length - 1]); + } else if (originDestMap.containsKey(bl2.split("__")[bl2.split("__").length - 1])) { + originDestMap.get(bl2.split("__")[bl2.split("__").length - 1]).add(bl1.split("__")[bl1.split("__").length - 1]); } else { - Set<String> hs= new HashSet<String>(); - hs.add(bl2.split("__")[bl2.split("__").length-1]); - originDestMap.put(bl1.split("__")[bl1.split("__").length-1], hs); + Set<String> hs = new HashSet<String>(); + hs.add(bl2.split("__")[bl2.split("__").length - 1]); + originDestMap.put(bl1.split("__")[bl1.split("__").length - 1], hs); } } //Add Relations - for (String bl1: originDestMap.keySet()){ - for (String bl2:originDestMap.get(bl1)){ - Vector<Point> points=new Vector<Point>(); + for (String bl1 : originDestMap.keySet()) { + for (String bl2 : originDestMap.get(bl1)) { + Vector<Point> points = new Vector<Point>(); // System.out.println("Finding " + bl1 + " and bl2 "+ bl2); - if (blockMap.get(bl1)==null || blockMap.get(bl2)==null){ + if (blockMap.get(bl1) == null || blockMap.get(bl2) == null) { continue; } - TGConnectingPoint p1= blockMap.get(bl1).findFirstFreeTGConnectingPoint(true,true); + TGConnectingPoint p1 = blockMap.get(bl1).findFirstFreeTGConnectingPoint(true, true); p1.setFree(false); - TGConnectingPoint p2= blockMap.get(bl2).findFirstFreeTGConnectingPoint(true,true); + TGConnectingPoint p2 = blockMap.get(bl2).findFirstFreeTGConnectingPoint(true, true); p2.setFree(false); - if (bl2.equals(bl1)){ + if (bl2.equals(bl1)) { //Add 2 point so the connection looks square - Point p = new Point(p1.getX(), p1.getY()-10); + Point p = new Point(p1.getX(), p1.getY() - 10); points.add(p); - p = new Point(p2.getX(), p2.getY()-10); + p = new Point(p2.getX(), p2.getY() - 10); points.add(p); } AvatarBDPortConnector conn = new AvatarBDPortConnector(0, 0, 0, 0, 0, 0, true, null, abd, p1, p2, points); - abd.addComponent(conn, 0,0,false,true); + abd.addComponent(conn, 0, 0, false, true); //Add Relations to connector - for (AvatarRelation ar:avspec.getRelations()){ - if (ar.block1.getName().contains(bl1) && ar.block2.getName().contains(bl2) || ar.block1.getName().contains(bl2) && ar.block2.getName().contains(bl1)){ + for (AvatarRelation ar : avspec.getRelations()) { + if (ar.block1.getName().contains(bl1) && ar.block2.getName().contains(bl2) || ar.block1.getName().contains(bl2) && ar.block2.getName().contains(bl1)) { //TGConnectingPoint p1= blockMap.get(bl1).getFreeTGConnectingPoint(blockMap.get(bl1).getX(), blockMap.get(bl1).getY()); @@ -9779,10 +9713,10 @@ public class GTURTLEModeling { conn.setPrivate(ar.isPrivate()); conn.setSizeOfFIFO(ar.getSizeOfFIFO()); //System.out.println(bl1 +" "+ ar.block1.getName() + " "+ ar.block2.getName()); - for (int i =0; i< ar.nbOfSignals(); i++){ + for (int i = 0; i < ar.nbOfSignals(); i++) { //System.out.println("Adding relation " + ar.getSignal1(i).toString() + " " + ar.getSignal2(i).toBasicString()); - conn.addSignal(ar.getSignal1(i).toString(),ar.getSignal1(i).getInOut()==0,ar.block1.getName().contains(bl1)); - conn.addSignal(ar.getSignal2(i).toString(), ar.getSignal2(i).getInOut()==0,!ar.block1.getName().contains(bl1)); + conn.addSignal(ar.getSignal1(i).toString(), ar.getSignal1(i).getInOut() == 0, ar.block1.getName().contains(bl1)); + conn.addSignal(ar.getSignal2(i).toString(), ar.getSignal2(i).getInOut() == 0, !ar.block1.getName().contains(bl1)); // System.out.println("adding signal " +ar.getSignal1(i).toBasicString()); } //System.out.println("Added Signals"); @@ -9803,77 +9737,73 @@ public class GTURTLEModeling { }*/ } } - ypos+=100; + ypos += 100; //Add Pragmas - AvatarBDPragma pragma=new AvatarBDPragma(xpos, ypos, xpos, xpos*2, ypos, ypos*2, false, null,abd); + AvatarBDPragma pragma = new AvatarBDPragma(xpos, ypos, xpos, xpos * 2, ypos, ypos * 2, false, null, abd); // String[] arr = new String[avspec.getPragmas().size()]; - String s=""; + String s = ""; // int i=0; - for (AvatarPragma p: avspec.getPragmas()){ + for (AvatarPragma p : avspec.getPragmas()) { // arr[i] = p.getName(); - String t= ""; + String t = ""; String[] split = p.getName().split(" "); - if (p.getName().contains("#Confidentiality")){ - for (String str:split){ - if (str.contains(".")){ + if (p.getName().contains("#Confidentiality")) { + for (String str : split) { + if (str.contains(".")) { String tmp = str.split("\\.")[0]; String tmp2 = str.split("\\.")[1]; - t=t.concat(tmp.split("__")[tmp.split("__").length-1] + "." + tmp2.split("__")[tmp2.split("__").length-1] + " "); - } - else { - t=t.concat(str+" "); + t = t.concat(tmp.split("__")[tmp.split("__").length - 1] + "." + tmp2.split("__")[tmp2.split("__").length - 1] + " "); + } else { + t = t.concat(str + " "); } } + } else if (p.getName().contains("Authenticity")) { + t = p.getName(); + } else if (p.getName().contains("Initial")) { + t = p.getName(); + } else { + t = p.getName(); } - else if (p.getName().contains("Authenticity")){ - t=p.getName(); - } - else if (p.getName().contains("Initial")){ - t=p.getName(); - } - else { - t=p.getName(); - } - s=s.concat(t+"\n"); + s = s.concat(t + "\n"); // i++; } pragma.setValue(s); pragma.makeValue(); - abd.addComponent(pragma, xpos, ypos, false,true); + abd.addComponent(pragma, xpos, ypos, false, true); //Add message and key datatype if there is a cryptoblock - xpos=50; - ypos+=200; - if (hasCrypto){ - AvatarBDDataType message = new AvatarBDDataType(xpos, ypos, xpos, xpos*2, ypos, ypos*2, false, null,abd); + xpos = 50; + ypos += 200; + if (hasCrypto) { + AvatarBDDataType message = new AvatarBDDataType(xpos, ypos, xpos, xpos * 2, ypos, ypos * 2, false, null, abd); message.setValue("Message"); - abd.addComponent(message, xpos, ypos, false,true); - message.resize(200,100); - xpos+=400; + abd.addComponent(message, xpos, ypos, false, true); + message.resize(200, 100); + xpos += 400; - AvatarBDDataType key = new AvatarBDDataType(xpos, ypos, xpos, xpos*2, ypos, ypos*2, false, null,abd); + AvatarBDDataType key = new AvatarBDDataType(xpos, ypos, xpos, xpos * 2, ypos, ypos * 2, false, null, abd); key.setValue("Key"); TAttribute attr = new TAttribute(2, "data", "0", 8); message.addAttribute(attr); key.addAttribute(attr); - key.resize(200,100); - abd.addComponent(key, xpos, ypos, false,true); + key.resize(200, 100); + abd.addComponent(key, xpos, ypos, false, true); } } - public void buildStateMachine(AvatarBlock ab, AvatarBDBlock bl, AvatarSMDPanel smp){ + public void buildStateMachine(AvatarBlock ab, AvatarBDBlock bl, AvatarSMDPanel smp) { Map<AvatarTransition, TGComponent> tranSourceMap = new HashMap<AvatarTransition, TGComponent>(); Map<AvatarTransition, AvatarStateMachineElement> tranDestMap = new HashMap<AvatarTransition, AvatarStateMachineElement>(); Map<AvatarStateMachineElement, TGComponent> locMap = new HashMap<AvatarStateMachineElement, TGComponent>(); Map<AvatarStateMachineElement, TGComponent> SMDMap = new HashMap<AvatarStateMachineElement, TGComponent>(); //Build the state machine - int smx=400; - int smy=40; + int smx = 400; + int smy = 40; - if (smp==null){ + if (smp == null) { System.out.println("can't find"); return; } @@ -9881,42 +9811,41 @@ public class GTURTLEModeling { AvatarStateMachine asm = ab.getStateMachine(); //Remove the empty check states - AvatarStartState start= asm.getStartState(); + AvatarStartState start = asm.getStartState(); addStates(start, smx, smy, smp, bl, SMDMap, locMap, tranDestMap, tranSourceMap); //Add transitions - for (AvatarTransition t: tranSourceMap.keySet()){ - if (tranSourceMap.get(t)==null || tranDestMap.get(t)==null){ + for (AvatarTransition t : tranSourceMap.keySet()) { + if (tranSourceMap.get(t) == null || tranDestMap.get(t) == null) { continue; } - int x=tranSourceMap.get(t).getX()+tranSourceMap.get(t).getWidth()/2; - int y=tranSourceMap.get(t).getY()+tranSourceMap.get(t).getHeight(); + int x = tranSourceMap.get(t).getX() + tranSourceMap.get(t).getWidth() / 2; + int y = tranSourceMap.get(t).getY() + tranSourceMap.get(t).getHeight(); // TGConnectingPoint p1 = tranSourceMap.get(t).findFirstFreeTGConnectingPoint(true,false); TGConnectingPoint p1 = tranSourceMap.get(t).closerFreeTGConnectingPoint(x, y, true, false); - if (p1==null){ - p1= tranSourceMap.get(t).findFirstFreeTGConnectingPoint(true,true); + if (p1 == null) { + p1 = tranSourceMap.get(t).findFirstFreeTGConnectingPoint(true, true); //p1=tranSourceMap.get(t).closerFreeTGConnectingPoint(x,y,true, true); } - x= locMap.get(tranDestMap.get(t)).getX()+ locMap.get(tranDestMap.get(t)).getWidth()/2; + x = locMap.get(tranDestMap.get(t)).getX() + locMap.get(tranDestMap.get(t)).getWidth() / 2; y = locMap.get(tranDestMap.get(t)).getY(); - if (tranSourceMap.get(t).getY() > locMap.get(tranDestMap.get(t)).getY()){ - y=locMap.get(tranDestMap.get(t)).getY()+locMap.get(tranDestMap.get(t)).getHeight()/2; - if (tranSourceMap.get(t).getX() < locMap.get(tranDestMap.get(t)).getX()){ + if (tranSourceMap.get(t).getY() > locMap.get(tranDestMap.get(t)).getY()) { + y = locMap.get(tranDestMap.get(t)).getY() + locMap.get(tranDestMap.get(t)).getHeight() / 2; + if (tranSourceMap.get(t).getX() < locMap.get(tranDestMap.get(t)).getX()) { x = locMap.get(tranDestMap.get(t)).getX(); - } - else { - x= locMap.get(tranDestMap.get(t)).getX()+locMap.get(tranDestMap.get(t)).getWidth(); + } else { + x = locMap.get(tranDestMap.get(t)).getX() + locMap.get(tranDestMap.get(t)).getWidth(); } } - TGConnectingPoint p2 = locMap.get(tranDestMap.get(t)).closerFreeTGConnectingPoint(x,y,false, true); - if (p2==null){ - p2=locMap.get(tranDestMap.get(t)).closerFreeTGConnectingPoint(x,y,true, true); + TGConnectingPoint p2 = locMap.get(tranDestMap.get(t)).closerFreeTGConnectingPoint(x, y, false, true); + if (p2 == null) { + p2 = locMap.get(tranDestMap.get(t)).closerFreeTGConnectingPoint(x, y, true, true); } Vector<Point> points = new Vector<Point>(); - if (p1==null || p2 ==null){ - System.out.println(tranSourceMap.get(t)+" "+locMap.get(tranDestMap.get(t))); + if (p1 == null || p2 == null) { + System.out.println(tranSourceMap.get(t) + " " + locMap.get(tranDestMap.get(t))); - System.out.println("Missing point "+ p1 + " "+p2); + System.out.println("Missing point " + p1 + " " + p2); return; } AvatarSMDConnector SMDcon = new AvatarSMDConnector(p1.getX(), p1.getY(), p1.getX(), p1.getY(), p1.getX(), p1.getY(), true, null, smp, p1, p2, points); @@ -9924,16 +9853,15 @@ public class GTURTLEModeling { ///System.out.println("FREE " +p1.isFree() + " "+ p2.isFree()); p1.setFree(false); p2.setFree(false); - String action=""; - if (t.getActions().size()==0){ - action=""; - } - else { - action=t.getActions().get(0).toString().replaceAll(" ",""); + String action = ""; + if (t.getActions().size() == 0) { + action = ""; + } else { + action = t.getActions().get(0).toString().replaceAll(" ", ""); } SMDcon.setTransitionInfo(t.getGuard().toString(), action); - for (int i=1; i<t.getActions().size(); i++){ - SMDcon.setTransitionInfo("", t.getActions().get(i).toString().replaceAll(" ","")); + for (int i = 1; i < t.getActions().size(); i++) { + SMDcon.setTransitionInfo("", t.getActions().get(i).toString().replaceAll(" ", "")); } smp.addComponent(SMDcon, p1.getX(), p1.getY(), false, true); } @@ -9944,7 +9872,7 @@ public class GTURTLEModeling { rm = new RequirementModeling(reqs, rdp, mgui); checkingErrors = rm.getCheckingErrors(); warnings = rm.getWarnings(); - if ((checkingErrors != null) && (checkingErrors.size() > 0)){ + if ((checkingErrors != null) && (checkingErrors.size() > 0)) { return false; } else { //mgui.setMode(mgui.GEN_DESIGN_OK); @@ -9977,7 +9905,7 @@ public class GTURTLEModeling { CheckingError ce; TGComponent tgc; - for(int i=0; i<checkingErrors.size(); i++) { + for (int i = 0; i < checkingErrors.size(); i++) { ce = checkingErrors.get(i); if (ce != null && ce instanceof UICheckingError) { tgc = ((UICheckingError) ce).getTGComponent(); @@ -9990,9 +9918,9 @@ public class GTURTLEModeling { private void analyzeErrorOnComponent(TGComponent _tgc) { if (_tgc instanceof BasicErrorHighlight) { - ((BasicErrorHighlight)_tgc).setStateAction(ErrorHighlight.UNKNOWN); + ((BasicErrorHighlight) _tgc).setStateAction(ErrorHighlight.UNKNOWN); } else if (_tgc instanceof ActionStateErrorHighlight) { - ((ActionStateErrorHighlight)_tgc).setStateAction(ErrorHighlight.UNKNOWN_AS); + ((ActionStateErrorHighlight) _tgc).setStateAction(ErrorHighlight.UNKNOWN_AS); } } diff --git a/src/main/java/ui/JMenuBarTurtle.java b/src/main/java/ui/JMenuBarTurtle.java index 448c131c8ad5a62cb0b4e8911bf549ddd57bae3e..d352f504e217d3f814336c7dceb015cb5a689c35 100755 --- a/src/main/java/ui/JMenuBarTurtle.java +++ b/src/main/java/ui/JMenuBarTurtle.java @@ -37,8 +37,6 @@ */ - - package ui; import common.ConfigurationTTool; @@ -51,12 +49,13 @@ import javax.swing.*; /** - * Class JMenuBarTurtle - * Creation: 09/12/2003 - * Version 1.0 09/12/2003 - * @author Ludovic APVRILLE + * Class JMenuBarTurtle + * Creation: 09/12/2003 + * Version 1.0 09/12/2003 + * + * @author Ludovic APVRILLE */ -public class JMenuBarTurtle extends JMenuBar { +public class JMenuBarTurtle extends JMenuBar { private JMenu menugraph; //Menu @@ -81,7 +80,7 @@ public class JMenuBarTurtle extends JMenuBar { // Menus - private void buildMenus(MainGUI mgui) { + private void buildMenus(MainGUI mgui) { // Main menu file = new JMenu("File"); edit = new JMenu("Edit"); @@ -103,7 +102,7 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_PROJECT]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_FROM_NETWORK]); + menuItem = file.add(mgui.actions[TGUIAction.ACT_OPEN_FROM_NETWORK]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = file.add(mgui.actions[TGUIAction.ACT_SAVE]); menuItem.addMouseListener(mgui.mouseHandler); @@ -420,7 +419,7 @@ public class JMenuBarTurtle extends JMenuBar { menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_RTLOTOS]); menuItem.addMouseListener(mgui.mouseHandler); - + if (MainGUI.lotosOn) { menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_LOTOS]); @@ -581,7 +580,7 @@ public class JMenuBarTurtle extends JMenuBar { menuItem.addMouseListener(mgui.mouseHandler); menuItem = capture.add(mgui.actions[TGUIAction.ACT_ALL_DIAGRAM_CAPTURE]); menuItem.addMouseListener(mgui.mouseHandler); - menuItem = capture.add(mgui.actions[TGUIAction.ACT_ALL_DIAGRAM_CAPTURE_SVG]); + menuItem = capture.add(mgui.actions[TGUIAction.ACT_ALL_DIAGRAM_CAPTURE_SVG]); menuItem.addMouseListener(mgui.mouseHandler); menuItem = capture.add(mgui.actions[TGUIAction.ACT_SELECTED_CAPTURE]); menuItem.addMouseListener(mgui.mouseHandler); diff --git a/src/main/java/ui/MainGUI.java b/src/main/java/ui/MainGUI.java index 7d672613096d4a06ece91a80b00ce1f2208594d7..260b9e2e5c5e3cc96e3805296ccfb5eb8970c4c8 100644 --- a/src/main/java/ui/MainGUI.java +++ b/src/main/java/ui/MainGUI.java @@ -37,8 +37,6 @@ */ - - package ui; import avatartranslator.AvatarSpecification; @@ -54,7 +52,6 @@ import translator.CheckingError; import translator.MasterGateManager; import ui.ad.TActivityDiagramPanel; import ui.atd.AttackTreeDiagramPanel; -import ui.ftd.FaultTreeDiagramPanel; import ui.avatarad.AvatarADPanel; import ui.avatarbd.AvatarBDLibraryFunction; import ui.avatarbd.AvatarBDPortConnector; @@ -70,8 +67,10 @@ import ui.cd.TClassDiagramPanel; import ui.diplodocusmethodology.DiplodocusMethodologyDiagramPanel; import ui.ebrdd.EBRDDPanel; import ui.file.*; +import ui.ftd.FaultTreeDiagramPanel; import ui.graph.AUTGraph; import ui.graph.RG; +import ui.het.CAMSBlockDiagramPanel; import ui.interactivesimulation.JFrameInteractiveSimulation; import ui.interactivesimulation.SimulationTransaction; import ui.iod.InteractionOverviewDiagramPanel; @@ -85,10 +84,9 @@ import ui.tmlcd.TMLTaskDiagramPanel; import ui.tmlcompd.TMLCCompositeComponent; import ui.tmlcompd.TMLComponentTaskDiagramPanel; import ui.tmlcp.TMLCPPanel; -import ui.tmldd.TMLArchiDiagramPanel; import ui.tmldd.TMLArchiCAMSNode; +import ui.tmldd.TMLArchiDiagramPanel; import ui.tmlsd.TMLSDPanel; -import ui.het.*; import ui.tree.DiagramTreeModel; import ui.tree.DiagramTreeRenderer; import ui.tree.JDiagramTree; @@ -102,7 +100,6 @@ import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.filechooser.FileNameExtensionFilter; - import java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; @@ -122,9 +119,10 @@ import java.util.concurrent.ConcurrentHashMap; * Version: 1.1 21/12/2003 * Version: 1.2 29/09/2004 * 26/11/2015 D. Genius added DDD + * * @author Ludovic APVRILLE */ -public class MainGUI implements ActionListener, WindowListener, KeyListener, PeriodicBehavior { +public class MainGUI implements ActionListener, WindowListener, KeyListener, PeriodicBehavior { public static boolean systemcOn; public static boolean lotosOn; @@ -138,7 +136,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public static boolean experimentalOn; public static boolean avatarOnly; public static boolean turtleOn; - + public boolean isxml = false; public final static int LOTOS = 0; @@ -165,15 +163,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public DiagramTreeModel dtm; // Actions - public TGUIAction [] actions; - public MouseHandler mouseHandler; - public KeyListener keyHandler; + public TGUIAction[] actions; + public MouseHandler mouseHandler; + public KeyListener keyHandler; // Validation - public LinkedList<TClassInterface> tclassesToValidate = new LinkedList<TClassInterface> (); + public LinkedList<TClassInterface> tclassesToValidate = new LinkedList<TClassInterface>(); // Status bar - private JLabel status; + private JLabel status; //Menubar private JMenuBarTurtle jmenubarturtle; @@ -320,7 +318,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe private ArrayList<RunningInfo> runningIDs; private ArrayList<LoadInfo> loadIDs; private ConcurrentHashMap<Integer, ArrayList<SimulationTransaction>> transactionMap = new ConcurrentHashMap<Integer, ArrayList<SimulationTransaction>>(); - private ConcurrentHashMap<Integer, ConcurrentHashMap<String, String>> latencyMap = new ConcurrentHashMap<Integer, ConcurrentHashMap<String,String>>(); + private ConcurrentHashMap<Integer, ConcurrentHashMap<String, String>> latencyMap = new ConcurrentHashMap<Integer, ConcurrentHashMap<String, String>>(); private ConcurrentHashMap<String, String> statusMap = new ConcurrentHashMap<String, String>(); private JFrameInteractiveSimulation jfis; private JFrameAvatarInteractiveSimulation jfais; @@ -338,7 +336,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public MainGUI(boolean _turtleOn, boolean _systemcOn, boolean _lotosOn, boolean _proactiveOn, boolean _tpnOn, boolean _osOn, boolean _uppaalOn, boolean _ncOn, boolean _avatarOn, boolean _proverifOn, boolean - _avatarOnly, boolean _experimental) { + _avatarOnly, boolean _experimental) { turtleOn = _turtleOn; systemcOn = _systemcOn; lotosOn = _lotosOn; @@ -359,7 +357,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //PluginManager.pluginManager = new PluginManager(); } - + public void setKey(String _sk) { sk = _sk; RshClient.sk = sk; @@ -368,9 +366,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public String getKey() { return sk; } - + public File getDir() { - return dir; + return dir; } public boolean isAvatarOn() { @@ -397,7 +395,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe frame = new JFrame("TTool"); frame.addWindowListener(this); - frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE ); + frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); frame.setIconImage(IconManager.img8); framePanel = frame.getContentPane(); @@ -502,7 +500,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe framePanel.add(mainBar, BorderLayout.NORTH); // Panels - panelForTab = new JPanel(); panelForTab.setLayout(new BorderLayout()); + panelForTab = new JPanel(); + panelForTab.setLayout(new BorderLayout()); //panelForTree = new JPanel(); panelForTree.setLayout(new BorderLayout()); // Tree dtree = new JDiagramTree(this); @@ -541,7 +540,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void initActions() { actions = new TGUIAction[TGUIAction.NB_ACTION]; - for(int i=0; i<TGUIAction.NB_ACTION; i++) { + for (int i = 0; i < TGUIAction.NB_ACTION; i++) { actions[i] = new TGUIAction(i); actions[i].addActionListener(this); //actions[i].addKeyListener(this); @@ -564,33 +563,33 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe hasChanged = true; if (tdp != null) { switch (type) { - case -1: - // Structural change - break; - case TDiagramPanel.NEW_COMPONENT: - //TraceManager.addDev("New Component"); - tdp.structureChanged(); - break; - case TDiagramPanel.NEW_CONNECTOR: - //TraceManager.addDev("New Connector"); - tdp.structureChanged(); - break; - case TDiagramPanel.REMOVE_COMPONENT: - //TraceManager.addDev("Remove Component"); - tdp.structureChanged(); - break; - case TDiagramPanel.MOVE_CONNECTOR: - //TraceManager.addDev("Move Connector"); - tdp.structureChanged(); - break; - case TDiagramPanel.CHANGE_VALUE_COMPONENT: - //TraceManager.addDev("Value of component changed"); - tdp.valueChanged(); - break; - case TDiagramPanel.MOVE_COMPONENT: - //TraceManager.addDev("Component moved"); - break; - default: + case -1: + // Structural change + break; + case TDiagramPanel.NEW_COMPONENT: + //TraceManager.addDev("New Component"); + tdp.structureChanged(); + break; + case TDiagramPanel.NEW_CONNECTOR: + //TraceManager.addDev("New Connector"); + tdp.structureChanged(); + break; + case TDiagramPanel.REMOVE_COMPONENT: + //TraceManager.addDev("Remove Component"); + tdp.structureChanged(); + break; + case TDiagramPanel.MOVE_CONNECTOR: + //TraceManager.addDev("Move Connector"); + tdp.structureChanged(); + break; + case TDiagramPanel.CHANGE_VALUE_COMPONENT: + //TraceManager.addDev("Value of component changed"); + tdp.valueChanged(); + break; + case TDiagramPanel.MOVE_COMPONENT: + //TraceManager.addDev("Component moved"); + break; + default: } } @@ -608,12 +607,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void setMethodologicalMode(byte m) { methoMode = m; - switch(methoMode) { - case METHO_ANALYSIS: - break; - case METHO_DESIGN: - break; - default: + switch (methoMode) { + case METHO_ANALYSIS: + break; + case METHO_DESIGN: + break; + default: } } @@ -624,13 +623,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //@author: Huy TRUONG - public JToolBarMainTurtle getMainBar(){ + public JToolBarMainTurtle getMainBar() { return this.mainBar; } //-- public void activeActions(boolean b) { - for(int i=0; i<TGUIAction.NB_ACTION; i++) { + for (int i = 0; i < TGUIAction.NB_ACTION; i++) { actions[i].setEnabled(b); } } @@ -652,7 +651,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TraceManager.addDev("Autosaving in " + fileSave.getAbsolutePath()); status.setText("Autosaving in " + fileSave.getAbsolutePath()); - if(checkFileForSave(fileSave)) { + if (checkFileForSave(fileSave)) { try { String s = gtm.makeXMLFromTurtleModeling(-1); FileOutputStream fos = new FileOutputStream(fileSave); @@ -673,7 +672,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe Vector<Object> elements = new Vector<Object>(); TURTLEPanel panel; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { panel = tabs.get(i); panel.searchForText(text.toLowerCase(), elements); } @@ -703,14 +702,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public void minimizeRG(RG toBeMinimized) { - JFrameMinimize jfm = new JFrameMinimize(frame, this, "Graph minimization", toBeMinimized); + JFrameMinimize jfm = new JFrameMinimize(frame, this, "Graph minimization", toBeMinimized, SpecConfigTTool.TGraphPath); //jfm.setSize(900, 700); GraphicLib.centerOnParent(jfm, 900, 700); jfm.setVisible(true); } public void makeRefusalGraph(RG inputGraph) { - JFrameRefusalGraph jfm = new JFrameRefusalGraph(frame, this, "Test Sequences Construction", inputGraph); + JFrameRefusalGraph jfm = new JFrameRefusalGraph(frame, this, "Test Sequences Construction", inputGraph, SpecConfigTTool.TGraphPath); //jfm.setSize(900, 700); GraphicLib.centerOnParent(jfm, 900, 700); jfm.setVisible(true); @@ -729,7 +728,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp = getCurrentTURTLEPanel(); if (tp instanceof AvatarDesignPanel) { - return ((AvatarDesignPanel)tp).hasCheckableMasterMutex(); + return ((AvatarDesignPanel) tp).hasCheckableMasterMutex(); } return null; @@ -739,14 +738,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp = getCurrentTURTLEPanel(); if (tp instanceof AvatarDesignPanel) { - ((AvatarDesignPanel)tp).removeAllMutualExclusionWithMasterMutex(); + ((AvatarDesignPanel) tp).removeAllMutualExclusionWithMasterMutex(); } } - - private int addAnalysisPanel(String name, int index) { if (index == -1) { index = tabs.size(); @@ -768,7 +765,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe index = tabs.size(); } TMLCommunicationPatternPanel tmlcpp = new TMLCommunicationPatternPanel(this); - tabs.add( index, tmlcpp ); // should look for the first + tabs.add(index, tmlcpp); // should look for the first //mainTabbedPane.addTab(name, IconManager.imgic17, ap.tabbedPane, "Opens analysis diagrams"); mainTabbedPane.add(tmlcpp.tabbedPane, index); mainTabbedPane.setToolTipTextAt(index, "Open CP diagrams"); @@ -1057,15 +1054,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } //Return the list of all the TMLArchiDiagramPanels - public Vector<TMLArchiPanel> getTMLArchiDiagramPanels() { + public Vector<TMLArchiPanel> getTMLArchiDiagramPanels() { Vector<TMLArchiPanel> panelsList = new Vector<TMLArchiPanel>(); TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); - if ( tp instanceof TMLArchiPanel) { - panelsList.add( (TMLArchiPanel) (tp) ); + if (tp instanceof TMLArchiPanel) { + panelsList.add((TMLArchiPanel) (tp)); } } return panelsList; @@ -1075,32 +1072,38 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; Vector<String> list = new Vector<String>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLDesignPanel) { - list.addAll(((TMLDesignPanel)tp).getAllTMLTaskNames(mainTabbedPane.getTitleAt(i))); + list.addAll(((TMLDesignPanel) tp).getAllTMLTaskNames(mainTabbedPane.getTitleAt(i))); } } return list; } public void expandToErrors() { - if (gtm != null) { - gtm.expandToErrors(); - } + if (gtm != null) { + gtm.expandToErrors(); + } + } + + public void expandToWarnings() { + if (gtm != null) { + gtm.expandToWarnings(); + } } - - public Vector<String> getTMLTasks(){ + + public Vector<String> getTMLTasks() { TURTLEPanel tp; Vector<String> list = new Vector<String>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLDesignPanel) { - list.addAll(((TMLDesignPanel)tp).getAllTMLTaskNames(mainTabbedPane.getTitleAt(i))); + list.addAll(((TMLDesignPanel) tp).getAllTMLTaskNames(mainTabbedPane.getTitleAt(i))); } if (tp instanceof TMLComponentDesignPanel) { - list.addAll(((TMLComponentDesignPanel)tp).getAllTMLTaskNames(mainTabbedPane.getTitleAt(i))); + list.addAll(((TMLComponentDesignPanel) tp).getAllTMLTaskNames(mainTabbedPane.getTitleAt(i))); } } @@ -1111,10 +1114,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; Vector<String> list = new Vector<String>(); - for( int i = 0; i < tabs.size(); i++ ) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); - if( tp instanceof TMLComponentDesignPanel ) { - list.addAll( ((TMLComponentDesignPanel)tp).getAllTMLTasksAttributes() ); + if (tp instanceof TMLComponentDesignPanel) { + list.addAll(((TMLComponentDesignPanel) tp).getAllTMLTasksAttributes()); } } @@ -1125,10 +1128,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; ArrayList<TMLCommunicationPatternPanel> list = new ArrayList<TMLCommunicationPatternPanel>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); - if( tp instanceof TMLCommunicationPatternPanel ) { - list.add( (TMLCommunicationPatternPanel) tp ); + if (tp instanceof TMLCommunicationPatternPanel) { + list.add((TMLCommunicationPatternPanel) tp); } } return list; @@ -1137,10 +1140,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void updateAllReferences() { TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { - ((TMLComponentDesignPanel)tp).tmlctdp.delayedLoad(); + ((TMLComponentDesignPanel) tp).tmlctdp.delayedLoad(); //((TMLComponentDesignPanel)tp).tmlctdp.updatePorts(); } } @@ -1149,11 +1152,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void updateAllPorts() { TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { //((TMLComponentDesignPanel)tp).tmlctdp.delayedLoad(); - ((TMLComponentDesignPanel)tp).tmlctdp.updatePorts(); + ((TMLComponentDesignPanel) tp).tmlctdp.updatePorts(); } } } @@ -1162,12 +1165,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; Vector<String> list = new Vector<String>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLDesignPanel) { - list.addAll(((TMLDesignPanel)tp).getAllTMLCommunicationNames(mainTabbedPane.getTitleAt(i))); + list.addAll(((TMLDesignPanel) tp).getAllTMLCommunicationNames(mainTabbedPane.getTitleAt(i))); } else if (tp instanceof TMLComponentDesignPanel) { - list.addAll(((TMLComponentDesignPanel)tp).getAllTMLCommunicationNames(mainTabbedPane.getTitleAt(i))); + list.addAll(((TMLComponentDesignPanel) tp).getAllTMLCommunicationNames(mainTabbedPane.getTitleAt(i))); } } return list; @@ -1177,13 +1180,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; Vector<String> list = new Vector<String>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); /*if (tp instanceof TMLDesignPanel) { list.addAll(((TMLDesignPanel)tp).getAllTMLChannelNames( mainTabbedPane.getTitleAt(i)) ); } else*/ - if( tp instanceof TMLComponentDesignPanel ) { - list.addAll(((TMLComponentDesignPanel)tp).getAllTMLInputPorts( mainTabbedPane.getTitleAt(i)) ); + if (tp instanceof TMLComponentDesignPanel) { + list.addAll(((TMLComponentDesignPanel) tp).getAllTMLInputPorts(mainTabbedPane.getTitleAt(i))); } } return list; @@ -1193,12 +1196,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; Vector<String> list = new Vector<String>(); - for( int i = 0; i < tabs.size(); i++ ) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); - if ( tp instanceof TMLDesignPanel ) { - list.addAll( ( (TMLDesignPanel)tp ).getAllTMLEventNames( mainTabbedPane.getTitleAt(i) ) ); - } else if ( tp instanceof TMLComponentDesignPanel ) { - list.addAll( ( (TMLComponentDesignPanel)tp ).getAllTMLEventNames( mainTabbedPane.getTitleAt(i) ) ); + if (tp instanceof TMLDesignPanel) { + list.addAll(((TMLDesignPanel) tp).getAllTMLEventNames(mainTabbedPane.getTitleAt(i))); + } else if (tp instanceof TMLComponentDesignPanel) { + list.addAll(((TMLComponentDesignPanel) tp).getAllTMLEventNames(mainTabbedPane.getTitleAt(i))); } } return list; @@ -1209,15 +1212,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe Vector<String> list = new Vector<String>(); boolean b; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLDesignPanel) { b = (mainTabbedPane.getTitleAt(i).compareTo(ref) == 0); - list.addAll(((TMLDesignPanel)tp).getAllNonMappedTMLTaskNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); + list.addAll(((TMLDesignPanel) tp).getAllNonMappedTMLTaskNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); } if (tp instanceof TMLComponentDesignPanel) { b = (mainTabbedPane.getTitleAt(i).compareTo(ref) == 0); - list.addAll(((TMLComponentDesignPanel)tp).getAllNonMappedTMLPrimitiveComponentNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); + list.addAll(((TMLComponentDesignPanel) tp).getAllNonMappedTMLPrimitiveComponentNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); } } @@ -1229,11 +1232,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe Vector<String> list = new Vector<String>(); boolean b; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof AvatarDesignPanel) { b = (mainTabbedPane.getTitleAt(i).compareTo(ref) == 0); - list.addAll(((AvatarDesignPanel)tp).getAllNonMappedAvatarBlockNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); + list.addAll(((AvatarDesignPanel) tp).getAllNonMappedAvatarBlockNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); } } @@ -1245,11 +1248,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe Vector<String> list = new Vector<String>(); boolean b; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof AvatarDesignPanel) { b = (mainTabbedPane.getTitleAt(i).compareTo(ref) == 0); - list.addAll(((AvatarDesignPanel)tp).getAllNonMappedAvatarChannelNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); + list.addAll(((AvatarDesignPanel) tp).getAllNonMappedAvatarChannelNames(mainTabbedPane.getTitleAt(i), tadp, b, name)); } } @@ -1261,11 +1264,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe Vector<String> list = new Vector<String>(); // boolean b; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); - if (tp instanceof TMLComponentDesignPanel) { - if (((TMLComponentDesignPanel)tp).tmlctdp != tcdp) { - list.addAll(((TMLComponentDesignPanel)tp).getAllCompositeComponent(mainTabbedPane.getTitleAt(i))); + if (tp instanceof TMLComponentDesignPanel) { + if (((TMLComponentDesignPanel) tp).tmlctdp != tcdp) { + list.addAll(((TMLComponentDesignPanel) tp).getAllCompositeComponent(mainTabbedPane.getTitleAt(i))); } } } @@ -1505,22 +1508,21 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public void setIODName(int analysisIndex, String name) { - AnalysisPanel ap = (AnalysisPanel)(tabs.elementAt(analysisIndex)); + AnalysisPanel ap = (AnalysisPanel) (tabs.elementAt(analysisIndex)); ap.tabbedPane.setTitleAt(0, name); } public void setDeploymentName(int deploymentIndex, String name) { - DeploymentPanel dp = (DeploymentPanel)(tabs.elementAt(deploymentIndex)); + DeploymentPanel dp = (DeploymentPanel) (tabs.elementAt(deploymentIndex)); dp.tabbedPane.setTitleAt(0, name); } public void setNCName(int ncIndex, String name) { - NCPanel ncp = (NCPanel)(tabs.elementAt(ncIndex)); + NCPanel ncp = (NCPanel) (tabs.elementAt(ncIndex)); ncp.tabbedPane.setTitleAt(0, name); } - // add main panel for editing TURTLE diagrams private void addTURTLEPanel() { @@ -1544,11 +1546,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe mainTabbedPane.setOpaque(true); ChangeListener cl = new ChangeListener() { - @Override - public void stateChanged(ChangeEvent e){ - paneAction(e); - } - }; + @Override + public void stateChanged(ChangeEvent e) { + paneAction(e); + } + }; mainTabbedPane.addChangeListener(cl); panelForTab.add(mainTabbedPane, BorderLayout.CENTER); @@ -1565,15 +1567,16 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void firstDiag() { - TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) { - return; - } - tp.tabbedPane.setSelectedIndex(0); + TURTLEPanel tp = getCurrentTURTLEPanel(); + if (tp == null) { + return; + } + tp.tabbedPane.setSelectedIndex(0); } + public String getTitleOf(TDiagramPanel _tdp) { TURTLEPanel panel; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { panel = tabs.get(i); if (panel.hasTDiagramPanel(_tdp)) { return getTitleAt(panel); @@ -1595,7 +1598,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public TURTLEPanel getTURTLEPanel(String s) { - for(int i=0; i<mainTabbedPane.getTabCount(); i++) { + for (int i = 0; i < mainTabbedPane.getTabCount(); i++) { if (mainTabbedPane.getTitleAt(i).compareTo(s) == 0) { return tabs.elementAt(i); } @@ -1605,13 +1608,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void drawAvatarSpecification(AvatarSpecification av) { int index = createAvatarDesign("GeneratedDesign"); - AvatarDesignPanel adp = (AvatarDesignPanel)(tabs.elementAt(index)); + AvatarDesignPanel adp = (AvatarDesignPanel) (tabs.elementAt(index)); gtm.drawPanel(av, adp); } // Creates the status bar. - private JLabel createStatusBar() { + private JLabel createStatusBar() { status = new JLabel("Ready..."); status.setBorder(BorderFactory.createEtchedBorder()); return status; @@ -1619,7 +1622,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void activate(JMenu jm, boolean b) { JMenuItem im; - for(int i=0; i<jm.getItemCount(); i++) { + for (int i = 0; i < jm.getItemCount(); i++) { im = jm.getItem(i); if (im != null) im.setEnabled(b); @@ -1661,7 +1664,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe frame.setVisible(true); } - public void newTurtleModeling() { + public void newTurtleModeling() { setMode(OPENED); addTURTLEPanel(); gtm = new GTURTLEModeling(this, tabs); @@ -1674,7 +1677,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe setMode(NOT_OPENED); // tabbed pane - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tabs.elementAt(i).tabbedPane.removeAll(); } @@ -1684,10 +1687,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe activetdp = null; gtm = null; - tclassesToValidate = new LinkedList<TClassInterface> (); + tclassesToValidate = new LinkedList<TClassInterface>(); MasterGateManager.reinitNameRestriction(); - typeButtonSelected = - 1; + typeButtonSelected = -1; idButtonSelected = -1; pluginSelected = null; @@ -1702,7 +1705,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void setStatusBarText(String s) { // captitalizeFirstLetter - if (s == null) { + if (s == null) { return; } @@ -1725,8 +1728,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newDesign() { //TraceManager.addDev("NEW DESIGN"); addDesignPanel("Design", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1734,8 +1737,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newDeployment() { //TraceManager.addDev("NEW DESIGN"); addDeploymentPanel("Deployment", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1771,8 +1774,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newTMLDesign() { //TraceManager.addDev("NEW DESIGN"); addTMLDesignPanel("DIPLODOCUS_Design", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1780,8 +1783,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newDiplodocusMethodology() { //TraceManager.addDev("NEW DESIGN"); addDiplodocusMethodologyPanel("DIPLODOCUS_Methodology", -1, true); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1789,8 +1792,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newAvatarMethodology() { //TraceManager.addDev("NEW DESIGN"); addAvatarMethodologyPanel("AVATAR_Methodology", -1, true); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1798,8 +1801,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newSysmlsecMethodology() { //TraceManager.addDev("NEW DESIGN"); addSysmlsecMethodologyPanel("SysMLSec_Methodology", -1, true); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1807,8 +1810,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newTMLComponentDesign() { //TraceManager.addDev("NEW DESIGN"); addTMLComponentDesignPanel("DIPLODOCUS_C_Design", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1825,8 +1828,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newTMLArchi() { //TraceManager.addDev("NEW DIPLO Architecture"); addTMLArchiPanel("Architecture", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1834,8 +1837,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newSystemCAMS() {//ajout CD //TraceManager.addDev("NEW DIPLO Architecture"); addSystemCAMSPanel("SystemC-AMS", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1843,8 +1846,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newADD() { //TraceManager.addDev("NEW Avatar deployment"); addADDPanel("Deployment", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint(); } @@ -1852,22 +1855,22 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newTURTLEOSDesign() { //TraceManager.addDev("NEW DESIGN"); addTURTLEOSDesignPanel("TURTLE-OS Design", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); } public void newNCDesign() { //TraceManager.addDev("NEW NC DESIGN"); addNCDesignPanel("NC Design", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); } public void newAvatarBD() { //TraceManager.addDev("NEW AVATAR BD"); addAvatarDesignPanel("Design", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); } public void newAvatarRequirement() { @@ -1886,9 +1889,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void newProactiveDesign() { //TraceManager.addDev("NEW DESIGN"); - /*int index = */addProActiveDesignPanel("ProActive Design", -1); - tabs.elementAt(tabs.size()-1).tabbedPane.setSelectedIndex(0); - mainTabbedPane.setSelectedIndex(tabs.size()-1); + /*int index = */ + addProActiveDesignPanel("ProActive Design", -1); + tabs.elementAt(tabs.size() - 1).tabbedPane.setSelectedIndex(0); + mainTabbedPane.setSelectedIndex(tabs.size() - 1); //paneAction(null); //frame.repaint();*/ } @@ -1969,14 +1973,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe frame.setTitle("TTool: unsaved project"); } } - + public void newProjectDir() { - if (mode == NOT_OPENED) { - int val = createFileDialog(); - if (val == JFileChooser.APPROVE_OPTION) - createFile(); - } - else { + if (mode == NOT_OPENED) { + int val = createFileDialog(); + if (val == JFileChooser.APPROVE_OPTION) + createFile(); + } else { // check if previous modeling is saved boolean b = actions[TGUIAction.ACT_SAVE].isEnabled(); if (b) { @@ -1990,44 +1993,44 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } int val = createFileDialog(); if (val == JFileChooser.APPROVE_OPTION) { - // close current modeling - closeTurtleModeling(); - createFile(); + // close current modeling + closeTurtleModeling(); + createFile(); } } } - + public void saveConfig() { int i = 0; for (; i < tabs.size(); i++) { - if (tabs.get(i) == activetdp.tp) - break; + if (tabs.get(i) == activetdp.tp) + break; } int j = tabs.get(i).getIndexOfChild(activetdp); SpecConfigTTool.lastTab = i; SpecConfigTTool.lastPanel = j; try { - SpecConfigTTool.saveConfiguration(config); - SpecConfigTTool.lastPanel = -1; - SpecConfigTTool.lastTab = -1; - } catch (MalformedConfigurationException e) { - System.err.println(e.getMessage() + " : Can't save config file."); - } - } - + SpecConfigTTool.saveConfiguration(config); + SpecConfigTTool.lastPanel = -1; + SpecConfigTTool.lastTab = -1; + } catch (MalformedConfigurationException e) { + System.err.println(e.getMessage() + " : Can't save config file."); + } + } + public String loadFile(File f) { String s = null; - if(checkFileForOpen(f)) { + if (checkFileForOpen(f)) { try { FileInputStream fis = new FileInputStream(f); int nb = fis.available(); - byte [] ba = new byte[nb]; + byte[] ba = new byte[nb]; fis.read(ba); fis.close(); s = new String(ba); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be opened because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); } catch (OutOfMemoryError er) { JOptionPane.showMessageDialog(frame, "File could not be opened because " + er.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); @@ -2037,7 +2040,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public void saveFile(File f, String data, String msg) { - if(checkFileForSave(f)) { + if (checkFileForSave(f)) { try { if (data == null) { return; @@ -2047,7 +2050,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe fos.close(); JOptionPane.showMessageDialog(frame, msg + " " + f.getAbsolutePath(), "Saving", JOptionPane.INFORMATION_MESSAGE); return; - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be saved because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return; } @@ -2058,7 +2061,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe File libfile; int returnVal = jfclib.showDialog(frame, "Import library"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return null; } @@ -2072,7 +2075,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe File lotfile; int returnVal = jfclot.showDialog(frame, "Load RT-LOTOS specification"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return null; } @@ -2084,7 +2087,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } - String [] ret = new String[2]; + String[] ret = new String[2]; ret[0] = lotfile.getName(); ret[1] = spec; return ret; @@ -2094,7 +2097,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe File lotfile; int returnVal = jfclot.showDialog(frame, "Save RT-LOTOS specification"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2113,7 +2116,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfctgraph.setCurrentDirectory(new File(SpecConfigTTool.TGraphPath)); int returnVal = jfctgraph.showDialog(frame, "Save last DTA (textual form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2124,7 +2127,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /* graphical form */ returnVal = jfcggraph.showDialog(frame, "Save last DTA (graphical form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2137,13 +2140,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public String saveTPNNDRFormat(String tpn) { String s = file.getAbsolutePath(); int l = s.length(); - String myFile = s.substring(0, l-4) + ".ndr"; + String myFile = s.substring(0, l - 4) + ".ndr"; try { FileUtils.saveFile(myFile, tpn); } catch (Exception e) { - return "TPN could not be saved in myFile: " +e.getMessage(); + return "TPN could not be saved in myFile: " + e.getMessage(); } - return "TPN saved in " +myFile; + return "TPN saved in " + myFile; } public void saveRG(String tdata, String gdata) { @@ -2155,7 +2158,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfctgraph.setCurrentDirectory(new File(SpecConfigTTool.TGraphPath)); int returnVal = jfctgraph.showDialog(frame, "Save last RG (textual form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2166,7 +2169,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /* graphical form */ returnVal = jfcggraph.showDialog(frame, "Save last RG (graphical form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2184,7 +2187,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfctgraph.setFileFilter(filter); int returnVal = jfctgraph.showDialog(frame, "Save last TLSA (textual form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2195,7 +2198,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /* graphical form */ returnVal = jfcggraph.showDialog(frame, "Save last TLSA (graphical form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2213,7 +2216,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfctgraph.setFileFilter(filter); int returnVal = jfctgraph.showDialog(frame, "Save last RG/AUT (textual form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2224,7 +2227,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /* graphical form */ returnVal = jfcggraph.showDialog(frame, "Save last RG/AUT (graphical form)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } @@ -2235,12 +2238,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - public String[] loadGGraph() { File gfile; int returnVal = jfcggraph.showDialog(frame, "Load Graph (DOT format)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return null; } @@ -2252,7 +2254,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } - String [] ret = new String[2]; + String[] ret = new String[2]; ret[0] = gfile.getName(); ret[1] = spec; return ret; @@ -2265,7 +2267,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } - String [] ret = new String[2]; + String[] ret = new String[2]; ret[0] = name; ret[1] = spec; return ret; @@ -2283,7 +2285,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfctgraph.setCurrentDirectory(new File(SpecConfigTTool.TGraphPath)); int returnVal = jfctgraph.showDialog(frame, "Load AUT graph"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return null; } @@ -2295,46 +2297,46 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } - String [] ret = new String[2]; + String[] ret = new String[2]; ret[0] = autfile.getName(); ret[1] = spec; return ret; } - + public void loadAUTGraphsDir() { File dir = new File(SpecConfigTTool.TGraphPath); if (!dir.exists()) { - System.err.println("Graphs directory doesn't exists !"); - return; + System.err.println("Graphs directory doesn't exists !"); + return; } - - for (File autfile: dir.listFiles()) { - if (!FileUtils.getExtension(autfile).equals("aut")) - continue; - - String spec = loadFile(autfile); - if (spec == null) { - continue; - } - RG rg = new RG(autfile.getName()); - rg.fileName = autfile.getName(); - rg.data = spec; - addRG(rg); + for (File autfile : dir.listFiles()) { + if (!FileUtils.getExtension(autfile).equals("aut")) + continue; + + String spec = loadFile(autfile); + if (spec == null) { + continue; + } + + RG rg = new RG(autfile.getName()); + rg.fileName = autfile.getName(); + rg.data = spec; + addRG(rg); } - + } public void updateLastOpenFile(File file) { if (ConfigurationTTool.LastOpenFileDefined) { ConfigurationTTool.LastOpenFile = file.getPath(); if (ConfigurationTTool.LastOpenFile.contains(".ttool" + File.separator)) { - int last = 0; - for (int i = 0;i < ConfigurationTTool.LastOpenFile.length(); i++) { - if (ConfigurationTTool.LastOpenFile.charAt(i) == '/') - last = i; - } - ConfigurationTTool.LastOpenFile = ConfigurationTTool.LastOpenFile.substring(0, last); + int last = 0; + for (int i = 0; i < ConfigurationTTool.LastOpenFile.length(); i++) { + if (ConfigurationTTool.LastOpenFile.charAt(i) == '/') + last = i; + } + ConfigurationTTool.LastOpenFile = ConfigurationTTool.LastOpenFile.substring(0, last); } // Change name of action actions[TGUIAction.ACT_OPEN_LAST].setName(TGUIAction.ACT_OPEN_LAST, ConfigurationTTool.LastOpenFile); @@ -2353,16 +2355,16 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = null; String oldmodeling = gtm.makeXMLFromTurtleModeling(-1); - if(checkFileForOpen(filetmp)) { + if (checkFileForOpen(filetmp)) { try { FileInputStream fis = new FileInputStream(filetmp); int nb = fis.available(); - byte [] ba = new byte[nb]; + byte[] ba = new byte[nb]; fis.read(ba); fis.close(); s = new String(ba); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be opened because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return; } @@ -2375,7 +2377,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //TraceManager.addDev("Loading"); // load the new TURTLE modeling // Issue #41: Moved to common method - loadModels( gtm.mergeTURTLEGModeling(oldmodeling, s), "merged" ); + loadModels(gtm.mergeTURTLEGModeling(oldmodeling, s), "merged"); // try { // //TraceManager.addDev("Merging"); // gtm.enableUndo(false); @@ -2416,8 +2418,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void openProject(boolean isProject) { - if (config != null && activetdp != null) - saveConfig(); + if (config != null && activetdp != null) + saveConfig(); // check if a current modeling is opened boolean b = actions[TGUIAction.ACT_SAVE].isEnabled(); @@ -2433,12 +2435,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //jfc.setApproveButtonText("Open"); if (isProject) { - jfc.resetChoosableFileFilters(); - jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - jfc.setAcceptAllFileFilterUsed(false); - FileNameExtensionFilter filter = new FileNameExtensionFilter("TTool project", "ttool"); - jfc.setFileFilter(filter); - /*jfc.addMouseListener(new MouseListener() { + jfc.resetChoosableFileFilters(); + jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + jfc.setAcceptAllFileFilterUsed(false); + FileNameExtensionFilter filter = new FileNameExtensionFilter("TTool project", "ttool"); + jfc.setFileFilter(filter); + /*jfc.addMouseListener(new MouseListener() { @Override public void mouseClicked(MouseEvent arg0) { @@ -2479,13 +2481,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return; } });*/ - } - else { - jfc.resetChoosableFileFilters(); - jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); - jfc.setAcceptAllFileFilterUsed(false); - FileNameExtensionFilter filter = new FileNameExtensionFilter("XML files", "xml"); - jfc.setFileFilter(filter); + } else { + jfc.resetChoosableFileFilters(); + jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); + jfc.setAcceptAllFileFilterUsed(false); + FileNameExtensionFilter filter = new FileNameExtensionFilter("XML files", "xml"); + jfc.setFileFilter(filter); /*jfc.addMouseListener(new MouseListener() { @Override @@ -2539,37 +2540,36 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public void openProjectFromFile(File _f) { - if (FileUtils.getExtension(_f).equals("ttool")) { - dir = _f; - SpecConfigTTool.setDirConfig(dir); - String filename = dir.getAbsolutePath() + "/" + dir.getName().replaceAll(".ttool", ".xml"); - file = new File(filename); - config = new File(dir.getAbsolutePath() + "/project_config.xml"); - try { - SpecConfigTTool.loadConfigFile(config); - } catch (MalformedConfigurationException e) { - System.err.println(e.getMessage() + " : Can't load config file."); - } - } - else { - dir = null; - config = null; - SpecConfigTTool.setBasicConfig(systemcOn); - file = _f; - } - - if(checkFileForOpen(file)) { + if (FileUtils.getExtension(_f).equals("ttool")) { + dir = _f; + SpecConfigTTool.setDirConfig(dir); + String filename = dir.getAbsolutePath() + "/" + dir.getName().replaceAll(".ttool", ".xml"); + file = new File(filename); + config = new File(dir.getAbsolutePath() + "/project_config.xml"); + try { + SpecConfigTTool.loadConfigFile(config); + } catch (MalformedConfigurationException e) { + System.err.println(e.getMessage() + " : Can't load config file."); + } + } else { + dir = null; + config = null; + SpecConfigTTool.setBasicConfig(systemcOn); + file = _f; + } + + if (checkFileForOpen(file)) { String s = null; try { FileInputStream fis = new FileInputStream(file); int nb = fis.available(); - byte [] ba = new byte[nb]; + byte[] ba = new byte[nb]; fis.read(ba); fis.close(); s = new String(ba); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be opened because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return; } @@ -2586,7 +2586,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe updateLastOpenFile(file); // Issue #41: Moved to common method - loadModels( s, "loaded" ); + loadModels(s, "loaded"); // // load the new TURTLE modeling // try { // gtm.loadModelingFromXML(s); @@ -2607,7 +2607,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe // gtm.saveOperation(getCurrentSelectedPoint()); // dtree.forceUpdate(); if (getCurrentTDiagramPanel() != null) - getCurrentTDiagramPanel().repaint(); + getCurrentTDiagramPanel().repaint(); } } @@ -2622,45 +2622,44 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe file = new File(ConfigurationTTool.LastOpenFile); - if(checkFileForOpen(file)) { + if (checkFileForOpen(file)) { String s = null; - + if (FileUtils.getExtension(file).equals("ttool")) { - int last = 0; - for (int i = 0;i < ConfigurationTTool.LastOpenFile.length(); i++) { - if (ConfigurationTTool.LastOpenFile.charAt(i) == '/') - last = i; - } - dir = file; - String xml = ConfigurationTTool.LastOpenFile.substring(last, ConfigurationTTool.LastOpenFile.length()).replaceAll(".ttool", ".xml"); - file = new File(dir.getAbsolutePath() + File.separator + xml); - SpecConfigTTool.setDirConfig(dir); - config = new File(dir.getAbsolutePath() + "/project_config.xml"); - try { - SpecConfigTTool.loadConfigFile(config); - } catch (MalformedConfigurationException e) { - System.err.println(e.getMessage() + " : Can't load config file."); - } - } - else { - dir = null; - config = null; - SpecConfigTTool.setBasicConfig(systemcOn); + int last = 0; + for (int i = 0; i < ConfigurationTTool.LastOpenFile.length(); i++) { + if (ConfigurationTTool.LastOpenFile.charAt(i) == '/') + last = i; + } + dir = file; + String xml = ConfigurationTTool.LastOpenFile.substring(last, ConfigurationTTool.LastOpenFile.length()).replaceAll(".ttool", ".xml"); + file = new File(dir.getAbsolutePath() + File.separator + xml); + SpecConfigTTool.setDirConfig(dir); + config = new File(dir.getAbsolutePath() + "/project_config.xml"); + try { + SpecConfigTTool.loadConfigFile(config); + } catch (MalformedConfigurationException e) { + System.err.println(e.getMessage() + " : Can't load config file."); + } + } else { + dir = null; + config = null; + SpecConfigTTool.setBasicConfig(systemcOn); } try { FileInputStream fis = new FileInputStream(file); int nb = fis.available(); - byte [] ba = new byte[nb]; + byte[] ba = new byte[nb]; fis.read(ba); fis.close(); s = new String(ba); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be opened because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return; } - + // close current modeling closeTurtleModeling(); @@ -2670,7 +2669,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe gtm.enableUndo(false); // Issue #41: Moved to common method - loadModels( s, "loaded" ); + loadModels(s, "loaded"); //TraceManager.addDev("Loading"); // load the new TURTLE modeling // try { @@ -2699,25 +2698,24 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe // } - private void loadModels( final String xmlModel, - final String actionMessage ) { + private void loadModels(final String xmlModel, + final String actionMessage) { gtm.enableUndo(false); // load the new TURTLE modeling try { - gtm.loadModelingFromXML( xmlModel ); + gtm.loadModelingFromXML(xmlModel); frame.setTitle("TTool: " + file.getAbsolutePath()); makeLotosFile(); // Issue #41: Reselect the last tab - mainTabbedPane.setSelectedIndex( mainTabbedPane.getTabCount() - 1 ); + mainTabbedPane.setSelectedIndex(mainTabbedPane.getTabCount() - 1); if (gtm.getCheckingErrors().size() > 0) { JOptionPane.showMessageDialog(frame, "Modeling could not be correctly " + actionMessage, "Error when loading modeling", JOptionPane.INFORMATION_MESSAGE); } - } - catch (MalformedModelingException mme) { + } catch (MalformedModelingException mme) { JOptionPane.showMessageDialog(frame, "Modeling could not be correctly " + actionMessage, "Error when loading modeling", JOptionPane.INFORMATION_MESSAGE); frame.setTitle("TToolt: unnamed project"); } @@ -2726,28 +2724,28 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe gtm.saveOperation(getCurrentSelectedPoint()); dtree.forceUpdate(); if (SpecConfigTTool.lastTab > -1 && SpecConfigTTool.lastPanel > -1 && mainTabbedPane.getTabCount() > 0) { - mainTabbedPane.setSelectedIndex(SpecConfigTTool.lastTab); - activetdp = tabs.get(SpecConfigTTool.lastTab).getPanels().elementAt(SpecConfigTTool.lastPanel); - activetdp.selectTab(activetdp.name); - basicActivateDrawing(); + mainTabbedPane.setSelectedIndex(SpecConfigTTool.lastTab); + activetdp = tabs.get(SpecConfigTTool.lastTab).getPanels().elementAt(SpecConfigTTool.lastPanel); + activetdp.selectTab(activetdp.name); + basicActivateDrawing(); } - + if (dir != null) - loadAUTGraphsDir(); + loadAUTGraphsDir(); } public void saveAsLibrary(String data) { File libfile; int returnVal = jfclib.showDialog(frame, "Export library"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } libfile = jfclib.getSelectedFile(); libfile = FileUtils.addFileExtensionIfMissing(libfile, TLibFilter.getExtension()); - if(checkFileForSave(libfile)) { + if (checkFileForSave(libfile)) { try { if (data == null) { throw new Exception("Selected data corrupted"); @@ -2757,7 +2755,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe fos.close(); JOptionPane.showMessageDialog(frame, "Modeling was correctly saved under a TURTLE library named " + libfile.getName(), "Saving", JOptionPane.INFORMATION_MESSAGE); return; - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be saved because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return; } @@ -2783,12 +2781,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean saveTIF() { int returnVal = jfctif.showSaveDialog(frame); - if(returnVal == JFileChooser.APPROVE_OPTION) { + if (returnVal == JFileChooser.APPROVE_OPTION) { file = jfctif.getSelectedFile(); file = FileUtils.addFileExtensionIfMissing(file, TTIFFilter.getExtension()); } - if(checkFileForSave(file)) { + if (checkFileForSave(file)) { String s = gtm.saveTIF(); try { @@ -2818,16 +2816,16 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } String s = null; - if(checkFileForOpen(file)) { + if (checkFileForOpen(file)) { try { FileInputStream fis = new FileInputStream(file); int nb = fis.available(); - byte [] ba = new byte[nb]; + byte[] ba = new byte[nb]; fis.read(ba); fis.close(); s = new String(ba); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be opened because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return false; } @@ -2852,16 +2850,16 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } String s = null; - if(checkFileForOpen(file)) { + if (checkFileForOpen(file)) { try { FileInputStream fis = new FileInputStream(file); int nb = fis.available(); - byte [] ba = new byte[nb]; + byte[] ba = new byte[nb]; fis.read(ba); fis.close(); s = new String(ba); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be opened because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return false; } @@ -2878,69 +2876,68 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } private int createFileDialog() { - int returnVal = jfc.showSaveDialog(frame); - if(returnVal == JFileChooser.APPROVE_OPTION) { - dir = jfc.getSelectedFile(); - dir = FileUtils.addFileExtensionIfMissing(dir, "ttool"); - dir.mkdir(); - SpecConfigTTool.setDirConfig(dir); - config = SpecConfigTTool.createProjectConfig(dir); - try { - SpecConfigTTool.loadConfigFile(config); - } catch (MalformedConfigurationException e) { - System.err.println(e.getMessage() + " : Can't load config file."); - } - String newname = FileUtils.removeFileExtension(dir.getName()); + int returnVal = jfc.showSaveDialog(frame); + if (returnVal == JFileChooser.APPROVE_OPTION) { + dir = jfc.getSelectedFile(); + dir = FileUtils.addFileExtensionIfMissing(dir, "ttool"); + dir.mkdir(); + SpecConfigTTool.setDirConfig(dir); + config = SpecConfigTTool.createProjectConfig(dir); + try { + SpecConfigTTool.loadConfigFile(config); + } catch (MalformedConfigurationException e) { + System.err.println(e.getMessage() + " : Can't load config file."); + } + String newname = FileUtils.removeFileExtension(dir.getName()); file = new File(dir, newname); file = FileUtils.addFileExtensionIfMissing(file, TFileFilter.getExtension()); } - + return returnVal; } - + private void createFile() { newTurtleModeling(); - frame.setTitle(file.getName()); - try { - if (gtm == null) { - throw new Exception("Internal model Error 1"); - } - String s = gtm.makeXMLFromTurtleModeling(-1); - if (s == null) { - throw new Exception("Internal model Error 2"); - } - FileOutputStream fos = new FileOutputStream(file); - fos.write(s.getBytes()); - fos.close(); - updateLastOpenFile(file); - setMode(MODEL_SAVED); - String title = "TTool: " + file.getAbsolutePath(); - if (!frame.getTitle().equals(title)) { - frame.setTitle(title); - } - if (lotosfile == null) { - makeLotosFile(); - } - } - catch(Exception e) { + frame.setTitle(file.getName()); + try { + if (gtm == null) { + throw new Exception("Internal model Error 1"); + } + String s = gtm.makeXMLFromTurtleModeling(-1); + if (s == null) { + throw new Exception("Internal model Error 2"); + } + FileOutputStream fos = new FileOutputStream(file); + fos.write(s.getBytes()); + fos.close(); + updateLastOpenFile(file); + setMode(MODEL_SAVED); + String title = "TTool: " + file.getAbsolutePath(); + if (!frame.getTitle().equals(title)) { + frame.setTitle(title); + } + if (lotosfile == null) { + makeLotosFile(); + } + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be saved because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); } } - + protected boolean saveProject() { if (file == null) { - if (dir != null) - createFileDialog(); - else { - int returnVal = jfc.showSaveDialog(frame); - if(returnVal == JFileChooser.APPROVE_OPTION) { + if (dir != null) + createFileDialog(); + else { + int returnVal = jfc.showSaveDialog(frame); + if (returnVal == JFileChooser.APPROVE_OPTION) { file = jfc.getSelectedFile(); file = FileUtils.addFileExtensionIfMissing(file, TFileFilter.getExtension()); } - } + } } - if( checkFileForSave(file)) { + if (checkFileForSave(file)) { try { if (gtm == null) { throw new Exception("Internal model Error 1"); @@ -2962,7 +2959,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe makeLotosFile(); } return true; - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, "File could not be saved because " + e.getMessage(), "File Error", JOptionPane.INFORMATION_MESSAGE); return false; } @@ -2983,11 +2980,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe try { if (file != null) { if (!file.exists()) { - pb = "File " + file + " doesn't exist"; + pb = "File " + file + " doesn't exist"; ok = false; } if ((ok == true) && (!file.canRead())) { - pb = "File is read protected"; + pb = "File is read protected"; ok = false; } } @@ -3014,11 +3011,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (file != null) { if (!file.exists()) { if (!file.createNewFile()) { - pb = "File could not be created"; + pb = "File could not be created"; ok = false; } if (!file.canWrite()) { - pb = "File is write protected"; + pb = "File is write protected"; ok = false; } } @@ -3080,7 +3077,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void makeLotosFile() { String s = file.getAbsolutePath(); int l = s.length(); - String myFile = s.substring(0, l-4); + String myFile = s.substring(0, l - 4); lotosfile = new File(myFile + ".lot"); simfile = new File(myFile + ".sim"); dtafile = new File(myFile + ".dta"); @@ -3099,16 +3096,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /** * Display "Modeling has not been saved" window - * @author Fabien Tessier + * * @param str1 (text for the left button) * @param str2 (text for the right button) * @return boolean (false = cancel, true = perform action) + * @author Fabien Tessier */ public boolean saveBeforeAction(String str1, String str2) { - Object[] options = { str1, str2, "CANCEL" }; //Texts for buttons + Object[] options = {str1, str2, "CANCEL"}; //Texts for buttons JOptionPane optionPane = new JOptionPane("Modeling has not been saved", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_CANCEL_OPTION, null, options, options[0]); JDialog dialog = optionPane.createDialog(activetdp, "Warning"); //Use JDialog to enable navigation with arrow keys - dialog.setLocation((frame.getSize().width)/2 - dialog.getWidth()/2, (frame.getSize().height)/2 - dialog.getHeight()/2); + dialog.setLocation((frame.getSize().width) / 2 - dialog.getWidth() / 2, (frame.getSize().height) / 2 - dialog.getHeight() / 2); UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE); Set<AWTKeyStroke> forwardTraversalKeys = new HashSet<AWTKeyStroke>(dialog.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)); @@ -3154,12 +3152,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe try { if (ConfigurationTTool.LastOpenFileDefined) { - if (dir != null) - saveConfig(); + if (dir != null) + saveConfig(); ConfigurationTTool.saveConfiguration(); //TraceManager.addDev("Configuration written to file"); } - } catch (Exception e) {} + } catch (Exception e) { + } System.exit(0); @@ -3215,7 +3214,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void updateZoomInfo() { String s = ""; - int zoom = (int)(getCurrentTDiagramPanel().getZoom()*100); + int zoom = (int) (getCurrentTDiagramPanel().getZoom() * 100); if (zoom < 100) { s = "0" + zoom + "%"; } else { @@ -3243,12 +3242,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //@author: Huy TRUONG //open a new External Search Dialog - public void showExternalSearch(){ + public void showExternalSearch() { String textSearchField = mainBar.search.getText(); List<String> listSearch = new ArrayList<String>(); if (null == this.searchBox) { - if (getCurrentTDiagramPanel()!=null) { + if (getCurrentTDiagramPanel() != null) { if (getCurrentTDiagramPanel().tdmm.getSelectComponents().size() == 0) { listSearch.add(textSearchField); } else { @@ -3257,29 +3256,27 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } this.searchBox = new JDialogSearchBox(frame, "External Search", listSearch, getCurrentTDiagramPanel().tdmm); - }else + } else this.searchBox = new JDialogSearchBox(frame, "External Search", new ArrayList<String>()); - } - else { + } else { if (this.searchBox.isShowing()) { - this.searchBox.setVisible( true ); - } - else { + this.searchBox.setVisible(true); + } else { this.searchBox = null; showExternalSearch(); } } } - public void doInternalSearch(){ + public void doInternalSearch() { search(mainBar.search.getText()); } public void aboutVersion() { JFrameBasicText jft = new JFrameBasicText("About TTool ...", DefaultText.getAboutText(), IconManager.imgic324); jft.setIconImage(IconManager.img8); - GraphicLib.centerOnParent(jft, 740, 800 ); + GraphicLib.centerOnParent(jft, 740, 800); jft.setVisible(true); } @@ -3288,7 +3285,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe JFrameBasicText jft = new JFrameBasicText("Your configuration of TTool ...", ConfigurationTTool.getConfiguration(systemcOn), IconManager.imgic76); jft.setIconImage(IconManager.img8); //jft.setSize(700, 800); - GraphicLib.centerOnParent(jft, 700, 800 ); + GraphicLib.centerOnParent(jft, 700, 800); jft.setVisible(true); } @@ -3368,51 +3365,52 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (file == null) { JOptionPane.showMessageDialog(frame, - "The project must be saved before any simulation or formal verification can be performed", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The project must be saved before any simulation or formal verification can be performed", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); return false; } if (tp instanceof AnalysisPanel) { try { - b = gtm.buildTURTLEModelingFromAnalysis((AnalysisPanel)tp); + b = gtm.buildTURTLEModelingFromAnalysis((AnalysisPanel) tp); } catch (AnalysisSyntaxException ae) { //TraceManager.addDev("Exception AnalysisSyntaxException"); //msg = ae.getMessage(); b = false; } + expandToWarnings(); + expandToErrors(); if (b) { setMode(MainGUI.MODEL_OK); setMode(MainGUI.GEN_DESIGN_OK); ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal (RT-LOTOS) specification or executable code (Java)", - "Syntax analysis successful on analysis diagrams", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal (RT-LOTOS) specification or executable code (Java)", + "Syntax analysis successful on analysis diagrams", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The TURTLE Analysis contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The TURTLE Analysis contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } setMode(MainGUI.GEN_DESIGN_OK); //setMode(MainGUI.MODEL_OK); } - } else if (tp instanceof DesignPanel) { //Design - DesignPanel dp = (DesignPanel)tp; + DesignPanel dp = (DesignPanel) tp; JDialogModelChecking.validated = dp.validated; JDialogModelChecking.ignored = dp.ignored; - LinkedList<TClassInterface> tclassesToValidate = new LinkedList<TClassInterface> (); - JDialogModelChecking jdmc = new JDialogModelChecking(frame, tclassesToValidate,dp.tcdp.getComponentList(), "Choosing Tclasses to validate"); + LinkedList<TClassInterface> tclassesToValidate = new LinkedList<TClassInterface>(); + JDialogModelChecking jdmc = new JDialogModelChecking(frame, tclassesToValidate, dp.tcdp.getComponentList(), "Choosing Tclasses to validate"); if (!automatic) { GraphicLib.centerOnParent(jdmc); jdmc.setVisible(true); // blocked until dialog has been closed @@ -3424,22 +3422,24 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe dp.validated = JDialogModelChecking.validated; dp.ignored = JDialogModelChecking.ignored; b = gtm.checkTURTLEModeling(tclassesToValidate, dp, overideTifChecking); + expandToWarnings(); + expandToErrors(); if (b) { ret = true; setMode(MainGUI.MODEL_OK); setMode(MainGUI.GEN_DESIGN_OK); if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal (RT-LOTOS) specification or executable code (Java)", - "Syntax analysis successful on design diagrams", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal (RT-LOTOS) specification or executable code (Java)", + "Syntax analysis successful on design diagrams", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The TURTLE Modeling contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The TURTLE Modeling contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } @@ -3447,21 +3447,23 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } else if (tp instanceof DeploymentPanel) { DeploymentPanel dp = (DeploymentPanel) tp; b = gtm.translateDeployment(dp); + expandToWarnings(); + expandToErrors(); if (b) { setMode(MainGUI.MODEL_OK); ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal (RT-LOTOS) specification or executable code (Java)", - "Syntax analysis successful on deployment diagrams", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal (RT-LOTOS) specification or executable code (Java)", + "Syntax analysis successful on deployment diagrams", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The TURTLE deployment contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The TURTLE deployment contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } @@ -3469,21 +3471,23 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } else if (tp instanceof AttackTreePanel) { AttackTreePanel atp = (AttackTreePanel) tp; b = gtm.translateAttackTreePanel(atp); + expandToWarnings(); + expandToErrors(); if (b) { setMode(MainGUI.ATTACKTREE_SYNTAXCHECKING_OK); ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s)", - "Syntax analysis successful on attack tree", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s)", + "Syntax analysis successful on attack tree", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The Attack tree contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The Attack tree contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } @@ -3491,10 +3495,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe // AVATAR } else if (tp instanceof AvatarDesignPanel) { //Design - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; //JDialogModelChecking.validated = adp.validated; //JDialogModelChecking.ignored = adp.ignored; - LinkedList<AvatarBDStateMachineOwner> blocksToValidate = new LinkedList<AvatarBDStateMachineOwner> (); + LinkedList<AvatarBDStateMachineOwner> blocksToValidate = new LinkedList<AvatarBDStateMachineOwner>(); JDialogSelectAvatarBlock jdmc = new JDialogSelectAvatarBlock(frame, blocksToValidate, adp.getAvatarBDPanel().getFullStateMachineOwnerList(), "Choosing blocks to validate", adp.getValidated(), adp.getIgnored(), adp.getOptimized()); if (!automatic) { GraphicLib.centerOnParent(jdmc); @@ -3519,6 +3523,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /*adp.validated = JDialogModelChecking.validated; adp.ignored = JDialogModelChecking.ignored;*/ b = gtm.checkAvatarDesign(blocksToValidate, adp, optimize); + expandToWarnings(); + expandToErrors(); if (b) { ret = true; setMode(MainGUI.AVATAR_SYNTAXCHECKING_OK); @@ -3532,12 +3538,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } */ } else { - expandToErrors(); if (!automatic) { JOptionPane.showMessageDialog(frame, - "The Avatar modeling contains several errors", - "Syntax analysis failed", - JOptionPane.ERROR_MESSAGE); + "The Avatar modeling contains several errors", + "Syntax analysis failed", + JOptionPane.ERROR_MESSAGE); } } } @@ -3553,7 +3558,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //JDialogModelChecking.validated = adp.validated; //JDialogModelChecking.ignored = adp.ignored; - LinkedList<AvatarBDStateMachineOwner> blocksToValidate = new LinkedList<AvatarBDStateMachineOwner> (); + LinkedList<AvatarBDStateMachineOwner> blocksToValidate = new LinkedList<AvatarBDStateMachineOwner>(); JDialogSelectAvatarBlock jdmc = new JDialogSelectAvatarBlock(frame, blocksToValidate, adp.getAvatarBDPanel().getFullStateMachineOwnerList(), "Choosing blocks to validate", adp.getValidated(), adp.getIgnored(), adp.getOptimized()); if (!automatic) { GraphicLib.centerOnParent(jdmc); @@ -3578,6 +3583,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /*adp.validated = JDialogModelChecking.validated; adp.ignored = JDialogModelChecking.ignored;*/ b = gtm.checkAvatarDesign(blocksToValidate, adp, optimize); + expandToWarnings(); + expandToErrors(); if (b) { ret = true; setMode(MainGUI.AVATAR_SYNTAXCHECKING_OK); @@ -3593,9 +3600,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The Avatar modeling contains several errors", - "Syntax analysis failed", - JOptionPane.ERROR_MESSAGE); + "The Avatar modeling contains several errors", + "Syntax analysis failed", + JOptionPane.ERROR_MESSAGE); } } } @@ -3614,22 +3621,22 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s)", - "Syntax analysis successful on NC diagram", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s)", + "Syntax analysis successful on NC diagram", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The NC diagram contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The NC diagram contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } else if (tp instanceof TMLDesignPanel) { - TMLDesignPanel tmldp = (TMLDesignPanel)tp; + TMLDesignPanel tmldp = (TMLDesignPanel) tp; JDialogSelectTMLTask.validated = tmldp.validated; JDialogSelectTMLTask.ignored = tmldp.ignored; Vector<TGComponent> tmlTasksToValidate = new Vector<TGComponent>(); @@ -3644,6 +3651,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe tmldp.validated = JDialogSelectTMLTask.validated; tmldp.ignored = JDialogSelectTMLTask.ignored; b = gtm.translateTMLDesign(tmlTasksToValidate, tmldp, jdstmlt.getOptimize()); + expandToWarnings(); + expandToErrors(); if (b) { //setMode(MainGUI.MODEL_OK); setMode(MainGUI.GEN_SYSTEMC_OK); @@ -3651,21 +3660,21 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate make proofs (safety, security and performance) or generate executable code", - "Syntax analysis successful on TML designs", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate make proofs (safety, security and performance) or generate executable code", + "Syntax analysis successful on TML designs", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The TML design contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The TML design contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } } else if (tp instanceof TMLComponentDesignPanel) { - TMLComponentDesignPanel tmlcdp = (TMLComponentDesignPanel)tp; + TMLComponentDesignPanel tmlcdp = (TMLComponentDesignPanel) tp; JDialogSelectTMLComponent.validated = tmlcdp.validated; JDialogSelectTMLComponent.ignored = tmlcdp.ignored; Vector<TGComponent> tmlComponentsToValidate = new Vector<TGComponent>(); @@ -3680,6 +3689,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe tmlcdp.validated = JDialogSelectTMLComponent.validated; tmlcdp.ignored = JDialogSelectTMLComponent.ignored; b = gtm.translateTMLComponentDesign(tmlComponentsToValidate, tmlcdp, jdstmlc.getOptimize()); + expandToWarnings(); + expandToErrors(); if (b) { //setMode(MainGUI.MODEL_OK); setMode(MainGUI.GEN_SYSTEMC_OK); @@ -3687,26 +3698,26 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate make proofs (safety, security and performance) or generate executable code", - "Syntax analysis successful on TML designs", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate make proofs (safety, security and performance) or generate executable code", + "Syntax analysis successful on TML designs", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The TML design contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The TML design contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } - } else if (tp instanceof SystemCAMSPanel) { //Ajout CD + } else if (tp instanceof SystemCAMSPanel) { //Ajout CD - SystemCAMSPanel camsp = (SystemCAMSPanel)tp; + SystemCAMSPanel camsp = (SystemCAMSPanel) tp; JDialogSelectSystemCAMSBlock.validated = camsp.validated; JDialogSelectSystemCAMSBlock.ignored = camsp.ignored; Vector<TGComponent> camsBlocksToValidate = new Vector<TGComponent>(); - JDialogSelectSystemCAMSBlock jdsscb = new JDialogSelectSystemCAMSBlock(frame, camsBlocksToValidate, camsp.camsbdp.getComponentList(),"Block Parameter"); + JDialogSelectSystemCAMSBlock jdsscb = new JDialogSelectSystemCAMSBlock(frame, camsBlocksToValidate, camsp.camsbdp.getComponentList(), "Block Parameter"); if (!automatic) { GraphicLib.centerOnParent(jdsscb); jdsscb.setVisible(true); @@ -3717,28 +3728,30 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (camsBlocksToValidate.size() > 0) { camsp.validated = JDialogSelectSystemCAMSBlock.validated; camsp.ignored = JDialogSelectSystemCAMSBlock.ignored; + expandToWarnings(); + expandToErrors(); if (b) { setMode(MainGUI.GEN_SYSTEMC_OK); setMode(MainGUI.MODEL_OK); ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now perform verifications (safety, security, performance) or generate executable code", - "Syntax analysis successful on SystemC-AMS", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now perform verifications (safety, security, performance) or generate executable code", + "Syntax analysis successful on SystemC-AMS", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The SystemC-AMS contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The SystemC-AMS contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } } else if (tp instanceof TMLArchiPanel) { - tmlap = (TMLArchiPanel)tp; + tmlap = (TMLArchiPanel) tp; JDialogSelectTMLNodes.validated = tmlap.validated; JDialogSelectTMLNodes.ignored = tmlap.ignored; Vector<TGComponent> tmlNodesToValidate = new Vector<TGComponent>(); @@ -3756,6 +3769,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe tmlap.ignored = JDialogSelectTMLNodes.ignored; //TraceManager.addDev("Ready to generate TML mapping!"); b = gtm.checkSyntaxTMLMapping(tmlNodesToValidate, tmlap, jdstmln.getOptimize()); + expandToWarnings(); + expandToErrors(); if (b) { //setMode(MainGUI.MODEL_OK); setMode(MainGUI.GEN_SYSTEMC_OK); @@ -3763,84 +3778,82 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now perform verifications (safety, security, performance) or generate executable code", - "Syntax analysis successful on TML mapping", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now perform verifications (safety, security, performance) or generate executable code", + "Syntax analysis successful on TML mapping", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The TML mapping contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The TML mapping contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } - } - else if( tp instanceof TMLCommunicationPatternPanel ) { + } else if (tp instanceof TMLCommunicationPatternPanel) { TMLCommunicationPatternPanel tmlcpp = (TMLCommunicationPatternPanel) tp; - JDialogSelectCPDiagrams.validated = tmlcpp.validated; - JDialogSelectCPDiagrams.ignored = tmlcpp.ignored; + JDialogSelectCPDiagrams.validated = tmlcpp.validated; + JDialogSelectCPDiagrams.ignored = tmlcpp.ignored; Vector<TGComponent> tmlDiagramsToValidate = new Vector<TGComponent>(); - JDialogSelectCPDiagrams jdscpd = new JDialogSelectCPDiagrams( frame, tmlDiagramsToValidate, tmlcpp.tmlcpp.getComponentList(), - "Choosing Diagrams to validate" ); - if( !automatic ) { - GraphicLib.centerOnParent( jdscpd ); - jdscpd.setVisible( true ); // Blocked until dialog has been closed - } - else { + JDialogSelectCPDiagrams jdscpd = new JDialogSelectCPDiagrams(frame, tmlDiagramsToValidate, tmlcpp.tmlcpp.getComponentList(), + "Choosing Diagrams to validate"); + if (!automatic) { + GraphicLib.centerOnParent(jdscpd); + jdscpd.setVisible(true); // Blocked until dialog has been closed + } else { jdscpd.closeDialog(); } - if( tmlDiagramsToValidate.size() > 0 ) { + if (tmlDiagramsToValidate.size() > 0) { tmlcpp.validated = JDialogSelectCPDiagrams.validated; tmlcpp.ignored = JDialogSelectCPDiagrams.ignored; TraceManager.addDev("Ready to generate TML code for Communication Patterns!"); - b = gtm.checkSyntaxTMLCP( tmlDiagramsToValidate, tmlcpp, jdscpd.getOptimize() ); //Fills a data structure + b = gtm.checkSyntaxTMLCP(tmlDiagramsToValidate, tmlcpp, jdscpd.getOptimize()); //Fills a data structure //translateTMLComponentDesign //and should say if it is correct or contains error in the return variable b - if( b ) { + expandToWarnings(); + expandToErrors(); + if (b) { //setMode(MainGUI.MODEL_OK); - setMode( MainGUI.GEN_SYSTEMC_OK ); - setMode( MainGUI.MODEL_OK ); + setMode(MainGUI.GEN_SYSTEMC_OK); + setMode(MainGUI.MODEL_OK); ret = true; - if( !automatic ) { - JOptionPane.showMessageDialog( frame, "0 error, " + getCheckingWarnings().size() + - " warning(s). You can now perform verifications (safety, security, performance) or generate executable code", - "Syntax analysis successful on TML mapping", - JOptionPane.INFORMATION_MESSAGE ); + if (!automatic) { + JOptionPane.showMessageDialog(frame, "0 error, " + getCheckingWarnings().size() + + " warning(s). You can now perform verifications (safety, security, performance) or generate executable code", + "Syntax analysis successful on TML mapping", + JOptionPane.INFORMATION_MESSAGE); } - } - else { - if( !automatic ) { - JOptionPane.showMessageDialog( frame, "The Communication Patterns design contains several errors", "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE ); + } else { + if (!automatic) { + JOptionPane.showMessageDialog(frame, "The Communication Patterns design contains several errors", "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } - } - else if( tp instanceof RequirementPanel ) { + } else if (tp instanceof RequirementPanel) { TDiagramPanel tdp = getCurrentTDiagramPanel(); if (!(tdp instanceof RequirementDiagramPanel)) { if (tdp instanceof EBRDDPanel) { - b = gtm.makeEBRDD((EBRDDPanel)tdp); + b = gtm.makeEBRDD((EBRDDPanel) tdp); if (b) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s).", - "Syntax analysis successful on EBRDD", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s).", + "Syntax analysis successful on EBRDD", + JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(frame, - "The EBRDD contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The EBRDD contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } else { return ret; } //TraceManager.addDev("No syntax checking for EBRDD: not yet implemented"); } else { - RequirementDiagramPanel rdp= (RequirementDiagramPanel)tdp; + RequirementDiagramPanel rdp = (RequirementDiagramPanel) tdp; JDialogSelectRequirements.validated = rdp.validated; JDialogSelectRequirements.ignored = rdp.ignored; Vector<Requirement> reqsToValidate = new Vector<Requirement>(); @@ -3855,23 +3868,25 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe rdp.validated = JDialogSelectRequirements.validated; rdp.ignored = JDialogSelectRequirements.ignored; b = gtm.generateTMsForRequirementAnalysis(reqsToValidate, rdp); + expandToWarnings(); + expandToErrors(); if (b) { //setMode(MainGUI.GEN_SYSTEMC_OK); setMode(MainGUI.REQ_OK); ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now verify requirements' satisfiability", - "Syntax analysis successful on requirements", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now verify requirements' satisfiability", + "Syntax analysis successful on requirements", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The requirement diagram contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The requirement diagram contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } @@ -3879,7 +3894,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } else if (tp instanceof ProactiveDesignPanel) { // TraceManager.addDev("!!!!!!!!!!!!1"); //newTurtleModeling(); - b = gtm.translateProactiveDesign((ProactiveDesignPanel)tp); + b = gtm.translateProactiveDesign((ProactiveDesignPanel) tp); + expandToWarnings(); + expandToErrors(); if (b) { //setMode(MainGUI.MODEL_OK); //setMode(MainGUI.GEN_SYSTEMC_OK); @@ -3887,39 +3904,41 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a LOTOS,specification", - "Syntax analysis successful on Proactive design", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a LOTOS,specification", + "Syntax analysis successful on Proactive design", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The Proactive design contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The Proactive design contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } else if (tp instanceof TURTLEOSDesignPanel) { TraceManager.addDev("TURTLEOS Design Panel"); //TURTLEOSDesignPanel tosdp = (TURTLEOSDesignPanel) tp; - b = gtm.translateTURTLEOSDesign((TURTLEOSDesignPanel)tp); + b = gtm.translateTURTLEOSDesign((TURTLEOSDesignPanel) tp); + expandToWarnings(); + expandToErrors(); if (b) { setMode(MainGUI.MODEL_OK); ret = true; if (!automatic) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal specification or executable code (Java)", - "Syntax analysis successful on deployment diagrams", - JOptionPane.INFORMATION_MESSAGE); + "0 error, " + getCheckingWarnings().size() + " warning(s). You can now generate a corresponding formal specification or executable code (Java)", + "Syntax analysis successful on deployment diagrams", + JOptionPane.INFORMATION_MESSAGE); } } else { if (!automatic) { JOptionPane.showMessageDialog(frame, - "The TURTLE deployment contains several errors", - "Syntax analysis failed", - JOptionPane.INFORMATION_MESSAGE); + "The TURTLE deployment contains several errors", + "Syntax analysis failed", + JOptionPane.INFORMATION_MESSAGE); } } } @@ -3930,9 +3949,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public LinkedList<TAttribute> getAllAttributes() { TURTLEPanel tp = getCurrentTURTLEPanel(); - String name = getCurrentTDiagramPanel().getName(); + String name = getCurrentTDiagramPanel().getName(); - return this.getAllAttributes (tp, name); + return this.getAllAttributes(tp, name); } public LinkedList<TAttribute> getAllAttributes(TURTLEPanel tp, String name) { @@ -3943,7 +3962,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (!(tp instanceof AvatarDesignPanel)) { return null; } - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; return adp.getAllAttributes(name); } @@ -3958,17 +3977,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (!(tp instanceof AvatarDesignPanel)) { return null; } - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; - String name = getCurrentTDiagramPanel().getName(); + String name = getCurrentTDiagramPanel().getName(); return adp.getAllMethods(name); } public LinkedList<AvatarSignal> getAllSignals() { TURTLEPanel tp = getCurrentTURTLEPanel(); - String name = getCurrentTDiagramPanel().getName(); - return this.getAllSignals (tp, name); + String name = getCurrentTDiagramPanel().getName(); + return this.getAllSignals(tp, name); } public LinkedList<AvatarSignal> getAllSignals(TURTLEPanel tp, String name) { @@ -3979,26 +3998,26 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (!(tp instanceof AvatarDesignPanel)) { return null; } - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; return adp.getAllSignals(name); } - public List<AvatarBDLibraryFunction> getAllLibraryFunctions () { + public List<AvatarBDLibraryFunction> getAllLibraryFunctions() { TURTLEPanel tp = getCurrentTURTLEPanel(); - return this.getAllLibraryFunctions (tp); + return this.getAllLibraryFunctions(tp); } - public List<AvatarBDLibraryFunction> getAllLibraryFunctions (TURTLEPanel tp) { - String name = getCurrentTDiagramPanel().getName(); - return this.getAllLibraryFunctions (tp, name); + public List<AvatarBDLibraryFunction> getAllLibraryFunctions(TURTLEPanel tp) { + String name = getCurrentTDiagramPanel().getName(); + return this.getAllLibraryFunctions(tp, name); } /* Note that this is here for historical purpose : Now, any block can access library functions of any * other block. */ - public List<AvatarBDLibraryFunction> getAllLibraryFunctions (TURTLEPanel tp, String name) { + public List<AvatarBDLibraryFunction> getAllLibraryFunctions(TURTLEPanel tp, String name) { if (tp == null) { return null; } @@ -4006,7 +4025,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (!(tp instanceof AvatarDesignPanel)) { return null; } - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; return adp.getAllLibraryFunctions(name); } @@ -4020,17 +4039,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (!(tp instanceof TMLComponentDesignPanel)) { return null; } - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; - String name = getCurrentTDiagramPanel().getName(); + String name = getCurrentTDiagramPanel().getName(); return tmlcomp.getAllOutEvents(name); } - public ArrayList<TGComponent> getAllLatencyChecks(){ + public ArrayList<TGComponent> getAllLatencyChecks() { TURTLEPanel tp; ArrayList<TGComponent> list = new ArrayList<TGComponent>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); tp.getAllLatencyChecks(list); } @@ -4039,19 +4058,27 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public String[] getAllInEvents() { TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) {return null;} - if (!(tp instanceof TMLComponentDesignPanel)) {return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; - String name = getCurrentTDiagramPanel().getName(); + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; + String name = getCurrentTDiagramPanel().getName(); return tmlcomp.getAllInEvents(name); } public String[] getAllOutChannels() { //this routine can be called only from a TMLComponentDesignPanel TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) { return null;} - if (!(tp instanceof TMLComponentDesignPanel)) { return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; - String name = getCurrentTDiagramPanel().getName(); + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; + String name = getCurrentTDiagramPanel().getName(); System.out.println("Name " + name); return tmlcomp.getAllOutChannels(name); } @@ -4060,73 +4087,95 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public String[] getAllCompOutChannels() { //this routine can be called only from a TMLComponentDesignPanel //List<String> chans = new ArrayList<String>(); TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) { return null;} - if (!(tp instanceof TMLComponentDesignPanel)) { return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; return tmlcomp.getCompOutChannels(); } public String[] getAllCompInChannels() { //this routine can be called only from a TMLComponentDesignPanel TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) { return null;} - if (!(tp instanceof TMLComponentDesignPanel)) { return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; return tmlcomp.getCompInChannels(); } public String[] getAllInChannels() { //this routine can be called only from a TMLComponentDesignPanel TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) {return null;} - if (!(tp instanceof TMLComponentDesignPanel)) {return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; - String name = getCurrentTDiagramPanel().getName(); + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; + String name = getCurrentTDiagramPanel().getName(); return tmlcomp.getAllInChannels(name); } - public Vector<String> getAllCryptoConfig(){ + public Vector<String> getAllCryptoConfig() { TURTLEPanel tp; Vector<String> list = new Vector<String>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { - for (String s: ((TMLComponentDesignPanel)tp).getAllCryptoConfig()){ - list.add(mainTabbedPane.getTitleAt(i)+"::"+s); + for (String s : ((TMLComponentDesignPanel) tp).getAllCryptoConfig()) { + list.add(mainTabbedPane.getTitleAt(i) + "::" + s); } } } return list; } + public String[] getCurrentCryptoConfig() { TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) {return null;} - if (!(tp instanceof TMLComponentDesignPanel)) {return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; List<String> strlist = tmlcomp.getAllCryptoConfig(); String[] strarray = new String[strlist.size()]; strlist.toArray(strarray); return strarray; } - public String[] getAllNonce(){ + + public String[] getAllNonce() { TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) {return null;} - if (!(tp instanceof TMLComponentDesignPanel)) {return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; List<String> strlist = tmlcomp.getAllNonce(); String[] strarray = new String[strlist.size()]; strlist.toArray(strarray); return strarray; } - public ArrayList<String> getAllKeys(){ + public ArrayList<String> getAllKeys() { TURTLEPanel tp; ArrayList<String> list = new ArrayList<String>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { - for (String s:((TMLComponentDesignPanel)tp).getAllKeys()){ + for (String s : ((TMLComponentDesignPanel) tp).getAllKeys()) { list.add(s); } } @@ -4134,14 +4183,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return list; } - public ArrayList<TGComponent> getAllAttacks(){ + public ArrayList<TGComponent> getAllAttacks() { TURTLEPanel tp; ArrayList<TGComponent> list = new ArrayList<TGComponent>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof AttackTreePanel) { - for (TGComponent s:((AttackTreePanel)tp).getAllAttacks()){ + for (TGComponent s : ((AttackTreePanel) tp).getAllAttacks()) { list.add(s); } } @@ -4150,14 +4199,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - public ArrayList<TGComponent> getAllFaults(){ + public ArrayList<TGComponent> getAllFaults() { TURTLEPanel tp; ArrayList<TGComponent> list = new ArrayList<TGComponent>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof FaultTreePanel) { - for (TGComponent s:((FaultTreePanel)tp).getAllFaults()){ + for (TGComponent s : ((FaultTreePanel) tp).getAllFaults()) { list.add(s); } } @@ -4166,14 +4215,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - public ArrayList<TGComponent> getAllRequirements(){ + public ArrayList<TGComponent> getAllRequirements() { TURTLEPanel tp; ArrayList<TGComponent> list = new ArrayList<TGComponent>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof AvatarRequirementPanel) { - for (TGComponent s:((AvatarRequirementPanel)tp).getAllRequirements()){ + for (TGComponent s : ((AvatarRequirementPanel) tp).getAllRequirements()) { list.add(s); } } @@ -4181,12 +4230,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return list; } + public String[] getAllOutRequests() { TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp == null) {return null;} - if (!(tp instanceof TMLComponentDesignPanel)) {return null;} - TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel)tp; - String name = getCurrentTDiagramPanel().getName(); + if (tp == null) { + return null; + } + if (!(tp instanceof TMLComponentDesignPanel)) { + return null; + } + TMLComponentDesignPanel tmlcomp = (TMLComponentDesignPanel) tp; + String name = getCurrentTDiagramPanel().getName(); return tmlcomp.getAllOutRequests(name); } @@ -4199,9 +4253,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (!(tp instanceof AvatarDesignPanel)) { return null; } - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; - String name = getCurrentTDiagramPanel().getName(); + String name = getCurrentTDiagramPanel().getName(); return adp.getAllTimers(name); } @@ -4221,11 +4275,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } if (tp instanceof AvatarDesignPanel) { - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; adp.modelBacktracingProVerif(pvoa); getCurrentTDiagramPanel().repaint(); - } - else if (tp instanceof TMLArchiPanel) { + } else if (tp instanceof TMLArchiPanel) { /* for (int i=0; i<tabs.size(); i++){ tp = (TURTLEPanel)(tabs.elementAt(i)); if (tp instanceof TMLComponentDesignPanel) { @@ -4236,8 +4289,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe gtm.getTMLMapping().getTMLModeling().backtrace(pvoa, getTabName(tp)); gtm.getTML2Avatar().backtraceReachability(pvoa.getReachabilityResults()); gtm.getTMLMapping().getTMLModeling().backtraceAuthenticity(pvoa.getAuthenticityResults(), getTabName(tp)); - } - else if (tp instanceof TMLComponentDesignPanel){ + } else if (tp instanceof TMLComponentDesignPanel) { gtm.getTMLMapping().getTMLModeling().clearBacktracing(); gtm.getTMLMapping().getTMLModeling().backtrace(pvoa, "Default Mapping"); gtm.getTML2Avatar().backtraceReachability(pvoa.getReachabilityResults()); @@ -4246,7 +4298,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return; } - public void modelBacktracingUPPAAL( Map<String, Integer> verifMap) { + public void modelBacktracingUPPAAL(Map<String, Integer> verifMap) { TURTLEPanel tp = getCurrentTURTLEPanel(); if (tp == null) { return; @@ -4256,7 +4308,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return; } - AvatarDesignPanel adp = (AvatarDesignPanel)tp; + AvatarDesignPanel adp = (AvatarDesignPanel) tp; adp.modelBacktracingUppaal(verifMap); getCurrentTDiagramPanel().repaint(); } @@ -4284,9 +4336,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } if (!automatic) { JOptionPane.showMessageDialog(frame, - "RT-LOTOS specification generated", - "RT-LOTOS specification", - JOptionPane.INFORMATION_MESSAGE); + "RT-LOTOS specification generated", + "RT-LOTOS specification", + JOptionPane.INFORMATION_MESSAGE); } dtree.toBeUpdated(); return true; @@ -4317,9 +4369,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //TraceManager.addDev("LOTOS generated"); if (!automatic) { JOptionPane.showMessageDialog(frame, - "LOTOS specification generated (" + getCheckingWarnings().size() + " warning(s))", - "LOTOS specification", - JOptionPane.INFORMATION_MESSAGE); + "LOTOS specification generated (" + getCheckingWarnings().size() + " warning(s))", + "LOTOS specification", + JOptionPane.INFORMATION_MESSAGE); } } setMode(MainGUI.RTLOTOS_OK); @@ -4431,7 +4483,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe JMenu menu = jmenubarturtle.getJMenuGraph(); menu.removeAll(); String s; - for(int i=0; i<v.size(); i++) { + for (int i = 0; i < v.size(); i++) { s = v.elementAt(i); jmenubarturtle.addMenuItem(menu, s, this); } @@ -4440,9 +4492,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void generateAUTS() { JDialogGenAUTS jdgauts = new JDialogGenAUTS(frame, this, "Generation of automata via LOTOS", gtm.getPathCaesar(), - GTURTLEModeling.getPathBcgio(), - REMOTE_RTL_LOTOS_FILE, - GTURTLEModeling.getCaesarHost(), SpecConfigTTool.TGraphPath); + GTURTLEModeling.getPathBcgio(), + REMOTE_RTL_LOTOS_FILE, + GTURTLEModeling.getCaesarHost(), SpecConfigTTool.TGraphPath); // jdgauts.setSize(450, 600); GraphicLib.centerOnParent(jdgauts, 450, 600); jdgauts.setVisible(true); @@ -4475,34 +4527,34 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe formalValidation(true); } else { JOptionPane.showMessageDialog(frame, - "" + getCheckingErrors().size() + " errors, " +getCheckingWarnings().size() + " warning(s). UPPAAL specification could NOT be generated", - "Translation to UPPAAL failed", - JOptionPane.INFORMATION_MESSAGE); + "" + getCheckingErrors().size() + " errors, " + getCheckingWarnings().size() + " warning(s). UPPAAL specification could NOT be generated", + "Translation to UPPAAL failed", + JOptionPane.INFORMATION_MESSAGE); return; } } public void avatarProVerifVerification() { - boolean limit=true; + boolean limit = true; TraceManager.addDev("Avatar proverif fv"); TURTLEPanel tp = this.getCurrentTURTLEPanel(); AvatarDesignPanel adp = null; - if (tp instanceof AvatarDesignPanel){ + if (tp instanceof AvatarDesignPanel) { adp = (AvatarDesignPanel) tp; - limit=false; - } - JDialogProverifVerification jgen = new JDialogProverifVerification(frame, this, "Security verification with ProVerif", ConfigurationTTool.ProVerifVerifierHost, SpecConfigTTool.ProVerifCodeDirectory, ConfigurationTTool.ProVerifVerifierPath, adp,limit, gtm.getCPUTaskMap()); + limit = false; + } + JDialogProverifVerification jgen = new JDialogProverifVerification(frame, this, "Security verification with ProVerif", ConfigurationTTool.ProVerifVerifierHost, SpecConfigTTool.ProVerifCodeDirectory, ConfigurationTTool.ProVerifVerifierPath, adp, limit, gtm.getCPUTaskMap()); // jgen.setSize(500, 450); GraphicLib.centerOnParent(jgen, 600, 800); jgen.setVisible(true); dtree.toBeUpdated(); } - public void dse(){ + public void dse() { TraceManager.addDev("Design space exploration"); - JDialogDSE jdse= new JDialogDSE(frame, this, "Design Space Exploration", SpecConfigTTool.SystemCCodeDirectory, SpecConfigTTool.TMLCodeDirectory); + JDialogDSE jdse = new JDialogDSE(frame, this, "Design Space Exploration", SpecConfigTTool.SystemCCodeDirectory, SpecConfigTTool.TMLCodeDirectory); // jdse.setSize(600,800); - GraphicLib.centerOnParent(jdse, 600,800); + GraphicLib.centerOnParent(jdse, 600, 800); jdse.setVisible(true); dtree.toBeUpdated(); } @@ -4518,7 +4570,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void avatarExecutableCodeGeneration() { TraceManager.addDev("Avatar code generation"); - JDialogAvatarExecutableCodeGeneration jgen = new JDialogAvatarExecutableCodeGeneration(frame, this, "Executable Code generation, compilation and execution", ConfigurationTTool.AVATARExecutableCodeHost, SpecConfigTTool.AVATARExecutableCodeDirectory, SpecConfigTTool.AVATARExecutableCodeCompileCommand, SpecConfigTTool.AVATARExecutableCodeExecuteCommand, ConfigurationTTool.AVATARExecutableSoclibCodeCompileCommand, ConfigurationTTool.AVATARExecutableSoclibCodeExecuteCommand, ConfigurationTTool.AVATARExecutableSoclibTraceFile); + JDialogAvatarExecutableCodeGeneration jgen = new JDialogAvatarExecutableCodeGeneration(frame, this, "Executable Code generation, compilation and execution", ConfigurationTTool.AVATARExecutableCodeHost, SpecConfigTTool.AVATARExecutableCodeDirectory, SpecConfigTTool.AVATARExecutableCodeCompileCommand, SpecConfigTTool.AVATARExecutableCodeExecuteCommand, ConfigurationTTool.AVATARExecutableSoclibCodeCompileCommand, ConfigurationTTool.AVATARExecutableSoclibCodeExecuteCommand, ConfigurationTTool.AVATARExecutableSoclibTraceFile); // jgen.setSize(500, 450); GraphicLib.centerOnParent(jgen, 500, 450); jgen.setVisible(true); @@ -4526,15 +4578,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } // DG - public void avatarddExecutableCodeGeneration(){ + public void avatarddExecutableCodeGeneration() { TraceManager.addDev("Avatar code generation"); JDialogAvatarddExecutableCodeGeneration jgen = new JDialogAvatarddExecutableCodeGeneration(frame, this, "Executable Code generation, compilation and execution", - ConfigurationTTool.AVATARExecutableCodeHost, - ConfigurationTTool.AVATARMPSoCCodeDirectory, - ConfigurationTTool.AVATARMPSoCCompileCommand, - ConfigurationTTool.AVATARExecutableSoclibCodeExecuteCommand); + ConfigurationTTool.AVATARExecutableCodeHost, + ConfigurationTTool.AVATARMPSoCCodeDirectory, + ConfigurationTTool.AVATARMPSoCCompileCommand, + ConfigurationTTool.AVATARExecutableSoclibCodeExecuteCommand); // jgen.setSize(500, 450); - GraphicLib.centerOnParent(jgen, 500, 450 ); + GraphicLib.centerOnParent(jgen, 500, 450); jgen.setVisible(true); dtree.toBeUpdated(); } @@ -4558,15 +4610,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TraceManager.addDev("4178"); if (result) { JOptionPane.showMessageDialog(frame, - "0 error, " + getCheckingWarnings().size() + " warning(s). UPPAAL specification generated", - "Successful translation to UPPAAL", - JOptionPane.INFORMATION_MESSAGE); - } - else { + "0 error, " + getCheckingWarnings().size() + " warning(s). UPPAAL specification generated", + "Successful translation to UPPAAL", + JOptionPane.INFORMATION_MESSAGE); + } else { JOptionPane.showMessageDialog(frame, - "" + getCheckingErrors().size() + " errors, " +getCheckingWarnings().size() + " warning(s). UPPAAL specification could NOT be generated", - "Translation to UPPAAL failed", - JOptionPane.INFORMATION_MESSAGE); + "" + getCheckingErrors().size() + " errors, " + getCheckingWarnings().size() + " warning(s). UPPAAL specification could NOT be generated", + "Translation to UPPAAL failed", + JOptionPane.INFORMATION_MESSAGE); } @@ -4575,13 +4626,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (!result) { return; } - } - else { + } else { /*if (generateTURTLEModelingFromState(gtm.getTURTLEModelingState(), false, UPPAAL) == -1) { TraceManager.addDev("4202 - UPPAAL generation failed"); return; }*/ - TraceManager.addDev( "About to open the window at line 4198" ); + TraceManager.addDev("About to open the window at line 4198"); if (showWindow) { TURTLEPanel tp = getCurrentTURTLEPanel(); boolean result = false; @@ -4602,7 +4652,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } } - TraceManager.addDev( "gtm.getTURTLEModelingState() <= 0)" ); + TraceManager.addDev("gtm.getTURTLEModelingState() <= 0)"); //TraceManager.addDev("After UPPAAL"); if (showWindow) { JDialogUPPAALGeneration jgen = new JDialogUPPAALGeneration(frame, this, "UPPAAL code generation", SpecConfigTTool.UPPAALCodeDirectory, JDialogUPPAALGeneration.TURTLE_MODE); @@ -4615,8 +4665,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void avatarModelChecker() { TraceManager.addDev("Execute avatar model checker"); - gtm.generateAvatarFromTML(true,false); - if (gtm.getAvatarSpecification()==null){ + gtm.generateAvatarFromTML(true, false); + if (gtm.getAvatarSpecification() == null) { TraceManager.addDev("Null avatar spec"); return; } @@ -4675,12 +4725,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp = getCurrentTURTLEPanel(); if (tp instanceof AvatarDesignPanel) { avatarSimulation(); - } else if ((tp instanceof TMLDesignPanel) || (tp instanceof TMLComponentDesignPanel) || (tp instanceof TMLArchiPanel)) { + } else if ((tp instanceof TMLDesignPanel) || (tp instanceof TMLComponentDesignPanel) || (tp instanceof TMLArchiPanel)) { JDialogSystemCGeneration jgen = new JDialogSystemCGeneration(frame, this, "Simulation Code Generation and Compilation", - ConfigurationTTool.SystemCHost, SpecConfigTTool.SystemCCodeDirectory, SpecConfigTTool.SystemCCodeCompileCommand, - SpecConfigTTool.SystemCCodeExecuteCommand, SpecConfigTTool.SystemCCodeInteractiveExecuteCommand, SpecConfigTTool.GGraphPath, _mode); + ConfigurationTTool.SystemCHost, SpecConfigTTool.SystemCCodeDirectory, SpecConfigTTool.SystemCCodeCompileCommand, + SpecConfigTTool.SystemCCodeExecuteCommand, SpecConfigTTool.SystemCCodeInteractiveExecuteCommand, SpecConfigTTool.GGraphPath, _mode); //jgen.setSize(500, 750); - GraphicLib.centerOnParent( jgen, 700, 750 ); + GraphicLib.centerOnParent(jgen, 700, 750); jgen.setVisible(true); dtree.toBeUpdated(); @@ -4717,7 +4767,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfis.setIconImage(IconManager.img9); //jfis.setSize(1024, 900); - GraphicLib.centerOnParent( jfis, 1024, 900 ); + GraphicLib.centerOnParent(jfis, 1024, 900); jfis.setVisible(true); } @@ -4754,13 +4804,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; if (tabs != null) { - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLDesignPanel) { - ((TMLDesignPanel)tp).getListOfBreakPoints(points); + ((TMLDesignPanel) tp).getListOfBreakPoints(points); } if (tp instanceof TMLComponentDesignPanel) { - ((TMLComponentDesignPanel)tp).getListOfBreakPoints(points); + ((TMLComponentDesignPanel) tp).getListOfBreakPoints(points); } } } @@ -4789,10 +4839,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe // if( file != null ) { // path = file.getAbsolutePath(); // } - JDialogCCodeGeneration jgen = new JDialogCCodeGeneration( frame, this, "Application code generation and compilation", - SpecConfigTTool.CCodeDirectory, - "make -C " + SpecConfigTTool.CCodeDirectory, - gtm ); + JDialogCCodeGeneration jgen = new JDialogCCodeGeneration(frame, this, "Application code generation and compilation", + SpecConfigTTool.CCodeDirectory, + "make -C " + SpecConfigTTool.CCodeDirectory, + gtm); // jgen.setSize(500, 750); GraphicLib.centerOnParent(jgen, 500, 750); jgen.setVisible(true); @@ -4871,22 +4921,22 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void checkCode() { if (gtm.getLanguageID() == GTURTLEModeling.RT_LOTOS) { JDialogTextProcess jdtp = new JDialogTextProcess(frame, - "Checking RT-LOTOS specification with RTL", - gtm.getPathRTL() + " __FILENAME -max-spec-t-1", - REMOTE_RTL_LOTOS_FILE, - gtm.getLastRTLOTOSSpecification(), - gtm.getHost()); + "Checking RT-LOTOS specification with RTL", + gtm.getPathRTL() + " __FILENAME -max-spec-t-1", + REMOTE_RTL_LOTOS_FILE, + gtm.getLastRTLOTOSSpecification(), + gtm.getHost()); //jdtp.setSize(450, 600); GraphicLib.centerOnParent(jdtp, 450, 600); jdtp.setVisible(true); dtree.toBeUpdated(); } else if (gtm.getLanguageID() == GTURTLEModeling.LOTOS) { JDialogLOTOSAnalysis jdla = new JDialogLOTOSAnalysis(frame, - this, "Checking LOTOS specification with CAESAR", - gtm.getPathCaesar(), - REMOTE_RTL_LOTOS_FILE, - gtm.getLastRTLOTOSSpecification(), - GTURTLEModeling.getCaesarHost()); + this, "Checking LOTOS specification with CAESAR", + gtm.getPathCaesar(), + REMOTE_RTL_LOTOS_FILE, + gtm.getLastRTLOTOSSpecification(), + GTURTLEModeling.getCaesarHost()); // jdla.setSize(450, 600); GraphicLib.centerOnParent(jdla, 450, 600); jdla.setVisible(true); @@ -4898,12 +4948,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void simulation() { if (gtm.getLanguageID() == GTURTLEModeling.RT_LOTOS) { JDialogSimulation jds = new JDialogSimulation(frame, - this, - "Intensive simulation with RTL", - gtm.getPathRTL(), - REMOTE_RTL_LOTOS_FILE, - gtm.getLastRTLOTOSSpecification(), - gtm.getHost()); + this, + "Intensive simulation with RTL", + gtm.getPathRTL(), + REMOTE_RTL_LOTOS_FILE, + gtm.getLastRTLOTOSSpecification(), + gtm.getHost()); //jds.setSize(450, 600); GraphicLib.centerOnParent(jds, 450, 600); jds.setVisible(true); @@ -4934,17 +4984,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void formalValidation(boolean automatic, TURTLEPanel _tp) { if (gtm.getLanguageID() == GTURTLEModeling.RT_LOTOS) { JDialogFormalValidation jdfv = new JDialogFormalValidation(frame, - this, - "Formal Validation with RTL", - gtm.getPathRTL(), - gtm.getPathDTA2DOT(), - gtm.getPathRGSTRAP(), - gtm.getPathRG2TLSA(), - REMOTE_RTL_LOTOS_FILE, - gtm.getLastRTLOTOSSpecification(), - gtm.getHost(), - GTURTLEModeling.getHostAldebaran(), - GTURTLEModeling.getPathBcgio()); + this, + "Formal Validation with RTL", + gtm.getPathRTL(), + gtm.getPathDTA2DOT(), + gtm.getPathRGSTRAP(), + gtm.getPathRG2TLSA(), + REMOTE_RTL_LOTOS_FILE, + gtm.getLastRTLOTOSSpecification(), + gtm.getHost(), + GTURTLEModeling.getHostAldebaran(), + GTURTLEModeling.getPathBcgio()); jdfv.setAutomatic(automatic); // jdfv.setSize(450, 600); GraphicLib.centerOnParent(jdfv, 450, 600); @@ -4952,14 +5002,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe dtree.toBeUpdated(); } else if (gtm.getLanguageID() == GTURTLEModeling.LOTOS) { JDialogLOTOSValidation jdla = new JDialogLOTOSValidation(frame, - this, "Generating RG with CAESAR", - gtm.getPathCaesar(), - gtm.getPathCaesarOpen(), - GTURTLEModeling.getPathBcgio(), - gtm.getPathBcgmerge(), - REMOTE_RTL_LOTOS_FILE, - gtm.getLastRTLOTOSSpecification(), - GTURTLEModeling.getCaesarHost()); + this, "Generating RG with CAESAR", + gtm.getPathCaesar(), + gtm.getPathCaesarOpen(), + GTURTLEModeling.getPathBcgio(), + gtm.getPathBcgmerge(), + REMOTE_RTL_LOTOS_FILE, + gtm.getLastRTLOTOSSpecification(), + GTURTLEModeling.getCaesarHost()); jdla.setAutomatic(automatic); // jdla.setSize(450, 600); GraphicLib.centerOnParent(jdla, 450, 600); @@ -4967,30 +5017,30 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe dtree.toBeUpdated(); } else if (gtm.getLanguageID() == GTURTLEModeling.UPPAAL) { JDialogUPPAALValidation jduv = new JDialogUPPAALValidation(frame, - this, "Formal Verification with UPPAAL", - gtm.getPathUPPAALVerifier(), - gtm.getPathUPPAALFile(), - REMOTE_UPPAAL_FILE, - gtm.getLastUPPAALSpecification().getStringSpec(), - gtm.getUPPAALVerifierHost(), - _tp); + this, "Formal Verification with UPPAAL", + gtm.getPathUPPAALVerifier(), + gtm.getPathUPPAALFile(), + REMOTE_UPPAAL_FILE, + gtm.getLastUPPAALSpecification().getStringSpec(), + gtm.getUPPAALVerifierHost(), + _tp); // jduv.setSize(450, 600); GraphicLib.centerOnParent(jduv, 650, 600); jduv.setVisible(true); dtree.toBeUpdated(); } else if (gtm.getLanguageID() == GTURTLEModeling.MATRIX) { JDialogTMatrixManagement jdfv = new JDialogTMatrixManagement(frame, - this, - "Observers's Based Formal Verification", - gtm.getRequirementModeling(), - gtm.getPathRTL(), - gtm.getPathDTA2DOT(), - gtm.getPathRGSTRAP(), - gtm.getPathRG2TLSA(), - REMOTE_RTL_LOTOS_FILE, - gtm.getHost(), - GTURTLEModeling.getHostAldebaran(), - GTURTLEModeling.getPathBcgio()); + this, + "Observers's Based Formal Verification", + gtm.getRequirementModeling(), + gtm.getPathRTL(), + gtm.getPathDTA2DOT(), + gtm.getPathRGSTRAP(), + gtm.getPathRG2TLSA(), + REMOTE_RTL_LOTOS_FILE, + gtm.getHost(), + GTURTLEModeling.getHostAldebaran(), + GTURTLEModeling.getPathBcgio()); // jdfv.setSize(550, 600); jdfv.setIconImage(IconManager.img8); GraphicLib.centerOnParent(jdfv, 550, 600); @@ -5002,19 +5052,19 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void projection() { TClassDiagramPanel tcdp = null; if (getCurrentTURTLEPanel() instanceof DesignPanel) { - tcdp = ((DesignPanel)(getCurrentTURTLEPanel())).tcdp; + tcdp = ((DesignPanel) (getCurrentTURTLEPanel())).tcdp; } JDialogProjection jdfv = new JDialogProjection(frame, - this, - tcdp, - gtm.getTURTLEModeling(), - GTURTLEModeling.getHostAldebaran(), - GTURTLEModeling.getPathAldebaran(), - gtm.getPathBcgmin(), - GTURTLEModeling.getPathBcgio(), - gtm.getLastRGAUT(), - REMOTE_ALDEBARAN_AUT_FILE, - "Minimization using Aldebaran"); + this, + tcdp, + gtm.getTURTLEModeling(), + GTURTLEModeling.getHostAldebaran(), + GTURTLEModeling.getPathAldebaran(), + gtm.getPathBcgmin(), + GTURTLEModeling.getPathBcgio(), + gtm.getLastRGAUT(), + REMOTE_ALDEBARAN_AUT_FILE, + "Minimization using Aldebaran"); // jdfv.setSize(900, 700); GraphicLib.centerOnParent(jdfv, 900, 700); jdfv.setVisible(true); @@ -5022,21 +5072,21 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void modifyGraph() { JDialogGraphModification jdgm; - if (gtm == null ){ + if (gtm == null) { jdgm = new JDialogGraphModification(frame, - GTURTLEModeling.getHostAldebaran(), - GTURTLEModeling.getPathBcgio(), - "graph", - "Minimization using Aldebaran", - null, null); + GTURTLEModeling.getHostAldebaran(), + GTURTLEModeling.getPathBcgio(), + "graph", + "Minimization using Aldebaran", + null, null); } else { jdgm = new JDialogGraphModification(frame, - GTURTLEModeling.getHostAldebaran(), - GTURTLEModeling.getPathBcgio(), - "graph", - "Minimization using Aldebaran", - gtm.getLastRGAUT(), - gtm.getLastTextualRGAUTProj()); + GTURTLEModeling.getHostAldebaran(), + GTURTLEModeling.getPathBcgio(), + "graph", + "Minimization using Aldebaran", + gtm.getLastRGAUT(), + gtm.getLastTextualRGAUTProj()); } //jdgm.setSize(600, 500); GraphicLib.centerOnParent(jdgm, 600, 500); @@ -5052,11 +5102,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void bisimulation() { JDialogBisimulation jdb = new JDialogBisimulation(frame, - GTURTLEModeling.getHostAldebaran(), - GTURTLEModeling.getPathAldebaran(), - REMOTE_ALDEBARAN_BISIMU_FILE1, - REMOTE_ALDEBARAN_BISIMU_FILE2, - "Bisimulation using Aldebaran"); + GTURTLEModeling.getHostAldebaran(), + GTURTLEModeling.getPathAldebaran(), + REMOTE_ALDEBARAN_BISIMU_FILE1, + REMOTE_ALDEBARAN_BISIMU_FILE2, + "Bisimulation using Aldebaran"); // jdb.setSize(650, 800); GraphicLib.centerOnParent(jdb, 650, 800); jdb.setVisible(true); @@ -5065,12 +5115,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void bisimulationCADP() { JDialogBisimulationBisimulator jdb = new JDialogBisimulationBisimulator(frame, - GTURTLEModeling.getCaesarHost(), - GTURTLEModeling.getPathBisimulator(), - GTURTLEModeling.getPathBcgio(), - REMOTE_BISIMULATOR_FILE1, - REMOTE_BISIMULATOR_FILE2, - "Bisimulation using BISIMULATOR"); + GTURTLEModeling.getCaesarHost(), + GTURTLEModeling.getPathBisimulator(), + GTURTLEModeling.getPathBcgio(), + REMOTE_BISIMULATOR_FILE1, + REMOTE_BISIMULATOR_FILE2, + "Bisimulation using BISIMULATOR"); // jdb.setSize(650, 800); GraphicLib.centerOnParent(jdb, 650, 800); jdb.setVisible(true); @@ -5118,17 +5168,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe t.go(); } - public void showAUT(String title, String data, AUTGraph graph) { + public void showAUT(String title, String data, AUTGraph graph) { ThreadGUIElement t = new ThreadGUIElement(frame, 0, title, data, "Analyzing graph... Please wait", graph, null, true); t.go(); } - public void showAUTFromRG(String title, RG rg) { + public void showAUTFromRG(String title, RG rg) { ThreadGUIElement t = new ThreadGUIElement(frame, 0, title, rg.data, "Analyzing graph... Please wait", rg.graph, rg, true); t.go(); } - public void displayAUTFromRG(String title, RG rg) { + public void displayAUTFromRG(String title, RG rg) { ThreadGUIElement t = new ThreadGUIElement(frame, 0, title, rg.data, "Analyzing graph... Please wait", rg.graph, rg, false); t.go(); } @@ -5187,9 +5237,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void statAUTDiplodocus() { if (lastDiploRG == null) { JOptionPane.showMessageDialog(frame, - "The file could not be loaded:", - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The file could not be loaded:", + "Error", + JOptionPane.INFORMATION_MESSAGE); return; } showAUTFromRG(lastDiploRG.name, lastDiploRG); @@ -5350,14 +5400,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = gtm.showDTA(); if (s != null) { JOptionPane.showMessageDialog(frame, - "The DTA could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The DTA could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } public void showWave() { - RemoteExecutionThread ret = new RemoteExecutionThread(ConfigurationTTool.SystemCHost, null, null, ConfigurationTTool.GTKWavePath + " vcddump.vcd"); + RemoteExecutionThread ret = new RemoteExecutionThread(ConfigurationTTool.SystemCHost, null, null, ConfigurationTTool.GTKWavePath + " vcddump.vcd"); ret.start(); } @@ -5365,9 +5415,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = gtm.showRG(); if (s != null) { JOptionPane.showMessageDialog(frame, - "The RG could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The RG could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } @@ -5375,9 +5425,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = gtm.showTLSA(); if (s != null) { JOptionPane.showMessageDialog(frame, - "The TLSA could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The TLSA could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } @@ -5385,9 +5435,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = gtm.showRGAut(); if (s != null) { JOptionPane.showMessageDialog(frame, - "The RG could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The RG could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } @@ -5395,19 +5445,19 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = gtm.showRGAutProj(); if (s != null) { JOptionPane.showMessageDialog(frame, - "The RG could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The RG could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } public void showRGDiplodocus() { if (lastDiploRG == null) { JOptionPane.showMessageDialog(frame, - "The RG was not yet generated", - "Error", - JOptionPane.INFORMATION_MESSAGE); - return ; + "The RG was not yet generated", + "Error", + JOptionPane.INFORMATION_MESSAGE); + return; } TraceManager.addDev("Showing diplo RG"); displayAUTFromRG(lastDiploRG.name, lastDiploRG); @@ -5418,9 +5468,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = GTURTLEModeling.runDOTTY(modifiedautdot); if (s != null) { JOptionPane.showMessageDialog(frame, - "The RG could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The RG could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } @@ -5430,9 +5480,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = GTURTLEModeling.showGGraph(graph[1]); if (s != null) { JOptionPane.showMessageDialog(frame, - "The graph could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The graph could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } } @@ -5444,9 +5494,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe String s = GTURTLEModeling.showGGraph(graph[1]); if (s != null) { JOptionPane.showMessageDialog(frame, - "The graph could not be displayed: " + s, - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The graph could not be displayed: " + s, + "Error", + JOptionPane.INFORMATION_MESSAGE); } } } @@ -5462,7 +5512,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //Select file File file = selectFileForCapture(); if (file == null) - return; + return; Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension screenSize = toolkit.getScreenSize(); @@ -5483,9 +5533,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void diagramCapture() { if (tabs.size() < 1) { JOptionPane.showMessageDialog(frame, - "No diagram is under edition", - "Error", - JOptionPane.INFORMATION_MESSAGE); + "No diagram is under edition", + "Error", + JOptionPane.INFORMATION_MESSAGE); return; } @@ -5506,9 +5556,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (tabs.size() < 1) { JOptionPane.showMessageDialog(frame, - "No diagram is under edition", - "Error", - JOptionPane.INFORMATION_MESSAGE); + "No diagram is under edition", + "Error", + JOptionPane.INFORMATION_MESSAGE); return; } @@ -5524,24 +5574,24 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe FileUtils.saveFile(file.getAbsolutePath(), s); } catch (Exception e) { JOptionPane.showMessageDialog(frame, - "File could not be saved: " + e.getMessage(), - "Error", - JOptionPane.INFORMATION_MESSAGE); + "File could not be saved: " + e.getMessage(), + "Error", + JOptionPane.INFORMATION_MESSAGE); return; } JOptionPane.showMessageDialog(frame, - "The capture was correctly performed and saved in " + file.getAbsolutePath(), - "Save in svg format ok", - JOptionPane.INFORMATION_MESSAGE); + "The capture was correctly performed and saved in " + file.getAbsolutePath(), + "Save in svg format ok", + JOptionPane.INFORMATION_MESSAGE); } } public void allDiagramCapture() { if (tabs.size() < 1) { JOptionPane.showMessageDialog(frame, - "No diagram is under edition", - "Error", - JOptionPane.INFORMATION_MESSAGE); + "No diagram is under edition", + "Error", + JOptionPane.INFORMATION_MESSAGE); return; } @@ -5557,49 +5607,49 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe name = name.substring(0, name.length() - 4); //boolean actions; - for(int j=0; j<tabs.size(); j++) { + for (int j = 0; j < tabs.size(); j++) { tp = tabs.get(j); - for(int i=0; i<tp.panels.size(); i++) { - tdp1 = tp.panels.elementAt(i) ; - tdp1.repaint(); - image = tdp1.performMinimalCapture(); - if (i < 10) { - file1 = new File(name + "0" + i + "__" + tdp1.getName()); - } else { - file1 = new File(name + i + "__" + tdp1.getName()); - } - file1 = FileUtils.addFileExtensionIfMissing(file1, TImgFilter.getExtension()); - if (!writeImageCapture(image, file1, false)) { - JOptionPane.showMessageDialog(frame, - "Diagrams could NOT be captured in png format", - "Capture failed", - JOptionPane.INFORMATION_MESSAGE); - return; - } - if (i ==0) { - if (!writeImageCapture(image, file, false)) { - JOptionPane.showMessageDialog(frame, - "Diagrams could NOT be captured in png format", - "Capture failed", - JOptionPane.INFORMATION_MESSAGE); - return; - } - } - } + for (int i = 0; i < tp.panels.size(); i++) { + tdp1 = tp.panels.elementAt(i); + tdp1.repaint(); + image = tdp1.performMinimalCapture(); + if (i < 10) { + file1 = new File(name + "0" + i + "__" + tdp1.getName()); + } else { + file1 = new File(name + i + "__" + tdp1.getName()); + } + file1 = FileUtils.addFileExtensionIfMissing(file1, TImgFilter.getExtension()); + if (!writeImageCapture(image, file1, false)) { + JOptionPane.showMessageDialog(frame, + "Diagrams could NOT be captured in png format", + "Capture failed", + JOptionPane.INFORMATION_MESSAGE); + return; + } + if (i == 0) { + if (!writeImageCapture(image, file, false)) { + JOptionPane.showMessageDialog(frame, + "Diagrams could NOT be captured in png format", + "Capture failed", + JOptionPane.INFORMATION_MESSAGE); + return; + } + } + } } JOptionPane.showMessageDialog(frame, - "All diagrams were sucessfully captured in png format", - "Capture ok", - JOptionPane.INFORMATION_MESSAGE); + "All diagrams were sucessfully captured in png format", + "Capture ok", + JOptionPane.INFORMATION_MESSAGE); } public void allDiagramCaptureSvg() { if (tabs.size() < 1) { JOptionPane.showMessageDialog(frame, - "No diagram is under edition", - "Error", - JOptionPane.INFORMATION_MESSAGE); + "No diagram is under edition", + "Error", + JOptionPane.INFORMATION_MESSAGE); return; } @@ -5615,9 +5665,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe name = name.substring(0, name.length() - 4); //boolean actions; - for(int j=0; j<tabs.size(); j++) { + for (int j = 0; j < tabs.size(); j++) { tp = tabs.get(j); - for(int i=0; i<tp.panels.size(); i++) { + for (int i = 0; i < tp.panels.size(); i++) { tdp1 = tp.panels.elementAt(i); tdp1.repaint(); @@ -5631,13 +5681,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } file1 = FileUtils.addFileExtensionIfMissing(file1, TSVGFilter.getExtension()); try { - TraceManager.addDev("Saving in file:" + file1.getAbsolutePath()); + TraceManager.addDev("Saving in file:" + file1.getAbsolutePath()); FileUtils.saveFile(file1, svgImg); - } catch(Exception e) { + } catch (Exception e) { JOptionPane.showMessageDialog(frame, - "Diagrams could NOT be captured in svg format", - "Capture failed", - JOptionPane.INFORMATION_MESSAGE); + "Diagrams could NOT be captured in svg format", + "Capture failed", + JOptionPane.INFORMATION_MESSAGE); return; } @@ -5645,9 +5695,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } JOptionPane.showMessageDialog(frame, - "All diagrams were sucessfully captured in svg format", - "Capture ok", - JOptionPane.INFORMATION_MESSAGE); + "All diagrams were sucessfully captured in svg format", + "Capture ok", + JOptionPane.INFORMATION_MESSAGE); } public void selectedCapture() { @@ -5663,18 +5713,18 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfcimg.setCurrentDirectory(new File(SpecConfigTTool.IMGPath)); int returnVal = jfcimg.showSaveDialog(frame); if (returnVal == JFileChooser.CANCEL_OPTION) - return null; + return null; - if(returnVal == JFileChooser.APPROVE_OPTION) { + if (returnVal == JFileChooser.APPROVE_OPTION) { file = jfcimg.getSelectedFile(); file = FileUtils.addFileExtensionIfMissing(file, TImgFilter.getExtension()); } - if(!checkFileForSave(file)) { + if (!checkFileForSave(file)) { JOptionPane.showMessageDialog(frame, - "The capture could not be performed: invalid file", - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The capture could not be performed: invalid file", + "Error", + JOptionPane.INFORMATION_MESSAGE); return null; } return file; @@ -5685,25 +5735,25 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jfcimgsvg.setCurrentDirectory(new File(SpecConfigTTool.IMGPath)); int returnVal = jfcimgsvg.showSaveDialog(frame); if (returnVal == JFileChooser.CANCEL_OPTION) - return null; + return null; - if(returnVal == JFileChooser.APPROVE_OPTION) { + if (returnVal == JFileChooser.APPROVE_OPTION) { file = jfcimgsvg.getSelectedFile(); file = FileUtils.addFileExtensionIfMissing(file, TSVGFilter.getExtension()); } - if (checkForSave) { - if(!checkFileForSave(file)) { - JOptionPane.showMessageDialog(frame, - "The capture could not be performed: invalid file", - "Error", - JOptionPane.INFORMATION_MESSAGE); - return null; - } - } + if (checkForSave) { + if (!checkFileForSave(file)) { + JOptionPane.showMessageDialog(frame, + "The capture could not be performed: invalid file", + "Error", + JOptionPane.INFORMATION_MESSAGE); + return null; + } + } return file; } - + public void performScreenCapture(Rectangle rect, File file) { frame.paint(frame.getGraphics()); @@ -5714,15 +5764,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ImageIO.write(image, "png", file); } catch (Exception e) { JOptionPane.showMessageDialog(frame, - "The capture could not be performed:" + e.getMessage(), - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The capture could not be performed:" + e.getMessage(), + "Error", + JOptionPane.INFORMATION_MESSAGE); return; } JOptionPane.showMessageDialog(frame, - "The capture was correctly performed", - "Screen capture ok", - JOptionPane.INFORMATION_MESSAGE); + "The capture was correctly performed", + "Screen capture ok", + JOptionPane.INFORMATION_MESSAGE); return; } @@ -5733,23 +5783,23 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ImageIO.write(image, "png", file); } catch (Exception e) { JOptionPane.showMessageDialog(frame, - "The capture could not be performed:" + e.getMessage(), - "Error", - JOptionPane.INFORMATION_MESSAGE); + "The capture could not be performed:" + e.getMessage(), + "Error", + JOptionPane.INFORMATION_MESSAGE); return false; } if (info) { JOptionPane.showMessageDialog(frame, - "The capture was correctly performed and saved in " + file.getAbsolutePath(), - "Screen capture ok", - JOptionPane.INFORMATION_MESSAGE); + "The capture was correctly performed and saved in " + file.getAbsolutePath(), + "Screen capture ok", + JOptionPane.INFORMATION_MESSAGE); } return true; } public void generateDocumentation() { //TraceManager.addDev("Documentation"); - ThreadGUIElement t = new ThreadGUIElement(frame, 1, tabs, mainTabbedPane, SpecConfigTTool.DocGenPath, file.getName(),"Documentation", "Generating documentation ... Please wait"); + ThreadGUIElement t = new ThreadGUIElement(frame, 1, tabs, mainTabbedPane, SpecConfigTTool.DocGenPath, file.getName(), "Documentation", "Generating documentation ... Please wait"); t.go(); /*DocumentationGenerator docgen = new DocumentationGenerator(tabs, mainTabbedPane, ConfigurationTTool.IMGPath, file.getName()); docgen.setFirstHeadingNumber(2); @@ -5773,9 +5823,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe GraphicLib.centerOnParent(jdrt); jdrt.setVisible(true); if (!jdrt.hasBeenCancelled()) { - Point [] pts = jdrt.getColumnsInfo(); + Point[] pts = jdrt.getColumnsInfo(); if (pts != null) { - for(int i=0; i<pts.length; i++) { + for (int i = 0; i < pts.length; i++) { TraceManager.addDev("" + i + ": (" + pts[i].x + ", " + pts[i].y + ")"); } @@ -5823,41 +5873,41 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return idButtonSelected; } - public void addTClass(TURTLEPanel tp, String s) { + public void addTClass(TURTLEPanel tp, String s) { if (!(tp instanceof DesignPanel)) { return; } - ((DesignPanel)tp).addTActivityDiagram(s); + ((DesignPanel) tp).addTActivityDiagram(s); setPanelMode(); } - public void addTOSClass(TURTLEPanel tp, String s) { + public void addTOSClass(TURTLEPanel tp, String s) { if (!(tp instanceof TURTLEOSDesignPanel)) { return; } - ((TURTLEOSDesignPanel)tp).addTURTLEOSActivityDiagram(s); + ((TURTLEOSDesignPanel) tp).addTURTLEOSActivityDiagram(s); setPanelMode(); } - public void addTMLTask(TURTLEPanel tp, String s) { + public void addTMLTask(TURTLEPanel tp, String s) { //TraceManager.addDev("ADD TML Task=" + s); if (!(tp instanceof TMLDesignPanel)) { return; } - ((TMLDesignPanel)tp).addTMLActivityDiagram(s); + ((TMLDesignPanel) tp).addTMLActivityDiagram(s); setPanelMode(); } - public void addTMLCPrimitiveComponent(TURTLEPanel tp, String s) { + public void addTMLCPrimitiveComponent(TURTLEPanel tp, String s) { //TraceManager.addDev("ADD C Primitive Component=" + s); if (!(tp instanceof TMLComponentDesignPanel)) { return; } - ((TMLComponentDesignPanel)tp).addTMLActivityDiagram(s); + ((TMLComponentDesignPanel) tp).addTMLActivityDiagram(s); setPanelMode(); } @@ -5865,11 +5915,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; TMLActivityDiagramPanel tmladp; //TraceManager.addDev("global search for: " + name); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { if (tp.hasTDiagramPanel(_tdp)) { - tmladp = ((TMLComponentDesignPanel)tp).getTMLActivityDiagramPanel(name); + tmladp = ((TMLComponentDesignPanel) tp).getTMLActivityDiagramPanel(name); if (tmladp != null) { //TraceManager.addDev("Found"); return tmladp; @@ -5884,7 +5934,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public TURTLEPanel getTURTLEPanelOfTDiagramPanel(TDiagramPanel _tdp) { TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { if (tp.hasTDiagramPanel(_tdp)) { @@ -5900,10 +5950,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; ArrayList<EBRDDPanel> al = new ArrayList<EBRDDPanel>(); //TraceManager.addDev("global search for: " + name); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof RequirementPanel) { - ((RequirementPanel)tp).addAllEBRDDPanels(al); + ((RequirementPanel) tp).addAllEBRDDPanels(al); } } @@ -5914,10 +5964,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; ArrayList<AvatarPDPanel> al = new ArrayList<AvatarPDPanel>(); //TraceManager.addDev("global search for: " + name); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof AvatarRequirementPanel) { - ((AvatarRequirementPanel)tp).addAllAvatarPDPanels(al); + ((AvatarRequirementPanel) tp).addAllAvatarPDPanels(al); } } @@ -5928,23 +5978,23 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; List<TGComponent> ll = new LinkedList<TGComponent>(); - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { - ll.addAll(((TMLComponentDesignPanel)tp).tmlctdp.getComponentList()); + ll.addAll(((TMLComponentDesignPanel) tp).tmlctdp.getComponentList()); } } return ll; } - public void removeTClass(TURTLEPanel tp, String s) { + public void removeTClass(TURTLEPanel tp, String s) { if (!(tp instanceof DesignPanel)) { return; } - for(int i = 0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { tp.tabbedPane.removeTabAt(i); tp.panels.removeElementAt(i); @@ -5954,13 +6004,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } } - public void removeTOSClass(TURTLEPanel tp, String s) { + public void removeTOSClass(TURTLEPanel tp, String s) { if (!(tp instanceof TURTLEOSDesignPanel)) { return; } TraceManager.addDev("Removing tab ..."); - for(int i = 0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { tp.tabbedPane.removeTabAt(i); tp.panels.removeElementAt(i); @@ -5975,7 +6025,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return; } - for(int i = 0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { tp.tabbedPane.removeTabAt(i); tp.panels.removeElementAt(i); @@ -5985,11 +6035,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } } - public void removeAvatarBlock (TURTLEPanel tp, String s) { + public void removeAvatarBlock(TURTLEPanel tp, String s) { if (!(tp instanceof AvatarDesignPanel)) return; - for (int i=0; i<tp.tabbedPane.getTabCount(); i++) + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) if (tp.tabbedPane.getTitleAt(i).equals(s)) { tp.tabbedPane.removeTabAt(i); tp.panels.removeElementAt(i); @@ -5998,14 +6048,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } } - public void removeTMLCPrimitiveComponent(TURTLEPanel tp, String s) { + public void removeTMLCPrimitiveComponent(TURTLEPanel tp, String s) { //TraceManager.addDev("Removing panel 0:" + s); if (!(tp instanceof TMLComponentDesignPanel)) { return; } //TraceManager.addDev("Removing panel 1:" + s); - for(int i = 0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { tp.tabbedPane.removeTabAt(i); tp.panels.removeElementAt(i); @@ -6023,7 +6073,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public String getTabName(TURTLEPanel p) { int index = tabs.indexOf(p); - if (index<0) { + if (index < 0) { return ""; } return mainTabbedPane.getTitleAt(index); @@ -6032,7 +6082,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public int getMajorIndexOf(TDiagramPanel tdp) { TURTLEPanel tp; - for(int i=0; i<tabs.size();i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp.panels.contains(tdp)) { return i; @@ -6056,10 +6106,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp; ArrayList<TMLComponentTaskDiagramPanel> foundPanels = new ArrayList<TMLComponentTaskDiagramPanel>(); - for(int i=0; i<tabs.size();i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { - ((TMLComponentDesignPanel)tp).tmlctdp.getPanelsUsingAComponent(tmlcc, foundPanels); + ((TMLComponentDesignPanel) tp).tmlctdp.getPanelsUsingAComponent(tmlcc, foundPanels); } } @@ -6069,10 +6119,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void updateReferenceToTMLCCompositeComponent(TMLCCompositeComponent tmlcc) { TURTLEPanel tp; - for(int i=0; i<tabs.size();i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLComponentDesignPanel) { - ((TMLComponentDesignPanel)tp).tmlctdp.updateReferenceToTMLCCompositeComponent(tmlcc); + ((TMLComponentDesignPanel) tp).tmlctdp.updateReferenceToTMLCCompositeComponent(tmlcc); } } } @@ -6084,7 +6134,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } String panelName = name.substring(0, index); - String componentName = name.substring(index+2, name.length()); + String componentName = name.substring(index + 2, name.length()); TURTLEPanel tp = getTURTLEPanel(panelName); @@ -6093,7 +6143,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - return ((TMLComponentDesignPanel)(tp)).tmlctdp.getCompositeComponentByName(componentName); + return ((TMLComponentDesignPanel) (tp)).tmlctdp.getCompositeComponentByName(componentName); } public AvatarSMDPanel getAvatarSMDPanel(int indexDesign, String name) { @@ -6104,7 +6154,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } if (tp instanceof AvatarDesignPanel) { - return ((AvatarDesignPanel)tp).getAvatarSMDPanel(name); + return ((AvatarDesignPanel) tp).getAvatarSMDPanel(name); } TraceManager.addDev("null ADP :" + name); return null; @@ -6116,7 +6166,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } if (tp instanceof DesignPanel) { - return ((DesignPanel)tp).getActivityDiagramPanel(name); + return ((DesignPanel) tp).getActivityDiagramPanel(name); } return null; } @@ -6127,7 +6177,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } if (tp instanceof TURTLEOSDesignPanel) { - return ((TURTLEOSDesignPanel)tp).getTURTLEOSActivityDiagramPanel(name); + return ((TURTLEOSDesignPanel) tp).getTURTLEOSActivityDiagramPanel(name); } return null; } @@ -6138,10 +6188,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } if (tp instanceof TMLDesignPanel) { - return ((TMLDesignPanel)tp).getTMLActivityDiagramPanel(name); + return ((TMLDesignPanel) tp).getTMLActivityDiagramPanel(name); } if (tp instanceof TMLComponentDesignPanel) { - return ((TMLComponentDesignPanel)tp).getTMLActivityDiagramPanel(name); + return ((TMLComponentDesignPanel) tp).getTMLActivityDiagramPanel(name); } return null; } @@ -6152,7 +6202,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } if (tp instanceof ProactiveDesignPanel) { - return ((ProactiveDesignPanel)tp).getSMDPanel(name); + return ((ProactiveDesignPanel) tp).getSMDPanel(name); } return null; } @@ -6161,10 +6211,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TDiagramPanel tdp; int cpt = 0; - for(int i = 0; i<getCurrentJTabbedPane().getTabCount(); i++) { + for (int i = 0; i < getCurrentJTabbedPane().getTabCount(); i++) { tdp = getCurrentTURTLEPanel().panels.elementAt(i); if (tdp instanceof TActivityDiagramPanel) { - cpt ++; + cpt++; } } return cpt; @@ -6261,8 +6311,6 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - - // IOD, SD public boolean isSDCreated(int index, String s) { @@ -6389,16 +6437,16 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public boolean createTMLCPSequenceDiagram(TURTLEPanel tp, String s) { - if(isSDCreated(tp, s)) { + if (isSDCreated(tp, s)) { return false; } - if (!(tp instanceof TMLCommunicationPatternPanel) ) { + if (!(tp instanceof TMLCommunicationPatternPanel)) { return false; } - ((TMLCommunicationPatternPanel)tp).addCPSequenceDiagram(s); + ((TMLCommunicationPatternPanel) tp).addCPSequenceDiagram(s); setPanelMode(); return true; @@ -6406,13 +6454,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean createUniqueTMLCPSequenceDiagram(TURTLEPanel tp, String s) { int i; - for(i=0; i<1000; i++) { - if(!isTMLCPSDCreated(tp, s+i)) { + for (i = 0; i < 1000; i++) { + if (!isTMLCPSDCreated(tp, s + i)) { break; } } - ((TMLCommunicationPatternPanel)tp).addCPSequenceDiagram(s+i); + ((TMLCommunicationPatternPanel) tp).addCPSequenceDiagram(s + i); setPanelMode(); return true; @@ -6423,7 +6471,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public boolean createTMLCPDiagram(TURTLEPanel tp, String s) { - if(isTMLCPCreated(tp, s)) { + if (isTMLCPCreated(tp, s)) { return false; } @@ -6431,7 +6479,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((TMLCommunicationPatternPanel)tp).addCPDiagram(s); + ((TMLCommunicationPatternPanel) tp).addCPDiagram(s); setPanelMode(); return true; } @@ -6460,8 +6508,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public AttackTreeDiagramPanel getAttackTreeDiagramPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (AttackTreeDiagramPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (AttackTreeDiagramPanel) (tp.panelAt(indexTab)); } return null; /*for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { @@ -6480,8 +6528,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public FaultTreeDiagramPanel getFaultTreeDiagramPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (FaultTreeDiagramPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (FaultTreeDiagramPanel) (tp.panelAt(indexTab)); } return null; /*for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { @@ -6501,10 +6549,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public TMLCPPanel getTMLCPDiagramPanel(TURTLEPanel tp, String s) { - for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { if (tp.panelAt(i) instanceof TMLCPPanel) - return (TMLCPPanel)(tp.panelAt(i)); + return (TMLCPPanel) (tp.panelAt(i)); } } return null; @@ -6517,10 +6565,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public TMLSDPanel getTMLCPSDDiagramPanel(TURTLEPanel tp, String s) { - for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { if (tp.panelAt(i) instanceof TMLSDPanel) - return (TMLSDPanel)(tp.panelAt(i)); + return (TMLSDPanel) (tp.panelAt(i)); } } return null; @@ -6533,30 +6581,30 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public ui.sd.SequenceDiagramPanel getSequenceDiagramPanel(TURTLEPanel tp, String s) { - for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { if (tp.panelAt(i) instanceof ui.sd.SequenceDiagramPanel) - return (ui.sd.SequenceDiagramPanel)(tp.panelAt(i)); + return (ui.sd.SequenceDiagramPanel) (tp.panelAt(i)); } } return null; } public ui.sd2.SequenceDiagramPanel getSequenceDiagramPanelZV(TURTLEPanel tp, String s) { - for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { if (tp.panelAt(i) instanceof ui.sd2.SequenceDiagramPanel) - return (ui.sd2.SequenceDiagramPanel)(tp.panelAt(i)); + return (ui.sd2.SequenceDiagramPanel) (tp.panelAt(i)); } } return null; } public InteractionOverviewDiagramPanel getIODiagramPanel(TURTLEPanel tp, String s) { - for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { if (tp.panelAt(i) instanceof InteractionOverviewDiagramPanel) - return (InteractionOverviewDiagramPanel)(tp.panelAt(i)); + return (InteractionOverviewDiagramPanel) (tp.panelAt(i)); } } return null; @@ -6569,8 +6617,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public UseCaseDiagramPanel getUseCaseDiagramPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (UseCaseDiagramPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (UseCaseDiagramPanel) (tp.panelAt(indexTab)); } return null; } @@ -6580,7 +6628,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public boolean createSequenceDiagram(TURTLEPanel tp, String s) { - if(isSDCreated(tp, s)) { + if (isSDCreated(tp, s)) { return false; } @@ -6589,19 +6637,20 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } if (tp instanceof AnalysisPanel) { - ((AnalysisPanel)tp).addSequenceDiagram(s); + ((AnalysisPanel) tp).addSequenceDiagram(s); } else if (tp instanceof AvatarAnalysisPanel) { - ((AvatarAnalysisPanel)tp).addSequenceDiagram(s); + ((AvatarAnalysisPanel) tp).addSequenceDiagram(s); } setPanelMode(); return true; } + public boolean createSequenceDiagramZV(int index, String s) { return createSequenceDiagramZV(tabs.elementAt(index), s); } public boolean createSequenceDiagramZV(TURTLEPanel tp, String s) { - if(isSDCreated(tp, s)) { + if (isSDCreated(tp, s)) { return false; } @@ -6610,9 +6659,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } if (tp instanceof AnalysisPanel) { - ((AnalysisPanel)tp).addSequenceDiagramZV(s); + ((AnalysisPanel) tp).addSequenceDiagramZV(s); } else if (tp instanceof AvatarAnalysisPanel) { - ((AvatarAnalysisPanel)tp).addSequenceDiagramZV(s); + ((AvatarAnalysisPanel) tp).addSequenceDiagramZV(s); } setPanelMode(); return true; @@ -6620,16 +6669,16 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean createUniqueSequenceDiagram(TURTLEPanel tp, String s) { int i; - for(i=0; i<1000; i++) { - if(!isSDCreated(tp, s+i)) { + for (i = 0; i < 1000; i++) { + if (!isSDCreated(tp, s + i)) { break; } } if (tp instanceof AnalysisPanel) { - ((AnalysisPanel)tp).addSequenceDiagram(s+i); + ((AnalysisPanel) tp).addSequenceDiagram(s + i); } else if (tp instanceof AvatarAnalysisPanel) { - ((AvatarAnalysisPanel)tp).addSequenceDiagram(s+i); + ((AvatarAnalysisPanel) tp).addSequenceDiagram(s + i); } setPanelMode(); @@ -6639,16 +6688,16 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean createUniqueSequenceDiagramZV(TURTLEPanel tp, String s) { int i; - for(i=0; i<1000; i++) { - if(!isSDCreated(tp, s+i)) { + for (i = 0; i < 1000; i++) { + if (!isSDCreated(tp, s + i)) { break; } } if (tp instanceof AnalysisPanel) { - ((AnalysisPanel)tp).addSequenceDiagramZV(s+i); + ((AnalysisPanel) tp).addSequenceDiagramZV(s + i); } else if (tp instanceof AvatarAnalysisPanel) { - ((AvatarAnalysisPanel)tp).addSequenceDiagramZV(s+i); + ((AvatarAnalysisPanel) tp).addSequenceDiagramZV(s + i); } setPanelMode(); @@ -6660,27 +6709,26 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - if (! ((tp instanceof AnalysisPanel) || (tp instanceof AvatarAnalysisPanel))) { + if (!((tp instanceof AnalysisPanel) || (tp instanceof AvatarAnalysisPanel))) { return false; } if (tp instanceof AnalysisPanel) { - ((AnalysisPanel)tp).addInstancesToLastSD(_ucdp); + ((AnalysisPanel) tp).addInstancesToLastSD(_ucdp); } else if (tp instanceof AvatarAnalysisPanel) { - ((AvatarAnalysisPanel)tp).addInstancesToLastSD(_ucdp); + ((AvatarAnalysisPanel) tp).addInstancesToLastSD(_ucdp); } return true; } - public boolean createIODiagram(int index, String s) { return createIODiagram(tabs.elementAt(index), s); } public boolean createIODiagram(TURTLEPanel tp, String s) { - if(isIODCreated(tp, s)) { + if (isIODCreated(tp, s)) { return false; } @@ -6688,7 +6736,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((AnalysisPanel)tp).addIODiagram(s); + ((AnalysisPanel) tp).addIODiagram(s); setPanelMode(); return true; } @@ -6698,35 +6746,35 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public boolean createUniqueUseCaseDiagram(TURTLEPanel tp, String s) { - if (!((tp instanceof AnalysisPanel) || (tp instanceof AvatarAnalysisPanel))) { + if (!((tp instanceof AnalysisPanel) || (tp instanceof AvatarAnalysisPanel))) { return false; } int i; - for(i=0; i<1000; i++) { - if(!isUseCaseDiagramCreated(tp, s + " " + i)) { + for (i = 0; i < 1000; i++) { + if (!isUseCaseDiagramCreated(tp, s + " " + i)) { break; } } if (tp instanceof AnalysisPanel) { - ((AnalysisPanel)tp).addUseCaseDiagram(s + " " + i); + ((AnalysisPanel) tp).addUseCaseDiagram(s + " " + i); } else { - ((AvatarAnalysisPanel)tp).addUseCaseDiagram(s + " " + i); + ((AvatarAnalysisPanel) tp).addUseCaseDiagram(s + " " + i); } setPanelMode(); return true; } public boolean createUseCaseDiagram(TURTLEPanel tp, String s) { - if (!((tp instanceof AnalysisPanel) || (tp instanceof AvatarAnalysisPanel))) { + if (!((tp instanceof AnalysisPanel) || (tp instanceof AvatarAnalysisPanel))) { return false; } if (tp instanceof AnalysisPanel) { - ((AnalysisPanel)tp).addUseCaseDiagram(s); + ((AnalysisPanel) tp).addUseCaseDiagram(s); } else { - ((AvatarAnalysisPanel)tp).addUseCaseDiagram(s); + ((AvatarAnalysisPanel) tp).addUseCaseDiagram(s); } setPanelMode(); return true; @@ -6737,18 +6785,18 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public boolean createUniqueAvatarCD(TURTLEPanel tp, String s) { - if (!(tp instanceof AvatarAnalysisPanel)) { + if (!(tp instanceof AvatarAnalysisPanel)) { return false; } int i; - for(i=0; i<1000; i++) { - if(!isAvatarCDCreated(tp, s + " " + i)) { + for (i = 0; i < 1000; i++) { + if (!isAvatarCDCreated(tp, s + " " + i)) { break; } } - ((AvatarAnalysisPanel)tp).addAvatarContextDiagram(s + " " + i); + ((AvatarAnalysisPanel) tp).addAvatarContextDiagram(s + " " + i); setPanelMode(); @@ -6756,12 +6804,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public boolean createAvatarCD(TURTLEPanel tp, String s) { - if (!(tp instanceof AvatarAnalysisPanel)) { + if (!(tp instanceof AvatarAnalysisPanel)) { return false; } - ((AvatarAnalysisPanel)tp).addAvatarContextDiagram(s); + ((AvatarAnalysisPanel) tp).addAvatarContextDiagram(s); setPanelMode(); @@ -6778,13 +6826,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } int i; - for(i=0; i<1000; i++) { - if(!isAvatarADCreated(tp, s + " " + i)) { + for (i = 0; i < 1000; i++) { + if (!isAvatarADCreated(tp, s + " " + i)) { break; } } - ((AvatarAnalysisPanel)tp).addAvatarActivityDiagram(s + " " + i); + ((AvatarAnalysisPanel) tp).addAvatarActivityDiagram(s + " " + i); setPanelMode(); return true; } @@ -6795,7 +6843,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - ((AvatarAnalysisPanel)tp).addAvatarActivityDiagram(s); + ((AvatarAnalysisPanel) tp).addAvatarActivityDiagram(s); setPanelMode(); return true; @@ -6804,8 +6852,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //Changed by Solange from public boolean... public String createProActiveSMD(int index, String s) { //Adde by Solange String name at the beginning - String name=createProActiveSMD(tabs.elementAt(index), s); - return(name); //changed from return true + String name = createProActiveSMD(tabs.elementAt(index), s); + return (name); //changed from return true } //Return changed by Solange from boolean to String @@ -6813,14 +6861,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //Added by Solange. It fills the lists of components, interfaces, etc TURTLEPanel tp2 = getCurrentTURTLEPanel(); - gtm.generateLists((ProactiveDesignPanel)tp2); + gtm.generateLists((ProactiveDesignPanel) tp2); // if (!(tp instanceof ProactiveDesignPanel)) { return null; //Changed by Solange from return false } - s=((ProactiveDesignPanel)tp).addSMD(s); + s = ((ProactiveDesignPanel) tp).addSMD(s); //Added by Solange // ProactiveSMDPanel temp=((ProactiveDesignPanel)tp).getSMDPanel(s); //Added by Solange @@ -6844,7 +6892,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe */ // setPanelMode(); - return(s); //Changes by Solange from return true + return (s); //Changes by Solange from return true } public boolean createAvatarRD(int index, String s) { @@ -6856,7 +6904,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((AvatarRequirementPanel)tp).addAvatarRD(s); + ((AvatarRequirementPanel) tp).addAvatarRD(s); setPanelMode(); return true; } @@ -6870,7 +6918,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((AvatarMADsPanel)tp).addAvatarMADPanel(s); + ((AvatarMADsPanel) tp).addAvatarMADPanel(s); setPanelMode(); return true; } @@ -6884,7 +6932,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((AvatarRequirementPanel)tp).addAvatarPD(s); + ((AvatarRequirementPanel) tp).addAvatarPD(s); setPanelMode(); return true; } @@ -6898,7 +6946,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((ADDPanel)tp).addDeploymentPanelDiagram(s); + ((ADDPanel) tp).addDeploymentPanelDiagram(s); setPanelMode(); return true; } @@ -6925,7 +6973,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((RequirementPanel)tp).addRequirementDiagram(s); + ((RequirementPanel) tp).addRequirementDiagram(s); setPanelMode(); return true; } @@ -6939,7 +6987,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((AttackTreePanel)tp).addAttackTreeDiagram(s); + ((AttackTreePanel) tp).addAttackTreeDiagram(s); setPanelMode(); return true; } @@ -6953,7 +7001,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((FaultTreePanel)tp).addFaultTreeDiagram(s); + ((FaultTreePanel) tp).addFaultTreeDiagram(s); setPanelMode(); return true; } @@ -6967,7 +7015,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return false; } - ((RequirementPanel)tp).addEBRDD(s); + ((RequirementPanel) tp).addEBRDD(s); setPanelMode(); return true; } @@ -6996,7 +7044,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void generateOntologyForAllDiagrams() { TraceManager.addDev("Ontology for all diagrams"); try { - /*String modeling =*/ gtm.makeXMLFromTurtleModeling(-1); + /*String modeling =*/ + gtm.makeXMLFromTurtleModeling(-1); TraceManager.addDev("Model made"); } catch (Exception e) { } @@ -7004,15 +7053,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - public AvatarRDPanel getAvatarRDPanel(int index, int indexTab, String s) { TURTLEPanel tp = tabs.elementAt(index); return getAvatarRDPanel(tp, indexTab, s); } public AvatarRDPanel getAvatarRDPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (AvatarRDPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (AvatarRDPanel) (tp.panelAt(indexTab)); } return null; } @@ -7023,8 +7071,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public AvatarMADPanel getAvatarMADPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (AvatarMADPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (AvatarMADPanel) (tp.panelAt(indexTab)); } return null; } @@ -7046,17 +7094,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public AvatarPDPanel getAvatarPDPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (AvatarPDPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (AvatarPDPanel) (tp.panelAt(indexTab)); } return null; } public ADDDiagramPanel getAvatarADDPanel(TURTLEPanel tp, int indexTab, String s) { - TraceManager.addDev("index=" + indexTab + " s=" + s + "title=" +tp.tabbedPane.getTitleAt(indexTab)); + TraceManager.addDev("index=" + indexTab + " s=" + s + "title=" + tp.tabbedPane.getTitleAt(indexTab)); - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (ADDDiagramPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (ADDDiagramPanel) (tp.panelAt(indexTab)); } return null; } @@ -7065,7 +7113,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //TraceManager.addDev("index=" + indexTab + " s=" + s + "title=" +tp.tabbedPane.getTitleAt(indexTab)); //if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (ADDDiagramPanel)(tp.panelAt(indexTab)); + return (ADDDiagramPanel) (tp.panelAt(indexTab)); //} } @@ -7077,8 +7125,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public AvatarCDPanel getAvatarCDPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (AvatarCDPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (AvatarCDPanel) (tp.panelAt(indexTab)); } return null; } @@ -7090,8 +7138,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public AvatarADPanel getAvatarADPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (AvatarADPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (AvatarADPanel) (tp.panelAt(indexTab)); } return null; } @@ -7103,10 +7151,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public RequirementDiagramPanel getRequirementDiagramPanel(TURTLEPanel tp, String s) { - for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { if (tp.panelAt(i) instanceof RequirementDiagramPanel) - return (RequirementDiagramPanel)(tp.panelAt(i)); + return (RequirementDiagramPanel) (tp.panelAt(i)); } } return null; @@ -7119,8 +7167,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public RequirementDiagramPanel getRequirementDiagramPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (RequirementDiagramPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (RequirementDiagramPanel) (tp.panelAt(indexTab)); } return null; } @@ -7132,10 +7180,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public EBRDDPanel getEBRDDPanel(TURTLEPanel tp, String s) { - for(int i=0; i<tp.tabbedPane.getTabCount(); i++) { + for (int i = 0; i < tp.tabbedPane.getTabCount(); i++) { if (tp.tabbedPane.getTitleAt(i).equals(s)) { if (tp.panelAt(i) instanceof EBRDDPanel) - return (EBRDDPanel)(tp.panelAt(i)); + return (EBRDDPanel) (tp.panelAt(i)); } } return null; @@ -7148,8 +7196,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public EBRDDPanel getEBRDDPanel(TURTLEPanel tp, int indexTab, String s) { - if(tp.tabbedPane.getTitleAt(indexTab).equals(s)) { - return (EBRDDPanel)(tp.panelAt(indexTab)); + if (tp.tabbedPane.getTitleAt(indexTab).equals(s)) { + return (EBRDDPanel) (tp.panelAt(indexTab)); } return null; } @@ -7157,19 +7205,19 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void alignInstances() { //TraceManager.addDev("Align instances"); if (getCurrentTDiagramPanel() instanceof ui.sd.SequenceDiagramPanel) { - ((ui.sd.SequenceDiagramPanel)(getCurrentTDiagramPanel())).alignInstances(); + ((ui.sd.SequenceDiagramPanel) (getCurrentTDiagramPanel())).alignInstances(); changeMade(getCurrentTDiagramPanel(), TDiagramPanel.MOVE_COMPONENT); getCurrentTDiagramPanel().repaint(); } if (getCurrentTDiagramPanel() instanceof ui.sd2.SequenceDiagramPanel) { - ((ui.sd2.SequenceDiagramPanel)(getCurrentTDiagramPanel())).alignInstances(); + ((ui.sd2.SequenceDiagramPanel) (getCurrentTDiagramPanel())).alignInstances(); changeMade(getCurrentTDiagramPanel(), TDiagramPanel.MOVE_COMPONENT); getCurrentTDiagramPanel().repaint(); } if (getCurrentTDiagramPanel() instanceof TMLSDPanel) { - ((TMLSDPanel)(getCurrentTDiagramPanel())).alignInstances(); + ((TMLSDPanel) (getCurrentTDiagramPanel())).alignInstances(); changeMade(getCurrentTDiagramPanel(), TDiagramPanel.MOVE_COMPONENT); getCurrentTDiagramPanel().repaint(); } @@ -7178,7 +7226,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void alignPartitions() { //TraceManager.addDev("Align instances"); if (getCurrentTDiagramPanel() instanceof AvatarADPanel) { - ((AvatarADPanel)(getCurrentTDiagramPanel())).alignPartitions(); + ((AvatarADPanel) (getCurrentTDiagramPanel())).alignPartitions(); changeMade(getCurrentTDiagramPanel(), TDiagramPanel.MOVE_COMPONENT); getCurrentTDiagramPanel().repaint(); } @@ -7210,13 +7258,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return tabs.elementAt(mainTabbedPane.getSelectedIndex()).tdp; } - public void selectDummyTab (int index) { - if (this.tabs.size () < index+1) + public void selectDummyTab(int index) { + if (this.tabs.size() < index + 1) return; - this.dummySelectedTab = this.tabs.elementAt (index); + this.dummySelectedTab = this.tabs.elementAt(index); } - public void forgetDummyTab () { + public void forgetDummyTab() { this.dummySelectedTab = null; } @@ -7235,9 +7283,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void reinitCountOfPanels() { int i, j; TURTLEPanel tp; - for(i = 0; i<mainTabbedPane.getTabCount(); i++) { + for (i = 0; i < mainTabbedPane.getTabCount(); i++) { tp = tabs.elementAt(i); - for(j=0; j<tp.tabbedPane.getTabCount(); j++) { + for (j = 0; j < tp.tabbedPane.getTabCount(); j++) { tp.panels.elementAt(j).count = 0; } } @@ -7246,12 +7294,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void setPanelMode() { int index; TURTLEPanel tp = getCurrentTURTLEPanel(); - if (tp==null){ + if (tp == null) { return; } index = tp.tabbedPane.getSelectedIndex(); - if (index < tp.panels.size() -1) { + if (index < tp.panels.size() - 1) { setMode(FORWARD_DIAG); } else { setMode(NO_FORWARD_DIAG); @@ -7324,7 +7372,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void paneDiplodocusMethodologyAction(ChangeEvent e) { //TraceManager.addDev("Pane design action size=" + tabs.size()); try { - TDiagramPanel tdp1 = getCurrentTURTLEPanel().panels.elementAt(getCurrentJTabbedPane().getSelectedIndex()); + TDiagramPanel tdp1 = getCurrentTURTLEPanel().panels.elementAt(getCurrentJTabbedPane().getSelectedIndex()); //TraceManager.addDev("Pane design action 1"); if (activetdp != null) { @@ -7456,17 +7504,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } // nameTab : array of strings not to be removed - public void removeAnalysisDiagrams(String [] nameTab) { + public void removeAnalysisDiagrams(String[] nameTab) { int i, j; String value; boolean found; - for(i=1; i<getCurrentJTabbedPane().getTabCount(); i++) { + for (i = 1; i < getCurrentJTabbedPane().getTabCount(); i++) { value = getCurrentJTabbedPane().getTitleAt(i); found = false; - for(j=0; j<nameTab.length; j++) { + for (j = 0; j < nameTab.length; j++) { if (nameTab[j] != null) { - if (nameTab[j].compareTo(value) ==0) { + if (nameTab[j].compareTo(value) == 0) { found = true; break; } @@ -7490,9 +7538,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe value = getCurrentJTabbedPane().getTitleAt(index); //String s = (String)JOptionPane.showInputDialog(this, "Name of the diagram:", JOptionPane.QUESTION_MESSAGE); - String s = (String)JOptionPane.showInputDialog(frame, "Name of the diagram:", "setting value", JOptionPane.PLAIN_MESSAGE, IconManager.imgic101, null, value); + String s = (String) JOptionPane.showInputDialog(frame, "Name of the diagram:", "setting value", JOptionPane.PLAIN_MESSAGE, IconManager.imgic101, null, value); - if ((s != null) && (s.length() > 0)){ + if ((s != null) && (s.length() > 0)) { // name already in use? index1 = getCurrentJTabbedPane().indexOfTab(s); /*if (methoMode == METHO_ANALYSIS) { @@ -7574,9 +7622,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if ((getCurrentTURTLEPanel() instanceof AvatarDesignPanel) || (getCurrentTURTLEPanel() instanceof AvatarRequirementPanel) || (getCurrentTURTLEPanel() instanceof AttackTreePanel) || (getCurrentTURTLEPanel() instanceof FaultTreePanel) || (getCurrentTURTLEPanel() instanceof ADDPanel)) { mainBar.showAvatarActions(true); - } else if ((getCurrentTURTLEPanel() instanceof TMLDesignPanel) || (getCurrentTURTLEPanel() instanceof TMLComponentDesignPanel) || (getCurrentTURTLEPanel() instanceof TMLArchiPanel)){ + } else if ((getCurrentTURTLEPanel() instanceof TMLDesignPanel) || (getCurrentTURTLEPanel() instanceof TMLComponentDesignPanel) || (getCurrentTURTLEPanel() instanceof TMLArchiPanel)) { mainBar.showDiplodocusActions(true); - } else { + } else { mainBar.showAvatarActions(false); } @@ -7597,20 +7645,20 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean newTClassName(TURTLEPanel tp, String old, String niou) { JTabbedPane jtp = tp.tabbedPane; - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { if (jtp.getTitleAt(i).equals(niou)) { return false; } } //TraceManager.addDev("old " + old + " niou " + niou); - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { //TraceManager.addDev("Tab " + i + " = " + mainTabbedPane.getTitleAt(i)); if (jtp.getTitleAt(i).equals(old)) { jtp.setTitleAt(i, niou); jtp.setToolTipTextAt(i, "Opens the activity diagram of " + niou); TDiagramPanel tdp; //change panel name - for(int j=0; j<tp.panels.size(); j++) { + for (int j = 0; j < tp.panels.size(); j++) { tdp = tp.panels.elementAt(j); if (tdp.getName().equals(old)) { tdp.setName(niou); @@ -7627,20 +7675,20 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean newTOSClassName(TURTLEPanel tp, String old, String niou) { JTabbedPane jtp = tp.tabbedPane; - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { if (jtp.getTitleAt(i).equals(niou)) { return false; } } //TraceManager.addDev("old " + old + " niou " + niou); - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { //TraceManager.addDev("Tab " + i + " = " + mainTabbedPane.getTitleAt(i)); if (jtp.getTitleAt(i).equals(old)) { jtp.setTitleAt(i, niou); jtp.setToolTipTextAt(i, "Opens the TURTLE-OS activity diagram of " + niou); TDiagramPanel tdp; //change panel name - for(int j=0; j<tp.panels.size(); j++) { + for (int j = 0; j < tp.panels.size(); j++) { tdp = tp.panels.elementAt(j); if (tdp.getName().equals(old)) { tdp.setName(niou); @@ -7658,14 +7706,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean newTMLTaskName(TURTLEPanel tp, String old, String niou) { //TraceManager.addDev("Panel=" + tp + " Old task name = " + old + " New task name=" + niou); JTabbedPane jtp = tp.tabbedPane; - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { //TraceManager.addDev("jtp = " + jtp.getTitleAt(i)); if (jtp.getTitleAt(i).equals(niou)) { return false; } } //TraceManager.addDev("old " + old + " niou " + niou); - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { //TraceManager.addDev("Tab " + i + " = " + mainTabbedPane.getTitleAt(i)); //TraceManager.addDev("jtp = " + jtp.getTitleAt(i)); if (jtp.getTitleAt(i).equals(old)) { @@ -7673,7 +7721,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe jtp.setToolTipTextAt(i, "Opens the TML activity diagram of " + niou); TDiagramPanel tdp; //change panel name - for(int j=0; j<tp.panels.size(); j++) { + for (int j = 0; j < tp.panels.size(); j++) { tdp = tp.panels.elementAt(j); if (tdp.getName().equals(old)) { tdp.setName(niou); @@ -7691,7 +7739,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean nameComponentInUse(TURTLEPanel tp, String old, String niou) { JTabbedPane jtp = tp.tabbedPane; - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { if (jtp.getTitleAt(i).equals(niou)) { return true; } @@ -7701,20 +7749,20 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean newTMLComponentTaskName(TURTLEPanel tp, String old, String niou) { JTabbedPane jtp = tp.tabbedPane; - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { if (jtp.getTitleAt(i).equals(niou)) { return false; } } TraceManager.addDev("old " + old + " niou " + niou); - for(int i = 0; i<jtp.getTabCount(); i++) { + for (int i = 0; i < jtp.getTabCount(); i++) { TraceManager.addDev("Tab " + i + " = " + mainTabbedPane.getTitleAt(i)); if (jtp.getTitleAt(i).equals(old)) { jtp.setTitleAt(i, niou); jtp.setToolTipTextAt(i, "Opens the TML activity diagram of " + niou); TDiagramPanel tdp; //change panel name - for(int j=0; j<tp.panels.size(); j++) { + for (int j = 0; j < tp.panels.size(); j++) { tdp = tp.panels.elementAt(j); if (tdp.getName().equals(old)) { tdp.setName(niou); @@ -7740,10 +7788,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } } - public void cloneRenameTab(int index, String s){ + + public void cloneRenameTab(int index, String s) { cloneTab(index); - mainTabbedPane.setTitleAt(tabs.size()-1, mainTabbedPane.getTitleAt(index)+"_"+s); + mainTabbedPane.setTitleAt(tabs.size() - 1, mainTabbedPane.getTitleAt(index) + "_" + s); } + public void requestRemoveTab(int index) { if (index >= tabs.size()) { return; @@ -7756,7 +7806,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void requestMoveRightTab(int index) { //TraceManager.addDev("Move right"); - if (index > tabs.size()-2) { + if (index > tabs.size() - 2) { return; } requestMoveTabFromTo(index, index + 1); @@ -7768,7 +7818,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe if (index < 1) { return; } - requestMoveTabFromTo(index, index-1); + requestMoveTabFromTo(index, index - 1); changeMade(null, -1); } @@ -7809,8 +7859,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void requestRenameTab(int index) { String oldName = mainTabbedPane.getTitleAt(index); - String s = (String)JOptionPane.showInputDialog(frame, "Name: ", "Renaming a tab", JOptionPane.PLAIN_MESSAGE, IconManager.imgic101, null, mainTabbedPane.getTitleAt(index)); - if ((s != null) && (s.length() > 0)){ + String s = (String) JOptionPane.showInputDialog(frame, "Name: ", "Renaming a tab", JOptionPane.PLAIN_MESSAGE, IconManager.imgic101, null, mainTabbedPane.getTitleAt(index)); + if ((s != null) && (s.length() > 0)) { // name already in use? if (s.compareTo(oldName) != 0) { if (isAValidTabName(s) && (!isTabNameUsed(s))) { @@ -7833,9 +7883,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /** * Check if a name is already used by another TURTLEPanel tab - * @author Fabien Tessier + * * @param name * @return true if the name matches another tab name + * @author Fabien Tessier */ public boolean isTabNameUsed(String name) { for (int i = 0; i < mainTabbedPane.getTabCount(); i++) { @@ -7847,16 +7898,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe /** * Rename reference to the tab in Diplodocus Methodology - * @author Fabien Tessier + * * @param oldname * @param newname + * @author Fabien Tessier */ public void renameInMethodo(String oldname, String newname) { - for (TURTLEPanel tp: tabs) { + for (TURTLEPanel tp : tabs) { if (tp instanceof DiplodocusMethodologyPanel) { DiplodocusMethodologyDiagramPanel dmdp = (DiplodocusMethodologyDiagramPanel) tp.tdp; - for (TGComponent tgc: dmdp.componentList) - for (TGComponent tgc2: tgc.tgcomponent) { + for (TGComponent tgc : dmdp.componentList) + for (TGComponent tgc2 : tgc.tgcomponent) { if (tgc2.getValue().equals(oldname)) tgc2.setValue(newname); } @@ -7867,10 +7919,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void renameMapping(String oldName, String newName) { TURTLEPanel tp; - for(int i = 0; i<mainTabbedPane.getTabCount(); i++) { + for (int i = 0; i < mainTabbedPane.getTabCount(); i++) { tp = tabs.elementAt(i); if (tp instanceof TMLArchiPanel) { - ((TMLArchiPanel)tp).renameMapping(oldName, newName); + ((TMLArchiPanel) tp).renameMapping(oldName, newName); } } @@ -7879,10 +7931,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void renameDeployment(String oldName, String newName) { TURTLEPanel tp; - for(int i = 0; i<mainTabbedPane.getTabCount(); i++) { + for (int i = 0; i < mainTabbedPane.getTabCount(); i++) { tp = tabs.elementAt(i); if (tp instanceof ADDPanel) { - ((ADDPanel)tp).renameDeployment(oldName, newName); + ((ADDPanel) tp).renameDeployment(oldName, newName); } } @@ -7900,7 +7952,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe mainTabbedPane.setSelectedIndex(index1); } - for(j=0; j<tp.tabbedPane.getTabCount(); j++) { + for (j = 0; j < tp.tabbedPane.getTabCount(); j++) { if (tp.tabbedPane.getTitleAt(j).equals(s)) { tp.tabbedPane.setSelectedIndex(j); return true; @@ -7978,7 +8030,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe int index; TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); index = tp.panels.indexOf(tdp); if (index > -1) { @@ -7999,7 +8051,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TURTLEPanel tp = tabs.elementAt(index); if (tp instanceof DesignPanel) { - return (DesignPanel)tp; + return (DesignPanel) tp; } else { return null; } @@ -8011,25 +8063,25 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe // return current deployment panel public ADDDiagramPanel getDeploymentPanel() { - ADDDiagramPanel deploymentDiagram = null ; //(ADDDiagramPanel)activetdp; + ADDDiagramPanel deploymentDiagram = null; //(ADDDiagramPanel)activetdp; TURTLEPanel tp = getCurrentTURTLEPanel(); Vector<TDiagramPanel> ps = tp.panels; - for(TDiagramPanel panel : ps ){ - if (panel instanceof ADDDiagramPanel){ - deploymentDiagram = (ADDDiagramPanel)panel; + for (TDiagramPanel panel : ps) { + if (panel instanceof ADDDiagramPanel) { + deploymentDiagram = (ADDDiagramPanel) panel; } } - if(deploymentDiagram == null) + if (deploymentDiagram == null) System.err.println("No ADDDiagramPanel found : MainGUI.getDeploymentPanel()"); return deploymentDiagram; } - public ADDDiagramPanel getFirstAvatarDeploymentPanelFound(){ + public ADDDiagramPanel getFirstAvatarDeploymentPanelFound() { ADDDiagramPanel adp = null; - for(int i =0 ; i<tabs.size();i++) - if(tabs.get(i) instanceof ADDPanel){ - adp = ((ADDPanel)tabs.get(i)).tmladd; + for (int i = 0; i < tabs.size(); i++) + if (tabs.get(i) instanceof ADDPanel) { + adp = ((ADDPanel) tabs.get(i)).tmladd; } if (adp == null) System.err.println("No AvatarDeployment Panel Found : MainGUI.getFirstAvatarDeploymentPanelFound()"); @@ -8039,11 +8091,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe // find the first Design Panel in MainGUI.tabs - public AvatarDesignPanel getFirstAvatarDesignPanelFound(){ + public AvatarDesignPanel getFirstAvatarDesignPanelFound() { AvatarDesignPanel adp = null; - for(int i =0 ; i<tabs.size();i++) - if(tabs.get(i) instanceof AvatarDesignPanel){ - adp = (AvatarDesignPanel)tabs.get(i); + for (int i = 0; i < tabs.size(); i++) + if (tabs.get(i) instanceof AvatarDesignPanel) { + adp = (AvatarDesignPanel) tabs.get(i); } if (adp == null) System.err.println("No AvatarDesign Panel Found : MainGUI.getFirstAvatarDesignPanel()"); @@ -8051,18 +8103,20 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - public void extracDeploymentDiagramToFile(){ + public void extracDeploymentDiagramToFile() { ADDDiagramPanel deploymentDiagramPanel = getDeploymentPanel(); AvatarDesignPanel designDiagramPanel = getFirstAvatarDesignPanelFound(); AvatarDeploymentPanelTranslator avdeploymenttranslator = new AvatarDeploymentPanelTranslator(deploymentDiagramPanel); - /*AvatarddSpecification avddspec =*/ avdeploymenttranslator.getAvatarddSpecification(); + /*AvatarddSpecification avddspec =*/ + avdeploymenttranslator.getAvatarddSpecification(); - AvatarDesignPanelTranslator avdesigntranslator = new AvatarDesignPanelTranslator( designDiagramPanel); - List<AvatarBDStateMachineOwner> adp = designDiagramPanel.getAvatarBDPanel().getFullStateMachineOwnerList(); - /*AvatarSpecification avaspec =*/ avdesigntranslator.generateAvatarSpecification(adp); + AvatarDesignPanelTranslator avdesigntranslator = new AvatarDesignPanelTranslator(designDiagramPanel); + List<AvatarBDStateMachineOwner> adp = designDiagramPanel.getAvatarBDPanel().getFullStateMachineOwnerList(); + /*AvatarSpecification avaspec =*/ + avdesigntranslator.generateAvatarSpecification(adp); //DG //LinkedList<AvatarComponent> components = AvatarddSpecification.getComponents(); @@ -8071,7 +8125,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe //tofile.extracParamToFile(); } - public void avatarToSoclib(){ + public void avatarToSoclib() { //DG 6.2. appelee nulle part? ADDDiagramPanel deploymentDiagramPanel = getDeploymentPanel(); @@ -8081,19 +8135,19 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe AvatarddSpecification avddspec = avdeploymenttranslator.getAvatarddSpecification(); - AvatarDesignPanelTranslator avdesigntranslator = new AvatarDesignPanelTranslator( designDiagramPanel); + AvatarDesignPanelTranslator avdesigntranslator = new AvatarDesignPanelTranslator(designDiagramPanel); - LinkedList<AvatarBDStateMachineOwner> adp = designDiagramPanel.getAvatarBDPanel().getFullStateMachineOwnerList(); + LinkedList<AvatarBDStateMachineOwner> adp = designDiagramPanel.getAvatarBDPanel().getFullStateMachineOwnerList(); AvatarSpecification avaspec = avdesigntranslator.generateAvatarSpecification(adp); // Generator for block tasks and application main file - TasksAndMainGenerator gene = new TasksAndMainGenerator(avddspec,avaspec); - gene.generateSoclib(false,false); - try{ + TasksAndMainGenerator gene = new TasksAndMainGenerator(avddspec, avaspec); + gene.generateSoclib(false, false); + try { //System.err.println("ok"); gene.saveInFiles(TasksAndMainGenerator.getGeneratedPath()); - }catch(FileException e){ + } catch (FileException e) { System.err.println("FileException : MainGUI.avatarToSoclib()"); } @@ -8103,7 +8157,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public boolean selectMainTab(String id) { TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); if (getTabName(tp).compareTo(id) == 0) { selectTab(tp); @@ -8123,7 +8177,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe int index; TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); index = tp.panels.indexOf(tdp); if (index > -1) { @@ -8135,9 +8189,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleAttributes() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if ((tdp != null) && (tdp instanceof TClassDiagramPanel)){ + if ((tdp != null) && (tdp instanceof TClassDiagramPanel)) { //TraceManager.addDev("Toggle attributes"); - TClassDiagramPanel tdcp = (TClassDiagramPanel)tdp; + TClassDiagramPanel tdcp = (TClassDiagramPanel) tdp; tdcp.setAttributesVisible(!tdcp.areAttributesVisible()); tdcp.checkAllMySize(); tdcp.repaint(); @@ -8163,7 +8217,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void resetAllDIPLOIDs() { TURTLEPanel tp; - for(int i=0; i<tabs.size(); i++) { + for (int i = 0; i < tabs.size(); i++) { tp = tabs.elementAt(i); tp.resetAllDIPLOIDs(); } @@ -8182,7 +8236,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public int isRunningAvatarComponent(TGComponent _tgc) { - if(jfais.isVisible()) { + if (jfais.isVisible()) { if (jfais.isRunningComponent(_tgc)) { return 1; } @@ -8194,7 +8248,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } public String[] hasMessageInformationForAvatarConnector(AvatarBDPortConnector _conn) { - if(jfais.isVisible()) { + if (jfais.isVisible()) { return jfais.getFirstMessagesOnEachConnectorSide(_conn); } return null; @@ -8245,7 +8299,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } - for(RunningInfo ri: runningIDs) { + for (RunningInfo ri : runningIDs) { if (ri.id == id) { return ri; } @@ -8253,7 +8307,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return null; } - public synchronized ArrayList<SimulationTransaction> getTransactions(int id){ + + public synchronized ArrayList<SimulationTransaction> getTransactions(int id) { if (transactionMap == null) { return null; } @@ -8261,10 +8316,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return transactionMap.get(id); } - public synchronized void addLatencyVals(int id, String[] latency){ - if (latencyMap!=null){ + public synchronized void addLatencyVals(int id, String[] latency) { + if (latencyMap != null) { //System.out.println("Adding latency..."); - if (!latencyMap.containsKey(id)){ + if (!latencyMap.containsKey(id)) { ConcurrentHashMap<String, String> map = new ConcurrentHashMap<String, String>(); latencyMap.put(id, map); } @@ -8274,14 +8329,15 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe // System.out.println(latencyMap); } - public synchronized ConcurrentHashMap<String, String> getLatencyVals(int id){ + public synchronized ConcurrentHashMap<String, String> getLatencyVals(int id) { // System.out.println(id + " " + latencyMap); - if (latencyMap!=null){ + if (latencyMap != null) { return latencyMap.get(id); } return null; } - public synchronized ConcurrentHashMap<String,String> getStatus(int id){ + + public synchronized ConcurrentHashMap<String, String> getStatus(int id) { if (statusMap == null) { return null; } @@ -8289,18 +8345,19 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe return statusMap; } - public String getStatus(String s){ - if (statusMap==null){ + public String getStatus(String s) { + if (statusMap == null) { return null; } return statusMap.get(s); } + public synchronized LoadInfo isLoadID(int id) { if (loadIDs == null) { return null; } - for(LoadInfo li: loadIDs) { + for (LoadInfo li : loadIDs) { if (li.id == id) { return li; } @@ -8330,6 +8387,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe tdp.repaint(); } } + public synchronized void resetTransactions() { transactionMap.clear(); TDiagramPanel tdp = getCurrentTDiagramPanel(); @@ -8337,6 +8395,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe tdp.repaint(); } } + public synchronized void resetStatus() { statusMap.clear(); TDiagramPanel tdp = getCurrentTDiagramPanel(); @@ -8354,7 +8413,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe _state = "unknown"; } - for(RunningInfo ri: runningIDs) { + for (RunningInfo ri : runningIDs) { if (ri.id == _id) { ri.state = _state.toLowerCase(); //TraceManager.addDev("Updated state on UML diagram"); @@ -8391,13 +8450,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe tdp.repaint(); } } - public synchronized void addTransaction(int _id, SimulationTransaction st){ - if (transactionMap.containsKey(_id)){ - if (!transactionMap.get(_id).contains(st)){ + + public synchronized void addTransaction(int _id, SimulationTransaction st) { + if (transactionMap.containsKey(_id)) { + if (!transactionMap.get(_id).contains(st)) { transactionMap.get(_id).add(st); } - } - else { + } else { ArrayList<SimulationTransaction> ts = new ArrayList<SimulationTransaction>(); ts.add(st); transactionMap.put(_id, ts); @@ -8408,7 +8467,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } } - public synchronized void addStatus(String task, String stat){ + public synchronized void addStatus(String task, String stat) { statusMap.put(task, stat); TDiagramPanel tdp = getCurrentTDiagramPanel(); if (tdp != null) { @@ -8436,10 +8495,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public synchronized void removeRunningId(Integer id) { if (runningIDs == null) { - return ; + return; } - for(RunningInfo ri: runningIDs) { + for (RunningInfo ri : runningIDs) { if (ri.id == id.intValue()) { runningIDs.remove(ri); //TraceManager.addDev("Running id " + i + " removed"); @@ -8451,10 +8510,10 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public synchronized void removeLoadId(int _id) { if (loadIDs == null) { - return ; + return; } - for(LoadInfo li: loadIDs) { + for (LoadInfo li : loadIDs) { if (li.id == _id) { loadIDs.remove(li); //TraceManager.addDev("Running id " + i + " removed"); @@ -8466,9 +8525,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleGates() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if ((tdp != null) && (tdp instanceof TClassDiagramPanel)){ + if ((tdp != null) && (tdp instanceof TClassDiagramPanel)) { //TraceManager.addDev("Toggle gates"); - TClassDiagramPanel tdcp = (TClassDiagramPanel)tdp; + TClassDiagramPanel tdcp = (TClassDiagramPanel) tdp; tdcp.setGatesVisible(!tdcp.areGatesVisible()); tdcp.checkAllMySize(); tdcp.repaint(); @@ -8478,9 +8537,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleSynchro() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if ((tdp != null) && (tdp instanceof TClassDiagramPanel)){ + if ((tdp != null) && (tdp instanceof TClassDiagramPanel)) { //TraceManager.addDev("Toggle synchro"); - TClassDiagramPanel tdcp = (TClassDiagramPanel)tdp; + TClassDiagramPanel tdcp = (TClassDiagramPanel) tdp; tdcp.setSynchroVisible(!tdcp.areSynchroVisible()); tdcp.checkAllMySize(); tdcp.repaint(); @@ -8490,9 +8549,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleJava() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if ((tdp != null) && (tdp instanceof TActivityDiagramPanel)){ + if ((tdp != null) && (tdp instanceof TActivityDiagramPanel)) { //TraceManager.addDev("Toggle synchro"); - TActivityDiagramPanel tadp = (TActivityDiagramPanel)tdp; + TActivityDiagramPanel tadp = (TActivityDiagramPanel) tdp; tadp.setJavaVisible(!tadp.isJavaVisible()); tadp.checkAllMySize(); tadp.repaint(); @@ -8512,7 +8571,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleAttr() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if (tdp != null){ + if (tdp != null) { //TraceManager.addDev("Toggle attributes"); tdp.setAttributes((tdp.getAttributeState() + 1) % 3); tdp.checkAllMySize(); @@ -8523,9 +8582,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleChannels() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if ((tdp != null) && (tdp instanceof TMLTaskDiagramPanel)){ + if ((tdp != null) && (tdp instanceof TMLTaskDiagramPanel)) { //TraceManager.addDev("Toggle attributes"); - TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel)tdp; + TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel) tdp; tmltdp.setChannelsVisible(!tmltdp.areChannelsVisible()); tmltdp.checkAllMySize(); tmltdp.repaint(); @@ -8535,9 +8594,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleEvents() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if ((tdp != null) && (tdp instanceof TMLTaskDiagramPanel)){ + if ((tdp != null) && (tdp instanceof TMLTaskDiagramPanel)) { //TraceManager.addDev("Toggle attributes"); - TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel)tdp; + TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel) tdp; tmltdp.setEventsVisible(!tmltdp.areEventsVisible()); tmltdp.checkAllMySize(); tmltdp.repaint(); @@ -8547,9 +8606,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe public void toggleRequests() { TDiagramPanel tdp = getCurrentTDiagramPanel(); - if ((tdp != null) && (tdp instanceof TMLTaskDiagramPanel)){ + if ((tdp != null) && (tdp instanceof TMLTaskDiagramPanel)) { //TraceManager.addDev("Toggle attributes"); - TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel)tdp; + TMLTaskDiagramPanel tmltdp = (TMLTaskDiagramPanel) tdp; tmltdp.setRequestsVisible(!tmltdp.areRequestsVisible()); tmltdp.checkAllMySize(); tmltdp.repaint(); @@ -8562,7 +8621,6 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - public void windowClosing(WindowEvent e) { //frame.setVisible(false); quitApplication(); @@ -8601,7 +8659,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe TraceManager.addDev("KEY RELEASED: "); } - public void actionPerformed(ActionEvent evt) { + public void actionPerformed(ActionEvent evt) { String command = evt.getActionCommand(); //TraceManager.addDev("Command:" + command); TDiagramPanel tdp1 = getCurrentTDiagramPanel(); @@ -8615,12 +8673,12 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - private class PopupListener extends MouseAdapter /* popup menus onto tabs */ { + private class PopupListener extends MouseAdapter /* popup menus onto tabs */ { private MainGUI mgui; private JPopupMenu menu; private JMenuItem rename, remove, moveRight, moveLeft, newDesign, newAnalysis, newDeployment, newRequirement/*, newTMLDesign*/, newTMLComponentDesign, newTMLArchi, newProactiveDesign, newTURTLEOSDesign, - newNCDesign, sort, clone, newAttackTree, newFaultTree, newAVATARBD, newAVATARRequirement, newMAD, newTMLCP, newTMLMethodo, newAvatarMethodo, newAVATARDD, newSysmlsecMethodo, newSystemCAMS; + newNCDesign, sort, clone, newAttackTree, newFaultTree, newAVATARBD, newAVATARRequirement, newMAD, newTMLCP, newTMLMethodo, newAvatarMethodo, newAVATARDD, newSysmlsecMethodo, newSystemCAMS; private JMenuItem newAVATARAnalysis; public PopupListener(MainGUI _mgui) { @@ -8633,11 +8691,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe activetdp.tdmm.setSelection(-1, -1); checkForPopup(e); } + public void mouseReleased(MouseEvent e) { if (activetdp != null) activetdp.tdmm.setSelection(-1, -1); checkForPopup(e); } + public void mouseClicked(MouseEvent e) { if (activetdp != null) activetdp.tdmm.setSelection(-1, -1); @@ -8645,7 +8705,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } private void checkForPopup(MouseEvent e) { - if(e.isPopupTrigger()) { + if (e.isPopupTrigger()) { Component c = e.getComponent(); //TraceManager.addDev("e =" + e + " Component=" + c); updateMenu(mgui.getCurrentSelectedIndex()); @@ -8665,13 +8725,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe newDeployment = createMenuItem("New TURTLE Deployment"); newAttackTree = createMenuItem("New Attack Tree"); - newFaultTree = createMenuItem("New Fault Tree"); + newFaultTree = createMenuItem("New Fault Tree"); newRequirement = createMenuItem("New TURTLE Requirement Diagram"); newTMLMethodo = createMenuItem("New DIPLODOCUS Methodology"); - /*newTMLDesign =*/ createMenuItem("New Partitioning - Design"); + /*newTMLDesign =*/ + createMenuItem("New Partitioning - Design"); newTMLComponentDesign = createMenuItem("New Partitioning - Functional view"); newTMLArchi = createMenuItem("New Partitioning - Architecture and Mapping"); newTMLCP = createMenuItem("New Partitioning - Communication Pattern"); @@ -8737,7 +8798,6 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - // Methodologies if (!avatarOnly) { if (systemcOn) { @@ -8775,7 +8835,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe menu.add(newMAD); menu.add(newAVATARRequirement); menu.add(newAttackTree); - menu.add(newFaultTree); + menu.add(newFaultTree); menu.add(newAVATARAnalysis); menu.add(newAVATARBD); if (experimentalOn) { @@ -8786,7 +8846,6 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe } - private JMenuItem createMenuItem(String s) { JMenuItem item = new JMenuItem(s); item.setActionCommand(s); @@ -8827,105 +8886,106 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe private Action listener = new AbstractAction() { - /** - * - */ - private static final long serialVersionUID = -3632935027104753332L; - - @Override - public void actionPerformed(ActionEvent e) { - JMenuItem item = (JMenuItem)e.getSource(); - String ac = item.getActionCommand(); - if(ac.equals("Rename")) { - mgui.requestRenameTab(mainTabbedPane.getSelectedIndex()); - } else if (ac.equals("Remove")) { - mgui.requestRemoveTab(mainTabbedPane.getSelectedIndex()); - } else if (ac.equals("Move to the left")) { - mgui.requestMoveLeftTab(mainTabbedPane.getSelectedIndex()); - } else if (ac.equals("Move to the right")) { - mgui.requestMoveRightTab(mainTabbedPane.getSelectedIndex()); - } else if (ac.equals("Sort")) { - GraphicLib.sortJTabbedPane(mgui.mainTabbedPane, mgui.tabs, 0, mgui.mainTabbedPane.getTabCount()); - mgui.changeMade(null, -1); - } else if (ac.equals("Clone")) { - mgui.cloneTab(mainTabbedPane.getSelectedIndex()); - } else if (ac.equals("New TURTLE Analysis")) { - mgui.newAnalysis(); - } else if (ac.equals("New TURTLE Design")) { - mgui.newDesign(); - } else if (ac.equals("New TURTLE Deployment")) { - mgui.newDeployment(); - } else if (e.getSource() == newAttackTree) { - mgui.newAttackTree(); - } else if (e.getSource() == newFaultTree) { - mgui.newFaultTree(); - } else if (ac.equals("New TURTLE Requirement Diagram")) { - mgui.newRequirement(); - } else if (e.getSource() == newTMLMethodo) { - mgui.newDiplodocusMethodology(); - } else if (e.getSource() == newAvatarMethodo) { - mgui.newAvatarMethodology(); - } else if (e.getSource() == newSysmlsecMethodo) { - mgui.newSysmlsecMethodology(); - } else if (ac.equals("New DIPLODOCUS Design")) { - mgui.newTMLDesign(); - } else if (e.getSource() == newTMLComponentDesign) { - mgui.newTMLComponentDesign(); - } else if (e.getSource() == newTMLCP) { - mgui.newTMLCP(); - } else if (e.getSource() == newTMLArchi) { - mgui.newTMLArchi(); - } else if (ac.equals("New Proactive Design")) { - mgui.newProactiveDesign(); - } else if (ac.equals("New TURTLE-OS Design")) { - mgui.newTURTLEOSDesign(); - } else if (e.getSource() == newNCDesign) { - mgui.newNCDesign(); - } else if (e.getSource() == newAVATARBD) { - mgui.newAvatarBD(); - } else if (e.getSource() == newAVATARDD) { - mgui.newADD(); - } else if (e.getSource() == newAVATARRequirement) { - mgui.newAvatarRequirement(); - } else if (e.getSource() == newMAD) { - mgui.newAvatarMADs(); - } else if (e.getSource() == newAVATARAnalysis) { - mgui.newAvatarAnalysis(); - } else if (e.getSource() == newSystemCAMS) { //ajout CD - mgui.newSystemCAMS(); - } + /** + * + */ + private static final long serialVersionUID = -3632935027104753332L; + + @Override + public void actionPerformed(ActionEvent e) { + JMenuItem item = (JMenuItem) e.getSource(); + String ac = item.getActionCommand(); + if (ac.equals("Rename")) { + mgui.requestRenameTab(mainTabbedPane.getSelectedIndex()); + } else if (ac.equals("Remove")) { + mgui.requestRemoveTab(mainTabbedPane.getSelectedIndex()); + } else if (ac.equals("Move to the left")) { + mgui.requestMoveLeftTab(mainTabbedPane.getSelectedIndex()); + } else if (ac.equals("Move to the right")) { + mgui.requestMoveRightTab(mainTabbedPane.getSelectedIndex()); + } else if (ac.equals("Sort")) { + GraphicLib.sortJTabbedPane(mgui.mainTabbedPane, mgui.tabs, 0, mgui.mainTabbedPane.getTabCount()); + mgui.changeMade(null, -1); + } else if (ac.equals("Clone")) { + mgui.cloneTab(mainTabbedPane.getSelectedIndex()); + } else if (ac.equals("New TURTLE Analysis")) { + mgui.newAnalysis(); + } else if (ac.equals("New TURTLE Design")) { + mgui.newDesign(); + } else if (ac.equals("New TURTLE Deployment")) { + mgui.newDeployment(); + } else if (e.getSource() == newAttackTree) { + mgui.newAttackTree(); + } else if (e.getSource() == newFaultTree) { + mgui.newFaultTree(); + } else if (ac.equals("New TURTLE Requirement Diagram")) { + mgui.newRequirement(); + } else if (e.getSource() == newTMLMethodo) { + mgui.newDiplodocusMethodology(); + } else if (e.getSource() == newAvatarMethodo) { + mgui.newAvatarMethodology(); + } else if (e.getSource() == newSysmlsecMethodo) { + mgui.newSysmlsecMethodology(); + } else if (ac.equals("New DIPLODOCUS Design")) { + mgui.newTMLDesign(); + } else if (e.getSource() == newTMLComponentDesign) { + mgui.newTMLComponentDesign(); + } else if (e.getSource() == newTMLCP) { + mgui.newTMLCP(); + } else if (e.getSource() == newTMLArchi) { + mgui.newTMLArchi(); + } else if (ac.equals("New Proactive Design")) { + mgui.newProactiveDesign(); + } else if (ac.equals("New TURTLE-OS Design")) { + mgui.newTURTLEOSDesign(); + } else if (e.getSource() == newNCDesign) { + mgui.newNCDesign(); + } else if (e.getSource() == newAVATARBD) { + mgui.newAvatarBD(); + } else if (e.getSource() == newAVATARDD) { + mgui.newADD(); + } else if (e.getSource() == newAVATARRequirement) { + mgui.newAvatarRequirement(); + } else if (e.getSource() == newMAD) { + mgui.newAvatarMADs(); + } else if (e.getSource() == newAVATARAnalysis) { + mgui.newAvatarAnalysis(); + } else if (e.getSource() == newSystemCAMS) { //ajout CD + mgui.newSystemCAMS(); } - }; + } + }; } /** * This adapter is constructed to handle mouse over component events. */ - private class MouseHandler extends MouseAdapter { + private class MouseHandler extends MouseAdapter { private JLabel label; /** * ctor for the adapter. + * * @param label the JLabel which will recieve value of the * Action.LONG_DESCRIPTION key. */ - public MouseHandler(JLabel label) { + public MouseHandler(JLabel label) { setLabel(label); } - public void setLabel(JLabel label) { + public void setLabel(JLabel label) { this.label = label; } @Override - public void mouseEntered(MouseEvent evt) { - if (evt.getSource() instanceof AbstractButton) { - AbstractButton button = (AbstractButton)evt.getSource(); + public void mouseEntered(MouseEvent evt) { + if (evt.getSource() instanceof AbstractButton) { + AbstractButton button = (AbstractButton) evt.getSource(); Action action = button.getAction(); - if (action != null) { - String message = (String)action.getValue(Action.LONG_DESCRIPTION); + if (action != null) { + String message = (String) action.getValue(Action.LONG_DESCRIPTION); label.setText(message); } } diff --git a/src/main/java/ui/TGUIAction.java b/src/main/java/ui/TGUIAction.java index 934ce8592b0f712c1f79a91b21f51603892537ff..897f0388a231f5769b8c5907abd071686a164f31 100755 --- a/src/main/java/ui/TGUIAction.java +++ b/src/main/java/ui/TGUIAction.java @@ -688,7 +688,7 @@ public class TGUIAction extends AbstractAction { actions[ACT_NEW_ANALYSIS] = new TAction("new-command-analysis", "New analysis", IconManager.imgic17, IconManager.imgic17, "New analysis", "New TURTLE analysis", 0); actions[ACT_OPEN] = new TAction("open-command","Open", IconManager.imgic22, IconManager.imgic23, "Open", "Open an existing TTool model",'O', true); actions[ACT_OPEN_PROJECT] = new TAction("open-project-command","Open project", IconManager.imgic22, IconManager.imgic23, "Open project", "Open an existing TTool project",'O', true); - actions[ACT_OPEN_FROM_NETWORK] = new TAction("open-command-from-network","Open from TTool repository", IconManager.imgic22, IconManager.imgic23, "Open from TTool repository", "Open an existing TTool model from the TTool repository (TTool website)",'0', true); + actions[ACT_OPEN_FROM_NETWORK] = new TAction("open-command-from-network","Open project from TTool repository", IconManager.imgic22, IconManager.imgic23, "Open project from TTool repository", "Open an existing TTool model from the TTool repository (TTool website)",'0', true); actions[ACT_OPEN_LAST] = new TAction("openlast-command","Open file: " + ConfigurationTTool.LastOpenFile, IconManager.imgic22, IconManager.imgic23, "Open: " + ConfigurationTTool.LastOpenFile, "Open the lastly saved TTool model", 0); actions[ACT_MERGE] = new TAction("merge-command","Merge", IconManager.imgic22, IconManager.imgic23, "Merge", "Merge the current TTool modeling with another one saved in a file ", 0); actions[ACT_SAVE] = new TAction("save-command", "Save",IconManager.imgic24, IconManager.imgic25, "Save", "Save an opened or a new TTool modeling", 'S', true); diff --git a/src/main/java/ui/graph/AUTBlock.java b/src/main/java/ui/graph/AUTBlock.java index b76a1bdb424ea96fa4501d0d0380578bd6b03281..583de0e0c991ef4a4f33029e1492a668b0db1c93 100755 --- a/src/main/java/ui/graph/AUTBlock.java +++ b/src/main/java/ui/graph/AUTBlock.java @@ -66,6 +66,13 @@ public class AUTBlock implements Comparable<AUTBlock> { states.add(_st); } + public int getHashValue() { + if (!hashComputed) { + computeHash(); + } + return hashValue; + } + public String toString() { boolean first = true; diff --git a/src/main/java/ui/graph/AUTGraph.java b/src/main/java/ui/graph/AUTGraph.java index a9a21d252638c2c124306ee7d9d55ebf3e2ba29a..d0a2e458c65eb877019813da76d9efd35205010d 100755 --- a/src/main/java/ui/graph/AUTGraph.java +++ b/src/main/java/ui/graph/AUTGraph.java @@ -37,12 +37,11 @@ */ - - package ui.graph; import myutil.Conversion; -import myutil.*; +import myutil.DijkstraState; +import myutil.GraphAlgorithms; import myutil.TraceManager; import java.io.BufferedReader; @@ -50,14 +49,15 @@ import java.io.StringReader; import java.util.*; /** - * Class AUTGraph - * Creation : 16/09/2004 - ** @version 1.0 16/09/2004 - * @author Ludovic APVRILLE + * Class AUTGraph + * Creation : 16/09/2004 + * * @version 1.0 16/09/2004 + * + * @author Ludovic APVRILLE */ public class AUTGraph implements myutil.Graph { - protected ArrayList<AUTTransition> transitions ; + protected ArrayList<AUTTransition> transitions; protected ArrayList<AUTState> states; protected int nbState; protected BufferedReader br; @@ -68,22 +68,22 @@ public class AUTGraph implements myutil.Graph { protected boolean statesComputed; protected static String STYLE_SHEET = - "node {" + - " fill-color: blue;" + - "} " + - // "edge.defaultedge {" + - // " shape: cubic-curve;" + - // "}" + - // "edge {shape: cubic-curve}" + - "edge.external {" + - " text-style: bold;" + - "} " + - "node.deadlock {" + - " fill-color: green;" + - "} " + - "node.init {" + - " fill-color: red;" + - "} "; + "node {" + + " fill-color: blue;" + + "} " + + // "edge.defaultedge {" + + // " shape: cubic-curve;" + + // "}" + + // "edge {shape: cubic-curve}" + + "edge.external {" + + " text-style: bold;" + + "} " + + "node.deadlock {" + + " fill-color: green;" + + "} " + + "node.init {" + + " fill-color: red;" + + "} "; public AUTGraph() { transitions = new ArrayList<AUTTransition>(); @@ -123,7 +123,7 @@ public class AUTGraph implements myutil.Graph { /* read header */ //System.out.println("Building graph"); try { - while((s = br.readLine()) != null) { + while ((s = br.readLine()) != null) { index1 = s.indexOf("des"); //System.out.println("Searching for des"); if (index1 == 0) { @@ -158,19 +158,19 @@ public class AUTGraph implements myutil.Graph { /* read transitions */ try { cpt = 0; - mod = Math.max(1, (int)(nbTransition / 100)); + mod = Math.max(1, (int) (nbTransition / 100)); - while((s = br.readLine()) != null) { + while ((s = br.readLine()) != null) { //System.out.println("realine:" + s); array = AUTGraph.decodeLine(s); at = new AUTTransition(array[0], array[1], array[2]); transitions.add(at); hasExitTransition[at.origin] = true; hasEntryTransition[at.destination] = true; - cpt ++; + cpt++; if ((cpt % mod) == 0) { - percentage = (int)((cpt *100) / nbTransition); + percentage = (int) ((cpt * 100) / nbTransition); //System.out.println("percentage=" + percentage + "cpt=" + cpt + "nbTransition=" + nbTransition); } } @@ -186,8 +186,8 @@ public class AUTGraph implements myutil.Graph { index1 = s.indexOf("("); index2 = s.indexOf(","); - s1 = s.substring(index1+1, index2); - s = s.substring(index2 +1, s.length()); + s1 = s.substring(index1 + 1, index2); + s = s.substring(index2 + 1, s.length()); s = Conversion.removeFirstSpaces(s); // for of the action @@ -199,7 +199,7 @@ public class AUTGraph implements myutil.Graph { index1 = s.indexOf("\""); if (index1 > -1) { //System.out.println("Guillemets on " + s); - s2 = s.substring(index1+1, s.length()); + s2 = s.substring(index1 + 1, s.length()); s2 = s2.substring(0, s2.indexOf("\"")); //System.out.println("Guillemets on " + s2); /*index2 = s2.indexOf("("); @@ -212,7 +212,7 @@ public class AUTGraph implements myutil.Graph { //System.out.println("No Guillemets on " + s); index1 = s.indexOf(","); if ((index2 = s.indexOf("(")) >= 0) { - s2 = s.substring(index2+1, index1-2); + s2 = s.substring(index2 + 1, index1 - 2); } else { if ((index2 = s.indexOf("\"t\"")) >= 0) { s2 = "t"; @@ -227,11 +227,11 @@ public class AUTGraph implements myutil.Graph { index1 = s.indexOf(","); //index2 = s.indexOf(")"); //s2 = s.substring(0, index1-1); - s3 = s.substring(index1+1, s.length()-1); + s3 = s.substring(index1 + 1, s.length() - 1); s3 = Conversion.removeFirstSpaces(s3); //System.out.println("s1=" + s1 + " s2=" + s2 + " s3=" + s3); - String []array = new String[3]; + String[] array = new String[3]; array[0] = s1; array[1] = s2; array[2] = s3; @@ -269,18 +269,17 @@ public class AUTGraph implements myutil.Graph { } public void addState(AUTState _st) { - states.add(_st); + states.add(_st); } - - public int getNbPotentialDeadlocks(){ + public int getNbPotentialDeadlocks() { int nb = 0; - for(int i=0; i<nbState; i++) { + for (int i = 0; i < nbState; i++) { if (hasEntryTransition(i)) { if (!hasExitTransition(i)) { - nb ++; + nb++; } } } @@ -290,8 +289,8 @@ public class AUTGraph implements myutil.Graph { public String getActionTransition(int origin, int destination) { - for(AUTTransition aut1 : transitions) { - if ((aut1.origin == origin) && (aut1.destination == destination)){ + for (AUTTransition aut1 : transitions) { + if ((aut1.origin == origin) && (aut1.destination == destination)) { return aut1.transition; } } @@ -318,8 +317,8 @@ public class AUTGraph implements myutil.Graph { } - for(AUTTransition aut1 : transitions) { - if ((aut1.origin == state) && (aut1.destination == destination)){ + for (AUTTransition aut1 : transitions) { + if ((aut1.origin == state) && (aut1.destination == destination)) { return true; } } @@ -336,11 +335,11 @@ public class AUTGraph implements myutil.Graph { int[] states = new int[nbPotentialDeadlock]; int index = 0; - for(int i=0; i<nbState; i++) { + for (int i = 0; i < nbState; i++) { if (hasEntryTransition(i)) { if (!hasExitTransition(i)) { states[index] = i; - index ++; + index++; } } } @@ -348,15 +347,15 @@ public class AUTGraph implements myutil.Graph { return states; } - public int [] shortestPathTo(int fromState, int targetState) { + public int[] shortestPathTo(int fromState, int targetState) { return GraphAlgorithms.ShortestPathFrom(this, fromState)[targetState].path; } public boolean hasTransitionWithAction(String action) { - for(AUTTransition aut1 : transitions) { - if (aut1.transition.compareTo(action) == 0){ + for (AUTTransition aut1 : transitions) { + if (aut1.transition.compareTo(action) == 0) { return true; } } @@ -380,8 +379,8 @@ public class AUTGraph implements myutil.Graph { public String toAUTStringFormat() { StringBuffer graph = new StringBuffer(""); - graph.append("des(0," + nbTransition + "," + nbState + ")\n"); - for(AUTTransition aut1 : transitions) { + graph.append("des(0," + nbTransition + "," + nbState + ")\n"); + for (AUTTransition aut1 : transitions) { graph.append("(" + aut1.origin + ",\"" + aut1.transition + "\"," + aut1.destination + ")\n"); } return graph.toString(); @@ -390,11 +389,11 @@ public class AUTGraph implements myutil.Graph { public String toFullString() { StringBuffer graph = new StringBuffer("Transitions:"); - for(AUTTransition aut1 : transitions) { + for (AUTTransition aut1 : transitions) { graph.append(aut1.toString()); } graph.append("\nstates:\n"); - for(AUTState str: states) { + for (AUTState str : states) { graph.append(str.toString()); } return graph.toString(); @@ -405,12 +404,12 @@ public class AUTGraph implements myutil.Graph { if (!statesComputed) { states = new ArrayList<AUTState>(nbState); AUTState state; - for(int i=0; i<nbState; i++) { + for (int i = 0; i < nbState; i++) { state = new AUTState(i); states.add(state); } - for(AUTTransition aut1 : transitions) { + for (AUTTransition aut1 : transitions) { states.get(aut1.origin).addOutTransition(aut1); states.get(aut1.destination).addInTransition(aut1); } @@ -434,7 +433,7 @@ public class AUTGraph implements myutil.Graph { public HashSet<String> getAllActions() { HashSet<String> hs = new HashSet<String>(); - for(AUTTransition tr: transitions) { + for (AUTTransition tr : transitions) { hs.add(tr.transition); } return hs; @@ -442,7 +441,7 @@ public class AUTGraph implements myutil.Graph { public void reinitMet() { - for(AUTState state: states) { + for (AUTState state : states) { state.met = false; } } @@ -450,7 +449,7 @@ public class AUTGraph implements myutil.Graph { public AUTState findFirstOriginState() { AUTState state; - for(int i=0; i<states.size(); i++) { + for (int i = 0; i < states.size(); i++) { state = states.get(i); //System.out.println("id=" + state.id + " transitions to me = " +state.inTransitions.size()); if (state.inTransitions.size() == 0) { @@ -464,13 +463,13 @@ public class AUTGraph implements myutil.Graph { public void putTransitionsFromInitFirst() { ArrayList<AUTTransition> tmp = new ArrayList<AUTTransition>(); - for(AUTTransition aut1 : transitions) { + for (AUTTransition aut1 : transitions) { if (aut1.origin == 0) { tmp.add(aut1); } } - for(AUTTransition aut2 : tmp) { + for (AUTTransition aut2 : tmp) { transitions.remove(aut2); transitions.add(0, aut2); } @@ -489,7 +488,7 @@ public class AUTGraph implements myutil.Graph { public AUTGraph cloneMe() { AUTGraph newGraph = new AUTGraph(); newGraph.setNbOfStates(getNbOfStates()); - for(AUTTransition tr: transitions) { + for (AUTTransition tr : transitions) { AUTTransition newTr = new AUTTransition(tr.origin, tr.transition, tr.destination); newGraph.addTransition(newTr); } @@ -502,12 +501,12 @@ public class AUTGraph implements myutil.Graph { String s = "tau"; // mark all transitions as non tau - for(AUTTransition tr: transitions) { + for (AUTTransition tr : transitions) { tr.isTau = false; } // Mark all tau transitions as tau - for(AUTTransition tr: transitions) { + for (AUTTransition tr : transitions) { if (tr.transition.startsWith("i(")) { tr.isTau = true; @@ -520,17 +519,17 @@ public class AUTGraph implements myutil.Graph { } - public void minimize(String [] tauTransitions, boolean tauOnly) { + public void minimize(String[] tauTransitions, boolean tauOnly) { String s = "tau"; // mark all transitions as non tau - for(AUTTransition tr: transitions) { + for (AUTTransition tr : transitions) { tr.isTau = false; } // Mark all tau transitions as tau - for(AUTTransition tr: transitions) { - for (int i=0; i<tauTransitions.length; i++) { + for (AUTTransition tr : transitions) { + for (int i = 0; i < tauTransitions.length; i++) { if (tr.transition.compareTo(tauTransitions[i]) == 0) { tr.isTau = true; tr.transition = s; @@ -562,7 +561,7 @@ public class AUTGraph implements myutil.Graph { AUTTransition tr; ArrayList<AUTState> toRemoveStates = new ArrayList<AUTState>(); // Remove in case state with one outgoing and outgoing is tau -> remove tr - for(AUTState st: states) { + for (AUTState st : states) { if (st.outTransitions.size() == 1) { tr = st.outTransitions.get(0); if (tr.isTau) { @@ -577,7 +576,7 @@ public class AUTGraph implements myutil.Graph { // Must put all incoming transition to the first state st1.inTransitions.remove(tr); - for(AUTTransition trM: st1.inTransitions) { + for (AUTTransition trM : st1.inTransitions) { trM.destination = st.id; st.inTransitions.add(trM); //TraceManager.addDev("New in transitions " + trM); @@ -586,7 +585,7 @@ public class AUTGraph implements myutil.Graph { // Out transitions st.outTransitions.clear(); - for(AUTTransition trM: st1.outTransitions) { + for (AUTTransition trM : st1.outTransitions) { st.outTransitions.add(trM); trM.origin = st.id; //TraceManager.addDev("New out transitions " + trM); @@ -613,11 +612,11 @@ public class AUTGraph implements myutil.Graph { AUTTransition tr1, tr2, trtmp; AUTState st1, st2, sttmp; ArrayList<AUTState> toRemoveStates = new ArrayList<AUTState>(); - AUTTransition [] ret; + AUTTransition[] ret; boolean modif = false; // Remove in case state with one outgoing and outgoing is tau -> remove transition - for(AUTState st: states) { + for (AUTState st : states) { ret = st.getAtLeastTwoOutTauTransitions(); if (ret != null) { tr1 = ret[0]; @@ -643,7 +642,7 @@ public class AUTGraph implements myutil.Graph { st.outTransitions.remove(tr2); // All transitions leaving st2 must now leave from st1 as well - for (AUTTransition trf: st2.outTransitions) { + for (AUTTransition trf : st2.outTransitions) { trf.origin = st1.id; st1.outTransitions.add(trf); } @@ -659,7 +658,6 @@ public class AUTGraph implements myutil.Graph { } - return modif; } @@ -671,7 +669,7 @@ public class AUTGraph implements myutil.Graph { boolean modif = false; // Remove stgate in case state with one outgoing and outgoing is tau - for(AUTState st: states) { + for (AUTState st : states) { if (st.hasOneIncomingTauAndOneFollower()) { //We can remove the previous tau transaction, and the current state tr1 = st.inTransitions.get(0); @@ -696,7 +694,6 @@ public class AUTGraph implements myutil.Graph { } - return modif; } @@ -705,14 +702,14 @@ public class AUTGraph implements myutil.Graph { boolean modif = false; // Remove tr if it is duplicated - for(AUTState st: states) { + for (AUTState st : states) { // May modify the outTransitions list, and result in exception. // The try .. catch clause protects from this try { if (st.outTransitions.size() > 1) { - for(int i=0; i<st.outTransitions.size(); i++) { - for(int j=i+1; j<st.outTransitions.size(); j++) { + for (int i = 0; i < st.outTransitions.size(); i++) { + for (int j = i + 1; j < st.outTransitions.size(); j++) { AUTTransition tri = st.outTransitions.get(i); AUTTransition trj = st.outTransitions.get(j); if (tri.destination == trj.destination) { @@ -730,7 +727,8 @@ public class AUTGraph implements myutil.Graph { } - } catch (Exception e) {} + } catch (Exception e) { + } } return modif; @@ -747,17 +745,17 @@ public class AUTGraph implements myutil.Graph { // Remove all states and adapt the id in the graph //TraceManager.addDev("nbState=" + nbState + " states size = " + states.size()); - for(AUTState str: toRemoveStates) { + for (AUTState str : toRemoveStates) { // We need to remove all transitions of the removed state //TraceManager.addDev("Removing transitions of state:" + str.id + "\n" + toFullString()); - for(AUTTransition trin: str.inTransitions) { + for (AUTTransition trin : str.inTransitions) { transitions.remove(trin); } - for(AUTTransition trout: str.outTransitions) { + for (AUTTransition trout : str.outTransitions) { transitions.remove(trout); } - for(AUTState state: states) { + for (AUTState state : states) { state.removeAllTransitionsWithId(str.id); } @@ -766,18 +764,18 @@ public class AUTGraph implements myutil.Graph { // Last state of the array? if (str.id == (nbState - 1)) { //TraceManager.addDev("Last state " + str.id); - nbState --; + nbState--; states.remove(str.id); // str not at the end: we replace it with the last state // We need to accordingly update - } else { + } else { - AUTState moved = states.get(nbState-1); + AUTState moved = states.get(nbState - 1); //TraceManager.addDev("Moving state " + moved.id + " to index " + str.id); states.set(str.id, moved); - states.remove(nbState-1); - nbState --; + states.remove(nbState - 1); + nbState--; //TraceManager.addDev("nbState=" + nbState + " states size = " + states.size()); /*AUTTransition tt = findTransitionWithId(nbState); if (tt != null) { @@ -800,11 +798,11 @@ public class AUTGraph implements myutil.Graph { boolean modif = false; boolean endState = false; // met is used to specify states that have a tau-path to a termination state - for(AUTState st1: states) { + for (AUTState st1 : states) { st1.met = false; } - for (AUTState st: states) { + for (AUTState st : states) { if ((st.id == 0) || (st.getNbInTransitions() > 0)) { //TraceManager.addDev(" 1. state " + st.id); if (st.hasOutputTauTransition()) { @@ -817,7 +815,7 @@ public class AUTGraph implements myutil.Graph { TraceManager.addDev("\t" + tr); }*/ - //TraceManager.addDev("State " + st.id + " can reach an end state with tau tr only?" + canReachAnEndStateWithTau); + //TraceManager.addDev("State " + st.id + " can reach an end state with tau tr only?" + canReachAnEndStateWithTau); st.met = canReachAnEndStateWithTau; endState = endState || canReachAnEndStateWithTau; } @@ -825,7 +823,7 @@ public class AUTGraph implements myutil.Graph { } // Remove tr if it is duplicated - for(AUTState st: states) { + for (AUTState st : states) { // We ignore states with no input tr apart from the start state (id 0) //TraceManager.addDev("0. state " + st.id); if ((st.id == 0) || (st.getNbInTransitions() > 0)) { @@ -833,7 +831,7 @@ public class AUTGraph implements myutil.Graph { if (st.hasOutputTauTransition()) { //TraceManager.addDev(" 2. state " + st.id); LinkedList<AUTTransition> nonTauTransitions = new LinkedList<AUTTransition>(); - getAllNonTauTransitionsFrom(st, nonTauTransitions); + getAllNonTauTransitionsFrom(st, nonTauTransitions); // Create these transitions in st if not yet existing //TraceManager.addDev("Remove tau\n" + toFullString()); @@ -853,7 +851,7 @@ public class AUTGraph implements myutil.Graph { if (endState) { // We must see if at least one met state has output transitions boolean hasEndState = false; - for(AUTState st: states) { + for (AUTState st : states) { if (st.met) { if (st.outTransitions.size() > 0) { hasEndState = true; @@ -867,10 +865,10 @@ public class AUTGraph implements myutil.Graph { AUTState endSt = new AUTState(newId); states.add(endSt); nbState = states.size(); - for(AUTState st1: states) { + for (AUTState st1 : states) { if (st1.met) { if (st1.outTransitions.size() > 0) { - //TraceManager.addDev("Adding an end tau to state " + st1.id); + //TraceManager.addDev("Adding an end tau to state " + st1.id); AUTTransition tr = new AUTTransition(st1.id, "tau", endSt.id); tr.isTau = true; transitions.add(tr); @@ -913,7 +911,7 @@ public class AUTGraph implements myutil.Graph { } boolean ret = false; - for(AUTTransition at: st.outTransitions) { + for (AUTTransition at : st.outTransitions) { if (!(at.isTau)) { nonTauTransitions.add(at); } else { @@ -935,13 +933,13 @@ public class AUTGraph implements myutil.Graph { while (toExplore.size() > 0) { toExploreTmp.clear(); - for(AUTState st: toExplore) { + for (AUTState st : toExplore) { if (!(metStates.contains(st))) { metStates.add(st); if (st.getNbOutTransitions() == 0) { ret = true; } else { - for(AUTTransition at: st.outTransitions) { + for (AUTTransition at : st.outTransitions) { if (!(at.isTau)) { nonTauTransitions.add(at); } else { @@ -961,7 +959,7 @@ public class AUTGraph implements myutil.Graph { } private AUTTransition findTransitionWithId(int id) { - for (AUTTransition tr: transitions) { + for (AUTTransition tr : transitions) { if ((tr.origin == id) || (tr.destination == id)) { return tr; } @@ -972,7 +970,7 @@ public class AUTGraph implements myutil.Graph { private void removeAllNonReachableStates() { // reset met of states - for(AUTState st1: states) { + for (AUTState st1 : states) { st1.met = false; } @@ -982,12 +980,12 @@ public class AUTGraph implements myutil.Graph { LinkedList<AUTState> nextStatesToConsider = new LinkedList<AUTState>(); statesToConsider.add(states.get(0)); - while(statesToConsider.size() > 0) { + while (statesToConsider.size() > 0) { nextStatesToConsider.clear(); - for(AUTState st: statesToConsider) { + for (AUTState st : statesToConsider) { st.met = true; - cpt ++; - for(AUTTransition tr: st.outTransitions) { + cpt++; + for (AUTTransition tr : st.outTransitions) { AUTState s = states.get(tr.destination); if (!(s.met)) { nextStatesToConsider.add(s); @@ -1000,7 +998,7 @@ public class AUTGraph implements myutil.Graph { //TraceManager.addDev("Found " + cpt + " reachable states"); ArrayList<AUTState> toRemoveStates = new ArrayList<AUTState>(); - for(AUTState st2: states) { + for (AUTState st2 : states) { if (!(st2.met)) { toRemoveStates.add(st2); //TraceManager.addDev("Removing state: " + st2.id); @@ -1022,7 +1020,7 @@ public class AUTGraph implements myutil.Graph { hasExitTransition = new boolean[nbState]; hasEntryTransition = new boolean[nbState]; - for(AUTTransition t: transitions) { + for (AUTTransition t : transitions) { hasExitTransition[t.origin] = true; hasEntryTransition[t.destination] = true; } @@ -1033,7 +1031,7 @@ public class AUTGraph implements myutil.Graph { // Create the alphabet HashMap<String, AUTElement> alphabet = new HashMap<String, AUTElement>(); - for(AUTTransition tr: transitions) { + for (AUTTransition tr : transitions) { AUTElement tmp = alphabet.get(tr.transition); if (tmp == null) { AUTElement elt = new AUTElement(tr.transition); @@ -1055,7 +1053,7 @@ public class AUTGraph implements myutil.Graph { // Create the first block that contains all states AUTBlock b0 = new AUTBlock(); - for(AUTState st: states) { + for (AUTState st : states) { b0.addState(st); } b0.computeHash(); @@ -1063,7 +1061,7 @@ public class AUTGraph implements myutil.Graph { AUTBlock b0Test = new AUTBlock(); - for(AUTState st: states) { + for (AUTState st : states) { b0Test.addState(st); } b0Test.computeHash(); @@ -1076,7 +1074,6 @@ public class AUTGraph implements myutil.Graph { } - // Create the first partition containing only block B0 AUTPartition partition = new AUTPartition(); partition.addBlock(b0); @@ -1090,21 +1087,37 @@ public class AUTGraph implements myutil.Graph { //printConfiguration(partition, w); - int maxIte = 1000; + int maxIte = 1000; // With same nb of partitions + int nbOfPartitions = w.size(); + int evolution = 20; + int hashCode = -1; AUTPartition currentP; - while((w.size()>0) && (maxIte >0)) { - maxIte --; + while ((w.size() > 0) && (maxIte > 0) && (evolution > 0)) { + + int newHash = w.getHashCode(); + if (newHash == hashCode) { + break; + } + + if (w.size() == nbOfPartitions) { + evolution--; + } else { + evolution = 20; + } + nbOfPartitions = w.size(); + maxIte--; currentP = w.partitions.get(0); w.partitions.remove(0); + // Simple splitter? if (currentP.blocks.size() == 1) { //TraceManager.addDev("Simple splitter = " + currentP); AUTBlock currentBlock = currentP.blocks.get(0); //List<AUTElement> sortedAlphabet = new ArrayList<AUTElement>(alphabet.values()); //Collections.sort(sortedAlphabet); - for(AUTElement elt: sortedAlphabet) { + for (AUTElement elt : sortedAlphabet) { //TraceManager.addDev("\n*** Considering alphabet element = " + elt.value); //printConfiguration(partition, w); // Look for states of the leading to another state by a = T @@ -1115,7 +1128,7 @@ public class AUTGraph implements myutil.Graph { LinkedList<AUTBlock> I = partition.getI(elt, T_minus1_elt_B); //printI(I); - for(AUTBlock blockX: I) { + for (AUTBlock blockX : I) { AUTBlock blockX1 = blockX.getStateIntersectWith(T_minus1_elt_B); blockX1.computeHash(); AUTBlock blockX2 = blockX.getStateDifferenceWith(T_minus1_elt_B); @@ -1138,7 +1151,7 @@ public class AUTGraph implements myutil.Graph { X_X1_X2.addBlock(blockX1); X_X1_X2.addBlock(blockX2); //TraceManager.addDev("Test concat X1+X2=" + AUTBlock.concat(blockX1, blockX2)); - w.addPartition( X_X1_X2); + w.addPartition(X_X1_X2); //TraceManager.addDev("Modifying P and W:"); //printConfiguration(partition, w); //TraceManager.addDev("-----------------\n"); @@ -1152,7 +1165,7 @@ public class AUTGraph implements myutil.Graph { } // Compound splitter - else if (currentP.blocks.size() == 3){ + else if (currentP.blocks.size() == 3) { //TraceManager.addDev("Complexe splitter (b, bi, bii) =" + currentP); AUTBlock b = currentP.blocks.get(0); AUTBlock bi = currentP.blocks.get(1); @@ -1165,14 +1178,14 @@ public class AUTGraph implements myutil.Graph { //TraceManager.addDev("B= " + b + " bi=" + bi + " bii=" + bii); - for(AUTElement elt: sortedAlphabet) { + for (AUTElement elt : sortedAlphabet) { //TraceManager.addDev("\n*** Considering alphabet element = " + elt.value); //printConfiguration(partition, w); AUTBlock T_minus1_elt_B = b.getMinus1(elt, states); //TraceManager.addDev("T_minus1_elt_B=" + T_minus1_elt_B); LinkedList<AUTBlock> I = partition.getI(elt, T_minus1_elt_B); //printI(I); - for(AUTBlock blockX: I) { + for (AUTBlock blockX : I) { // Compute block X1 = set of states in blockX that goes to Bi, but not to Bii // with current action AUTBlock blockX1 = new AUTBlock(); @@ -1185,7 +1198,7 @@ public class AUTGraph implements myutil.Graph { // with current action boolean b1, b2; AUTBlock blockX3 = new AUTBlock(); - for(AUTState st: blockX.states) { + for (AUTState st : blockX.states) { b1 = blockX.leadsTo(bi, elt); b2 = blockX.leadsTo(bii, elt); if (b1 && !b2) { @@ -1201,7 +1214,7 @@ public class AUTGraph implements myutil.Graph { if ((blockX.compareTo(blockX1) == 0) || (blockX.compareTo(blockX2) == 0) || (blockX.compareTo(blockX2) == 0)) { // do nothing //TraceManager.addDev("Identical blocks! X"); - } else { + } else { //TraceManager.addDev("Non Identical blocks! X"); // Modifying partition partition.removeBlock(blockX); @@ -1253,7 +1266,7 @@ public class AUTGraph implements myutil.Graph { } } - //TraceManager.addDev("\nAll done:\n---------"); + TraceManager.addDev("\nAll done: it: " + maxIte + "\n---------"); //printConfiguration(partition, w); //TraceManager.addDev("------------------"); @@ -1271,14 +1284,14 @@ public class AUTGraph implements myutil.Graph { int stID = 1; // We create one state per block // We look to the block that contains state 0 and we create the state id = 0 - for(AUTBlock bl: partition.blocks) { + for (AUTBlock bl : partition.blocks) { if (bl.hasState(0)) { AUTState st0 = new AUTState(0); blockToNewStates.put(bl, st0); sts.add(0, st0); } else { AUTState st = new AUTState(stID); - stID ++; + stID++; blockToNewStates.put(bl, st); sts.add(st); } @@ -1287,16 +1300,16 @@ public class AUTGraph implements myutil.Graph { // We now need to create the transitions // We parse all states in blocks, and consider their transition // We look for the destination and create a transition accordingly - for(AUTBlock bl: partition.blocks) { - AUTState newOrigin = blockToNewStates.get(bl); - for(AUTState src: bl.states) { - for(AUTTransition tr: src.outTransitions) { + for (AUTBlock bl : partition.blocks) { + AUTState newOrigin = blockToNewStates.get(bl); + for (AUTState src : bl.states) { + for (AUTTransition tr : src.outTransitions) { AUTState newDestination = blockToNewStates.get(partition.getBlockWithState(tr.destination)); boolean foundSimilar = false; AUTTransition newT = new AUTTransition(newOrigin.id, tr.transition, newDestination.id); newT.elt = tr.elt; - for(AUTTransition testT: trs) { + for (AUTTransition testT : trs) { if (testT.compareTo(newT) == 0) { foundSimilar = true; break; @@ -1321,111 +1334,109 @@ public class AUTGraph implements myutil.Graph { public AUTGraph generateRefusalGraph() { - computeStates(); - - AUTState currentState = new AUTState(0); - ArrayList<AUTState> newStates = new ArrayList<AUTState>(); - ArrayList<AUTTransition> newTransitions = new ArrayList<AUTTransition>(); - newStates.add(currentState); - - // We go thru the graph, starting at state1. Each time we meet an already handled state, we stop. - HashSet<AUTState> metStates = new HashSet<AUTState>(); // in origin Graph - HashMap<AUTState, AUTState> toRefusalState = new HashMap<AUTState, AUTState>(); - LinkedList<AUTState> toHandle = new LinkedList<AUTState>(); - toHandle.add(states.get(0)); - toRefusalState.put(states.get(0), currentState); - - while(toHandle.size() > 0) { - AUTState current = toHandle.get(0); - toHandle.remove(0); - metStates.add(current); - AUTState currentRefusal = toRefusalState.get(current); - if (currentRefusal == null) { - TraceManager.addDev("NULL current Refusal"); - } else { - // For each possible transition, we create a new transition to a new destination state - for(AUTTransition tr: current.outTransitions) { - // Create new transition. Is a new staqte necessary? - AUTState destState = states.get(tr.destination); - AUTState stRefusal; - stRefusal = new AUTState(newStates.size()); - newStates.add(stRefusal); - toRefusalState.put(destState, stRefusal); - AUTTransition trRefusal = new AUTTransition(current.id, tr.transition, stRefusal.id); - newTransitions.add(trRefusal); - stRefusal.addInTransition(trRefusal); - currentRefusal.addOutTransition(trRefusal); - - if (!metStates.contains(destState)) { - if (!(toHandle.contains(destState))) { - toHandle.add(destState); - } - } - - } - } - } - AUTGraph refusalGraph = new AUTGraph(newStates, newTransitions); - - return refusalGraph; - } + computeStates(); + + AUTState currentState = new AUTState(0); + ArrayList<AUTState> newStates = new ArrayList<AUTState>(); + ArrayList<AUTTransition> newTransitions = new ArrayList<AUTTransition>(); + newStates.add(currentState); + + // We go thru the graph, starting at state1. Each time we meet an already handled state, we stop. + HashSet<AUTState> metStates = new HashSet<AUTState>(); // in origin Graph + HashMap<AUTState, AUTState> toRefusalState = new HashMap<AUTState, AUTState>(); + LinkedList<AUTState> toHandle = new LinkedList<AUTState>(); + toHandle.add(states.get(0)); + toRefusalState.put(states.get(0), currentState); + + while (toHandle.size() > 0) { + AUTState current = toHandle.get(0); + toHandle.remove(0); + metStates.add(current); + AUTState currentRefusal = toRefusalState.get(current); + if (currentRefusal == null) { + //TraceManager.addDev("NULL current Refusal"); + } else { + // For each possible transition, we create a new transition to a new destination state + for (AUTTransition tr : current.outTransitions) { + // Create new transition. Is a new staqte necessary? + AUTState destState = states.get(tr.destination); + AUTState stRefusal; + stRefusal = new AUTState(newStates.size()); + newStates.add(stRefusal); + toRefusalState.put(destState, stRefusal); + AUTTransition trRefusal = new AUTTransition(current.id, tr.transition, stRefusal.id); + newTransitions.add(trRefusal); + stRefusal.addInTransition(trRefusal); + currentRefusal.addOutTransition(trRefusal); + + if (!metStates.contains(destState)) { + if (!(toHandle.contains(destState))) { + toHandle.add(destState); + } + } + } + } + } + AUTGraph refusalGraph = new AUTGraph(newStates, newTransitions); + + return refusalGraph; + } public AUTGraph makeTestSequencesFromRefusalGraph() { - ArrayList<AUTState> newStates = new ArrayList<AUTState>(); - ArrayList<AUTTransition> newTransitions = new ArrayList<AUTTransition>(); - AUTState firstState = new AUTState(0); - newStates.add(firstState); - - // Take all termination states of the refusal graph and get the shortest path - // from the first state to this termination state - // Add this path as a new path of the new graph - - computeStates(); - - DijkstraState[] allPaths = GraphAlgorithms.ShortestPathFrom(this, 0); - - for(AUTState state: states) { - if (state.isTerminationState()) { - int[] path = allPaths[state.id].path; - if (path != null) { - AUTState currentStateN = firstState; - // We create a corresponding path in the new graph. - String s = ""; - for(int j=0; j<path.length; j++) { - s += path[j] + " "; - } - TraceManager.addDev("path=" + s); - for(int i=1; i<path.length; i++) { - AUTState currentState = states.get(path[i-1]); - AUTState nextState = states.get(path[i]); - - AUTTransition tr = currentState.getTransitionTo(nextState.id); - TraceManager.addDev("Looking for transition"); - if (tr != null) { - // We need to create the destination state - AUTState newDest = new AUTState(newStates.size()); - newStates.add(newDest); - AUTTransition newTr = new AUTTransition(currentStateN.id, tr.transition, newDest.id); - newTransitions.add(newTr); - TraceManager.addDev("Adding transition:" + newTr); - currentStateN = newDest; - } else { - TraceManager.addDev(" -> null transitions"); - } - } - } - } - } - - - - // Making the graph - AUTGraph testGraph = new AUTGraph(newStates, newTransitions); - - return testGraph; - + ArrayList<AUTState> newStates = new ArrayList<AUTState>(); + ArrayList<AUTTransition> newTransitions = new ArrayList<AUTTransition>(); + AUTState firstState = new AUTState(0); + newStates.add(firstState); + + // Take all termination states of the refusal graph and get the shortest path + // from the first state to this termination state + // Add this path as a new path of the new graph + + computeStates(); + + DijkstraState[] allPaths = GraphAlgorithms.ShortestPathFrom(this, 0); + + for (AUTState state : states) { + if (state.isTerminationState()) { + int[] path = allPaths[state.id].path; + if (path != null) { + AUTState currentStateN = firstState; + // We create a corresponding path in the new graph. + String s = ""; + for (int j = 0; j < path.length; j++) { + s += path[j] + " "; + } + //TraceManager.addDev("path=" + s); + for (int i = 1; i < path.length; i++) { + AUTState currentState = states.get(path[i - 1]); + AUTState nextState = states.get(path[i]); + + AUTTransition tr = currentState.getTransitionTo(nextState.id); + //TraceManager.addDev("Looking for transition"); + if (tr != null) { + // We need to create the destination state + AUTState newDest = new AUTState(newStates.size()); + newStates.add(newDest); + AUTTransition newTr = new AUTTransition(currentStateN.id, tr.transition, newDest.id); + newTransitions.add(newTr); + //TraceManager.addDev("Adding transition:" + newTr); + currentStateN = newDest; + } else { + //TraceManager.addDev(" -> null transitions"); + } + } + } + } + } + + + // Making the graph + AUTGraph testGraph = new AUTGraph(newStates, newTransitions); + + return testGraph; + } @@ -1436,7 +1447,7 @@ public class AUTGraph implements myutil.Graph { private void printI(LinkedList<AUTBlock> I) { StringBuffer sb = new StringBuffer("I:"); - for(AUTBlock b: I) { + for (AUTBlock b : I) { sb.append(" " + b); } TraceManager.addDev(sb.toString()); @@ -1444,6 +1455,4 @@ public class AUTGraph implements myutil.Graph { } - - } diff --git a/src/main/java/ui/graph/AUTGraphDisplay.java b/src/main/java/ui/graph/AUTGraphDisplay.java index ddaf61d08fc05aff7306e9723cb1c1fa6000cc90..3881d604d8ea548903c1f0f8c7dfd1ad4e769133 100755 --- a/src/main/java/ui/graph/AUTGraphDisplay.java +++ b/src/main/java/ui/graph/AUTGraphDisplay.java @@ -37,39 +37,41 @@ */ - - package ui.graph; +import common.SpecConfigTTool; import myutil.TraceManager; -import org.graphstream.graph.implementations.*; +import org.graphstream.graph.implementations.AbstractEdge; import org.graphstream.graph.implementations.MultiGraph; -import org.graphstream.ui.view.*; +import org.graphstream.graph.implementations.MultiNode; import org.graphstream.ui.view.Viewer; -import common.ConfigurationTTool; -import common.SpecConfigTTool; -import ui.util.IconManager; +import org.graphstream.ui.view.ViewerListener; +import org.graphstream.ui.view.ViewerPipe; import ui.file.PNGFilter; +import ui.util.IconManager; +import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.awt.image.BufferedImage; import java.io.File; import java.util.ArrayList; import java.util.logging.Logger; /** - * Class AUTGraphDisplay - * Creation : 01/12/2016 - ** @version 1.0 01/12/2016 - * @author Ludovic APVRILLE + * Class AUTGraphDisplay + * Creation : 01/12/2016 + * * @version 1.0 01/12/2016 + * + * @author Ludovic APVRILLE */ -public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable { - +public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable { + protected AUTGraph graph; protected Viewer viewer; protected MultiGraph vGraph; @@ -77,50 +79,51 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable protected MultiNode firstNode; protected ArrayList<AbstractEdge> edges; protected boolean exitOnClose = false; - + public static String STYLE_SHEET = - "node {" + - " fill-color: #B1CAF1; text-color: black; size: 11px, 11px;" + - "} " + - // "edge.defaultedge {" + - // " shape: cubic-curve;" + - // "}" + - // "edge {shape: cubic-curve}" + - "edge.external {" + - " text-style: bold;" + - "} " + - "node.deadlock {" + - " fill-color: red; text-color: white; size: 15px, 15px;" + - - "} " + - "node.init {" + - " fill-color: green; text-color: black; size: 15px, 15px;" + - "} "; - + "node {" + + " fill-color: #B1CAF1; text-color: black; size: 11px, 11px;" + + "} " + + // "edge.defaultedge {" + + // " shape: cubic-curve;" + + // "}" + + // "edge {shape: cubic-curve}" + + "edge.external {" + + " text-style: bold;" + + "} " + + "node.deadlock {" + + " fill-color: red; text-color: white; size: 15px, 15px;" + + + "} " + + "node.init {" + + " fill-color: green; text-color: black; size: 15px, 15px;" + + "} "; + public AUTGraphDisplay(AUTGraph _graph, boolean _exitOnClose) { graph = _graph; - exitOnClose = _exitOnClose; + exitOnClose = _exitOnClose; } - + public void display() { MultiNode node; AbstractEdge edge; - Logger l0 = Logger.getLogger(""); - try { - if (l0 != null) { - l0.removeHandler(l0.getHandlers()[0]); - } - } catch (Exception e) {} - + Logger l0 = Logger.getLogger(""); + try { + if (l0 != null) { + l0.removeHandler(l0.getHandlers()[0]); + } + } catch (Exception e) { + } + System.setProperty("org.graphstream.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer"); - + vGraph = new MultiGraph("TTool graph"); vGraph.addAttribute("ui.stylesheet", STYLE_SHEET); int cpt = 0; - graph.computeStates(); - for(AUTState state: graph.getStates()) { + graph.computeStates(); + for (AUTState state : graph.getStates()) { node = vGraph.addNode("" + state.id); node.addAttribute("ui.label", "" + state.id); if (state.getNbOutTransitions() == 0) { @@ -130,12 +133,12 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable node.addAttribute("ui.class", "init"); firstNode = node; } - cpt ++; + cpt++; } cpt = 0; edges = new ArrayList<AbstractEdge>(graph.getTransitions().size()); - for(AUTTransition transition: graph.getTransitions()) { - edge = vGraph.addEdge(""+cpt, ""+transition.origin, ""+transition.destination, true); + for (AUTTransition transition : graph.getTransitions()) { + edge = vGraph.addEdge("" + cpt, "" + transition.origin, "" + transition.destination, true); /*TraceManager.addDev("Transition=" + transition.transition); String tmp = Conversion.replaceAllChar(transition.transition, '(', "$"); tmp = Conversion.replaceAllChar(tmp, ')', "$"); @@ -146,150 +149,147 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable edge.addAttribute("ui.class", "external"); } edges.add(edge); - cpt ++; + cpt++; } //viewer = vGraph.display(); //viewer = new Viewer(vGraph, Viewer.ThreadingModel.GRAPH_IN_SWING_THREAD); - - viewer = new Viewer(vGraph, Viewer.ThreadingModel.GRAPH_IN_ANOTHER_THREAD); + + viewer = new Viewer(vGraph, Viewer.ThreadingModel.GRAPH_IN_ANOTHER_THREAD); //SwingUtilities.invokeLater(new InitializeApplication(viewer, vGraph)); viewer.enableAutoLayout(); //View vi = viewer.addDefaultView(true); - + viewer.setCloseFramePolicy(Viewer.CloseFramePolicy.CLOSE_VIEWER); BasicFrame bf = new BasicFrame(this, viewer, vGraph, graph, edges, exitOnClose); - + //vi.addMouseListener(this); - - - + + loop = true; - + Thread t = new Thread(this); t.start(); - + } - - - + + public void run() { ViewerPipe fromViewer = viewer.newViewerPipe(); fromViewer.addViewerListener(this); fromViewer.addSink(vGraph); - + // Then we need a loop to do our work and to wait for events. // In this loop we will need to call the // pump() method before each use of the graph to copy back events // that have already occurred in the viewer thread inside // our thread - + int cpt = 0; //TraceManager.addDev("Starting loop:" + cpt); - while(loop) { + while (loop) { try { //TraceManager.addDev("beg of loop:" + cpt); fromViewer.blockingPump(); // or fromViewer.blockingPump(); in the nightly builds } catch (Exception e) {//TraceManager.addDev("Exception in pump:" + e); - } - + } + if (vGraph.hasAttribute("ui.viewClosed")) { TraceManager.addDev("View was closed"); loop = false; - if (exitOnClose) { - System.exit(1); - } + if (exitOnClose) { + System.exit(1); + } } /*else if (firstNode.hasAttribute("ui.clicked")) { TraceManager.addDev("Init node was clicked"); firstNode.removeAttribute("ui.clicked"); }*/ - + // here your simulation code. //TraceManager.addDev("End of loop" + cpt); //cpt ++; - + // You do not necessarily need to use a loop, this is only an example. // as long as you call pump() before using the graph. pump() is non // blocking. If you only use the loop to look at event, use blockingPump() // to avoid 100% CPU usage. The blockingPump() method is only available from // the nightly builds. } - //viewPipe = null; + //viewPipe = null; } - - + + public void buttonPushed(String id) { - TraceManager.addDev("Button pushed on node "+id); + TraceManager.addDev("Button pushed on node " + id); } - + public void buttonReleased(String id) { - TraceManager.addDev("Button released on node "+id); + TraceManager.addDev("Button released on node " + id); } - + public void viewClosed(String id) { TraceManager.addDev("View closed and closed !"); loop = false; - if (viewer != null) { - viewer.close(); - viewer.disableAutoLayout(); - } - viewer = null; - vGraph.clear(); - if (exitOnClose) { - System.exit(1); - } + if (viewer != null) { + viewer.close(); + viewer.disableAutoLayout(); + } + viewer = null; + vGraph.clear(); + if (exitOnClose) { + System.exit(1); + } } - - - + + public void displaySwing() { - vGraph = new MultiGraph("mg"); + vGraph = new MultiGraph("mg"); vGraph.addAttribute("ui.stylesheet", STYLE_SHEET); viewer = new Viewer(vGraph, Viewer.ThreadingModel.GRAPH_IN_GUI_THREAD); SwingUtilities.invokeLater(new InitializeApplication(viewer, vGraph, graph)); } - + public void mousePressed(MouseEvent e) { TraceManager.addDev("Mouse pressed; # of clicks: " - + e.getClickCount()); + + e.getClickCount()); } - + public void mouseReleased(MouseEvent e) { TraceManager.addDev("Mouse released; # of clicks: " - + e.getClickCount()); + + e.getClickCount()); } - + public void mouseEntered(MouseEvent e) { TraceManager.addDev("Mouse entered"); } - + public void mouseExited(MouseEvent e) { TraceManager.addDev("Mouse exited"); } - + public void mouseClicked(MouseEvent e) { TraceManager.addDev("Mouse clicked (# of clicks: " - + e.getClickCount() + ")"); + + e.getClickCount() + ")"); } - + class InitializeApplication extends JFrame implements Runnable { - private static final long serialVersionUID = - 804177406404724792L; + private static final long serialVersionUID = -804177406404724792L; protected MultiGraph vGraph; protected Viewer viewer; protected AUTGraph graph; protected MultiNode firstNode; - - + + public InitializeApplication(Viewer viewer, MultiGraph vGraph, AUTGraph autgraph) { this.viewer = viewer; this.vGraph = vGraph; this.graph = autgraph; } - + public void run() { int cpt = 0; MultiNode node; AbstractEdge edge; - for(AUTState state: graph.getStates()) { + for (AUTState state : graph.getStates()) { node = vGraph.addNode("" + state.id); node.addAttribute("ui.label", "" + state.id); if (state.getNbOutTransitions() == 0) { @@ -299,11 +299,11 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable node.addAttribute("ui.class", "init"); firstNode = node; } - cpt ++; + cpt++; } cpt = 0; - for(AUTTransition transition: graph.getTransitions()) { - edge = vGraph.addEdge(""+cpt, ""+transition.origin, ""+transition.destination, true); + for (AUTTransition transition : graph.getTransitions()) { + edge = vGraph.addEdge("" + cpt, "" + transition.origin, "" + transition.destination, true); /*TraceManager.addDev("Transition=" + transition.transition); String tmp = Conversion.replaceAllChar(transition.transition, '(', "$"); tmp = Conversion.replaceAllChar(tmp, ')', "$"); @@ -313,25 +313,26 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable if (!(transition.transition.startsWith("i("))) { edge.addAttribute("ui.class", "external"); } - cpt ++; + cpt++; } - + viewer.enableAutoLayout(); - - add(viewer.addDefaultView( true ), BorderLayout.CENTER ); + + add(viewer.addDefaultView(true), BorderLayout.CENTER); setDefaultCloseOperation(EXIT_ON_CLOSE); setSize(800, 600); setVisible(true); } - + } - - class BasicFrame extends JFrame implements ActionListener { + + class BasicFrame extends JFrame implements ActionListener { protected MultiGraph vGraph; protected Viewer viewer; + protected JPanel viewerPanel; protected AUTGraph graph; protected ArrayList<AbstractEdge> edges; - + protected JButton close; protected JButton screenshot; protected JCheckBox internalActions; @@ -339,45 +340,46 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable protected JCheckBox higherQuality, antialiasing; protected JLabel help, info; - protected boolean exitOnClose; + protected boolean exitOnClose; + + private AUTGraphDisplay autD; - private AUTGraphDisplay autD; - - - public BasicFrame(AUTGraphDisplay autD, Viewer viewer, MultiGraph vGraph, AUTGraph autgraph, ArrayList<AbstractEdge>_edges, boolean _exitOnClose) { - this.autD = autD; + + public BasicFrame(AUTGraphDisplay autD, Viewer viewer, MultiGraph vGraph, AUTGraph autgraph, ArrayList<AbstractEdge> _edges, boolean _exitOnClose) { + this.autD = autD; this.viewer = viewer; this.vGraph = vGraph; this.graph = autgraph; edges = _edges; - exitOnClose = _exitOnClose; + exitOnClose = _exitOnClose; makeComponents(); - if (exitOnClose) { - setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); - } - + if (exitOnClose) { + setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + } + } - + public void makeComponents() { - add(viewer.addDefaultView( false ), BorderLayout.CENTER ); + viewerPanel = viewer.addDefaultView(false); + add(viewerPanel, BorderLayout.CENTER); //add(viewer, BorderLayout.CENTER ); close = new JButton("Close", IconManager.imgic27); close.addActionListener(this); - screenshot = new JButton("Screenshot in png", IconManager.imgic28); + screenshot = new JButton("Save in png", IconManager.imgic28); screenshot.addActionListener(this); close.addActionListener(this); help = new JLabel("Zoom with PageUp/PageDown, move with cursor keys"); - info = new JLabel("Graph: " + graph.getNbOfStates() + " states, " + graph.getNbOfTransitions() + " transitions"); + info = new JLabel("Graph: " + graph.getNbOfStates() + " states, " + graph.getNbOfTransitions() + " transitions"); internalActions = new JCheckBox("Display internal actions", true); internalActions.addActionListener(this); readActions = new JCheckBox("Display read/write actions", true); readActions.addActionListener(this); - higherQuality = new JCheckBox("Higher drawing quality", false); + higherQuality = new JCheckBox("Higher drawing quality", false); higherQuality.addActionListener(this); - antialiasing = new JCheckBox("Anti aliasing", false); + antialiasing = new JCheckBox("Anti aliasing", false); antialiasing.addActionListener(this); - - + + JPanel jp01 = new JPanel(); GridBagLayout gridbag01 = new GridBagLayout(); GridBagConstraints c01 = new GridBagConstraints(); @@ -394,23 +396,23 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable jp01.add(readActions); jp01.add(higherQuality); jp01.add(antialiasing); - + JPanel infoPanel = new JPanel(new BorderLayout()); - JPanel labelPanel = new JPanel(new BorderLayout()); - labelPanel.add(help, BorderLayout.EAST); - labelPanel.add(info, BorderLayout.WEST); + JPanel labelPanel = new JPanel(new BorderLayout()); + labelPanel.add(help, BorderLayout.EAST); + labelPanel.add(info, BorderLayout.WEST); infoPanel.add(labelPanel, BorderLayout.NORTH); infoPanel.add(close, BorderLayout.SOUTH); infoPanel.add(jp01, BorderLayout.CENTER); - - + + add(infoPanel, BorderLayout.SOUTH); //setDefaultCloseOperation(EXIT_ON_CLOSE); setSize(1000, 700); setVisible(true); } - - public void actionPerformed(ActionEvent evt) { + + public void actionPerformed(ActionEvent evt) { if (evt.getSource() == close) { closeFrame(); } else if (evt.getSource() == screenshot) { @@ -425,18 +427,36 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable manageAntialiasing(); } } - + public void closeFrame() { - if (autD != null) { - autD.viewClosed("closed pushed"); - } - if (exitOnClose) { - System.exit(1); - } + if (autD != null) { + autD.viewClosed("closed pushed"); + } + if (exitOnClose) { + System.exit(1); + } dispose(); } - - public void screenshot() { + + public void takeScreenshot(Component component, File file) { + BufferedImage image = new BufferedImage( + component.getWidth(), + component.getHeight(), + BufferedImage.TYPE_INT_RGB + ); + // call the Component's paint method, using + // the Graphics object of the image. + component.paint( image.getGraphics() ); // alternately use .printAll(..) + + try { + // save captured image to PNG file + ImageIO.write(image, "png", file); + } catch (Exception e) { + } + + } + + public void screenshot() { TraceManager.addDev("Screenshot"); JFileChooser jfcggraph; if (SpecConfigTTool.GGraphPath.length() > 0) { @@ -447,80 +467,95 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable PNGFilter filter = new PNGFilter(); jfcggraph.setFileFilter(filter); int returnVal = jfcggraph.showDialog(this, "Graph capture (in png)"); - if(returnVal != JFileChooser.APPROVE_OPTION) { + if (returnVal != JFileChooser.APPROVE_OPTION) { return; } File pngFile = jfcggraph.getSelectedFile(); TraceManager.addDev("Making the screenshot in " + pngFile.getAbsolutePath()); - vGraph.addAttribute("ui.screenshot", pngFile.getAbsolutePath()); + + + //vGraph.addAttribute("ui.screenshot", pngFile.getAbsolutePath()); + //vGraph.addAttribute("ui.screenshot", "/homes/apvrille/tmp/toto.png"); + + takeScreenshot(viewerPanel, pngFile); + + /*FileSinkImages pic = new FileSinkImages(OutputType.PNG, Resolutions.UXGA); + //pic.setQuality(); + //pic.setLayoutPolicy(LayoutPolicy.COMPUTED_FULLY_AT_NEW_IMAGE); + pic.setLayoutPolicy(LayoutPolicy.COMPUTED_IN_LAYOUT_RUNNER); + try { + pic.writeAll(vGraph, pngFile.getAbsolutePath()); + } catch (IOException e) { + TraceManager.addDev("Capture could not be performed: " + e.getMessage()); + }*/ + //vGraph.addAttribute("ui.screenshot", "/tmp/toto.png"); TraceManager.addDev("Screenshot performed"); } - - - public void manageInternalActions() { - if (edges == null) { - return; - } - int cpt =0; - for(AUTTransition transition: graph.getTransitions()) { - if (transition.transition.startsWith("i(")) { - if (internalActions.isSelected()) { - edges.get(cpt).addAttribute("ui.label", transition.transition); - } else { - edges.get(cpt).addAttribute("ui.label", ""); + public void manageInternalActions() { + if (edges == null) { + return; + } + int cpt = 0; + for (AUTTransition transition : graph.getTransitions()) { + if (transition.transition.startsWith("i(")) { + if (internalActions.isSelected()) { + edges.get(cpt).addAttribute("ui.label", transition.transition); + } else { + edges.get(cpt).addAttribute("ui.label", ""); + } } + cpt++; } - cpt ++; } - } - - public void manageReadActions() { - if (edges == null) { - return; - } - int cpt =0; - for(AUTTransition transition: graph.getTransitions()) { - if (transition.transition.contains("?")) { - if (readActions.isSelected()) { - edges.get(cpt).addAttribute("ui.label", transition.transition); - } else { - edges.get(cpt).addAttribute("ui.label", ""); + + public void manageReadActions() { + if (edges == null) { + return; + } + int cpt = 0; + for (AUTTransition transition : graph.getTransitions()) { + if (transition.transition.contains("?")) { + if (readActions.isSelected()) { + edges.get(cpt).addAttribute("ui.label", transition.transition); + } else { + edges.get(cpt).addAttribute("ui.label", ""); + } } + cpt++; } - cpt ++; } - } - - public void manageHigherQuality() { - viewer.disableAutoLayout(); - if (higherQuality.isSelected()) { - vGraph.addAttribute("ui.quality"); - } else { - vGraph.removeAttribute("ui.quality"); + + public void manageHigherQuality() { + viewer.disableAutoLayout(); + if (higherQuality.isSelected()) { + vGraph.addAttribute("ui.quality"); + } else { + vGraph.removeAttribute("ui.quality"); + } + try { + viewer.enableAutoLayout(); + } catch (Exception e) { + } } - try { - viewer.enableAutoLayout(); - } catch (Exception e) {} - } - - public void manageAntialiasing() { - viewer.disableAutoLayout(); - if (antialiasing.isSelected()) { - vGraph.addAttribute("ui.antialias"); - } else { - vGraph.removeAttribute("ui.antialias"); + + public void manageAntialiasing() { + viewer.disableAutoLayout(); + if (antialiasing.isSelected()) { + vGraph.addAttribute("ui.antialias"); + } else { + vGraph.removeAttribute("ui.antialias"); + } + try { + viewer.enableAutoLayout(); + } catch (Exception e) { + } } - try { - viewer.enableAutoLayout(); - } catch (Exception e) {} - } - - - + + } // Basic Frame - - + + } // Main class diff --git a/src/main/java/ui/graph/AUTPartition.java b/src/main/java/ui/graph/AUTPartition.java index 393ab58abf13a0a286e74e4367aed5687b9a7346..1494c55a275d9c566f5615d2e06fe51a549989b8 100755 --- a/src/main/java/ui/graph/AUTPartition.java +++ b/src/main/java/ui/graph/AUTPartition.java @@ -37,28 +37,28 @@ */ - - package ui.graph; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedList; /** - * Class AUTPartition - * Creation : 06/01/2017 - ** @version 1.0 06/01/2017 - * @author Ludovic APVRILLE + * Class AUTPartition + * Creation : 06/01/2017 + * * @version 1.0 06/01/2017 + * + * @author Ludovic APVRILLE */ -public class AUTPartition { +public class AUTPartition { + - public ArrayList<AUTBlock> blocks; // Blocks are expected to be mutually exclusive // in terms of states they contain. public AUTPartition() { - blocks = new ArrayList<AUTBlock>(); + blocks = new ArrayList<AUTBlock>(); } public void addBlock(AUTBlock _bl) { @@ -66,43 +66,54 @@ public class AUTPartition { } public void addIfNonEmpty(AUTBlock _b) { - if (_b.size() > 0) { - addBlock(_b); - } + if (_b.size() > 0) { + addBlock(_b); + } } public String toString() { - StringBuffer sb = new StringBuffer(""); - for(AUTBlock block: blocks) { - sb.append("(" + block.toString() + ")"); - } - return sb.toString(); + StringBuffer sb = new StringBuffer(""); + for (AUTBlock block : blocks) { + sb.append("(" + block.toString() + ")"); + } + return sb.toString(); } // List of blocks that has a state that has an // output "elt" transition public LinkedList<AUTBlock> getI(AUTElement _elt, AUTBlock _b) { - LinkedList<AUTBlock> listI = new LinkedList<AUTBlock>(); - for(AUTBlock b: blocks) { - if (b.hasStateOf(_b)) { - listI.add(b); - } - } - return listI; + LinkedList<AUTBlock> listI = new LinkedList<AUTBlock>(); + for (AUTBlock b : blocks) { + if (b.hasStateOf(_b)) { + listI.add(b); + } + } + return listI; } public boolean removeBlock(AUTBlock _b) { - return blocks.remove(_b); + return blocks.remove(_b); } public AUTBlock getBlockWithState(int id) { - for(AUTBlock b: blocks) { - if (b.hasState(id)) { - return b; - } - } - return null; + for (AUTBlock b : blocks) { + if (b.hasState(id)) { + return b; + } + } + return null; + } + + public int getHashCode() { + int []values = new int[blocks.size()]; + int cpt = 0; + for(AUTBlock b: blocks) { + values[cpt] = b.getHashValue(); + cpt ++; + } + return Arrays.hashCode(values); + } diff --git a/src/main/java/ui/graph/AUTSplitter.java b/src/main/java/ui/graph/AUTSplitter.java index 16bd7f0e7eeda3509b7912e8362d2f5698076ff1..a2c9fe6fc2aabb547daba031e9de5b682f77b543 100755 --- a/src/main/java/ui/graph/AUTSplitter.java +++ b/src/main/java/ui/graph/AUTSplitter.java @@ -42,6 +42,7 @@ package ui.graph; import java.util.ArrayList; +import java.util.Arrays; /** * Class AUTSplitter @@ -74,5 +75,15 @@ public class AUTSplitter { return partitions.size(); } + public int getHashCode() { + int[] values = new int[partitions.size()]; + int cpt = 0; + for (AUTPartition p : partitions) { + values[cpt] = p.getHashCode(); + cpt++; + } + return Arrays.hashCode(values); + } + } diff --git a/src/main/java/ui/graph/RG.java b/src/main/java/ui/graph/RG.java index af51fd2bdbfe9b44ac7d6e765615072ccaa6cc8a..3552af6cbb5ff84fee15c44c88bc5eecb6a185fb 100755 --- a/src/main/java/ui/graph/RG.java +++ b/src/main/java/ui/graph/RG.java @@ -37,17 +37,16 @@ */ - - package ui.graph; import myutil.*; /** - * Class RG - * Creation : 07/12/2016 - ** @version 1.0 07/12/2016 - * @author Ludovic APVRILLE + * Class RG + * Creation : 07/12/2016 + * * @version 1.0 07/12/2016 + * + * @author Ludovic APVRILLE */ public class RG { @@ -55,66 +54,66 @@ public class RG { public AUTGraph graph; public String fileName; public String data; - public int nbOfStates = - 1; + public int nbOfStates = -1; public int nbOfTransitions = -1; - + public RG(String _name) { - name = _name; + name = _name; } public String getToolTip() { - return name; + return name; } public String toString() { - if (nbOfStates == -1) { - return name; - } - return name + " " + nbOfStates + " states, " + nbOfTransitions + " transitions"; + if (nbOfStates == -1) { + return name; + } + return name + " " + nbOfStates + " states, " + nbOfTransitions + " transitions"; } public RG generateRefusalGraph() { - if (graph == null) { - if (data == null){ - return null; - } - graph = new AUTGraph(); - graph.buildGraph(data); - } - - TraceManager.addDev("Making Ref. G"); - AUTGraph refusalGraph = graph.generateRefusalGraph(); - //TraceManager.addDev("Null graph?"); - if (refusalGraph == null) { - TraceManager.addDev("Null graph..."); - return null; - } - - RG ret = new RG(name+"_RF"); - ret.graph = refusalGraph; - return ret; + if (graph == null) { + if (data == null) { + return null; + } + graph = new AUTGraph(); + graph.buildGraph(data); + } + + TraceManager.addDev("Making Ref. G"); + AUTGraph refusalGraph = graph.generateRefusalGraph(); + //TraceManager.addDev("Null graph?"); + if (refusalGraph == null) { + TraceManager.addDev("Null graph..."); + return null; + } + + RG ret = new RG(name + "_RF"); + ret.graph = refusalGraph; + return ret; } public RG generateTestSequences() { - if (graph == null) { - if (data == null){ - return null; - } - graph = new AUTGraph(); - graph.buildGraph(data); - } - - TraceManager.addDev("Making Test sequences"); - AUTGraph testSequencesGraph = graph.makeTestSequencesFromRefusalGraph(); - //TraceManager.addDev("Null graph?"); - if (testSequencesGraph == null) { - TraceManager.addDev("Null graph..."); - return null; - } - - RG ret = new RG(name+"_Test"); - ret.graph = testSequencesGraph; - return ret; + if (graph == null) { + if (data == null) { + return null; + } + graph = new AUTGraph(); + graph.buildGraph(data); + } + + TraceManager.addDev("Making Test sequences"); + AUTGraph testSequencesGraph = graph.makeTestSequencesFromRefusalGraph(); + //TraceManager.addDev("Null graph?"); + if (testSequencesGraph == null) { + TraceManager.addDev("Null graph..."); + return null; + } + + RG ret = new RG(name + "_Test"); + ret.graph = testSequencesGraph; + return ret; } } diff --git a/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java b/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java index 6820f27f1842d5b4b942273c54880b5b445327d8..323e3c91d9c22b6b8fe02a9f8160dbadf2e3ba33 100644 --- a/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java +++ b/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java @@ -37,36 +37,39 @@ */ - - package ui.networkmodelloader; -import java.awt.*; -import java.awt.event.*; -import java.util.*; -import javax.swing.*; -import java.io.*; - import common.ConfigurationTTool; import common.SpecConfigTTool; -import ui.*; -import ui.file.TFileFilter; import myutil.*; +import ui.JTextAreaWriter; +import ui.MainGUI; +import ui.file.TFileFilter; import ui.util.IconManager; +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; + /** * Class JDialogNetworkModelPanel * Dialog for managing the loading of network models * Creation: 28/05/2017 - * @version 1.1 28/05/2017 + * * @author Ludovic APVRILLE * @author Ludovic Apvrille + * @version 1.1 28/05/2017 */ -public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements ActionListener, Runnable, LoaderFacilityInterface, CallbackLoaderInterface { +public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements ActionListener, Runnable, LoaderFacilityInterface, CallbackLoaderInterface { - public final static String [] FEATURES = {"all", "diplodocus", "avatar", "sysml-sec", "assumptions", "requirements", "attacktrees", "properties", "partitioning", "analysis", "design", "prototyping", "securityprotocol", "codegeneration"}; + public final static String[] FEATURES = {"all", "diplodocus", "avatar", "sysml-sec", "assumptions", "requirements", "attacktrees", "properties", "partitioning", "analysis", "design", "prototyping", "securityprotocol", "codegeneration"}; - public final static String [] PROPS = {"safety", "security", "performance"}; + public final static String[] PROPS = {"safety", "security", "performance"}; private ArrayList<NetworkModel> listOfModels; @@ -85,7 +88,7 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac protected JButton start; protected JButton stop; protected JComboBox<String> featureList; - protected JCheckBox [] props; + protected JCheckBox[] props; protected JScrollPane jsp; @@ -100,8 +103,10 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac private JFileChooser jfc; - /** Creates new form */ - public JDialogLoadingNetworkModel(Frame _f, MainGUI _mgui, String title, String _url) { + /** + * Creates new form + */ + public JDialogLoadingNetworkModel(Frame _f, MainGUI _mgui, String title, String _url) { super(title); f = _f; @@ -125,13 +130,13 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac protected void myInitComponents() { - - if (ConfigurationTTool.DownloadedFILEPath.length() > 0) { + + if (ConfigurationTTool.DownloadedFILEPath.length() > 0) { jfc = new JFileChooser(ConfigurationTTool.DownloadedFILEPath); } else { jfc = new JFileChooser(); } - + mode = NOT_LISTED; setButtons(); } @@ -144,7 +149,6 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac //setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - JPanel lowPart = new JPanel(new BorderLayout()); jta = new ScrolledJTextArea(); @@ -155,7 +159,7 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac jta.append("Connecting to " + url + ".\n Please wait ...\n\n"); Font f = new Font("Courrier", Font.BOLD, 12); jta.setFont(f); - textAreaWriter = new JTextAreaWriter( jta ); + textAreaWriter = new JTextAreaWriter(jta); jsp = new JScrollPane(jta, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); jsp.setPreferredSize(new Dimension(400, 200)); @@ -170,7 +174,7 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac options.add(featureList); props = new JCheckBox[PROPS.length]; - for (int i=0; i<props.length; i++) { + for (int i = 0; i < props.length; i++) { props[i] = new JCheckBox(PROPS[i]); props[i].addActionListener(this); props[i].setSelected(true); @@ -206,19 +210,19 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac c.add(jsp, BorderLayout.CENTER); } - public void actionPerformed(ActionEvent evt) { + public void actionPerformed(ActionEvent evt) { //String command = evt.getActionCommand(); // Compare the action command to the known actions. if (evt.getSource() == stop) { cancel(); - return ; + return; } else if (evt.getSource() == featureList) { featureSelectionMade(); return; } - for (int i = 0; i<props.length; i++) { + for (int i = 0; i < props.length; i++) { if (evt.getSource() == props[i]) { panel.setProperty(i, props[i].isSelected()); return; @@ -226,18 +230,17 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac } } - public void featureSelectionMade() { + private void featureSelectionMade() { panel.setFeatureSelectedIndex(featureList.getSelectedIndex()); } public void cancel() { - dispose(); + if (panel != null) panel.stopLoading(); dispose(); } - public void run() { // Loading main file describing models, giving information on this, and filling the array of models - // Accsing the main file + // Accessing the main file try { /*HttpURLConnection connection; TraceManager.addDev("URL: going to create it to: " + url); @@ -256,7 +259,7 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac BufferedReader in = URLManager.getBufferedReader(url); if (in == null) { jta.append("Could not establish a connection to the TTool server\n"); - jta.append("Error when retreiving file: " + url + "\n No internet connection?\n No right for the Java Virtual Machine to use http connections?\n\n"); + jta.append("Error when retreiving file: " + url + "\n No internet connection?\n No right for the Java Virtual Machine to use http connections?\n\n"); } else { jta.append("Connection established...\n"); String inputLine = null; @@ -270,7 +273,7 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac if (inputLine.startsWith("-FEATURES")) { if (nm != null) { String tmp = inputLine.substring(9, inputLine.length()).trim().toLowerCase(); - for (int i=1; i<FEATURES.length; i++) { + for (int i = 1; i < FEATURES.length; i++) { nm.features[i] = tmp.indexOf(FEATURES[i]) != -1; } //nm.type = NetworkModel.stringToNetworkModelType(inputLine.substring(5, inputLine.length()).trim()); @@ -280,7 +283,7 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac if (inputLine.startsWith("-PROPS")) { if (nm != null) { String tmp = inputLine.substring(6, inputLine.length()).trim().toLowerCase(); - for (int i=0; i<PROPS.length; i++) { + for (int i = 0; i < PROPS.length; i++) { nm.props[i] = tmp.indexOf(PROPS[i]) != -1; } //nm.type = NetworkModel.stringToNetworkModelType(inputLine.substring(5, inputLine.length()).trim()); @@ -335,25 +338,25 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac } protected void setButtons() { - switch(mode) { - case NOT_LISTED: - start.setEnabled(false); - stop.setEnabled(true); - //setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - getGlassPane().setVisible(false); - break; - case LISTED: - start.setEnabled(false); - stop.setEnabled(true); - getGlassPane().setVisible(true); - //setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - break; - case SELECTED: - default: - start.setEnabled(true); - stop.setEnabled(true); - getGlassPane().setVisible(false); - break; + switch (mode) { + case NOT_LISTED: + start.setEnabled(false); + stop.setEnabled(true); + //setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + getGlassPane().setVisible(false); + break; + case LISTED: + start.setEnabled(false); + stop.setEnabled(true); + getGlassPane().setVisible(true); + //setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + break; + case SELECTED: + default: + start.setEnabled(true); + stop.setEnabled(true); + getGlassPane().setVisible(false); + break; } } @@ -361,55 +364,55 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac // LoaderFacilityInterface public void load(int index) { String fileName = listOfModels.get(index).fileName; + if (panel != null) panel.stopLoading(); jta.append("Loading model: " + fileName); String urlToLoad = URLManager.getBaseURL(url) + fileName; URLManager urlm = new URLManager(); jfc.setSelectedFile(new File(FileUtils.removeFileExtension(fileName))); int returnVal = jfc.showSaveDialog(f); - if(returnVal == JFileChooser.APPROVE_OPTION) { - filePath = jfc.getSelectedFile().getAbsolutePath(); - filePath = FileUtils.addFileExtensionIfMissing(filePath, "xml"); - boolean ok = urlm.downloadFile(filePath, urlToLoad,this); - if (!ok) { - loadFailed(); - } - } - else { - panel.reactivateSelection(); + if (returnVal == JFileChooser.APPROVE_OPTION) { + filePath = jfc.getSelectedFile().getAbsolutePath(); + filePath = FileUtils.addFileExtensionIfMissing(filePath, "xml"); + boolean ok = urlm.downloadFile(filePath, urlToLoad, this); + if (!ok) { + loadFailed(); + } + } else { + panel.reactivateSelection(); } } // CallbackLoaderInterface public void loadDone() { - jta.append("Model transfered, opening it in TTool\n"); + jta.append("Model transferred, opening it in TTool\n"); this.dispose(); - SwingUtilities.invokeLater(new Runnable() { - public void run() { - File dir = new File(filePath.replace(".xml", "")); - dir = FileUtils.addFileExtensionIfMissing(dir, "ttool"); - dir.mkdir(); - SpecConfigTTool.setDirConfig(dir); - File config = SpecConfigTTool.createProjectConfig(dir); - try { - SpecConfigTTool.loadConfigFile(config); - } catch (MalformedConfigurationException e) { - System.err.println(e.getMessage() + " : Can't load config file."); - } - File file = new File(filePath); - file = FileUtils.addFileExtensionIfMissing(file, TFileFilter.getExtension()); - try { - FileUtils.moveFileToDirectory(file, dir, false); - } catch (IOException e) { - System.err.println(e.getMessage() + " : Network loading failed"); - } - mgui.openProjectFromFile(dir); - // Here, we can safely update the GUI - // because we'll be called from the - // event dispatch thread - //statusLabel.setText("Query: " + queryNo); - } - }); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + File dir = new File(filePath.replace(".xml", "")); + dir = FileUtils.addFileExtensionIfMissing(dir, "ttool"); + dir.mkdir(); + SpecConfigTTool.setDirConfig(dir); + File config = SpecConfigTTool.createProjectConfig(dir); + try { + SpecConfigTTool.loadConfigFile(config); + } catch (MalformedConfigurationException e) { + System.err.println(e.getMessage() + " : Can't load config file."); + } + File file = new File(filePath); + file = FileUtils.addFileExtensionIfMissing(file, TFileFilter.getExtension()); + try { + FileUtils.moveFileToDirectory(file, dir, false); + } catch (IOException e) { + System.err.println(e.getMessage() + " : Network loading failed"); + } + mgui.openProjectFromFile(dir); + // Here, we can safely update the GUI + // because we'll be called from the + // event dispatch thread + //statusLabel.setText("Query: " + queryNo); + } + }); //mgui.openProjectFromFile(new File(filePath)); } diff --git a/src/main/java/ui/networkmodelloader/NetworkModelPanel.java b/src/main/java/ui/networkmodelloader/NetworkModelPanel.java index 2d23ea93856e5e11412c159661498378970d873f..fe92176d25bad11cda3f1193e4149e2f4f6ecbac 100644 --- a/src/main/java/ui/networkmodelloader/NetworkModelPanel.java +++ b/src/main/java/ui/networkmodelloader/NetworkModelPanel.java @@ -37,29 +37,32 @@ */ - - package ui.networkmodelloader; -import java.awt.*; -import java.awt.event.*; -import java.awt.image.*; -import javax.swing.*; -import javax.swing.border.*; -import java.util.*; - -import myutil.*; -import ui.*; +import myutil.GraphicLib; +import myutil.ImageManager; +import myutil.LoaderFacilityInterface; +import myutil.URLManager; +import ui.ColorManager; +import javax.swing.*; +import javax.swing.border.BevelBorder; +import java.awt.*; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.util.ArrayList; /** * Class NetworkModel * Dialog for managing the loading of network models * Creation: 30/05/2017 - * @version 1.1 30/05/2017 + * * @author Ludovic APVRILLE * @author Ludovic APVRILLE + * @version 1.1 30/05/2017 */ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener, MouseMotionListener { @@ -92,14 +95,15 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener private String url; + private boolean go = true; - public NetworkModelPanel(LoaderFacilityInterface _loader, ArrayList<NetworkModel> _listOfModels, ActionListener _listener, JTextArea _jta, JLabel _infoModels) { + NetworkModelPanel(LoaderFacilityInterface _loader, ArrayList<NetworkModel> _listOfModels, ActionListener _listener, JTextArea _jta, JLabel _infoModels) { loader = _loader; listOfModels = _listOfModels; listener = _listener; jta = _jta; - infoModels = _infoModels; + infoModels = _infoModels; //Dimension pSize = new Dimension(500, 400); Dimension mSize = new Dimension(400, 300); @@ -111,7 +115,7 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener // properties props = new boolean[JDialogLoadingNetworkModel.PROPS.length]; - for (int i=0; i<props.length; i++) { + for (int i = 0; i < props.length; i++) { props[i] = true; } @@ -120,25 +124,30 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener addMouseListener(this); } - public void setJSP(JScrollPane _jsp) { + void setJSP(JScrollPane _jsp) { jsp = _jsp; jsp.setViewportView(this); } - public void setFeatureSelectedIndex(int _index) { + void setFeatureSelectedIndex(int _index) { featureSelectedIndex = _index; indexOfSelected = -1; repaint(); } - public void setProperty(int _index, boolean _mode) { + void setProperty(int _index, boolean _mode) { props[_index] = _mode; indexOfSelected = -1; repaint(); } + void stopLoading() { + go = false; + } + public void run() { - for(NetworkModel button: listOfModels) { + for (NetworkModel button : listOfModels) { + if (go == false) return; //Dimension d = new Dimension(buttonSizeX, buttonSizeY); //button.setPreferredSize(d); //int tmpX = cptColumn * (buttonSizeX + spaceBetweenButtons); @@ -167,14 +176,14 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener public void preparePanel(String _url) { - url = _url; + url = _url; Thread t = new Thread(this); t.start(); } private boolean hasAtLeastOneSelectedProperty(NetworkModel _nm) { - for (int i=0; i<props.length; i++) { + for (int i = 0; i < props.length; i++) { if (props[i]) { if (_nm.props[i]) { return true; @@ -192,10 +201,10 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener int cptRow = 0; int index = 0; - int modelsDrawn = 0; - - for(NetworkModel button: listOfModels) { - if ((button.features[featureSelectedIndex]) && hasAtLeastOneSelectedProperty(button)){ + int modelsDrawn = 0; + + for (NetworkModel button : listOfModels) { + if ((button.features[featureSelectedIndex]) && hasAtLeastOneSelectedProperty(button)) { Color c = g.getColor(); int tmpX = cptColumn * (buttonSizeX + spaceBetweenButtons) + marginX; int tmpY = cptRow * (buttonSizeY + spaceBetweenButtons) + marginY; @@ -205,17 +214,16 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener g.setColor(ColorManager.AVATAR_BLOCK); g.fillRect(tmpX, tmpY, buttonSizeX, buttonSizeY); g.setColor(c); - GraphicLib.centerString(g, "No picture", tmpX, tmpY + buttonSizeY/2, buttonSizeX); + GraphicLib.centerString(g, "No picture", tmpX, tmpY + buttonSizeY / 2, buttonSizeX); } - modelsDrawn ++; + modelsDrawn++; GraphicLib.centerString(g, button.fileName, tmpX, tmpY + buttonSizeY + 15, buttonSizeX); - - cptColumn ++; + cptColumn++; if (cptColumn == nbOfButtonsPerColumn) { - cptRow ++; + cptRow++; cptColumn = 0; } @@ -231,10 +239,10 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener } else { g.setColor(ColorManager.POINTER_ON_ME_0); } - Graphics2D g2 = (Graphics2D)g; + Graphics2D g2 = (Graphics2D) g; Stroke oldStroke = g2.getStroke(); g2.setStroke(new BasicStroke(5)); - g2.drawRect(button.x-10, button.y-10, button.width+20, button.height+20); + g2.drawRect(button.x - 10, button.y - 10, button.width + 20, button.height + 20); g2.setStroke(oldStroke); g.setColor(c); } @@ -245,11 +253,11 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener button.height = -1; } - index ++; + index++; } Dimension currentPSize = getPreferredSize(); - Dimension pSize = new Dimension(400, Math.max(300, (cptRow+1)*(buttonSizeY +spaceBetweenButtons) + 2* marginY)); + Dimension pSize = new Dimension(400, Math.max(300, (cptRow + 1) * (buttonSizeY + spaceBetweenButtons) + 2 * marginY)); setPreferredSize(pSize); if (!((currentPSize.getWidth() == pSize.getWidth()) && (currentPSize.getHeight() == pSize.getHeight()))) { @@ -261,10 +269,10 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener } } - if ((modelsDrawn != nbOfModels) && (infoModels != null)) { - nbOfModels = modelsDrawn; - infoModels.setText(nbOfModels + " model(s)"); - } + if ((modelsDrawn != nbOfModels) && (infoModels != null)) { + nbOfModels = modelsDrawn; + infoModels.setText(nbOfModels + " model(s)"); + } //g.drawString(listOfModels.size() + " model(s) available", 20, 20); @@ -277,19 +285,19 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener } public void mouseMoved(MouseEvent e) { - if (!selectedModel) { + if (!selectedModel) { int previousIndex = indexOfSelected; boolean found = false; int index = 0; - for(NetworkModel button: listOfModels) { + for (NetworkModel button : listOfModels) { if ((button.features[featureSelectedIndex]) && hasAtLeastOneSelectedProperty(button)) { - if ((e.getX() > button.x) && (e.getX() < button.x + button.width) && (e.getY() > button.y) && (e.getY() < button.y + button.height)) { + if ((e.getX() > button.x) && (e.getX() < button.x + button.width) && (e.getY() > button.y) && (e.getY() < button.y + button.height)) { indexOfSelected = index; found = true; break; } } - index ++; + index++; } if (!found) { indexOfSelected = -1; @@ -333,5 +341,4 @@ public class NetworkModelPanel extends JPanel implements Runnable, MouseListener } - } diff --git a/src/main/java/ui/tree/JDiagramTree.java b/src/main/java/ui/tree/JDiagramTree.java index eb411742035f48d8594ae1bb66cd3fd031ae2f34..3ecc2a5b365a5a3c931e7fc0ba646aefce0f65f5 100755 --- a/src/main/java/ui/tree/JDiagramTree.java +++ b/src/main/java/ui/tree/JDiagramTree.java @@ -37,8 +37,6 @@ */ - - package ui.tree; //import java.awt.*; @@ -71,10 +69,11 @@ import java.util.Set; * Class JDiagramTree * Dialog for managing attributes * Creation: 14/12/2003 - * @version 1.0 14/12/2003 + * * @author Ludovic APVRILLE + * @version 1.0 14/12/2003 */ -public class JDiagramTree extends javax.swing.JTree implements ActionListener, MouseListener, TreeExpansionListener, TreeSelectionListener, Runnable { +public class JDiagramTree extends javax.swing.JTree implements ActionListener, MouseListener, TreeExpansionListener, TreeSelectionListener, Runnable { private boolean toUpdate = false; private MainGUI mgui; private DiagramTreeModel dtm; @@ -97,8 +96,9 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M protected GraphTree selectedGT; - - /** Creates new form */ + /** + * Creates new form + */ public JDiagramTree(MainGUI _mgui) { super(new DiagramTreeModel(_mgui)); @@ -122,7 +122,7 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } public void updateNow() { - if(toUpdate) { + if (toUpdate) { forceUpdate(); } } @@ -135,7 +135,7 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } public void mousePressed(MouseEvent e) { - if(SwingUtilities.isRightMouseButton(e)){ + if (SwingUtilities.isRightMouseButton(e)) { if (e.isPopupTrigger()) myPopupEvent(e); } } @@ -161,11 +161,11 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M private void myPopupEvent(MouseEvent e) { int x = e.getX(); int y = e.getY(); - JTree tree = (JTree)e.getSource(); + JTree tree = (JTree) e.getSource(); TreePath path = tree.getPathForLocation(x, y); - //TraceManager.addDev("Path=" + path); - + //TraceManager.addDev("Path=" + path); + if (path == null) return; @@ -175,8 +175,8 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M //TraceManager.addDev("Adding popup menu to " + obj.getClass() + "/" + obj); - if (obj instanceof GraphTree){ - selectedGT = (GraphTree)obj; + if (obj instanceof GraphTree) { + selectedGT = (GraphTree) obj; if (popupGraphTree == null) { popupGraphTree = new JPopupMenu(); jmiAddFromFile = new JMenuItem("Add graph from file (.aut)"); @@ -188,7 +188,7 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M if (obj instanceof RG) { - selectedRG = (RG)obj; + selectedRG = (RG) obj; if (popupTree == null) { popupTree = new JPopupMenu(); jmiAnalyze = new JMenuItem("Analyze"); @@ -212,18 +212,18 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } } - public synchronized void run(){ + public synchronized void run() { checkPaths(); Iterator<TreePath> l_keys = m_expandedTreePaths.iterator(); TreePath l_path = null; - while(l_keys.hasNext()){ + while (l_keys.hasNext()) { try { l_path = l_keys.next(); TreePath parent = l_path.getParentPath(); //System.out.println("Path: " + l_path); //System.out.println("Parent path: " + parent); if ((l_path.getPathCount() == 2) || (m_expandedTreePaths.contains(parent))) { - //TraceManager.addDev("Path=" + l_path); + //TraceManager.addDev("Path=" + l_path); expandPath(l_path); } } catch (Exception e) { @@ -240,7 +240,7 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M private void checkPaths() { TreePath l_path = null; Iterator<TreePath> l_keys = m_expandedTreePaths.iterator(); - while(l_keys.hasNext()){ + while (l_keys.hasNext()) { l_path = l_keys.next(); if (!isAPathOf(l_path)) { m_expandedTreePaths.remove(l_path); @@ -250,11 +250,11 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } private boolean isAPathOf(TreePath tp) { - if ((dtm ==null) || (tp == null)) { + if ((dtm == null) || (tp == null)) { return false; } - Object [] objs = tp.getPath(); + Object[] objs = tp.getPath(); if (objs.length == 0) { return false; @@ -266,8 +266,8 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M int index; - for(int i=0; i<objs.length - 2; i++) { - index = dtm.getIndexOfChild(objs[i], objs[i+1]); + for (int i = 0; i < objs.length - 2; i++) { + index = dtm.getIndexOfChild(objs[i], objs[i + 1]); if (index == -1) { return false; } @@ -277,18 +277,17 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } - public synchronized void update(){ + public synchronized void update() { SwingUtilities.invokeLater(this); } public void treeExpanded(TreeExpansionEvent treeExpansionEvent) { TreePath tp = treeExpansionEvent.getPath(); m_expandedTreePaths.add(tp); - Iterator<TreePath> l_keys = m_expandedTreePaths.iterator(); - while(l_keys.hasNext()){ + for (TreePath m_expandedTreePath : m_expandedTreePaths) { TreePath l_path = null; try { - l_path = l_keys.next(); + l_path = m_expandedTreePath; TreePath parent = l_path.getParentPath(); if ((l_path.getPathCount() == 1) || (m_expandedTreePaths.contains(parent))) { expandPath(l_path); @@ -304,9 +303,9 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } public void expandMyPath(TreePath tp) { - //TraceManager.addDev("Path=" + tp); - expandPath(tp); - } + //TraceManager.addDev("Path=" + tp); + expandPath(tp); + } public void treeCollapsed(TreeExpansionEvent treeExpansionEvent) { m_expandedTreePaths.remove(treeExpansionEvent.getPath()); @@ -315,14 +314,14 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M public void valueChanged(TreeSelectionEvent treeSelectionEvent) { //TraceManager.addDev("Value changed"); - if(getSelectionPaths() != null && getSelectionPaths().length >0 ){ + if (getSelectionPaths() != null && getSelectionPaths().length > 0) { m_selectedTreePaths = getSelectionModel().getSelectionPaths(); } TreePath tp = treeSelectionEvent.getNewLeadSelectionPath(); - //TraceManager.addDev("Expanded path=" + tp); - + //TraceManager.addDev("Expanded path=" + tp); + if (tp == null) { return; } @@ -331,18 +330,18 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M Object o; if (nodeInfo instanceof TDiagramPanel) { - mgui.selectTab((TDiagramPanel)nodeInfo); + mgui.selectTab((TDiagramPanel) nodeInfo); } else if (nodeInfo instanceof TURTLEPanel) { - mgui.selectTab((TURTLEPanel)nodeInfo); + mgui.selectTab((TURTLEPanel) nodeInfo); } else if (nodeInfo instanceof TGComponent) { TGComponent tgc = (TGComponent) nodeInfo; mgui.selectTab(tgc.getTDiagramPanel()); tgc.getTDiagramPanel().highlightTGComponent(tgc); } else if (nodeInfo instanceof Invariant) { //TraceManager.addDev("Click on invariant"); - Invariant inv = (Invariant)nodeInfo; + Invariant inv = (Invariant) nodeInfo; mgui.setCurrentInvariant(inv); - for(int i=2; i< inv.getChildCount(); i++) { + for (int i = 2; i < inv.getChildCount(); i++) { o = inv.getChild(i); if (o instanceof TGComponent) { TGComponent tgc1 = (TGComponent) (o); @@ -350,14 +349,14 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M } if (o instanceof InvariantSynchro) { - InvariantSynchro is = (InvariantSynchro)o; + InvariantSynchro is = (InvariantSynchro) o; is.getFrom().getTDiagramPanel().repaint(); is.getTo().getTDiagramPanel().repaint(); } } } else if (nodeInfo instanceof CheckingError) { - CheckingError ce = (CheckingError)nodeInfo; + CheckingError ce = (CheckingError) nodeInfo; TDiagramPanel tdp = null; if (ce instanceof UICheckingError) { tdp = ((UICheckingError) ce).getTDiagramPanel(); @@ -371,7 +370,7 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M mgui.selectTDiagramPanel(tdp); } else if (ce.getTClass() != null) { mgui.selectTab(ce.getTClass().getName()); - } else if(ce.getRelation() != null) { + } else if (ce.getRelation() != null) { mgui.selectTab("Class diagram"); } else if (ce instanceof TMLCheckingError && ((TMLCheckingError) ce).getTMLActivityElement() != null) { TGComponent tgc = (TGComponent) ((TMLCheckingError) ce).getTMLActivityElement().getReferenceObject(); @@ -422,7 +421,7 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M if (ae.getSource() == jmiAddFromFile) { //TraceManager.addDev("Adding graph from file"); - String [] graph = mgui.loadAUTGraph(); + String[] graph = mgui.loadAUTGraph(); if (graph != null) { RG rg = new RG(graph[0]); rg.fileName = graph[0]; diff --git a/src/main/java/ui/util/DefaultText.java b/src/main/java/ui/util/DefaultText.java index 19814b97d42c0376d8a2aa5fffdf4ce5e7c17b75..fbad67393c484ba7507a531cb32d96f4adb49883 100755 --- a/src/main/java/ui/util/DefaultText.java +++ b/src/main/java/ui/util/DefaultText.java @@ -50,8 +50,8 @@ package ui.util; */ public class DefaultText { - public static String BUILD = "12520"; - public static String DATE = "2018/01/09 02:01:48 CET"; + public static String BUILD = "12526"; + public static String DATE = "2018/01/15 02:01:36 CET"; public static StringBuffer sbAbout = makeAbout(); diff --git a/src/main/java/ui/window/JDialogAvatarModelChecker.java b/src/main/java/ui/window/JDialogAvatarModelChecker.java index 1f3f49304dc0592aa348060d85c6a16dfcfebac3..e222d9f2f07c2a32f4f79d54fa304bddc7644ff3 100644 --- a/src/main/java/ui/window/JDialogAvatarModelChecker.java +++ b/src/main/java/ui/window/JDialogAvatarModelChecker.java @@ -37,8 +37,6 @@ */ - - package ui.window; import avatartranslator.AvatarSpecification; @@ -67,21 +65,22 @@ import java.util.concurrent.TimeUnit; * Class JDialogAvatarModelChecker * Dialog for managing the model checking of avatar specifications * Creation: 1/06/2016 - * @version 1.1 1/06/2016 + * * @author Ludovic APVRILLE + * @version 1.1 1/06/2016 */ -public class JDialogAvatarModelChecker extends javax.swing.JFrame implements ActionListener, Runnable, MasterProcessInterface { - private final static String [] INFOS = {"Not started", "Running", "Stopped by user", "Finished"}; - private final static Color [] COLORS = {Color.darkGray, Color.magenta, Color.red, Color.blue}; +public class JDialogAvatarModelChecker extends javax.swing.JFrame implements ActionListener, Runnable, MasterProcessInterface { + private final static String[] INFOS = {"Not started", "Running", "Stopped by user", "Finished"}; + private final static Color[] COLORS = {Color.darkGray, Color.magenta, Color.red, Color.blue}; - public final static int REACHABILITY_ALL = 1; - public final static int REACHABILITY_SELECTED = 2; - public final static int REACHABILITY_NONE = 3; + public final static int REACHABILITY_ALL = 1; + public final static int REACHABILITY_SELECTED = 2; + public final static int REACHABILITY_NONE = 3; - public final static int LIVENESS_ALL = 4; - public final static int LIVENESS_SELECTED = 5; - public final static int LIVENESS_NONE = 6; + public final static int LIVENESS_ALL = 4; + public final static int LIVENESS_SELECTED = 5; + public final static int LIVENESS_NONE = 6; protected static String graphDir; @@ -145,15 +144,15 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act private Thread t; private boolean go = false; - // private boolean hasError = false; + // private boolean hasError = false; private java.util.Timer timer; //protected boolean startProcess = false; - - - /** Creates new form */ - public JDialogAvatarModelChecker(Frame f, MainGUI _mgui, String title, AvatarSpecification _spec, String _graphDir, boolean _showLiveness) { + /** + * Creates new form + */ + public JDialogAvatarModelChecker(Frame f, MainGUI _mgui, String title, AvatarSpecification _spec, String _graphDir, boolean _showLiveness) { super(title); mgui = _mgui; @@ -167,13 +166,13 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act } showLiveness = _showLiveness; - + initComponents(); myInitComponents(); pack(); /*if ((mgui != null) && (spec != null)) { - mgui.drawAvatarSpecification(spec); + mgui.drawAvatarSpecification(spec); }*/ //getGlassPane().addMouseListener( new MouseAdapter() {}); @@ -241,9 +240,9 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act jp01.add(reachabilityAllStates, c01); reachabilities.add(reachabilityAllStates); - noReachability.setSelected(reachabilitySelected == REACHABILITY_NONE); - reachabilityCheckable.setSelected(reachabilitySelected == REACHABILITY_SELECTED); - reachabilityAllStates.setSelected(reachabilitySelected == REACHABILITY_ALL); + noReachability.setSelected(reachabilitySelected == REACHABILITY_NONE); + reachabilityCheckable.setSelected(reachabilitySelected == REACHABILITY_SELECTED); + reachabilityAllStates.setSelected(reachabilitySelected == REACHABILITY_ALL); // Liveness @@ -251,41 +250,46 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act noLiveness = new JRadioButton("No liveness"); noLiveness.addActionListener(this); - if (showLiveness) {jp01.add(noLiveness, c01);} + if (showLiveness) { + jp01.add(noLiveness, c01); + } liveness.add(noLiveness); livenessCheckable = new JRadioButton("Liveness of selected states"); livenessCheckable.addActionListener(this); - if (showLiveness) {jp01.add(livenessCheckable, c01);} + if (showLiveness) { + jp01.add(livenessCheckable, c01); + } liveness.add(livenessCheckable); livenessAllStates = new JRadioButton("Liveness of all states"); livenessAllStates.addActionListener(this); - if (showLiveness){jp01.add(livenessAllStates, c01);} + if (showLiveness) { + jp01.add(livenessAllStates, c01); + } liveness.add(livenessAllStates); - noLiveness.setSelected(livenessSelected == LIVENESS_NONE); - livenessCheckable.setSelected(livenessSelected == LIVENESS_SELECTED); - livenessAllStates.setSelected(livenessSelected == LIVENESS_ALL); + noLiveness.setSelected(livenessSelected == LIVENESS_NONE); + livenessCheckable.setSelected(livenessSelected == LIVENESS_SELECTED); + livenessAllStates.setSelected(livenessSelected == LIVENESS_ALL); // RG saveGraphAUT = new JCheckBox("Reachability Graph Generation", graphSelected); saveGraphAUT.addActionListener(this); - //saveGraphAUT.addSelectionListener(this); + //saveGraphAUT.addSelectionListener(this); jp01.add(saveGraphAUT, c01); graphPath = new JTextField(graphDir); jp01.add(graphPath, c01); saveGraphDot = new JCheckBox("Save RG in dotty:", graphSelectedDot); saveGraphDot.addActionListener(this); - //saveGraphDot.setEnebaled(false); + //saveGraphDot.setEnebaled(false); jp01.add(saveGraphDot, c01); graphPathDot = new JTextField(graphDirDot); jp01.add(graphPathDot, c01); c.add(jp01, BorderLayout.NORTH); - jta = new ScrolledJTextArea(); jta.setEditable(false); jta.setMargin(new Insets(10, 10, 10, 10)); @@ -388,7 +392,6 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act jpinfo.add(elapsedTime, c02); - JPanel jp2 = new JPanel(); jp2.add(start); jp2.add(stop); @@ -400,10 +403,10 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act } - public void actionPerformed(ActionEvent evt) { + public void actionPerformed(ActionEvent evt) { String command = evt.getActionCommand(); - if (command.equals("Start")) { + if (command.equals("Start")) { startProcess(); } else if (command.equals("Stop")) { stopProcess(); @@ -445,7 +448,7 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act if (amc != null) { amc.stopModelChecking(); } - mode = STOPPED; + mode = STOPPED; setButtons(); go = false; if (timer != null) { @@ -476,26 +479,26 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act } public void run() { - // String cmd; - // String list, data; - // int cycle = 0; + // String cmd; + // String list, data; + // int cycle = 0; - // hasError = false; + // hasError = false; TraceManager.addDev("Thread started"); - // File testFile; + // File testFile; try { reinitValues(); jta.append("Starting the model checker\n"); - if (generateDesignSelected) { + if (generateDesignSelected) { TraceManager.addDev("Drawing non modified avatar spec"); if ((mgui != null) && (spec != null)) { mgui.drawAvatarSpecification(spec); } } - + amc = new AvatarModelChecker(spec); endDate = null; previousNbOfStates = 0; @@ -510,11 +513,11 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act // Reachability int res; - if (reachabilitySelected == REACHABILITY_SELECTED) { + if (reachabilitySelected == REACHABILITY_SELECTED) { res = amc.setReachabilityOfSelected(); jta.append("Reachability of " + res + " selected elements activated\n"); - for(SpecificationReachability sr: amc.getReachabilities()){ + for (SpecificationReachability sr : amc.getReachabilities()) { handleReachability(sr.ref1, sr.result); if (sr.ref2 != sr.ref1) { handleReachability(sr.ref2, sr.result); @@ -522,10 +525,10 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act } } - if (reachabilitySelected == REACHABILITY_ALL) { + if (reachabilitySelected == REACHABILITY_ALL) { res = amc.setReachabilityOfAllStates(); - jta.append("Reachability of " + res + " states activated\n"); - for(SpecificationReachability sr: amc.getReachabilities()){ + jta.append("Reachability of " + res + " states activated\n"); + for (SpecificationReachability sr : amc.getReachabilities()) { handleReachability(sr.ref1, sr.result); if (sr.ref2 != sr.ref1) { handleReachability(sr.ref2, sr.result); @@ -544,7 +547,7 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act amc.startModelChecking(); TraceManager.addDev("Model checking done"); - //TraceManager.addDev("RG:" + amc.statesToString() + "\n\n"); + //TraceManager.addDev("RG:" + amc.statesToString() + "\n\n"); if (generateDesignSelected) { TraceManager.addDev("Drawing modified avatar spec"); @@ -561,12 +564,12 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act jta.append("Nb of states:" + amc.getNbOfStates() + "\n"); jta.append("Nb of links:" + amc.getNbOfLinks() + "\n"); - if ((reachabilitySelected == REACHABILITY_SELECTED) || (reachabilitySelected == REACHABILITY_ALL)) { + if ((reachabilitySelected == REACHABILITY_SELECTED) || (reachabilitySelected == REACHABILITY_ALL)) { jta.append("\nReachabilities found:\n"); jta.append(amc.reachabilityToString()); // Back annotation on diagrams - for(SpecificationReachability sr: amc.getReachabilities()){ + for (SpecificationReachability sr : amc.getReachabilities()) { //TraceManager.addDev("Handing reachability of " + sr); handleReachability(sr.ref1, sr.result); if (sr.ref2 != sr.ref1) { @@ -577,28 +580,28 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act //TraceManager.addDev(amc.toString()); //TraceManager.addDev(amc.toString()); - DateFormat dateFormat = new SimpleDateFormat("_yyyyMMdd_HHmmss"); - Date date = new Date(); - String dateAndTime=dateFormat.format(date); + DateFormat dateFormat = new SimpleDateFormat("_yyyyMMdd_HHmmss"); + Date date = new Date(); + String dateAndTime = dateFormat.format(date); if (saveGraphAUT.isSelected()) { - graphAUT = amc.toAUT(); - graphMode = GRAPH_OK; - //TraceManager.addDev("graph AUT=\n" + graph); - - String autfile; - if (graphPath.getText().indexOf("$") != -1) { - autfile = Conversion.replaceAllChar(graphPath.getText(), '$', dateAndTime); - } else { - autfile = graphPath.getText(); - } - - try { + graphAUT = amc.toAUT(); + graphMode = GRAPH_OK; + //TraceManager.addDev("graph AUT=\n" + graph); + + String autfile; + if (graphPath.getText().indexOf("$") != -1) { + autfile = Conversion.replaceAllChar(graphPath.getText(), '$', dateAndTime); + } else { + autfile = graphPath.getText(); + } + + try { RG rg = new RG(autfile); - rg.data = graphAUT; + rg.data = graphAUT; rg.fileName = autfile; - rg.nbOfStates = amc.getNbOfStates(); - rg.nbOfTransitions = amc.getNbOfLinks(); + rg.nbOfStates = amc.getNbOfStates(); + rg.nbOfTransitions = amc.getNbOfLinks(); mgui.addRG(rg); FileUtils.saveFile(autfile, graphAUT); jta.append("Graph saved in " + autfile + "\n"); @@ -607,12 +610,12 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act } } if (saveGraphDot.isSelected()) { - String dotfile; - if (graphPathDot.getText().indexOf("$") != -1) { - dotfile = Conversion.replaceAllChar(graphPathDot.getText(), '$', dateAndTime); - } else { - dotfile = graphPathDot.getText(); - } + String dotfile; + if (graphPathDot.getText().indexOf("$") != -1) { + dotfile = Conversion.replaceAllChar(graphPathDot.getText(), '$', dateAndTime); + } else { + dotfile = graphPathDot.getText(); + } try { String graph = amc.toDOT(); //TraceManager.addDev("graph AUT=\n" + graph); @@ -637,22 +640,22 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act protected void handleReachability(Object _o, SpecificationReachabilityType _res) { if (_o instanceof AvatarStateMachineElement) { - Object o = ((AvatarStateMachineElement)_o).getReferenceObject(); + Object o = ((AvatarStateMachineElement) _o).getReferenceObject(); if (o instanceof TGComponent) { - TGComponent tgc = (TGComponent)(o); + TGComponent tgc = (TGComponent) (o); TraceManager.addDev("Reachability of tgc=" + tgc + " value=" + tgc.getValue() + " class=" + tgc.getClass()); - switch(_res) { - case NOTCOMPUTED: - tgc.setReachability(TGComponent.ACCESSIBILITY_UNKNOWN); - tgc.setLiveness(TGComponent.ACCESSIBILITY_UNKNOWN); - break; - case REACHABLE: - tgc.setReachability(TGComponent.ACCESSIBILITY_OK); - break; - case NONREACHABLE: - tgc.setReachability(TGComponent.ACCESSIBILITY_KO); - tgc.setLiveness(TGComponent.ACCESSIBILITY_KO); - break; + switch (_res) { + case NOTCOMPUTED: + tgc.setReachability(TGComponent.ACCESSIBILITY_UNKNOWN); + tgc.setLiveness(TGComponent.ACCESSIBILITY_UNKNOWN); + break; + case REACHABLE: + tgc.setReachability(TGComponent.ACCESSIBILITY_OK); + break; + case NONREACHABLE: + tgc.setReachability(TGComponent.ACCESSIBILITY_KO); + tgc.setLiveness(TGComponent.ACCESSIBILITY_KO); + break; } tgc.getTDiagramPanel().repaint(); } @@ -667,7 +670,7 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act graphSelected = saveGraphAUT.isSelected(); graphPath.setEnabled(saveGraphAUT.isSelected()); graphSelectedDot = saveGraphDot.isSelected(); - saveGraphDot.setEnabled(saveGraphAUT.isSelected()); + saveGraphDot.setEnabled(saveGraphAUT.isSelected()); graphPathDot.setEnabled(saveGraphDot.isSelected() && saveGraphAUT.isSelected()); if (generateDesign != null) { generateDesignSelected = generateDesign.isSelected(); @@ -677,38 +680,38 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act if (noReachability.isSelected()) { reachabilitySelected = REACHABILITY_NONE; - } else if ( reachabilityCheckable.isSelected()) { + } else if (reachabilityCheckable.isSelected()) { reachabilitySelected = REACHABILITY_SELECTED; } else { reachabilitySelected = REACHABILITY_ALL; } - switch(mode) { - case NOT_STARTED: - if ((reachabilitySelected == REACHABILITY_SELECTED) || (reachabilitySelected == REACHABILITY_ALL) || graphSelected || graphSelectedDot) { - start.setEnabled(true); - } else { + switch (mode) { + case NOT_STARTED: + if ((reachabilitySelected == REACHABILITY_SELECTED) || (reachabilitySelected == REACHABILITY_ALL) || graphSelected || graphSelectedDot) { + start.setEnabled(true); + } else { + start.setEnabled(false); + } + stop.setEnabled(false); + close.setEnabled(true); + //setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + getGlassPane().setVisible(false); + break; + case STARTED: start.setEnabled(false); - } - stop.setEnabled(false); - close.setEnabled(true); - //setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - getGlassPane().setVisible(false); - break; - case STARTED: - start.setEnabled(false); - stop.setEnabled(true); - close.setEnabled(false); - getGlassPane().setVisible(true); - //setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - break; - case STOPPED: - default: - start.setEnabled(false); - stop.setEnabled(false); - close.setEnabled(true); - getGlassPane().setVisible(false); - break; + stop.setEnabled(true); + close.setEnabled(false); + getGlassPane().setVisible(true); + //setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + break; + case STOPPED: + default: + start.setEnabled(false); + stop.setEnabled(false); + close.setEnabled(true); + getGlassPane().setVisible(false); + break; } show.setEnabled(graphMode == GRAPH_OK); @@ -732,8 +735,8 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act try { if (amc != null) { int nbOfStatess = amc.getNbOfStates(); - nbOfStates.setText(""+nbOfStatess); - nbOfLinks.setText(""+amc.getNbOfLinks()); + nbOfStates.setText("" + nbOfStatess); + nbOfLinks.setText("" + amc.getNbOfLinks()); // Reachability and deadlocks int nb = amc.getNbOfReachabilities(); @@ -746,10 +749,10 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act nbOfReachabilitiesNotFound.setText("" + nb); - nbOfDeadlocks.setText(""+amc.getNbOfDeadlocks()); + nbOfDeadlocks.setText("" + amc.getNbOfDeadlocks()); - nbOfPendingStates.setText(""+amc.getNbOfPendingStates()); + nbOfPendingStates.setText("" + amc.getNbOfPendingStates()); Date d; previousDate = new Date(); if (endDate != null) { @@ -757,12 +760,12 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act } else { d = previousDate; } - long duration = d.getTime() - startDate.getTime(); - long durationMn = TimeUnit.MILLISECONDS.toMinutes(duration); - long durationSec = TimeUnit.MILLISECONDS.toSeconds(duration) - durationMn*60; - long durationMs = duration - 1000*(durationSec - durationMn*60); + long duration = d.getTime() - startDate.getTime(); + long durationMn = TimeUnit.MILLISECONDS.toMinutes(duration); + long durationSec = TimeUnit.MILLISECONDS.toSeconds(duration) - durationMn * 60; + long durationMs = duration - 1000 * (durationSec - durationMn * 60); - //TraceManager.addDev("mn=" + durationMn + " sec=" + durationSec + " ms=" + durationMs + " raw=" + duration); + //TraceManager.addDev("mn=" + durationMn + " sec=" + durationSec + " ms=" + durationMs + " raw=" + duration); String t = String.format("%02d min %02d sec %03d msec", durationMn, durationSec, durationMs); @@ -780,7 +783,7 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act //if (diff == 0) { - nbOfStatesPerSecond.setText(""+1000*diff/duration); + nbOfStatesPerSecond.setText("" + 1000 * diff / duration); updateInfo(); //} @@ -821,6 +824,7 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act private class ModelCheckerMonitor extends TimerTask { private JDialogAvatarModelChecker jdamc; + public ModelCheckerMonitor(JDialogAvatarModelChecker _jdamc) { jdamc = _jdamc; } diff --git a/src/main/java/ui/window/JFrameMinimize.java b/src/main/java/ui/window/JFrameMinimize.java index f2e4bb9029d65a985e1b8c1402f788424b229036..3cc73fabeaee332a1a6ad2977f42099f0d5445e1 100755 --- a/src/main/java/ui/window/JFrameMinimize.java +++ b/src/main/java/ui/window/JFrameMinimize.java @@ -37,15 +37,16 @@ */ - - package ui.window; +import myutil.Conversion; +import myutil.FileException; +import myutil.FileUtils; import myutil.ScrolledJTextArea; -import ui.util.IconManager; import ui.MainGUI; import ui.graph.AUTGraph; import ui.graph.RG; +import ui.util.IconManager; import javax.swing.*; import javax.swing.event.ListSelectionEvent; @@ -53,8 +54,12 @@ import javax.swing.event.ListSelectionListener; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.HashSet; @@ -62,31 +67,33 @@ import java.util.HashSet; * Class JFrameMinimize * Frame for handling the minimization of graphs * Creation: 09/12/2016 - * @version 1.0 09/12/2016 + * * @author Ludovic APVRILLE + * @version 1.0 09/12/2016 */ -public class JFrameMinimize extends javax.swing.JFrame implements ActionListener, ListSelectionListener, Runnable { +public class JFrameMinimize extends javax.swing.JFrame implements ActionListener, ListSelectionListener, Runnable { /*private static boolean isAldebaranSelected = false; private static boolean isOminSelected = false; private static boolean isStrongSelected = true;*/ - + protected static boolean graphSelected = true; + private MainGUI mgui; private RG rg; private RG newRG; - + protected Thread t; protected boolean listOfActionsComputed = false; - java.util.List<String> sortedListProjected ; + java.util.List<String> sortedListProjected; java.util.List<String> sortedListIgnored; private int mode; - + protected final static int NO_DATA = 0; protected final static int NOT_STARTED = 1; protected final static int STARTED = 2; protected final static int STOPPED = 3; - + //subpanels private JPanel panel1, panel2, panel3, panel4; private JList<String> listIgnored; @@ -96,38 +103,49 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener private JButton addOneIgnored; private JButton allIgnored; protected JTextArea jta; - + + // Panel for graph saving + private JCheckBox saveGraphAUT; + private JTextField graphPath; + private String graphDir; + private JCheckBox removeInternalActions; private JRadioButton tauOnly; private JRadioButton allMinimization; - - + + // Main Panel private JButton start, stop, close; - - /** Creates new form */ - public JFrameMinimize(Frame _f, MainGUI _mgui, String _title, RG _rg) { + + /** + * Creates new form + */ + public JFrameMinimize(Frame _f, MainGUI _mgui, String _title, RG _rg, String _graphDir) { super(_title); - + mgui = _mgui; - rg = _rg; - + rg = _rg; + + if (graphDir == null) { + graphDir = _graphDir + File.separator + "minimized$.aut"; + } + initComponents(); myInitComponents(); pack(); - + //getGlassPane().addMouseListener( new MouseAdapter() {}); getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); } - - + + private void myInitComponents() { mode = NO_DATA; setButtons(); - t = new Thread(this); - t.start(); + t = new Thread(this); + t.start(); } - + private void initComponents() { Container c = getContentPane(); GridBagLayout gridbag1 = new GridBagLayout(); @@ -137,51 +155,57 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener setFont(new Font("Helvetica", Font.PLAIN, 14)); c.setLayout(new BorderLayout()); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - + // ignored list - + JPanel panelTop = new JPanel(); panelTop.setLayout(new BorderLayout()); - + panel1 = new JPanel(); panel1.setLayout(new BorderLayout()); panel1.setBorder(new javax.swing.border.TitledBorder("Actions ignored")); listIgnored = new JList<String>(); //listIgnored.setPreferredSize(new Dimension(200, 250)); - listIgnored.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION ); + listIgnored.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); listIgnored.addListSelectionListener(this); JScrollPane scrollPane1 = new JScrollPane(listIgnored); panel1.add(scrollPane1, BorderLayout.CENTER); panel1.setPreferredSize(new Dimension(300, 250)); panelTop.add(panel1, BorderLayout.WEST); - + // validated list panel2 = new JPanel(); panel2.setLayout(new BorderLayout()); panel2.setBorder(new javax.swing.border.TitledBorder("Actions taken into account")); - listProjected = new JList<String> (); + listProjected = new JList<String>(); //listProjected.setPreferredSize(new Dimension(200, 250)); - listProjected.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION ); + listProjected.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); listProjected.addListSelectionListener(this); JScrollPane scrollPane2 = new JScrollPane(listProjected); panel2.add(scrollPane2, BorderLayout.CENTER); panel2.setPreferredSize(new Dimension(300, 250)); panelTop.add(panel2, BorderLayout.EAST); - + // radio buttons panel4 = new JPanel(); panel4.setLayout(gridbag4); panel4.setBorder(new javax.swing.border.TitledBorder("Minimization: tools and options")); + + + saveGraphAUT = new JCheckBox("Save the minimized graph in AUT format", graphSelected); + //saveGraphAUT.addSelectionListener(this); + graphPath = new JTextField(graphDir); + removeInternalActions = new JCheckBox("Remove internal actions"); removeInternalActions.setEnabled(true); - tauOnly = new JRadioButton("Only remove tau transitions"); - tauOnly.setEnabled(true); - allMinimization = new JRadioButton("Complete minimization [Experimental]"); - allMinimization.setEnabled(true); - ButtonGroup bt = new ButtonGroup(); - bt.add(tauOnly); - bt.add(allMinimization); - allMinimization.setSelected(true); + tauOnly = new JRadioButton("Only remove tau transitions"); + tauOnly.setEnabled(true); + allMinimization = new JRadioButton("Complete minimization [Experimental]"); + allMinimization.setEnabled(true); + ButtonGroup bt = new ButtonGroup(); + bt.add(tauOnly); + bt.add(allMinimization); + allMinimization.setSelected(true); //c4.anchor = GridBagConstraints.EAST; c4.weighty = 1.0; @@ -189,53 +213,56 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener c4.gridwidth = GridBagConstraints.REMAINDER; //end row c4.fill = GridBagConstraints.HORIZONTAL; c4.gridheight = 1; + panel4.add(saveGraphAUT, c4); + panel4.add(graphPath, c4); + panel4.add(allMinimization, c4); panel4.add(removeInternalActions, c4); - panel4.add(tauOnly, c4); - panel4.add(allMinimization, c4); + panel4.add(tauOnly, c4); + panel4.add(allMinimization, c4); panelTop.add(panel4, BorderLayout.SOUTH); - - + + // central buttons panel3 = new JPanel(); panel3.setLayout(gridbag1); - + c1.weighty = 1.0; c1.weightx = 1.0; c1.gridwidth = GridBagConstraints.REMAINDER; //end row c1.fill = GridBagConstraints.HORIZONTAL; c1.gridheight = 1; - + allProjected = new JButton(IconManager.imgic50); allProjected.setPreferredSize(new Dimension(50, 25)); allProjected.addActionListener(this); allProjected.setActionCommand("All"); panel3.add(allProjected, c1); - + addOneProjected = new JButton(IconManager.imgic48); addOneProjected.setPreferredSize(new Dimension(50, 25)); addOneProjected.addActionListener(this); addOneProjected.setActionCommand("Add one"); panel3.add(addOneProjected, c1); - + panel3.add(new JLabel(" "), c1); - + addOneIgnored = new JButton(IconManager.imgic46); addOneIgnored.addActionListener(this); addOneIgnored.setPreferredSize(new Dimension(50, 25)); addOneIgnored.setActionCommand("One Ignored"); panel3.add(addOneIgnored, c1); - + allIgnored = new JButton(IconManager.imgic44); allIgnored.addActionListener(this); allIgnored.setPreferredSize(new Dimension(50, 25)); allIgnored.setActionCommand("All Ignored"); panel3.add(allIgnored, c1); - + panelTop.add(panel3, BorderLayout.CENTER); - + c.add(panelTop, BorderLayout.NORTH); - + // textarea panel jta = new ScrolledJTextArea(); jta.setEditable(false); @@ -245,36 +272,44 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener Font f = new Font("Courrier", Font.BOLD, 12); jta.setFont(f); JScrollPane jsp = new JScrollPane(jta, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); - + c.add(jsp, BorderLayout.CENTER); - - + + // Button panel; + + JPanel southPanel = new JPanel(new BorderLayout()); + + + + start = new JButton("Start", IconManager.imgic53); stop = new JButton("Stop", IconManager.imgic55); close = new JButton("Close", IconManager.imgic27); - + start.setPreferredSize(new Dimension(150, 30)); stop.setPreferredSize(new Dimension(150, 30)); close.setPreferredSize(new Dimension(150, 30)); - + start.addActionListener(this); stop.addActionListener(this); close.addActionListener(this); - + JPanel jp2 = new JPanel(); jp2.add(start); jp2.add(stop); jp2.add(close); - - c.add(jp2, BorderLayout.SOUTH); + + southPanel.add(jp2, BorderLayout.CENTER); + + c.add(southPanel, BorderLayout.SOUTH); } - - public void actionPerformed(ActionEvent evt) { + + public void actionPerformed(ActionEvent evt) { String command = evt.getActionCommand(); - + // Compare the action command to the known actions. - if (command.equals("Start")) { + if (command.equals("Start")) { startProcess(); } else if (command.equals("Stop")) { stopProcess(); @@ -282,7 +317,7 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener closeDialog(); } else if (evt.getSource() == addOneIgnored) { addOneIgnored(); - } else if (evt.getSource() == addOneProjected) { + } else if (evt.getSource() == addOneProjected) { addOneProjected(); } else if (evt.getSource() == allProjected) { allProjected(); @@ -292,52 +327,51 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener } - private void updateListsFromModels() { - Collections.sort(sortedListProjected); - Collections.sort(sortedListIgnored); - String[] strarray = new String[sortedListProjected.size()]; - sortedListProjected.toArray(strarray ); - listProjected.setListData(strarray); - strarray = new String[sortedListIgnored.size()]; - sortedListIgnored.toArray(strarray ); - listIgnored.setListData(strarray); - setButtonsList(); + Collections.sort(sortedListProjected); + Collections.sort(sortedListIgnored); + String[] strarray = new String[sortedListProjected.size()]; + sortedListProjected.toArray(strarray); + listProjected.setListData(strarray); + strarray = new String[sortedListIgnored.size()]; + sortedListIgnored.toArray(strarray); + listIgnored.setListData(strarray); + setButtonsList(); } - - + + private void addOneIgnored() { - java.util.List<String> ll= listProjected.getSelectedValuesList(); - for (String o: ll){ + java.util.List<String> ll = listProjected.getSelectedValuesList(); + for (String o : ll) { sortedListProjected.remove(o); - sortedListIgnored.add (o); + sortedListIgnored.add(o); } updateListsFromModels(); setButtons(); } - + private void addOneProjected() { - java.util.List<String> ll= listIgnored.getSelectedValuesList(); - for (String o: ll){ + java.util.List<String> ll = listIgnored.getSelectedValuesList(); + for (String o : ll) { sortedListIgnored.remove(o); - sortedListProjected.add (o); + sortedListProjected.add(o); } updateListsFromModels(); setButtons(); - } - + } + private void allProjected() { - sortedListProjected.addAll(sortedListIgnored); - sortedListIgnored.clear(); - updateListsFromModels(); - + sortedListProjected.addAll(sortedListIgnored); + sortedListIgnored.clear(); + updateListsFromModels(); + setButtons(); } - + private void allIgnored() { sortedListIgnored.addAll(sortedListProjected); - sortedListProjected.clear(); - updateListsFromModels(); + sortedListProjected.clear(); + updateListsFromModels(); setButtons(); } @@ -363,10 +397,10 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener } } }*/ - - + + private void setButtons() { - switch(mode) { + switch (mode) { case NO_DATA: listProjected.setEnabled(false); listIgnored.setEnabled(false); @@ -406,71 +440,71 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener break; } } - + private void unsetButtonsList() { addOneProjected.setEnabled(false); addOneIgnored.setEnabled(false); allProjected.setEnabled(false); allIgnored.setEnabled(false); } - + private void setButtonsList() { int i1 = listIgnored.getSelectedIndex(); int i2 = listProjected.getSelectedIndex(); - + if (i1 == -1) { addOneProjected.setEnabled(false); } else { addOneProjected.setEnabled(true); } - + if (i2 == -1) { addOneIgnored.setEnabled(false); } else { addOneIgnored.setEnabled(true); } - if (sortedListIgnored == null) { - allProjected.setEnabled(false); - } else { - if (sortedListIgnored.size() == 0) { - allProjected.setEnabled(false); - } else { - allProjected.setEnabled(true); - } - } - - if (sortedListProjected == null) { - allIgnored.setEnabled(false); - } else { - if (sortedListProjected.size() == 0) { + if (sortedListIgnored == null) { + allProjected.setEnabled(false); + } else { + if (sortedListIgnored.size() == 0) { + allProjected.setEnabled(false); + } else { + allProjected.setEnabled(true); + } + } + + if (sortedListProjected == null) { allIgnored.setEnabled(false); - //closeButton.setEnabled(false); - //closeButton.setEnabled(false); - } else { - allIgnored.setEnabled(true); - //closeButton.setEnabled(true); - } - } + } else { + if (sortedListProjected.size() == 0) { + allIgnored.setEnabled(false); + //closeButton.setEnabled(false); + //closeButton.setEnabled(false); + } else { + allIgnored.setEnabled(true); + //closeButton.setEnabled(true); + } + } } - + public void valueChanged(ListSelectionEvent e) { setButtons(); } - + public void closeDialog() { if (mode == STARTED) { stopProcess(); } dispose(); } - + public void stopProcess() { - - mode = STOPPED; + + mode = STOPPED; setButtons(); } - + public void startProcess() { t = new Thread(this); mode = STARTED; @@ -480,84 +514,104 @@ public class JFrameMinimize extends javax.swing.JFrame implements ActionListener public void computeListOfActions() { - jta.append("Computing list of Actions\n"); - jta.append("\t1. Cloning graph\n"); - if (rg.graph == null) { - if (rg.data == null) { - jta.append("ERROR: invalid graph\n"); - return; - } - - rg.graph = new AUTGraph(); - jta.append("\t\t Buillding graph in memory\n"); - rg.graph.buildGraph(rg.data); - jta.append("\t\t Finishing graph in memory\n"); - rg.graph.computeStates(); - } - newRG = new RG("minimized" + rg.name); - newRG.data = rg.data; - newRG.graph = rg.graph.cloneMe(); - jta.append("\t2. Making list of actions\n"); - HashSet<String> hs = newRG.graph.getAllActions(); - jta.append("\t3. Sorting actions, and setting graphical lists\n"); - - sortedListProjected = new ArrayList<String>(hs); - sortedListIgnored = new ArrayList<String>(); - updateListsFromModels(); - - jta.append("All done\n"); - - jta.append("\nSelect actions and then, click on 'start' to start minimization\n"); - listOfActionsComputed = true; - mode = NOT_STARTED; - setButtons(); + jta.append("Computing list of Actions\n"); + jta.append("\t1. Cloning graph\n"); + if (rg.graph == null) { + if (rg.data == null) { + jta.append("ERROR: invalid graph\n"); + return; + } + + rg.graph = new AUTGraph(); + jta.append("\t\t Buillding graph in memory\n"); + rg.graph.buildGraph(rg.data); + jta.append("\t\t Finishing graph in memory\n"); + rg.graph.computeStates(); + } + newRG = new RG("minimized" + rg.name); + newRG.data = rg.data; + newRG.graph = rg.graph.cloneMe(); + jta.append("\t2. Making list of actions\n"); + HashSet<String> hs = newRG.graph.getAllActions(); + jta.append("\t3. Sorting actions, and setting graphical lists\n"); + + sortedListProjected = new ArrayList<String>(hs); + sortedListIgnored = new ArrayList<String>(); + updateListsFromModels(); + + jta.append("All done\n"); + + jta.append("\nSelect actions and then, click on 'start' to start minimization\n"); + listOfActionsComputed = true; + mode = NOT_STARTED; + setButtons(); } - + public void run() { - if (!listOfActionsComputed) { - computeListOfActions(); - return; - } - - jta.append("\nMinimizing graph...\n"); - String[] strarray = new String[sortedListIgnored.size()]; - sortedListIgnored.toArray(strarray ); - if (removeInternalActions.isSelected()) { - int toBeRemoved = 0; - for(String s: sortedListProjected) { - if (s.startsWith("i(")) { - toBeRemoved ++; - } - } - if (toBeRemoved > 0) { - String[] allstr = new String[strarray.length + toBeRemoved]; - for(int i=0; i<strarray.length; i++) { - allstr[i] = strarray[i]; - } - int index = strarray.length; - for(String s: sortedListProjected) { - if (s.startsWith("i(")) { - allstr[index] = s; - index++; - } - - } - strarray = allstr; - - } - } - newRG.graph.minimize(strarray, tauOnly.isSelected()); - newRG.nbOfStates = newRG.graph.getNbOfStates(); - newRG.nbOfTransitions = newRG.graph.getTransitions().size(); - mgui.addRG(newRG); - - jta.append("\nGraph minimized: " + newRG.nbOfStates + " states, " + newRG.nbOfTransitions + " transitions\n"); - - + if (!listOfActionsComputed) { + computeListOfActions(); + return; + } + + jta.append("\nMinimizing graph...\n"); + String[] strarray = new String[sortedListIgnored.size()]; + sortedListIgnored.toArray(strarray); + if (removeInternalActions.isSelected()) { + int toBeRemoved = 0; + for (String s : sortedListProjected) { + if (s.startsWith("i(")) { + toBeRemoved++; + } + } + if (toBeRemoved > 0) { + String[] allstr = new String[strarray.length + toBeRemoved]; + for (int i = 0; i < strarray.length; i++) { + allstr[i] = strarray[i]; + } + int index = strarray.length; + for (String s : sortedListProjected) { + if (s.startsWith("i(")) { + allstr[index] = s; + index++; + } + + } + strarray = allstr; + + } + } + newRG.graph.minimize(strarray, tauOnly.isSelected()); + newRG.nbOfStates = newRG.graph.getNbOfStates(); + newRG.nbOfTransitions = newRG.graph.getTransitions().size(); + mgui.addRG(newRG); + + jta.append("\nGraph minimized: " + newRG.nbOfStates + " states, " + newRG.nbOfTransitions + " transitions\n"); + + if (saveGraphAUT.isSelected()) { + DateFormat dateFormat = new SimpleDateFormat("_yyyyMMdd_HHmmss"); + Date date = new Date(); + String dateAndTime = dateFormat.format(date); + String graphAUT = newRG.graph.toAUTStringFormat(); + String autfile; + + if (graphPath.getText().indexOf("$") != -1) { + autfile = Conversion.replaceAllChar(graphPath.getText(), '$', dateAndTime); + } else { + autfile = graphPath.getText(); + } + + try { + FileUtils.saveFile(autfile, graphAUT); + } catch (FileException e) { + jta.append("Graph could not be saved in " + autfile + "\n"); + } + jta.append("Graph saved in " + autfile + "\n"); + } + mode = STOPPED; setButtons(); } - + } diff --git a/src/main/java/ui/window/JFrameRefusalGraph.java b/src/main/java/ui/window/JFrameRefusalGraph.java index b09e5c0216abfaba978f4b0d273c89445d542e96..2d962b614926b557d178c3d12de1e99a4ebd1f56 100755 --- a/src/main/java/ui/window/JFrameRefusalGraph.java +++ b/src/main/java/ui/window/JFrameRefusalGraph.java @@ -37,10 +37,11 @@ */ - - package ui.window; +import myutil.Conversion; +import myutil.FileException; +import myutil.FileUtils; import myutil.ScrolledJTextArea; import ui.util.IconManager; import ui.MainGUI; @@ -53,8 +54,12 @@ import javax.swing.event.ListSelectionListener; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.HashSet; @@ -62,126 +67,143 @@ import java.util.HashSet; * Class JFrameRefusalGraph * Frame for handling the construction of the refusal graph * Creation: 18/08/2017 - * @version 1.0 18/08/2017 + * * @author Ludovic APVRILLE + * @version 1.0 18/08/2017 */ -public class JFrameRefusalGraph extends javax.swing.JFrame implements ActionListener, Runnable { +public class JFrameRefusalGraph extends javax.swing.JFrame implements ActionListener, Runnable { /*private static boolean isAldebaranSelected = false; private static boolean isOminSelected = false; private static boolean isStrongSelected = true;*/ - + + protected static boolean graphSelected = true; + private MainGUI mgui; private RG rg; private RG newRG; private RG newRGTS; - + protected Thread t; private int mode; - + protected final static int NOT_STARTED = 1; protected final static int STARTED = 2; protected final static int STOPPED = 3; - - //subpanels + + //subpanels & components private JPanel panel2; - + private JCheckBox saveGraphAUT; + private JTextField graphPath; + private String graphDir; + // Main Panel private ScrolledJTextArea jta; private JButton start, stop, close; - - /** Creates new form */ - public JFrameRefusalGraph(Frame _f, MainGUI _mgui, String _title, RG _rg) { + + /** + * Creates new form + */ + public JFrameRefusalGraph(Frame _f, MainGUI _mgui, String _title, RG _rg, String _graphDir) { super(_title); - + mgui = _mgui; - rg = _rg; - + rg = _rg; + + if (graphDir == null) { + graphDir = _graphDir + File.separator + "testsequences$.aut"; + } + initComponents(); myInitComponents(); pack(); - + //getGlassPane().addMouseListener( new MouseAdapter() {}); getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); } - - + + private void myInitComponents() { mode = NOT_STARTED; - } - + } + private void initComponents() { Container c = getContentPane(); - setFont(new Font("Helvetica", Font.PLAIN, 14)); + setFont(new Font("Helvetica", Font.PLAIN, 14)); c.setLayout(new BorderLayout()); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - - - + + JPanel compPanel = new JPanel(new BorderLayout()); + saveGraphAUT = new JCheckBox("Save the generated sequences in AUT format", graphSelected); + compPanel.add(saveGraphAUT, BorderLayout.NORTH); + //saveGraphAUT.addSelectionListener(this); + graphPath = new JTextField(graphDir); + compPanel.add(graphPath, BorderLayout.SOUTH); + c.add(compPanel, BorderLayout.NORTH); + + // textarea panel jta = new ScrolledJTextArea(); jta.setEditable(false); jta.setMargin(new Insets(10, 10, 10, 10)); jta.setTabSize(3); - jta.append("Select actions and then, click on 'start' to generate test sequences\n"); + jta.append("Click on 'start' to generate test sequences\n"); Font f = new Font("Courrier", Font.BOLD, 12); jta.setFont(f); JScrollPane jsp = new JScrollPane(jta, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); - + c.add(jsp, BorderLayout.CENTER); - - + + // Button panel; start = new JButton("Start", IconManager.imgic53); stop = new JButton("Stop", IconManager.imgic55); close = new JButton("Close", IconManager.imgic27); - + start.setPreferredSize(new Dimension(150, 30)); stop.setPreferredSize(new Dimension(150, 30)); close.setPreferredSize(new Dimension(150, 30)); - + start.addActionListener(this); stop.addActionListener(this); close.addActionListener(this); - + JPanel jp2 = new JPanel(); jp2.add(start); jp2.add(stop); jp2.add(close); - + c.add(jp2, BorderLayout.SOUTH); } - - public void actionPerformed(ActionEvent evt) { + + public void actionPerformed(ActionEvent evt) { String command = evt.getActionCommand(); - + // Compare the action command to the known actions. - if (command.equals("Start")) { + if (command.equals("Start")) { startProcess(); } else if (command.equals("Stop")) { stopProcess(); } else if (command.equals("Close")) { closeDialog(); - } + } } - - private void setButtons() { - switch(mode) { - case NOT_STARTED: - start.setEnabled(true); - stop.setEnabled(false); - close.setEnabled(true); - getGlassPane().setVisible(false); - break; - case STARTED: - start.setEnabled(false); + switch (mode) { + case NOT_STARTED: + start.setEnabled(true); + stop.setEnabled(false); + close.setEnabled(true); + getGlassPane().setVisible(false); + break; + case STARTED: + start.setEnabled(false); stop.setEnabled(true); close.setEnabled(false); - getGlassPane().setVisible(false); + getGlassPane().setVisible(false); break; case STOPPED: default: @@ -192,21 +214,21 @@ public class JFrameRefusalGraph extends javax.swing.JFrame implements ActionList break; } } - - + + public void closeDialog() { if (mode == STARTED) { stopProcess(); } + graphSelected = saveGraphAUT.isSelected(); dispose(); } - + public void stopProcess() { - - mode = STOPPED; + mode = STOPPED; setButtons(); } - + public void startProcess() { t = new Thread(this); mode = STARTED; @@ -215,32 +237,51 @@ public class JFrameRefusalGraph extends javax.swing.JFrame implements ActionList } - public void run() { - jta.append("\nBuilding refusal graph...\n"); - - newRG = rg.generateRefusalGraph(); - - if (newRG != null) { - newRG.nbOfStates = newRG.graph.getNbOfStates(); - newRG.nbOfTransitions = newRG.graph.getTransitions().size(); - mgui.addRG(newRG); - jta.append("\nRefusal Graph: " + newRG.nbOfStates + " states, " + newRG.nbOfTransitions + " transitions\n"); - jta.append("Generating test sequences\n"); - newRGTS = newRG.generateTestSequences(); - newRGTS.nbOfStates = newRGTS.graph.getNbOfStates(); - newRGTS.nbOfTransitions = newRGTS.graph.getTransitions().size(); - mgui.addRG(newRGTS); - jta.append("\nTest sequences: " + newRGTS.nbOfStates + " states, " + newRGTS.nbOfTransitions + " transitions\n"); - - } else { - jta.append("\nCould not build Refusal Graph\n"); - } - + jta.append("\nBuilding refusal graph...\n"); + + newRG = rg.generateRefusalGraph(); + + if (newRG != null) { + newRG.nbOfStates = newRG.graph.getNbOfStates(); + newRG.nbOfTransitions = newRG.graph.getTransitions().size(); + //mgui.addRG(newRG); + jta.append("\nRefusal Graph: " + newRG.nbOfStates + " states, " + newRG.nbOfTransitions + " transitions\n"); + jta.append("Generating test sequences\n"); + newRGTS = newRG.generateTestSequences(); + newRGTS.nbOfStates = newRGTS.graph.getNbOfStates(); + newRGTS.nbOfTransitions = newRGTS.graph.getTransitions().size(); + mgui.addRG(newRGTS); + jta.append("\nTest sequences: " + newRGTS.nbOfStates + " states, " + newRGTS.nbOfTransitions + " transitions\n"); + + if (saveGraphAUT.isSelected()) { + DateFormat dateFormat = new SimpleDateFormat("_yyyyMMdd_HHmmss"); + Date date = new Date(); + String dateAndTime = dateFormat.format(date); + String graphAUT = newRGTS.graph.toAUTStringFormat(); + String autfile; + + if (graphPath.getText().indexOf("$") != -1) { + autfile = Conversion.replaceAllChar(graphPath.getText(), '$', dateAndTime); + } else { + autfile = graphPath.getText(); + } + + try { + FileUtils.saveFile(autfile, graphAUT); + } catch (FileException e) { + jta.append("Graph could not be saved in " + autfile + "\n"); + } + jta.append("Graph saved in " + autfile + "\n"); + } + } else { + jta.append("\nCould not build Refusal Graph\n"); + } + mode = STOPPED; setButtons(); } - + }