diff --git a/Makefile b/Makefile index 44513b434b03791adfd1346110c8320b7e09b625..01d7dae1e6b58b34cd03dba93a50807595693e60 100755 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ make documentation Generate the documentation of java classes using javadoc make release Prepare a new release for the website. It produces the release.tgz and releaseWithSrc.tgz files. make test Run tests on TTool. -make noguitest Run non graphical tests on TTool. +make noguitest Run non graphical tests on TTool. make publish_jar Build TTool and upload the resulting archive. !!! Must have the right ssh key installed for this !!! make install Install TTool, the jar of companion software and the runtime @@ -58,7 +58,7 @@ make ultraclean Clean the repository from binaries and compilation artif make ttooljavac Build TTool only with javac make ttoolnotest Build TTool with gradle, but do not execute test. Performs the install make allnotest Builld all apps, but do not execute tests. Performs the install -make internalhelp Generate the help of TTool in HTML format +make internalhelp Generate the help of TTool in HTML format Other targets: diff --git a/build.txt b/build.txt index 94919a66f181c4eebf2903b0d3dd217f8a537a1a..39359b5e87934870a301a01eba95335c93a1ec26 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -14830 \ No newline at end of file +14843 \ No newline at end of file diff --git a/modeling/DIPLODOCUS/SmartCardProtocol.xml b/modeling/DIPLODOCUS/SmartCardProtocol.xml index 28734445d4b27902453cd3aa8579f2f54a4d57af..341f363432fe621df2020384dc3dde257e527a2c 100755 --- a/modeling/DIPLODOCUS/SmartCardProtocol.xml +++ b/modeling/DIPLODOCUS/SmartCardProtocol.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<TURTLEGMODELING version="3.0 beta" ANIMATE_INTERACTIVE_SIMULATION="true" ACTIVATE_PENALTIES="false" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="3" LAST_SELECTED_SUB_TAB="0"> +<TURTLEGMODELING version="3.0 beta" ANIMATE_INTERACTIVE_SIMULATION="false" ACTIVATE_PENALTIES="false" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="0" LAST_SELECTED_SUB_TAB="0"> <Modeling type="TML Component Design" nameTab="AppC" tabs="TML Component Task Diagram$Application$TCPIP$Timer$InterfaceDevice$SmartCard" > <TMLComponentTaskDiagramPanel name="TML Component Task Diagram" minX="0" maxX="2724" minY="0" maxY="916" channels="true" events="true" requests="true" considerExecOperators="true" considerTimingOperators="true" zoom="1.0000000000000018" > @@ -8,8 +8,8 @@ <cdparam x="535" y="347" /> <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="556" y="321" id="169" /> -<P2 x="534" y="395" id="216" /> +<P1 x="556" y="347" id="113" /> +<P2 x="547" y="382" id="68" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -17,8 +17,8 @@ <cdparam x="820" y="398" /> <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="1025" y="471" id="63" /> -<P2 x="761" y="548" id="184" /> +<P1 x="1025" y="497" id="210" /> +<P2 x="761" y="574" id="98" /> <Point x="887" y="577" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -36,8 +36,8 @@ <cdparam x="568" y="323" /> <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="710" y="403" id="186" /> -<P2 x="693" y="321" id="147" /> +<P1 x="710" y="403" id="96" /> +<P2 x="693" y="347" id="135" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -45,8 +45,8 @@ <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="534" y="369" id="211" /> -<P2 x="453" y="322" id="41" /> +<P1 x="521" y="382" id="63" /> +<P2 x="466" y="335" id="33" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -54,8 +54,8 @@ <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="401" y="83" id="43" /> -<P2 x="593" y="84" id="171" /> +<P1 x="401" y="83" id="31" /> +<P2 x="593" y="84" id="111" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -63,8 +63,8 @@ <cdparam x="656" y="426" /> <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="805" y="542" id="190" /> -<P2 x="969" y="474" id="77" /> +<P1 x="816" y="552" id="92" /> +<P2 x="969" y="495" id="196" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -72,8 +72,8 @@ <cdparam x="656" y="400" /> <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="805" y="509" id="192" /> -<P2 x="931" y="466" id="75" /> +<P1 x="816" y="519" id="90" /> +<P2 x="921" y="476" id="198" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -81,8 +81,8 @@ <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="751" y="406" id="200" /> -<P2 x="842" y="362" id="105" /> +<P1 x="751" y="406" id="82" /> +<P2 x="829" y="375" id="162" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -90,8 +90,8 @@ <cdparam x="689" y="292" /> <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="842" y="388" id="109" /> -<P2 x="931" y="352" id="85" /> +<P1 x="855" y="375" id="166" /> +<P2 x="921" y="362" id="188" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -99,8 +99,8 @@ <cdparam x="656" y="377" /> <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="805" y="481" id="196" /> -<P2 x="931" y="443" id="83" /> +<P1 x="816" y="491" id="86" /> +<P2 x="921" y="453" id="190" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -108,8 +108,8 @@ <cdparam x="656" y="351" /> <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="805" y="448" id="194" /> -<P2 x="931" y="416" id="81" /> +<P1 x="816" y="458" id="88" /> +<P2 x="921" y="426" id="192" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -117,8 +117,8 @@ <cdparam x="741" 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="931" y="387" id="79" /> -<P2 x="805" y="419" id="198" /> +<P1 x="921" y="397" id="194" /> +<P2 x="816" y="429" id="84" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -126,8 +126,8 @@ <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="931" y="317" id="87" /> -<P2 x="734" y="269" id="159" /> +<P1 x="918" y="330" id="186" /> +<P2 x="747" y="282" id="123" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -135,8 +135,8 @@ <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="734" y="235" id="157" /> -<P2 x="931" y="278" id="89" /> +<P1 x="747" y="248" id="125" /> +<P2 x="918" y="291" id="184" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -144,8 +144,8 @@ <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="734" y="190" id="155" /> -<P2 x="931" y="235" id="91" /> +<P1 x="747" y="203" id="127" /> +<P2 x="918" y="248" id="182" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -153,8 +153,8 @@ <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="842" y="362" id="104" /> -<P2 x="734" y="301" id="153" /> +<P1 x="829" y="375" id="161" /> +<P2 x="747" y="314" id="129" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -162,8 +162,8 @@ <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="534" y="282" id="163" /> -<P2 x="453" y="286" id="35" /> +<P1 x="521" y="295" id="119" /> +<P2 x="466" y="299" id="39" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -171,8 +171,8 @@ <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="453" y="116" id="31" /> -<P2 x="534" y="116" id="151" /> +<P1 x="464" y="126" id="43" /> +<P2 x="524" y="126" id="131" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -180,8 +180,8 @@ <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="453" y="202" id="37" /> -<P2 x="534" y="202" id="165" /> +<P1 x="466" y="215" id="37" /> +<P2 x="521" y="215" id="117" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -189,8 +189,8 @@ <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="534" y="247" id="167" /> -<P2 x="453" y="247" id="39" /> +<P1 x="521" y="260" id="115" /> +<P2 x="466" y="260" id="35" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -198,8 +198,8 @@ <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="453" y="156" id="33" /> -<P2 x="534" y="156" id="161" /> +<P1 x="466" y="169" id="41" /> +<P2 x="521" y="169" id="121" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -207,8 +207,8 @@ <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="931" y="185" id="93" /> -<P2 x="734" y="111" id="173" /> +<P1 x="918" y="198" id="180" /> +<P2 x="747" y="124" id="109" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -216,8 +216,8 @@ <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="324" id="149" /> -<P2 x="669" y="406" id="188" /> +<P1 x="630" y="345" id="133" /> +<P2 x="669" y="406" id="94" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -225,8 +225,8 @@ <cdparam x="1308" y="303" /> <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="1232" y="368" id="127" /> -<P2 x="1167" y="370" id="73" /> +<P1 x="1222" y="378" id="146" /> +<P2 x="1178" y="380" id="200" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -234,8 +234,8 @@ <cdparam x="1172" y="437" /> <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="1167" y="405" id="71" /> -<P2 x="1232" y="403" id="125" /> +<P1 x="1178" y="415" id="202" /> +<P2 x="1222" y="413" id="148" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -243,8 +243,8 @@ <cdparam x="1041" y="162" /> <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="1167" y="198" id="69" /> -<P2 x="1167" y="266" id="67" /> +<P1 x="1178" y="208" id="204" /> +<P2 x="1178" y="276" id="206" /> <Point x="1227" y="207" /> <Point x="1227" y="247" /> <AutomaticDrawing data="true" /> @@ -272,8 +272,8 @@ <cdparam x="877" y="343" /> <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="1167" y="444" id="65" /> -<P2 x="1232" y="431" id="123" /> +<P1 x="1178" y="454" id="208" /> +<P2 x="1222" y="441" id="150" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR> @@ -301,17 +301,17 @@ <Attribute access="2" id="b" value="" type="4" typeOther="" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="1203" id="32" index="33" uid="0ac36443-7eff-4fb5-bbe3-cc1a95befa19" > +<SUBCOMPONENT type="1203" id="32" index="33" uid="5ec0ab66-161f-409d-9b51-baddef3187d2" > <father id="53" num="0" /> -<cdparam x="443" y="116" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="388" y="83" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="280" minY="-10" maxY="266" /> -<infoparam name="TGComponent" value="Request activation" /> +<cdrectangleparam minX="-13" maxX="277" minY="-13" maxY="263" /> +<infoparam name="TGComponent" value="Event reset, pTS, end" /> <new d="false" /> <TGConnectingPoint num="0" id="31" /> <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" vc="-1" /> +<Prop commName="reset, pTS, end" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -319,35 +319,35 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="34" index="34" uid="a94db3f8-aa3a-4f21-9f2b-f056a890ff26" > +<SUBCOMPONENT type="1203" id="34" index="34" uid="385c6564-7b3f-4056-ba4f-4b72e497147c" > <father id="53" num="1" /> -<cdparam x="440" y="156" /> +<cdparam x="440" y="322" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="277" minY="-13" maxY="263" /> -<infoparam name="TGComponent" value="Event data_Ready" /> +<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> <new d="false" /> <TGConnectingPoint num="0" id="33" /> <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" vc="-1" /> -<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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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="36" index="35" uid="d23dda4e-9966-4812-ae65-12d5dc92e753" > +<SUBCOMPONENT type="1203" id="36" index="35" uid="e28ae663-7fc3-444c-8bb5-aeed571a20e5" > <father id="53" num="2" /> -<cdparam x="440" y="286" /> +<cdparam x="440" y="247" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="277" minY="-13" maxY="263" /> -<infoparam name="TGComponent" value="Event data_Ready_SC" /> +<infoparam name="TGComponent" value="Channel fromSCtoD" /> <new d="false" /> <TGConnectingPoint num="0" id="35" /> <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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<Prop commName="fromSCtoD" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="40" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -373,17 +373,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="40" index="37" uid="e28ae663-7fc3-444c-8bb5-aeed571a20e5" > +<SUBCOMPONENT type="1203" id="40" index="37" uid="d23dda4e-9966-4812-ae65-12d5dc92e753" > <father id="53" num="4" /> -<cdparam x="440" y="247" /> +<cdparam x="440" y="286" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="277" minY="-13" maxY="263" /> -<infoparam name="TGComponent" value="Channel fromSCtoD" /> +<infoparam name="TGComponent" value="Event data_Ready_SC" /> <new d="false" /> <TGConnectingPoint num="0" id="39" /> <extraparam> -<Prop commName="fromSCtoD" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="40" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -391,35 +391,35 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="42" index="38" uid="385c6564-7b3f-4056-ba4f-4b72e497147c" > +<SUBCOMPONENT type="1203" id="42" index="38" uid="a94db3f8-aa3a-4f21-9f2b-f056a890ff26" > <father id="53" num="5" /> -<cdparam x="440" y="322" /> +<cdparam x="440" y="156" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="277" minY="-13" maxY="263" /> -<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> +<infoparam name="TGComponent" value="Event data_Ready" /> <new d="false" /> <TGConnectingPoint num="0" id="41" /> <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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> -<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" vc="-1" /> +<Type type="1" typeOther="" /> +<Type type="2" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="44" index="39" uid="5ec0ab66-161f-409d-9b51-baddef3187d2" > +<SUBCOMPONENT type="1203" id="44" index="39" uid="0ac36443-7eff-4fb5-bbe3-cc1a95befa19" > <father id="53" num="6" /> -<cdparam x="388" y="83" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="443" y="116" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="277" minY="-13" maxY="263" /> -<infoparam name="TGComponent" value="Event reset, pTS, end" /> +<cdrectangleparam minX="-10" maxX="280" minY="-10" maxY="266" /> +<infoparam name="TGComponent" value="Request activation" /> <new d="false" /> <TGConnectingPoint num="0" id="43" /> <extraparam> -<Prop commName="reset, pTS, end" commType="1" origin="true" finite="true" blocking="false" maxSamples="1" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -468,64 +468,64 @@ <info hiddeni="false" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="1200" id="146" index="40" uid="27b38621-086c-4eb9-ab5f-63c3519649e7" > +<SUBCOMPONENT type="1201" id="81" index="40" uid="e6a1eed0-7a8d-4c2b-8a7a-706405c70055" > <father id="238" num="0" /> -<cdparam x="842" y="133" /> -<sizeparam width="570" height="485" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="521" y="369" /> +<sizeparam width="26" height="26" minWidth="10" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="365" minY="0" maxY="45" /> -<infoparam name="TGComponent" value="TCPIP Entities" /> +<cdrectangleparam minX="-13" maxX="922" minY="-13" maxY="517" /> +<infoparam name="Composite port" value="" /> <new d="false" /> -<TGConnectingPoint num="0" id="138" /> -<TGConnectingPoint num="1" id="139" /> -<TGConnectingPoint num="2" id="140" /> -<TGConnectingPoint num="3" id="141" /> -<TGConnectingPoint num="4" id="142" /> -<TGConnectingPoint num="5" id="143" /> -<TGConnectingPoint num="6" id="144" /> -<TGConnectingPoint num="7" id="145" /> -<extraparam> -<info hiddeni="false" /> -</extraparam> -</SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="103" index="41" uid="e81b3719-88d7-40a5-9541-1fa5bf551e56" > -<father id="146" num="0" /> -<cdparam x="931" y="167" /> -<sizeparam width="236" height="317" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<TGConnectingPoint num="0" id="63" /> +<TGConnectingPoint num="1" id="64" /> +<TGConnectingPoint num="2" id="65" /> +<TGConnectingPoint num="3" id="66" /> +<TGConnectingPoint num="4" id="67" /> +<TGConnectingPoint num="5" id="68" /> +<TGConnectingPoint num="6" id="69" /> +<TGConnectingPoint num="7" id="70" /> +<TGConnectingPoint num="8" id="71" /> +<TGConnectingPoint num="9" id="72" /> +<TGConnectingPoint num="10" id="73" /> +<TGConnectingPoint num="11" id="74" /> +<TGConnectingPoint num="12" id="75" /> +<TGConnectingPoint num="13" id="76" /> +<TGConnectingPoint num="14" id="77" /> +<TGConnectingPoint num="15" id="78" /> +<TGConnectingPoint num="16" id="79" /> +<TGConnectingPoint num="17" id="80" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="1202" id="108" index="41" uid="d00f0238-f10a-4895-8928-01630674fd16" > +<father id="238" num="1" /> +<cdparam x="565" y="416" /> +<sizeparam width="240" height="145" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="334" minY="0" maxY="168" /> -<infoparam name="TGComponent" value="TCPIP" /> +<cdrectangleparam minX="0" maxX="695" minY="0" maxY="385" /> +<infoparam name="TGComponent" value="Application" /> <new d="false" /> -<TGConnectingPoint num="0" id="95" /> -<TGConnectingPoint num="1" id="96" /> -<TGConnectingPoint num="2" id="97" /> -<TGConnectingPoint num="3" id="98" /> -<TGConnectingPoint num="4" id="99" /> -<TGConnectingPoint num="5" id="100" /> -<TGConnectingPoint num="6" id="101" /> -<TGConnectingPoint num="7" id="102" /> +<TGConnectingPoint num="0" id="100" /> +<TGConnectingPoint num="1" id="101" /> +<TGConnectingPoint num="2" id="102" /> +<TGConnectingPoint num="3" id="103" /> +<TGConnectingPoint num="4" id="104" /> +<TGConnectingPoint num="5" id="105" /> +<TGConnectingPoint num="6" id="106" /> +<TGConnectingPoint num="7" id="107" /> <extraparam> <Data isAttacker="No" daemon="false" periodic="false" periodValue="" unit="" Operation="" /> -<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="64" index="42" uid="879a36d7-3f56-4bf1-9f25-1046a95bd7d0" > -<father id="103" num="0" /> -<cdparam x="1012" y="471" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="83" index="42" uid="1629d24b-baef-436a-84fc-8e915b24573c" > +<father id="108" num="0" /> +<cdparam x="741" y="406" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> -<infoparam name="Primitive port" value="Event opened" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="135" /> +<infoparam name="TGComponent" value="Request start_TCP_IP" /> <new d="false" /> -<TGConnectingPoint num="0" id="63" /> +<TGConnectingPoint num="0" id="82" /> <extraparam> -<Prop commName="opened" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -533,17 +533,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="66" index="43" uid="55b97293-919f-4873-a14a-cbdf0c1fc4fe" > -<father id="103" num="1" /> -<cdparam x="1157" y="444" /> +<SUBCOMPONENT type="1203" id="85" index="43" uid="3432623a-1069-4b8e-a27a-08825f112a57" > +<father id="108" num="1" /> +<cdparam x="795" y="419" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Event stop" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="135" /> +<infoparam name="TGComponent" value="Channel fromTtoA" /> <new d="false" /> -<TGConnectingPoint num="0" id="65" /> +<TGConnectingPoint num="0" id="84" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -551,17 +551,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="68" index="44" uid="c54e4157-4d8f-4de9-9ad8-f051ba61a8a1" > -<father id="103" num="2" /> -<cdparam x="1157" y="266" /> +<SUBCOMPONENT type="1203" id="87" index="44" uid="3373e6ce-6a23-4c79-a01d-730dd8f554a1" > +<father id="108" num="2" /> +<cdparam x="795" 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="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Channel temp" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="135" /> +<infoparam name="TGComponent" value="Event send_TCP" /> <new d="false" /> -<TGConnectingPoint num="0" id="67" /> +<TGConnectingPoint num="0" id="86" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -569,17 +569,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="70" index="45" uid="e5dde430-3393-4aa3-b582-cd1577ef6346" > -<father id="103" num="3" /> -<cdparam x="1157" y="198" /> +<SUBCOMPONENT type="1203" id="89" index="45" uid="49eb2dd2-0891-4d98-a4c0-a017a9ec1b39" > +<father id="108" num="3" /> +<cdparam x="795" y="448" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Channel temp" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="135" /> +<infoparam name="TGComponent" value="Event open, abort, close" /> <new d="false" /> -<TGConnectingPoint num="0" id="69" /> +<TGConnectingPoint num="0" id="88" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -587,17 +587,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="72" index="46" uid="20a1ecb1-6787-4c13-93a5-0e657f5dbe37" > -<father id="103" num="4" /> -<cdparam x="1157" y="405" /> +<SUBCOMPONENT type="1203" id="91" index="46" uid="19627382-2e54-4a93-9597-648c6bc78c68" > +<father id="108" num="4" /> +<cdparam x="795" y="509" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Request req_Timer" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="135" /> +<infoparam name="TGComponent" value="Event receive_Application" /> <new d="false" /> -<TGConnectingPoint num="0" id="71" /> +<TGConnectingPoint num="0" id="90" /> <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" vc="-1" /> +<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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -605,17 +605,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="74" index="47" uid="bd77d57a-5de7-41d6-a023-473d9b8c9f0e" > -<father id="103" num="5" /> -<cdparam x="1157" y="370" /> +<SUBCOMPONENT type="1203" id="93" index="47" uid="2308fd9f-032a-40f0-a828-56877cee45d6" > +<father id="108" num="5" /> +<cdparam x="795" y="542" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Event timeOut" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="135" /> +<infoparam name="TGComponent" value="Channel fromAtoT" /> <new d="false" /> -<TGConnectingPoint num="0" id="73" /> +<TGConnectingPoint num="0" id="92" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -623,17 +623,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="76" index="48" uid="f3dd1f4a-ed2f-4dea-bcce-4b07472f36a5" > -<father id="103" num="6" /> -<cdparam x="921" y="466" /> +<SUBCOMPONENT type="1203" id="95" index="48" uid="b771db42-75a5-434f-ba97-7423be1922ae" > +<father id="108" num="6" /> +<cdparam x="659" y="406" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Event receive_Application" /> +<cdrectangleparam minX="-10" maxX="230" minY="-10" maxY="135" /> +<infoparam name="TGComponent" value="Request start_Application" /> <new d="false" /> -<TGConnectingPoint num="0" id="75" /> +<TGConnectingPoint num="0" id="94" /> <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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -641,17 +641,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="78" index="49" uid="7e59f093-23ca-4d70-bb9b-c30022fb7b98" > -<father id="103" num="7" /> -<cdparam x="959" y="474" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="97" index="49" uid="b5801312-e9a6-4ab3-a599-0a88861828e8" > +<father id="108" num="7" /> +<cdparam x="697" y="403" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Channel fromAtoT" /> +<cdrectangleparam minX="-13" maxX="227" minY="-13" maxY="132" /> +<infoparam name="Primitive port" value="Event connectionOpened" /> <new d="false" /> -<TGConnectingPoint num="0" id="77" /> +<TGConnectingPoint num="0" id="96" /> <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" vc="-1" /> +<Prop commName="connectionOpened" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -659,17 +659,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="80" index="50" uid="d5cdd3e6-2448-4c6d-bd99-36eaa18acefd" > -<father id="103" num="8" /> -<cdparam x="921" y="387" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="99" index="50" uid="a9a39aba-94be-4ab5-b73a-fd71a68884b9" > +<father id="108" num="8" /> +<cdparam x="748" y="548" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Channel fromTtoA" /> +<cdrectangleparam minX="-13" maxX="227" minY="-13" maxY="132" /> +<infoparam name="Primitive port" value="Event opened" /> <new d="false" /> -<TGConnectingPoint num="0" id="79" /> +<TGConnectingPoint num="0" id="98" /> <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" vc="-1" /> +<Prop commName="opened" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -677,35 +677,45 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="82" index="51" uid="659b5abb-2eb0-42e6-bcb0-eca400f42f1e" > -<father id="103" num="9" /> -<cdparam x="921" y="416" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1202" id="145" index="51" uid="c8c75fa8-0162-44ca-b01a-6b6e72742e15" > +<father id="238" num="2" /> +<cdparam x="534" y="97" /> +<sizeparam width="200" height="237" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Event open, abort, close" /> +<cdrectangleparam minX="0" maxX="735" minY="0" maxY="293" /> +<infoparam name="TGComponent" value="SmartCard" /> <new d="false" /> -<TGConnectingPoint num="0" id="81" /> +<TGConnectingPoint num="0" id="137" /> +<TGConnectingPoint num="1" id="138" /> +<TGConnectingPoint num="2" id="139" /> +<TGConnectingPoint num="3" id="140" /> +<TGConnectingPoint num="4" id="141" /> +<TGConnectingPoint num="5" id="142" /> +<TGConnectingPoint num="6" id="143" /> +<TGConnectingPoint num="7" id="144" /> <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" vc="-1" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> +<Data isAttacker="No" daemon="false" periodic="false" periodValue="" unit="" Operation="" /> +<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="84" index="52" uid="fb739f59-d91b-462c-b37e-3b3f426b36a0" > -<father id="103" num="10" /> -<cdparam x="921" y="443" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="110" index="52" uid="60a02c53-1694-4f00-b0fd-37584e75c4f0" > +<father id="145" num="0" /> +<cdparam x="721" y="111" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Event send_TCP" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Event send" /> <new d="false" /> -<TGConnectingPoint num="0" id="83" /> +<TGConnectingPoint num="0" id="109" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -713,17 +723,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="86" index="53" uid="dc4790a9-7b16-4d0a-a28d-1000cdeaf6df" > -<father id="103" num="11" /> -<cdparam x="921" y="352" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="112" index="53" uid="f2d10609-3465-4116-aa64-5e93adbc1d88" > +<father id="145" num="1" /> +<cdparam x="580" 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="226" minY="-10" maxY="307" /> -<infoparam name="TGComponent" value="Request start_TCP_IP" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Event reset, pTS, end" /> <new d="false" /> -<TGConnectingPoint num="0" id="85" /> +<TGConnectingPoint num="0" id="111" /> <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" vc="-1" /> +<Prop commName="reset, pTS, end" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -731,17 +741,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="88" index="54" uid="a281eb85-f293-40fa-bfa7-245635426dc3" > -<father id="103" num="12" /> -<cdparam x="918" y="317" /> +<SUBCOMPONENT type="1203" id="114" index="54" uid="bbf073af-2ffa-43e8-8af7-57bc047aa49d" > +<father id="145" num="2" /> +<cdparam x="543" y="321" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> -<infoparam name="TGComponent" value="Channel fromTtoP" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> <new d="false" /> -<TGConnectingPoint num="0" id="87" /> +<TGConnectingPoint num="0" id="113" /> <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" vc="-1" /> +<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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -749,17 +759,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="90" index="55" uid="c050218a-5f14-4150-96f4-cb56425a5542" > -<father id="103" num="13" /> -<cdparam x="918" y="278" /> +<SUBCOMPONENT type="1203" id="116" index="55" uid="795e8701-8a55-45a2-b495-5098a90a083b" > +<father id="145" num="3" /> +<cdparam x="521" y="247" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> -<infoparam name="TGComponent" value="Channel fromPtoT" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Channel fromSCtoD" /> <new d="false" /> -<TGConnectingPoint num="0" id="89" /> +<TGConnectingPoint num="0" id="115" /> <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" vc="-1" /> +<Prop commName="fromSCtoD" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="40" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="true" checkConfStatus="1" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -767,17 +777,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="92" index="56" uid="6feaf20f-1f9c-449a-b841-536d97a11a60" > -<father id="103" num="14" /> -<cdparam x="918" y="235" /> +<SUBCOMPONENT type="1203" id="118" index="56" uid="fa6ce164-e610-48dc-bae1-e16b47213a94" > +<father id="145" num="4" /> +<cdparam x="521" y="202" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> -<infoparam name="TGComponent" value="Event receive" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Channel fromDtoSC" /> <new d="false" /> -<TGConnectingPoint num="0" id="91" /> +<TGConnectingPoint num="0" id="117" /> <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" vc="-1" /> +<Prop commName="fromDtoSC" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="40" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="null" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -785,17 +795,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="94" index="57" uid="d177fc07-a9f9-4fc9-b44e-4efd50455a73" > -<father id="103" num="15" /> -<cdparam x="918" y="185" /> +<SUBCOMPONENT type="1203" id="120" index="57" uid="5c7d9a72-47b3-4dcc-bdb5-ba657ac7c891" > +<father id="145" num="5" /> +<cdparam x="521" y="282" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> -<infoparam name="TGComponent" value="Event send" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Event data_Ready_SC" /> <new d="false" /> -<TGConnectingPoint num="0" id="93" /> +<TGConnectingPoint num="0" id="119" /> <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" vc="-1" /> +<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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -803,65 +813,35 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1201" id="122" index="58" uid="873de139-3cb1-4fed-9ae7-c7cd5bf9e4c1" > -<father id="146" num="1" /> -<cdparam x="829" y="362" /> -<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="472" /> -<infoparam name="Composite port" value="" /> -<new d="false" /> -<TGConnectingPoint num="0" id="104" /> -<TGConnectingPoint num="1" id="105" /> -<TGConnectingPoint num="2" id="106" /> -<TGConnectingPoint num="3" id="107" /> -<TGConnectingPoint num="4" id="108" /> -<TGConnectingPoint num="5" id="109" /> -<TGConnectingPoint num="6" id="110" /> -<TGConnectingPoint num="7" id="111" /> -<TGConnectingPoint num="8" id="112" /> -<TGConnectingPoint num="9" id="113" /> -<TGConnectingPoint num="10" id="114" /> -<TGConnectingPoint num="11" id="115" /> -<TGConnectingPoint num="12" id="116" /> -<TGConnectingPoint num="13" id="117" /> -<TGConnectingPoint num="14" id="118" /> -<TGConnectingPoint num="15" id="119" /> -<TGConnectingPoint num="16" id="120" /> -<TGConnectingPoint num="17" id="121" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="137" index="59" uid="71dd5cc7-83d8-46a7-873b-49843ceed51b" > -<father id="146" num="2" /> -<cdparam x="1232" y="328" /> -<sizeparam width="140" height="141" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="122" index="58" uid="943e2115-b6a8-4c2a-8d74-055a654aa40c" > +<father id="145" num="6" /> +<cdparam x="521" y="156" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="430" minY="0" maxY="344" /> -<infoparam name="TGComponent" value="Timer" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Event data_Ready" /> <new d="false" /> -<TGConnectingPoint num="0" id="129" /> -<TGConnectingPoint num="1" id="130" /> -<TGConnectingPoint num="2" id="131" /> -<TGConnectingPoint num="3" id="132" /> -<TGConnectingPoint num="4" id="133" /> -<TGConnectingPoint num="5" id="134" /> -<TGConnectingPoint num="6" id="135" /> -<TGConnectingPoint num="7" id="136" /> +<TGConnectingPoint num="0" id="121" /> <extraparam> -<Data isAttacker="No" daemon="false" periodic="false" periodValue="" unit="" Operation="" /> -<Attribute access="2" id="x" value="0" 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" vc="-1" /> +<Type type="1" typeOther="" /> +<Type type="2" typeOther="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> +<Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="124" index="60" uid="d8867e2b-11a8-4bf3-ac4d-40eb9ca46db1" > -<father id="137" num="0" /> -<cdparam x="1222" y="431" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="124" index="59" uid="674e46c8-5dc2-4467-800c-42d5e8308dd0" > +<father id="145" num="7" /> +<cdparam x="721" y="269" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="130" minY="-10" maxY="131" /> -<infoparam name="TGComponent" value="Event stop" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Channel fromTtoP" /> <new d="false" /> <TGConnectingPoint num="0" id="123" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -869,17 +849,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="126" index="61" uid="f7196f0a-e5f9-47d5-b752-a9dfdbb09b50" > -<father id="137" num="1" /> -<cdparam x="1222" y="403" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="126" index="60" uid="c03f19ba-eac5-4fd8-9c3b-87abaed8b4ff" > +<father id="145" num="8" /> +<cdparam x="721" 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="130" minY="-10" maxY="131" /> -<infoparam name="TGComponent" value="Request req_Timer" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Channel fromPtoT" /> <new d="false" /> <TGConnectingPoint num="0" id="125" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -887,17 +867,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="128" index="62" uid="0b3249a6-2378-4d14-822e-a7957081b10a" > -<father id="137" num="2" /> -<cdparam x="1222" y="368" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="128" index="61" uid="b0796d5a-6141-4ab7-8ff5-3a543afb43f2" > +<father id="145" num="9" /> +<cdparam x="721" y="190" /> +<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-10" maxX="130" minY="-10" maxY="131" /> -<infoparam name="TGComponent" value="Event timeOut" /> +<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> +<infoparam name="TGComponent" value="Event receive" /> <new d="false" /> <TGConnectingPoint num="0" id="127" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -905,45 +885,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="183" index="63" uid="c8c75fa8-0162-44ca-b01a-6b6e72742e15" > -<father id="238" num="1" /> -<cdparam x="534" y="97" /> -<sizeparam width="200" height="237" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="0" maxX="735" minY="0" maxY="293" /> -<infoparam name="TGComponent" value="SmartCard" /> -<new d="false" /> -<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> -<Data isAttacker="No" daemon="false" periodic="false" periodValue="" unit="" Operation="" /> -<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="148" index="64" uid="d7af56c8-f9bc-439b-a6f0-311aa32308b6" > -<father id="183" num="0" /> -<cdparam x="680" y="321" /> +<SUBCOMPONENT type="1203" id="130" index="62" uid="56de0e31-9335-4853-8803-d9b64b8b7531" > +<father id="145" num="10" /> +<cdparam x="721" y="301" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="Primitive port" value="Event connectionOpened" /> +<infoparam name="TGComponent" value="Request start_TCP_IP" /> <new d="false" /> -<TGConnectingPoint num="0" id="147" /> +<TGConnectingPoint num="0" id="129" /> <extraparam> -<Prop commName="connectionOpened" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -951,17 +903,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="150" index="65" uid="f62e505a-0502-4d04-90e9-398d3cc8b021" > -<father id="183" num="1" /> -<cdparam x="620" y="324" /> +<SUBCOMPONENT type="1203" id="132" index="63" uid="6649edb2-ec45-4d50-a123-3afa89d2b19b" > +<father id="145" num="11" /> +<cdparam x="524" y="116" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="227" /> -<infoparam name="TGComponent" value="Request start_Application" /> +<infoparam name="TGComponent" value="Request activation" /> <new d="false" /> -<TGConnectingPoint num="0" id="149" /> +<TGConnectingPoint num="0" id="131" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -969,17 +921,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="152" index="66" uid="6649edb2-ec45-4d50-a123-3afa89d2b19b" > -<father id="183" num="2" /> -<cdparam x="524" y="116" /> +<SUBCOMPONENT type="1203" id="134" index="64" uid="f62e505a-0502-4d04-90e9-398d3cc8b021" > +<father id="145" num="12" /> +<cdparam x="620" y="324" /> <sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="227" /> -<infoparam name="TGComponent" value="Request activation" /> +<infoparam name="TGComponent" value="Request start_Application" /> <new d="false" /> -<TGConnectingPoint num="0" id="151" /> +<TGConnectingPoint num="0" id="133" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -987,17 +939,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="154" index="67" uid="56de0e31-9335-4853-8803-d9b64b8b7531" > -<father id="183" num="3" /> -<cdparam x="721" y="301" /> +<SUBCOMPONENT type="1203" id="136" index="65" uid="d7af56c8-f9bc-439b-a6f0-311aa32308b6" > +<father id="145" num="13" /> +<cdparam x="680" y="321" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Request start_TCP_IP" /> +<infoparam name="Primitive port" value="Event connectionOpened" /> <new d="false" /> -<TGConnectingPoint num="0" id="153" /> +<TGConnectingPoint num="0" id="135" /> <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" vc="-1" /> +<Prop commName="connectionOpened" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1005,17 +957,58 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="156" index="68" uid="b0796d5a-6141-4ab7-8ff5-3a543afb43f2" > -<father id="183" num="4" /> -<cdparam x="721" y="190" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1200" id="229" index="66" uid="27b38621-086c-4eb9-ab5f-63c3519649e7" > +<father id="238" num="3" /> +<cdparam x="842" y="133" /> +<sizeparam width="570" height="485" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Event receive" /> +<cdrectangleparam minX="0" maxX="365" minY="0" maxY="45" /> +<infoparam name="TGComponent" value="TCPIP Entities" /> <new d="false" /> -<TGConnectingPoint num="0" id="155" /> +<TGConnectingPoint num="0" id="221" /> +<TGConnectingPoint num="1" id="222" /> +<TGConnectingPoint num="2" id="223" /> +<TGConnectingPoint num="3" id="224" /> +<TGConnectingPoint num="4" id="225" /> +<TGConnectingPoint num="5" id="226" /> +<TGConnectingPoint num="6" id="227" /> +<TGConnectingPoint num="7" id="228" /> <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" vc="-1" /> +<info hiddeni="false" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1202" id="160" index="67" uid="71dd5cc7-83d8-46a7-873b-49843ceed51b" > +<father id="229" num="0" /> +<cdparam x="1232" y="328" /> +<sizeparam width="140" height="141" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="430" minY="0" maxY="344" /> +<infoparam name="TGComponent" value="Timer" /> +<new d="false" /> +<TGConnectingPoint num="0" id="152" /> +<TGConnectingPoint num="1" id="153" /> +<TGConnectingPoint num="2" id="154" /> +<TGConnectingPoint num="3" id="155" /> +<TGConnectingPoint num="4" id="156" /> +<TGConnectingPoint num="5" id="157" /> +<TGConnectingPoint num="6" id="158" /> +<TGConnectingPoint num="7" id="159" /> +<extraparam> +<Data isAttacker="No" daemon="false" periodic="false" periodValue="" unit="" Operation="" /> +<Attribute access="2" id="x" value="0" type="0" typeOther="" /> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="1203" id="147" index="68" uid="0b3249a6-2378-4d14-822e-a7957081b10a" > +<father id="160" num="0" /> +<cdparam x="1222" y="368" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="-10" maxX="130" minY="-10" maxY="131" /> +<infoparam name="TGComponent" value="Event timeOut" /> +<new d="false" /> +<TGConnectingPoint num="0" id="146" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1023,17 +1016,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="158" index="69" uid="c03f19ba-eac5-4fd8-9c3b-87abaed8b4ff" > -<father id="183" num="5" /> -<cdparam x="721" y="235" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="149" index="69" uid="f7196f0a-e5f9-47d5-b752-a9dfdbb09b50" > +<father id="160" num="1" /> +<cdparam x="1222" y="403" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Channel fromPtoT" /> +<cdrectangleparam minX="-10" maxX="130" minY="-10" maxY="131" /> +<infoparam name="TGComponent" value="Request req_Timer" /> <new d="false" /> -<TGConnectingPoint num="0" id="157" /> +<TGConnectingPoint num="0" id="148" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1041,17 +1034,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="160" index="70" uid="674e46c8-5dc2-4467-800c-42d5e8308dd0" > -<father id="183" num="6" /> -<cdparam x="721" y="269" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="151" index="70" uid="d8867e2b-11a8-4bf3-ac4d-40eb9ca46db1" > +<father id="160" num="2" /> +<cdparam x="1222" y="431" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Channel fromTtoP" /> +<cdrectangleparam minX="-10" maxX="130" minY="-10" maxY="131" /> +<infoparam name="TGComponent" value="Event stop" /> <new d="false" /> -<TGConnectingPoint num="0" id="159" /> +<TGConnectingPoint num="0" id="150" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1059,35 +1052,71 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="162" index="71" uid="943e2115-b6a8-4c2a-8d74-055a654aa40c" > -<father id="183" num="7" /> -<cdparam x="521" y="156" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1201" id="179" index="71" uid="873de139-3cb1-4fed-9ae7-c7cd5bf9e4c1" > +<father id="229" num="1" /> +<cdparam x="829" y="362" /> +<sizeparam width="26" height="26" minWidth="10" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Event data_Ready" /> +<cdrectangleparam minX="-13" maxX="557" minY="-13" maxY="472" /> +<infoparam name="Composite port" value="" /> <new d="false" /> <TGConnectingPoint num="0" id="161" /> +<TGConnectingPoint num="1" id="162" /> +<TGConnectingPoint num="2" id="163" /> +<TGConnectingPoint num="3" id="164" /> +<TGConnectingPoint num="4" id="165" /> +<TGConnectingPoint num="5" id="166" /> +<TGConnectingPoint num="6" id="167" /> +<TGConnectingPoint num="7" id="168" /> +<TGConnectingPoint num="8" id="169" /> +<TGConnectingPoint num="9" id="170" /> +<TGConnectingPoint num="10" id="171" /> +<TGConnectingPoint num="11" id="172" /> +<TGConnectingPoint num="12" id="173" /> +<TGConnectingPoint num="13" id="174" /> +<TGConnectingPoint num="14" id="175" /> +<TGConnectingPoint num="15" id="176" /> +<TGConnectingPoint num="16" id="177" /> +<TGConnectingPoint num="17" id="178" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="1202" id="220" index="72" uid="e81b3719-88d7-40a5-9541-1fa5bf551e56" > +<father id="229" num="2" /> +<cdparam x="931" y="167" /> +<sizeparam width="236" height="317" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="334" minY="0" maxY="168" /> +<infoparam name="TGComponent" value="TCPIP" /> +<new d="false" /> +<TGConnectingPoint num="0" id="212" /> +<TGConnectingPoint num="1" id="213" /> +<TGConnectingPoint num="2" id="214" /> +<TGConnectingPoint num="3" id="215" /> +<TGConnectingPoint num="4" id="216" /> +<TGConnectingPoint num="5" id="217" /> +<TGConnectingPoint num="6" id="218" /> +<TGConnectingPoint num="7" id="219" /> <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" vc="-1" /> -<Type type="1" typeOther="" /> -<Type type="2" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> -<Type type="0" typeOther="" /> +<Data isAttacker="No" daemon="false" periodic="false" periodValue="" unit="" Operation="" /> +<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="164" index="72" uid="5c7d9a72-47b3-4dcc-bdb5-ba657ac7c891" > -<father id="183" num="8" /> -<cdparam x="521" y="282" /> +<SUBCOMPONENT type="1203" id="181" index="73" uid="d177fc07-a9f9-4fc9-b44e-4efd50455a73" > +<father id="220" num="0" /> +<cdparam x="918" y="185" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Event data_Ready_SC" /> +<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> +<infoparam name="TGComponent" value="Event send" /> <new d="false" /> -<TGConnectingPoint num="0" id="163" /> +<TGConnectingPoint num="0" id="180" /> <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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1095,17 +1124,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="166" index="73" uid="fa6ce164-e610-48dc-bae1-e16b47213a94" > -<father id="183" num="9" /> -<cdparam x="521" y="202" /> +<SUBCOMPONENT type="1203" id="183" index="74" uid="6feaf20f-1f9c-449a-b841-536d97a11a60" > +<father id="220" num="1" /> +<cdparam x="918" y="235" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Channel fromDtoSC" /> +<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> +<infoparam name="TGComponent" value="Event receive" /> <new d="false" /> -<TGConnectingPoint num="0" id="165" /> +<TGConnectingPoint num="0" id="182" /> <extraparam> -<Prop commName="fromDtoSC" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="40" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="null" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1113,17 +1142,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="168" index="74" uid="795e8701-8a55-45a2-b495-5098a90a083b" > -<father id="183" num="10" /> -<cdparam x="521" y="247" /> +<SUBCOMPONENT type="1203" id="185" index="75" uid="c050218a-5f14-4150-96f4-cb56425a5542" > +<father id="220" num="2" /> +<cdparam x="918" y="278" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Channel fromSCtoD" /> +<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> +<infoparam name="TGComponent" value="Channel fromPtoT" /> <new d="false" /> -<TGConnectingPoint num="0" id="167" /> +<TGConnectingPoint num="0" id="184" /> <extraparam> -<Prop commName="fromSCtoD" commType="0" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="40" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="true" checkConfStatus="1" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1131,17 +1160,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="170" index="75" uid="bbf073af-2ffa-43e8-8af7-57bc047aa49d" > -<father id="183" num="11" /> -<cdparam x="543" y="321" /> +<SUBCOMPONENT type="1203" id="187" index="76" uid="a281eb85-f293-40fa-bfa7-245635426dc3" > +<father id="220" num="3" /> +<cdparam x="918" y="317" /> <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Event answerToReset, pTSConfirm" /> +<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> +<infoparam name="TGComponent" value="Channel fromTtoP" /> <new d="false" /> -<TGConnectingPoint num="0" id="169" /> +<TGConnectingPoint num="0" id="186" /> <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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1149,17 +1178,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="172" index="76" uid="f2d10609-3465-4116-aa64-5e93adbc1d88" > -<father id="183" num="12" /> -<cdparam x="580" y="84" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="189" index="77" uid="dc4790a9-7b16-4d0a-a28d-1000cdeaf6df" > +<father id="220" num="4" /> +<cdparam x="921" y="352" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Event reset, pTS, end" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Request start_TCP_IP" /> <new d="false" /> -<TGConnectingPoint num="0" id="171" /> +<TGConnectingPoint num="0" id="188" /> <extraparam> -<Prop commName="reset, pTS, end" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="-1" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1167,17 +1196,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="174" index="77" uid="60a02c53-1694-4f00-b0fd-37584e75c4f0" > -<father id="183" num="13" /> -<cdparam x="721" y="111" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="191" index="78" uid="fb739f59-d91b-462c-b37e-3b3f426b36a0" > +<father id="220" num="5" /> +<cdparam x="921" y="443" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="224" /> -<infoparam name="TGComponent" value="Event send" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Event send_TCP" /> <new d="false" /> -<TGConnectingPoint num="0" id="173" /> +<TGConnectingPoint num="0" id="190" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1185,37 +1214,35 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1202" id="210" index="78" uid="d00f0238-f10a-4895-8928-01630674fd16" > -<father id="238" num="2" /> -<cdparam x="565" y="416" /> -<sizeparam width="240" height="145" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="193" index="79" uid="659b5abb-2eb0-42e6-bcb0-eca400f42f1e" > +<father id="220" num="6" /> +<cdparam x="921" y="416" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="695" minY="0" maxY="385" /> -<infoparam name="TGComponent" value="Application" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Event open, abort, close" /> <new d="false" /> -<TGConnectingPoint num="0" id="202" /> -<TGConnectingPoint num="1" id="203" /> -<TGConnectingPoint num="2" id="204" /> -<TGConnectingPoint num="3" id="205" /> -<TGConnectingPoint num="4" id="206" /> -<TGConnectingPoint num="5" id="207" /> -<TGConnectingPoint num="6" id="208" /> -<TGConnectingPoint num="7" id="209" /> +<TGConnectingPoint num="0" id="192" /> <extraparam> -<Data isAttacker="No" daemon="false" periodic="false" periodValue="" unit="" Operation="" /> +<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" vc="-1" /> +<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" index="79" uid="a9a39aba-94be-4ab5-b73a-fd71a68884b9" > -<father id="210" num="0" /> -<cdparam x="748" y="548" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="195" index="80" uid="d5cdd3e6-2448-4c6d-bd99-36eaa18acefd" > +<father id="220" num="7" /> +<cdparam x="921" y="387" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="227" minY="-13" maxY="132" /> -<infoparam name="Primitive port" value="Event opened" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Channel fromTtoA" /> <new d="false" /> -<TGConnectingPoint num="0" id="184" /> +<TGConnectingPoint num="0" id="194" /> <extraparam> -<Prop commName="opened" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1223,17 +1250,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="187" index="80" uid="b5801312-e9a6-4ab3-a599-0a88861828e8" > -<father id="210" num="1" /> -<cdparam x="697" y="403" /> -<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="197" index="81" uid="7e59f093-23ca-4d70-bb9b-c30022fb7b98" > +<father id="220" num="8" /> +<cdparam x="959" y="474" /> +<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="-13" maxX="227" minY="-13" maxY="132" /> -<infoparam name="Primitive port" value="Event connectionOpened" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Channel fromAtoT" /> <new d="false" /> -<TGConnectingPoint num="0" id="186" /> +<TGConnectingPoint num="0" id="196" /> <extraparam> -<Prop commName="connectionOpened" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1241,17 +1268,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="189" index="81" uid="b771db42-75a5-434f-ba97-7423be1922ae" > -<father id="210" num="2" /> -<cdparam x="659" y="406" /> +<SUBCOMPONENT type="1203" id="199" index="82" uid="f3dd1f4a-ed2f-4dea-bcce-4b07472f36a5" > +<father id="220" num="9" /> +<cdparam x="921" y="466" /> <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="135" /> -<infoparam name="TGComponent" value="Request start_Application" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Event receive_Application" /> <new d="false" /> -<TGConnectingPoint num="0" id="188" /> +<TGConnectingPoint num="0" id="198" /> <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" vc="-1" /> +<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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1259,17 +1286,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="191" index="82" uid="2308fd9f-032a-40f0-a828-56877cee45d6" > -<father id="210" num="3" /> -<cdparam x="795" y="542" /> +<SUBCOMPONENT type="1203" id="201" index="83" uid="bd77d57a-5de7-41d6-a023-473d9b8c9f0e" > +<father id="220" num="10" /> +<cdparam x="1157" y="370" /> <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="135" /> -<infoparam name="TGComponent" value="Channel fromAtoT" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Event timeOut" /> <new d="false" /> -<TGConnectingPoint num="0" id="190" /> +<TGConnectingPoint num="0" id="200" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1277,17 +1304,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="193" index="83" uid="19627382-2e54-4a93-9597-648c6bc78c68" > -<father id="210" num="4" /> -<cdparam x="795" y="509" /> +<SUBCOMPONENT type="1203" id="203" index="84" uid="20a1ecb1-6787-4c13-93a5-0e657f5dbe37" > +<father id="220" num="11" /> +<cdparam x="1157" y="405" /> <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="135" /> -<infoparam name="TGComponent" value="Event receive_Application" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Request req_Timer" /> <new d="false" /> -<TGConnectingPoint num="0" id="192" /> +<TGConnectingPoint num="0" id="202" /> <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="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1295,17 +1322,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="195" index="84" uid="49eb2dd2-0891-4d98-a4c0-a017a9ec1b39" > -<father id="210" num="5" /> -<cdparam x="795" y="448" /> +<SUBCOMPONENT type="1203" id="205" index="85" uid="e5dde430-3393-4aa3-b582-cd1577ef6346" > +<father id="220" num="12" /> +<cdparam x="1157" y="198" /> <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="135" /> -<infoparam name="TGComponent" value="Event open, abort, close" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Channel temp" /> <new d="false" /> -<TGConnectingPoint num="0" id="194" /> +<TGConnectingPoint num="0" id="204" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1313,17 +1340,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="197" index="85" uid="3373e6ce-6a23-4c79-a01d-730dd8f554a1" > -<father id="210" num="6" /> -<cdparam x="795" y="481" /> +<SUBCOMPONENT type="1203" id="207" index="86" uid="c54e4157-4d8f-4de9-9ad8-f051ba61a8a1" > +<father id="220" num="13" /> +<cdparam x="1157" y="266" /> <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="135" /> -<infoparam name="TGComponent" value="Event send_TCP" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Channel temp" /> <new d="false" /> -<TGConnectingPoint num="0" id="196" /> +<TGConnectingPoint num="0" id="206" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1331,17 +1358,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="199" index="86" uid="3432623a-1069-4b8e-a27a-08825f112a57" > -<father id="210" num="7" /> -<cdparam x="795" y="419" /> +<SUBCOMPONENT type="1203" id="209" index="87" uid="55b97293-919f-4873-a14a-cbdf0c1fc4fe" > +<father id="220" num="14" /> +<cdparam x="1157" y="444" /> <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="135" /> -<infoparam name="TGComponent" value="Channel fromTtoA" /> +<cdrectangleparam minX="-10" maxX="226" minY="-10" maxY="307" /> +<infoparam name="TGComponent" value="Event stop" /> <new d="false" /> -<TGConnectingPoint num="0" id="198" /> +<TGConnectingPoint num="0" id="208" /> <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" vc="-1" /> +<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" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1349,17 +1376,17 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1203" id="201" index="87" uid="1629d24b-baef-436a-84fc-8e915b24573c" > -<father id="210" num="8" /> -<cdparam x="741" y="406" /> -<sizeparam width="21" height="21" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<SUBCOMPONENT type="1203" id="211" index="88" uid="879a36d7-3f56-4bf1-9f25-1046a95bd7d0" > +<father id="220" num="15" /> +<cdparam x="1012" y="471" /> +<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="135" /> -<infoparam name="TGComponent" value="Request start_TCP_IP" /> +<cdrectangleparam minX="-13" maxX="223" minY="-13" maxY="304" /> +<infoparam name="Primitive port" value="Event opened" /> <new d="false" /> -<TGConnectingPoint num="0" id="200" /> +<TGConnectingPoint num="0" id="210" /> <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" vc="-1" /> +<Prop commName="opened" commType="1" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> <Type type="0" typeOther="" /> @@ -1367,33 +1394,6 @@ <Type type="0" typeOther="" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1201" id="229" index="88" uid="e6a1eed0-7a8d-4c2b-8a7a-706405c70055" > -<father id="238" num="3" /> -<cdparam x="521" y="369" /> -<sizeparam width="26" height="26" minWidth="10" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="-13" maxX="922" minY="-13" maxY="517" /> -<infoparam name="Composite port" value="" /> -<new d="false" /> -<TGConnectingPoint num="0" id="211" /> -<TGConnectingPoint num="1" id="212" /> -<TGConnectingPoint num="2" id="213" /> -<TGConnectingPoint num="3" id="214" /> -<TGConnectingPoint num="4" id="215" /> -<TGConnectingPoint num="5" id="216" /> -<TGConnectingPoint num="6" id="217" /> -<TGConnectingPoint num="7" id="218" /> -<TGConnectingPoint num="8" id="219" /> -<TGConnectingPoint num="9" id="220" /> -<TGConnectingPoint num="10" id="221" /> -<TGConnectingPoint num="11" id="222" /> -<TGConnectingPoint num="12" id="223" /> -<TGConnectingPoint num="13" id="224" /> -<TGConnectingPoint num="14" id="225" /> -<TGConnectingPoint num="15" id="226" /> -<TGConnectingPoint num="16" id="227" /> -<TGConnectingPoint num="17" id="228" /> -</SUBCOMPONENT> </TMLComponentTaskDiagramPanel> @@ -7288,13 +7288,13 @@ the smart card and the terminal <attributes nbOfCores="1" byteDataSize="4" schedulingPolicy="1" sliceTime="10000" goIdleTime="10" maxConsecutiveIdleCycles="10" pipelineSize="5" taskSwitchingTime="20" branchingPredictionPenalty="99" cacheMiss="5" execiTime="1" execcTime="1" clockRatio="1" operation="" MECType="0" encryption="0"/> </extraparam> </COMPONENT> -<SUBCOMPONENT type="1101" id="1484" index="5" uid="7493cf38-bc55-447d-b50e-cbe992a5d485" > +<SUBCOMPONENT type="1101" id="1484" index="5" uid="2dd23cd2-4b74-456e-b633-1d0426865e3c" > <father id="1545" num="0" /> -<cdparam x="152" y="154" /> -<sizeparam width="163" height="50" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="286" y="304" /> +<sizeparam width="109" height="50" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="296" 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" /> <new d="false" /> <TGConnectingPoint num="0" id="1476" /> <TGConnectingPoint num="1" id="1477" /> @@ -7305,16 +7305,16 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1482" /> <TGConnectingPoint num="7" id="1483" /> <extraparam> -<info value="AppC::InterfaceDevice" taskName="InterfaceDevice" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="AppC::Timer" taskName="Timer" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1101" id="1493" index="6" uid="65d7e618-328d-40c6-8231-c757e24407cb" > +<SUBCOMPONENT type="1101" id="1493" index="6" uid="e7286698-3fda-4dfa-9751-d04de1c7e61b" > <father id="1545" num="1" /> -<cdparam x="351" y="153" /> -<sizeparam width="136" height="50" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="350" y="234" /> +<sizeparam width="139" height="50" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="323" minY="0" maxY="271" /> -<infoparam name="TGComponent" value="AppC::SmartCard" /> +<cdrectangleparam minX="0" maxX="320" minY="0" maxY="271" /> +<infoparam name="TGComponent" value="AppC::Application" /> <new d="false" /> <TGConnectingPoint num="0" id="1485" /> <TGConnectingPoint num="1" id="1486" /> @@ -7325,7 +7325,7 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1491" /> <TGConnectingPoint num="7" id="1492" /> <extraparam> -<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="AppC::Application" taskName="Application" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1502" index="7" uid="1db077ff-4dc4-49e5-8f29-0dfc2335e457" > @@ -7348,13 +7348,13 @@ the smart card and the terminal <info value="AppC::TCPIP" taskName="TCPIP" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1101" id="1511" index="8" uid="e7286698-3fda-4dfa-9751-d04de1c7e61b" > +<SUBCOMPONENT type="1101" id="1511" index="8" uid="65d7e618-328d-40c6-8231-c757e24407cb" > <father id="1545" num="3" /> -<cdparam x="350" y="234" /> -<sizeparam width="139" height="50" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="351" y="153" /> +<sizeparam width="136" height="50" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="320" minY="0" maxY="271" /> -<infoparam name="TGComponent" value="AppC::Application" /> +<cdrectangleparam minX="0" maxX="323" minY="0" maxY="271" /> +<infoparam name="TGComponent" value="AppC::SmartCard" /> <new d="false" /> <TGConnectingPoint num="0" id="1503" /> <TGConnectingPoint num="1" id="1504" /> @@ -7365,16 +7365,16 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1509" /> <TGConnectingPoint num="7" id="1510" /> <extraparam> -<info value="AppC::Application" taskName="Application" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1101" id="1520" index="9" uid="2dd23cd2-4b74-456e-b633-1d0426865e3c" > +<SUBCOMPONENT type="1101" id="1520" index="9" uid="7493cf38-bc55-447d-b50e-cbe992a5d485" > <father id="1545" num="4" /> -<cdparam x="286" y="304" /> -<sizeparam width="109" height="50" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="152" y="154" /> +<sizeparam width="163" height="50" minWidth="75" minHeight="1" 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="296" minY="0" maxY="271" /> +<infoparam name="TGComponent" value="AppC::InterfaceDevice" /> <new d="false" /> <TGConnectingPoint num="0" id="1512" /> <TGConnectingPoint num="1" id="1513" /> @@ -7385,7 +7385,7 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1518" /> <TGConnectingPoint num="7" id="1519" /> <extraparam> -<info value="AppC::Timer" taskName="Timer" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="AppC::InterfaceDevice" taskName="InterfaceDevice" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> @@ -7592,13 +7592,13 @@ the smart card and the terminal <attributes nbOfCores="2" byteDataSize="4" schedulingPolicy="0" sliceTime="10000" goIdleTime="10" maxConsecutiveIdleCycles="10" pipelineSize="5" taskSwitchingTime="20" branchingPredictionPenalty="2" cacheMiss="18" execiTime="1" execcTime="1" clockRatio="3" operation="" MECType="0" encryption="0"/> </extraparam> </COMPONENT> -<SUBCOMPONENT type="1101" id="1640" index="10" uid="b41c4066-0970-4e6f-b5fd-c86f9949bdd2" > +<SUBCOMPONENT type="1101" id="1640" index="10" uid="2c88ab02-e18c-4867-8708-47263bf33686" > <father id="1683" num="0" /> -<cdparam x="272" y="92" /> -<sizeparam width="108" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="387" y="121" /> +<sizeparam width="136" height="37" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="164" minY="0" maxY="121" /> -<infoparam name="TGComponent" value="AppC::TCPIP" /> +<cdrectangleparam minX="0" maxX="136" minY="0" maxY="124" /> +<infoparam name="TGComponent" value="AppC::SmartCard" /> <new d="false" /> <TGConnectingPoint num="0" id="1632" /> <TGConnectingPoint num="1" id="1633" /> @@ -7609,7 +7609,7 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1638" /> <TGConnectingPoint num="7" id="1639" /> <extraparam> -<info value="AppC::TCPIP" taskName="TCPIP" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1649" index="11" uid="8d7da60f-dba0-4ce1-bb28-0067b0628bb4" > @@ -7632,13 +7632,13 @@ the smart card and the terminal <info value="AppC::Application" taskName="Application" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1101" id="1658" index="12" uid="2c88ab02-e18c-4867-8708-47263bf33686" > +<SUBCOMPONENT type="1101" id="1658" index="12" uid="b41c4066-0970-4e6f-b5fd-c86f9949bdd2" > <father id="1683" num="2" /> -<cdparam x="387" y="121" /> -<sizeparam width="136" height="37" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="272" y="92" /> +<sizeparam width="108" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="136" minY="0" maxY="124" /> -<infoparam name="TGComponent" value="AppC::SmartCard" /> +<cdrectangleparam minX="0" maxX="164" minY="0" maxY="121" /> +<infoparam name="TGComponent" value="AppC::TCPIP" /> <new d="false" /> <TGConnectingPoint num="0" id="1650" /> <TGConnectingPoint num="1" id="1651" /> @@ -7649,7 +7649,7 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1656" /> <TGConnectingPoint num="7" id="1657" /> <extraparam> -<info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> +<info value="AppC::TCPIP" taskName="TCPIP" referenceTaskName="AppC" priority="0" operationMEC="" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> @@ -7996,13 +7996,13 @@ the smart card and the terminal <attributes capacity="100" byteDataSize="4" mappingPenalty="0" reconfigurationTime="50" goIdleTime="10" maxConsecutiveIdleCycles="10" execiTime="1" execcTime="1" clockRatio="10" operation ="" scheduling ="" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="1101" id="1848" index="11" uid="16af0067-ce8e-42f7-b92a-6da4fdaf4320" > +<SUBCOMPONENT type="1101" id="1848" index="11" uid="9143972d-cc79-414e-87c6-90389e30d42f" > <father id="1891" num="0" /> -<cdparam x="271" y="73" /> -<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="341" y="178" /> +<sizeparam width="108" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="174" minY="0" maxY="161" /> -<infoparam name="TGComponent" value="AppC::Application" /> +<cdrectangleparam minX="0" maxX="205" minY="0" maxY="161" /> +<infoparam name="TGComponent" value="AppC::TCPIP" /> <new d="false" /> <TGConnectingPoint num="0" id="1840" /> <TGConnectingPoint num="1" id="1841" /> @@ -8013,7 +8013,7 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1846" /> <TGConnectingPoint num="7" id="1847" /> <extraparam> -<info value="AppC::Application" taskName="Application" referenceTaskName="AppC" priority="0" operationMEC="Application" fatherComponentMECType="0" /> +<info value="AppC::TCPIP" taskName="TCPIP" referenceTaskName="AppC" priority="0" operationMEC="Application" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1857" index="12" uid="93823099-5d13-4d38-a655-3e44f6060eda" > @@ -8036,13 +8036,13 @@ the smart card and the terminal <info value="AppC::SmartCard" taskName="SmartCard" referenceTaskName="AppC" priority="0" operationMEC="Application" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="1101" id="1866" index="13" uid="9143972d-cc79-414e-87c6-90389e30d42f" > +<SUBCOMPONENT type="1101" id="1866" index="13" uid="16af0067-ce8e-42f7-b92a-6da4fdaf4320" > <father id="1891" num="2" /> -<cdparam x="341" y="178" /> -<sizeparam width="108" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="271" y="73" /> +<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="205" minY="0" maxY="161" /> -<infoparam name="TGComponent" value="AppC::TCPIP" /> +<cdrectangleparam minX="0" maxX="174" minY="0" maxY="161" /> +<infoparam name="TGComponent" value="AppC::Application" /> <new d="false" /> <TGConnectingPoint num="0" id="1858" /> <TGConnectingPoint num="1" id="1859" /> @@ -8053,7 +8053,7 @@ the smart card and the terminal <TGConnectingPoint num="6" id="1864" /> <TGConnectingPoint num="7" id="1865" /> <extraparam> -<info value="AppC::TCPIP" taskName="TCPIP" referenceTaskName="AppC" priority="0" operationMEC="Application" fatherComponentMECType="0" /> +<info value="AppC::Application" taskName="Application" referenceTaskName="AppC" priority="0" operationMEC="Application" fatherComponentMECType="0" /> </extraparam> </SUBCOMPONENT> diff --git a/modeling/test/testTag.xml b/modeling/test/testTag.xml new file mode 100644 index 0000000000000000000000000000000000000000..75b9cb4090d32a5bb7913297d1513dddc3c1df90 --- /dev/null +++ b/modeling/test/testTag.xml @@ -0,0 +1,5186 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<TURTLEGMODELING version="3.0 beta" ANIMATE_INTERACTIVE_SIMULATION="true" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="true" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="4" LAST_SELECTED_SUB_TAB="0" TAGS="deactivated root stream1 colomarreuh" SHOW_TAGS="true"> + +<Modeling type="AVATAR Design" nameTab="Design1" tabs="Block Diagram$Block" > +<AVATARBlockDiagramPanel name="Block Diagram" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0000000000000002" > +<MainCode value="void __user_init() {"/> +<MainCode value="}"/> +<Optimized value="true" /> +<considerTimingOperators value="true" /> +<Validated value="" /> +<Ignored value="" /> + +<COMPONENT type="5000" id="41" index="0" uid="326e9b21-d9cd-4484-9942-cc07d03166ac" > +<cdparam x="231" y="177" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block" value="Block" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1" /> +<TGConnectingPoint num="1" id="2" /> +<TGConnectingPoint num="2" id="3" /> +<TGConnectingPoint num="3" id="4" /> +<TGConnectingPoint num="4" id="5" /> +<TGConnectingPoint num="5" id="6" /> +<TGConnectingPoint num="6" id="7" /> +<TGConnectingPoint num="7" id="8" /> +<TGConnectingPoint num="8" id="9" /> +<TGConnectingPoint num="9" id="10" /> +<TGConnectingPoint num="10" id="11" /> +<TGConnectingPoint num="11" id="12" /> +<TGConnectingPoint num="12" id="13" /> +<TGConnectingPoint num="13" id="14" /> +<TGConnectingPoint num="14" id="15" /> +<TGConnectingPoint num="15" id="16" /> +<TGConnectingPoint num="16" id="17" /> +<TGConnectingPoint num="17" id="18" /> +<TGConnectingPoint num="18" id="19" /> +<TGConnectingPoint num="19" id="20" /> +<TGConnectingPoint num="20" id="21" /> +<TGConnectingPoint num="21" id="22" /> +<TGConnectingPoint num="22" id="23" /> +<TGConnectingPoint num="23" id="24" /> +<TGConnectingPoint num="24" id="25" /> +<TGConnectingPoint num="25" id="26" /> +<TGConnectingPoint num="26" id="27" /> +<TGConnectingPoint num="27" id="28" /> +<TGConnectingPoint num="28" id="29" /> +<TGConnectingPoint num="29" id="30" /> +<TGConnectingPoint num="30" id="31" /> +<TGConnectingPoint num="31" id="32" /> +<TGConnectingPoint num="32" id="33" /> +<TGConnectingPoint num="33" id="34" /> +<TGConnectingPoint num="34" id="35" /> +<TGConnectingPoint num="35" id="36" /> +<TGConnectingPoint num="36" id="37" /> +<TGConnectingPoint num="37" id="38" /> +<TGConnectingPoint num="38" id="39" /> +<TGConnectingPoint num="39" id="40" /> +<tags value="root" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Attribute access="0" var="0" id="x" value="" type="8" typeOther="" /> +</extraparam> +</COMPONENT> + + +</AVATARBlockDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Block" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="48" index="0" uid="bb2e1425-ccb0-4280-a274-c82f0e370367" > +<cdparam x="604" y="414" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="47" /> +<P1 x="604" y="414" id="80" /> +<P2 x="595" y="441" id="77" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="46" index="11" uid="e4701b06-6a8f-4882-a903-ad24e11c9279" > +<father id="48" num="0" /> +<cdparam x="599" y="427" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="42" /> +<TGConnectingPoint num="1" id="43" /> +<TGConnectingPoint num="2" id="44" /> +<TGConnectingPoint num="3" id="45" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="55" index="1" uid="fa3f1199-8501-4440-bd68-686012d83925" > +<cdparam x="596" y="319" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="54" /> +<P1 x="596" y="319" id="143" /> +<P2 x="604" y="384" id="79" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="53" index="12" uid="142a3be3-faf9-4ff7-88b3-7c70130af5a6" > +<father id="55" num="0" /> +<cdparam x="600" y="351" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="49" /> +<TGConnectingPoint num="1" id="50" /> +<TGConnectingPoint num="2" id="51" /> +<TGConnectingPoint num="3" id="52" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="62" index="2" uid="118415a1-aa88-4f94-9a92-08db113462a9" > +<cdparam x="463" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="61" /> +<P1 x="463" y="213" id="196" /> +<P2 x="584" y="269" id="122" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="60" index="13" uid="84f3b3fd-b18f-4598-afa9-aec50ae534be" > +<father id="62" num="0" /> +<cdparam x="464" y="238" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="56" /> +<TGConnectingPoint num="1" id="57" /> +<TGConnectingPoint num="2" id="58" /> +<TGConnectingPoint num="3" id="59" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="69" index="3" uid="0576d7a5-05ba-4125-929c-8d48f507b167" > +<cdparam x="413" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="68" /> +<P1 x="413" y="213" id="195" /> +<P2 x="427" y="406" id="155" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="67" index="14" uid="a32746e9-6e5b-4cc9-9ddc-3beb8a2c3904" > +<father id="69" num="0" /> +<cdparam x="414" y="231" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="63" /> +<TGConnectingPoint num="1" id="64" /> +<TGConnectingPoint num="2" id="65" /> +<TGConnectingPoint num="3" id="66" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="76" index="4" uid="3204013c-5668-4cfc-a799-8e9a79d23101" > +<cdparam x="375" y="103" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="75" /> +<P1 x="375" y="103" id="230" /> +<P2 x="375" y="163" id="205" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="74" index="15" uid="10c2ee18-9bfa-4804-8bbe-e925605a1585" > +<father id="76" num="0" /> +<cdparam x="375" y="133" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="70" /> +<TGConnectingPoint num="1" id="71" /> +<TGConnectingPoint num="2" id="72" /> +<TGConnectingPoint num="3" id="73" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="78" index="5" uid="c37bf81a-89ef-4648-8d36-cb13138fdd96" > +<cdparam x="585" y="446" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="77" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5108" id="81" index="6" uid="13807982-09e9-4401-a789-1e964804860a" > +<cdparam x="534" y="389" /> +<sizeparam width="140" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="TGComponent" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="79" /> +<TGConnectingPoint num="1" id="80" /> +<tags value="" /> +<extraparam> +<Data variable="x" minValue="0" maxValue="10" functionId="0" extraAttribute1="" extraAttribute2="" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="154" index="7" uid="bc5be334-f0f0-4b72-9951-777c6aadfe3a" > +<cdparam x="559" y="269" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state0" value="rausState" /> +<new d="false" /> +<TGConnectingPoint num="0" id="82" /> +<TGConnectingPoint num="1" id="83" /> +<TGConnectingPoint num="2" id="84" /> +<TGConnectingPoint num="3" id="85" /> +<TGConnectingPoint num="4" id="86" /> +<TGConnectingPoint num="5" id="87" /> +<TGConnectingPoint num="6" id="88" /> +<TGConnectingPoint num="7" id="89" /> +<TGConnectingPoint num="8" id="90" /> +<TGConnectingPoint num="9" id="91" /> +<TGConnectingPoint num="10" id="92" /> +<TGConnectingPoint num="11" id="93" /> +<TGConnectingPoint num="12" id="94" /> +<TGConnectingPoint num="13" id="95" /> +<TGConnectingPoint num="14" id="96" /> +<TGConnectingPoint num="15" id="97" /> +<TGConnectingPoint num="16" id="98" /> +<TGConnectingPoint num="17" id="99" /> +<TGConnectingPoint num="18" id="100" /> +<TGConnectingPoint num="19" id="101" /> +<TGConnectingPoint num="20" id="102" /> +<TGConnectingPoint num="21" id="103" /> +<TGConnectingPoint num="22" id="104" /> +<TGConnectingPoint num="23" id="105" /> +<TGConnectingPoint num="24" id="106" /> +<TGConnectingPoint num="25" id="107" /> +<TGConnectingPoint num="26" id="108" /> +<TGConnectingPoint num="27" id="109" /> +<TGConnectingPoint num="28" id="110" /> +<TGConnectingPoint num="29" id="111" /> +<TGConnectingPoint num="30" id="112" /> +<TGConnectingPoint num="31" id="113" /> +<TGConnectingPoint num="32" id="114" /> +<TGConnectingPoint num="33" id="115" /> +<TGConnectingPoint num="34" id="116" /> +<TGConnectingPoint num="35" id="117" /> +<TGConnectingPoint num="36" id="118" /> +<TGConnectingPoint num="37" id="119" /> +<TGConnectingPoint num="38" id="120" /> +<TGConnectingPoint num="39" id="121" /> +<TGConnectingPoint num="40" id="122" /> +<TGConnectingPoint num="41" id="123" /> +<TGConnectingPoint num="42" id="124" /> +<TGConnectingPoint num="43" id="125" /> +<TGConnectingPoint num="44" id="126" /> +<TGConnectingPoint num="45" id="127" /> +<TGConnectingPoint num="46" id="128" /> +<TGConnectingPoint num="47" id="129" /> +<TGConnectingPoint num="48" id="130" /> +<TGConnectingPoint num="49" id="131" /> +<TGConnectingPoint num="50" id="132" /> +<TGConnectingPoint num="51" id="133" /> +<TGConnectingPoint num="52" id="134" /> +<TGConnectingPoint num="53" id="135" /> +<TGConnectingPoint num="54" id="136" /> +<TGConnectingPoint num="55" id="137" /> +<TGConnectingPoint num="56" id="138" /> +<TGConnectingPoint num="57" id="139" /> +<TGConnectingPoint num="58" id="140" /> +<TGConnectingPoint num="59" id="141" /> +<TGConnectingPoint num="60" id="142" /> +<TGConnectingPoint num="61" id="143" /> +<TGConnectingPoint num="62" id="144" /> +<TGConnectingPoint num="63" id="145" /> +<TGConnectingPoint num="64" id="146" /> +<TGConnectingPoint num="65" id="147" /> +<TGConnectingPoint num="66" id="148" /> +<TGConnectingPoint num="67" id="149" /> +<TGConnectingPoint num="68" id="150" /> +<TGConnectingPoint num="69" id="151" /> +<TGConnectingPoint num="70" id="152" /> +<TGConnectingPoint num="71" id="153" /> +<tags value="deactivated colomarreuh" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5101" id="156" index="8" uid="32263ba6-eec4-450e-a530-36f1e5d14a4e" > +<cdparam x="417" y="411" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="155" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="229" index="9" uid="6edcbf1d-3e3a-4a43-ae30-09b28c8bc0c9" > +<cdparam x="363" y="163" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state" /> +<new d="false" /> +<TGConnectingPoint num="0" id="157" /> +<TGConnectingPoint num="1" id="158" /> +<TGConnectingPoint num="2" id="159" /> +<TGConnectingPoint num="3" id="160" /> +<TGConnectingPoint num="4" id="161" /> +<TGConnectingPoint num="5" id="162" /> +<TGConnectingPoint num="6" id="163" /> +<TGConnectingPoint num="7" id="164" /> +<TGConnectingPoint num="8" id="165" /> +<TGConnectingPoint num="9" id="166" /> +<TGConnectingPoint num="10" id="167" /> +<TGConnectingPoint num="11" id="168" /> +<TGConnectingPoint num="12" id="169" /> +<TGConnectingPoint num="13" id="170" /> +<TGConnectingPoint num="14" id="171" /> +<TGConnectingPoint num="15" id="172" /> +<TGConnectingPoint num="16" id="173" /> +<TGConnectingPoint num="17" id="174" /> +<TGConnectingPoint num="18" id="175" /> +<TGConnectingPoint num="19" id="176" /> +<TGConnectingPoint num="20" id="177" /> +<TGConnectingPoint num="21" id="178" /> +<TGConnectingPoint num="22" id="179" /> +<TGConnectingPoint num="23" id="180" /> +<TGConnectingPoint num="24" id="181" /> +<TGConnectingPoint num="25" id="182" /> +<TGConnectingPoint num="26" id="183" /> +<TGConnectingPoint num="27" id="184" /> +<TGConnectingPoint num="28" id="185" /> +<TGConnectingPoint num="29" id="186" /> +<TGConnectingPoint num="30" id="187" /> +<TGConnectingPoint num="31" id="188" /> +<TGConnectingPoint num="32" id="189" /> +<TGConnectingPoint num="33" id="190" /> +<TGConnectingPoint num="34" id="191" /> +<TGConnectingPoint num="35" id="192" /> +<TGConnectingPoint num="36" id="193" /> +<TGConnectingPoint num="37" id="194" /> +<TGConnectingPoint num="38" id="195" /> +<TGConnectingPoint num="39" id="196" /> +<TGConnectingPoint num="40" id="197" /> +<TGConnectingPoint num="41" id="198" /> +<TGConnectingPoint num="42" id="199" /> +<TGConnectingPoint num="43" id="200" /> +<TGConnectingPoint num="44" id="201" /> +<TGConnectingPoint num="45" id="202" /> +<TGConnectingPoint num="46" id="203" /> +<TGConnectingPoint num="47" id="204" /> +<TGConnectingPoint num="48" id="205" /> +<TGConnectingPoint num="49" id="206" /> +<TGConnectingPoint num="50" id="207" /> +<TGConnectingPoint num="51" id="208" /> +<TGConnectingPoint num="52" id="209" /> +<TGConnectingPoint num="53" id="210" /> +<TGConnectingPoint num="54" id="211" /> +<TGConnectingPoint num="55" id="212" /> +<TGConnectingPoint num="56" id="213" /> +<TGConnectingPoint num="57" id="214" /> +<TGConnectingPoint num="58" id="215" /> +<TGConnectingPoint num="59" id="216" /> +<TGConnectingPoint num="60" id="217" /> +<TGConnectingPoint num="61" id="218" /> +<TGConnectingPoint num="62" id="219" /> +<TGConnectingPoint num="63" id="220" /> +<TGConnectingPoint num="64" id="221" /> +<TGConnectingPoint num="65" id="222" /> +<TGConnectingPoint num="66" id="223" /> +<TGConnectingPoint num="67" id="224" /> +<TGConnectingPoint num="68" id="225" /> +<TGConnectingPoint num="69" id="226" /> +<TGConnectingPoint num="70" id="227" /> +<TGConnectingPoint num="71" id="228" /> +<tags value="root stream1" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="231" index="10" uid="7b034fe8-501e-470f-b7ce-4e6d3aca82ed" > +<cdparam x="368" y="83" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="230" /> +<tags value="root" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +</Modeling> + + + + +<Modeling type="AVATAR Design" nameTab="Design2" tabs="Block Diagram$Sender$Receiver" > +<AVATARBlockDiagramPanel name="Block Diagram" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0000000000000002" > +<MainCode value="void __user_init() {"/> +<MainCode value="}"/> +<Optimized value="true" /> +<considerTimingOperators value="true" /> +<Validated value="" /> +<Ignored value="" /> + +<CONNECTOR type="5002" id="233" index="0" uid="9eabba73-2623-454e-a329-aeaea850d78c" > +<cdparam x="435" y="289" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="" /> +<TGConnectingPoint num="0" id="232" /> +<P1 x="435" y="289" id="279" /> +<P2 x="699" y="289" id="237" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +<extraparam> +<isd value="in sig1()" /> +<oso value="out sig1()" /> +<FIFOType asynchronous="false" synchronousCH="true" size="1" blocking="false" private="true" broadcast="false" lossy="false" ams="false" /> +</extraparam> +</CONNECTOR> +<COMPONENT type="5000" id="274" index="1" uid="828aa533-dac9-4883-a4a9-4b628ef85a5b" > +<cdparam x="699" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block0" value="Receiver" /> +<new d="false" /> +<TGConnectingPoint num="0" id="234" /> +<TGConnectingPoint num="1" id="235" /> +<TGConnectingPoint num="2" id="236" /> +<TGConnectingPoint num="3" id="237" /> +<TGConnectingPoint num="4" id="238" /> +<TGConnectingPoint num="5" id="239" /> +<TGConnectingPoint num="6" id="240" /> +<TGConnectingPoint num="7" id="241" /> +<TGConnectingPoint num="8" id="242" /> +<TGConnectingPoint num="9" id="243" /> +<TGConnectingPoint num="10" id="244" /> +<TGConnectingPoint num="11" id="245" /> +<TGConnectingPoint num="12" id="246" /> +<TGConnectingPoint num="13" id="247" /> +<TGConnectingPoint num="14" id="248" /> +<TGConnectingPoint num="15" id="249" /> +<TGConnectingPoint num="16" id="250" /> +<TGConnectingPoint num="17" id="251" /> +<TGConnectingPoint num="18" id="252" /> +<TGConnectingPoint num="19" id="253" /> +<TGConnectingPoint num="20" id="254" /> +<TGConnectingPoint num="21" id="255" /> +<TGConnectingPoint num="22" id="256" /> +<TGConnectingPoint num="23" id="257" /> +<TGConnectingPoint num="24" id="258" /> +<TGConnectingPoint num="25" id="259" /> +<TGConnectingPoint num="26" id="260" /> +<TGConnectingPoint num="27" id="261" /> +<TGConnectingPoint num="28" id="262" /> +<TGConnectingPoint num="29" id="263" /> +<TGConnectingPoint num="30" id="264" /> +<TGConnectingPoint num="31" id="265" /> +<TGConnectingPoint num="32" id="266" /> +<TGConnectingPoint num="33" id="267" /> +<TGConnectingPoint num="34" id="268" /> +<TGConnectingPoint num="35" id="269" /> +<TGConnectingPoint num="36" id="270" /> +<TGConnectingPoint num="37" id="271" /> +<TGConnectingPoint num="38" id="272" /> +<TGConnectingPoint num="39" id="273" /> +<tags value="" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Signal value="in sig1()" attached="true" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5000" id="315" index="2" uid="590fe8b2-3e7f-49c2-8c37-8dde9fd71331" > +<cdparam x="185" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block" value="Sender" /> +<new d="false" /> +<TGConnectingPoint num="0" id="275" /> +<TGConnectingPoint num="1" id="276" /> +<TGConnectingPoint num="2" id="277" /> +<TGConnectingPoint num="3" id="278" /> +<TGConnectingPoint num="4" id="279" /> +<TGConnectingPoint num="5" id="280" /> +<TGConnectingPoint num="6" id="281" /> +<TGConnectingPoint num="7" id="282" /> +<TGConnectingPoint num="8" id="283" /> +<TGConnectingPoint num="9" id="284" /> +<TGConnectingPoint num="10" id="285" /> +<TGConnectingPoint num="11" id="286" /> +<TGConnectingPoint num="12" id="287" /> +<TGConnectingPoint num="13" id="288" /> +<TGConnectingPoint num="14" id="289" /> +<TGConnectingPoint num="15" id="290" /> +<TGConnectingPoint num="16" id="291" /> +<TGConnectingPoint num="17" id="292" /> +<TGConnectingPoint num="18" id="293" /> +<TGConnectingPoint num="19" id="294" /> +<TGConnectingPoint num="20" id="295" /> +<TGConnectingPoint num="21" id="296" /> +<TGConnectingPoint num="22" id="297" /> +<TGConnectingPoint num="23" id="298" /> +<TGConnectingPoint num="24" id="299" /> +<TGConnectingPoint num="25" id="300" /> +<TGConnectingPoint num="26" id="301" /> +<TGConnectingPoint num="27" id="302" /> +<TGConnectingPoint num="28" id="303" /> +<TGConnectingPoint num="29" id="304" /> +<TGConnectingPoint num="30" id="305" /> +<TGConnectingPoint num="31" id="306" /> +<TGConnectingPoint num="32" id="307" /> +<TGConnectingPoint num="33" id="308" /> +<TGConnectingPoint num="34" id="309" /> +<TGConnectingPoint num="35" id="310" /> +<TGConnectingPoint num="36" id="311" /> +<TGConnectingPoint num="37" id="312" /> +<TGConnectingPoint num="38" id="313" /> +<TGConnectingPoint num="39" id="314" /> +<tags value="root" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Attribute access="0" var="0" id="x" value="" type="8" typeOther="" /> +<Signal value="out sig1()" attached="true" /> +</extraparam> +</COMPONENT> + + +</AVATARBlockDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Sender" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="322" index="0" uid="70879ec0-b9b3-4f54-874c-2ba05158a9f6" > +<cdparam x="793" y="452" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="321" /> +<P1 x="796" y="450" id="375" /> +<P2 x="795" y="492" id="372" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="320" index="17" uid="8a8f6bb2-4323-4156-8133-a52276a4c76e" > +<father id="322" num="0" /> +<cdparam x="792" y="472" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="316" /> +<TGConnectingPoint num="1" id="317" /> +<TGConnectingPoint num="2" id="318" /> +<TGConnectingPoint num="3" id="319" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="329" index="1" uid="367c8b5a-793a-4bba-b17b-74cd8de54724" > +<cdparam x="795" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="328" /> +<P1 x="795" y="371" id="386" /> +<P2 x="796" y="420" id="374" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="327" index="18" uid="e050949e-3ec0-4135-a2e7-c36b97852bb8" > +<father id="329" num="0" /> +<cdparam x="794" y="396" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="323" /> +<TGConnectingPoint num="1" id="324" /> +<TGConnectingPoint num="2" id="325" /> +<TGConnectingPoint num="3" id="326" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="336" index="2" uid="8e2a6151-ca34-4d1f-a813-ad5cdb82cb02" > +<cdparam x="659" y="306" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="335" /> +<P1 x="659" y="306" id="414" /> +<P2 x="795" y="341" id="385" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="334" index="19" uid="88148f6b-9e8c-4aa4-88ed-5749ab268c06" > +<father id="336" num="0" /> +<cdparam x="727" y="323" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="330" /> +<TGConnectingPoint num="1" id="331" /> +<TGConnectingPoint num="2" id="332" /> +<TGConnectingPoint num="3" id="333" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="343" index="3" uid="ccc18a43-3430-4254-a35c-88353f74f880" > +<cdparam x="604" y="414" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="342" /> +<P1 x="604" y="414" id="399" /> +<P2 x="595" y="441" id="396" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="341" index="20" uid="7ef824ab-459b-456d-91e6-9ed75772e050" > +<father id="343" num="0" /> +<cdparam x="599" y="427" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="337" /> +<TGConnectingPoint num="1" id="338" /> +<TGConnectingPoint num="2" id="339" /> +<TGConnectingPoint num="3" id="340" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="350" index="4" uid="f9a07353-38bc-4b05-919f-b9717522ef59" > +<cdparam x="596" y="319" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="349" /> +<P1 x="596" y="319" id="462" /> +<P2 x="604" y="384" id="398" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="348" index="21" uid="d65ec8ff-52a1-4372-b5f8-d11b5ad49c7f" > +<father id="350" num="0" /> +<cdparam x="600" y="351" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="344" /> +<TGConnectingPoint num="1" id="345" /> +<TGConnectingPoint num="2" id="346" /> +<TGConnectingPoint num="3" id="347" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="357" index="5" uid="594f253a-5560-42fb-afcd-da28229281a4" > +<cdparam x="463" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="356" /> +<P1 x="463" y="213" id="515" /> +<P2 x="584" y="269" id="441" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="355" index="22" uid="a61ea188-500c-45a2-8df4-69e8956fb8ce" > +<father id="357" num="0" /> +<cdparam x="464" y="238" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="351" /> +<TGConnectingPoint num="1" id="352" /> +<TGConnectingPoint num="2" id="353" /> +<TGConnectingPoint num="3" id="354" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="364" index="6" uid="2ce7d008-8fbe-42be-99ea-78132fe39d4f" > +<cdparam x="413" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="363" /> +<P1 x="413" y="213" id="514" /> +<P2 x="348" y="447" id="474" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="362" index="23" uid="d702bdd6-d359-45bd-ac39-e2d0666c2446" > +<father id="364" num="0" /> +<cdparam x="414" y="231" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="358" /> +<TGConnectingPoint num="1" id="359" /> +<TGConnectingPoint num="2" id="360" /> +<TGConnectingPoint num="3" id="361" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="371" index="7" uid="e76926f8-de00-4680-995a-5a58576747e3" > +<cdparam x="375" y="103" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="370" /> +<P1 x="375" y="103" id="549" /> +<P2 x="375" y="163" id="524" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="369" index="24" uid="2869e17a-183f-46fe-823a-a968126bc6d2" > +<father id="371" num="0" /> +<cdparam x="375" y="133" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="365" /> +<TGConnectingPoint num="1" id="366" /> +<TGConnectingPoint num="2" id="367" /> +<TGConnectingPoint num="3" id="368" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="373" index="8" uid="9f968524-e144-4cfa-9e8f-3d5c41b91bc6" > +<cdparam x="785" y="497" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="372" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="384" index="9" uid="c748a183-bff1-46a4-9dcb-41bc2b44c53e" > +<cdparam x="775" y="425" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="374" /> +<TGConnectingPoint num="1" id="375" /> +<TGConnectingPoint num="2" id="376" /> +<TGConnectingPoint num="3" id="377" /> +<TGConnectingPoint num="4" id="378" /> +<TGConnectingPoint num="5" id="379" /> +<TGConnectingPoint num="6" id="380" /> +<TGConnectingPoint num="7" id="381" /> +<TGConnectingPoint num="8" id="382" /> +<TGConnectingPoint num="9" id="383" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="395" index="10" uid="95e6079b-0c3f-445d-931a-963ec01efefd" > +<cdparam x="774" y="346" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="385" /> +<TGConnectingPoint num="1" id="386" /> +<TGConnectingPoint num="2" id="387" /> +<TGConnectingPoint num="3" id="388" /> +<TGConnectingPoint num="4" id="389" /> +<TGConnectingPoint num="5" id="390" /> +<TGConnectingPoint num="6" id="391" /> +<TGConnectingPoint num="7" id="392" /> +<TGConnectingPoint num="8" id="393" /> +<TGConnectingPoint num="9" id="394" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="397" index="11" uid="2380251d-bc1a-4e37-bacb-b7b400c0b25c" > +<cdparam x="585" y="446" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="396" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5108" id="400" index="12" uid="39ee8c5d-a275-4eb6-ba24-c2cfc807f2b1" > +<cdparam x="534" y="389" /> +<sizeparam width="140" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="TGComponent" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="398" /> +<TGConnectingPoint num="1" id="399" /> +<tags value="" /> +<extraparam> +<Data variable="x" minValue="0" maxValue="10" functionId="0" extraAttribute1="" extraAttribute2="" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="473" index="13" uid="8cd258e1-d795-4bad-9c79-fe7724d43085" > +<cdparam x="559" y="269" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state0" value="rausState" /> +<new d="false" /> +<TGConnectingPoint num="0" id="401" /> +<TGConnectingPoint num="1" id="402" /> +<TGConnectingPoint num="2" id="403" /> +<TGConnectingPoint num="3" id="404" /> +<TGConnectingPoint num="4" id="405" /> +<TGConnectingPoint num="5" id="406" /> +<TGConnectingPoint num="6" id="407" /> +<TGConnectingPoint num="7" id="408" /> +<TGConnectingPoint num="8" id="409" /> +<TGConnectingPoint num="9" id="410" /> +<TGConnectingPoint num="10" id="411" /> +<TGConnectingPoint num="11" id="412" /> +<TGConnectingPoint num="12" id="413" /> +<TGConnectingPoint num="13" id="414" /> +<TGConnectingPoint num="14" id="415" /> +<TGConnectingPoint num="15" id="416" /> +<TGConnectingPoint num="16" id="417" /> +<TGConnectingPoint num="17" id="418" /> +<TGConnectingPoint num="18" id="419" /> +<TGConnectingPoint num="19" id="420" /> +<TGConnectingPoint num="20" id="421" /> +<TGConnectingPoint num="21" id="422" /> +<TGConnectingPoint num="22" id="423" /> +<TGConnectingPoint num="23" id="424" /> +<TGConnectingPoint num="24" id="425" /> +<TGConnectingPoint num="25" id="426" /> +<TGConnectingPoint num="26" id="427" /> +<TGConnectingPoint num="27" id="428" /> +<TGConnectingPoint num="28" id="429" /> +<TGConnectingPoint num="29" id="430" /> +<TGConnectingPoint num="30" id="431" /> +<TGConnectingPoint num="31" id="432" /> +<TGConnectingPoint num="32" id="433" /> +<TGConnectingPoint num="33" id="434" /> +<TGConnectingPoint num="34" id="435" /> +<TGConnectingPoint num="35" id="436" /> +<TGConnectingPoint num="36" id="437" /> +<TGConnectingPoint num="37" id="438" /> +<TGConnectingPoint num="38" id="439" /> +<TGConnectingPoint num="39" id="440" /> +<TGConnectingPoint num="40" id="441" /> +<TGConnectingPoint num="41" id="442" /> +<TGConnectingPoint num="42" id="443" /> +<TGConnectingPoint num="43" id="444" /> +<TGConnectingPoint num="44" id="445" /> +<TGConnectingPoint num="45" id="446" /> +<TGConnectingPoint num="46" id="447" /> +<TGConnectingPoint num="47" id="448" /> +<TGConnectingPoint num="48" id="449" /> +<TGConnectingPoint num="49" id="450" /> +<TGConnectingPoint num="50" id="451" /> +<TGConnectingPoint num="51" id="452" /> +<TGConnectingPoint num="52" id="453" /> +<TGConnectingPoint num="53" id="454" /> +<TGConnectingPoint num="54" id="455" /> +<TGConnectingPoint num="55" id="456" /> +<TGConnectingPoint num="56" id="457" /> +<TGConnectingPoint num="57" id="458" /> +<TGConnectingPoint num="58" id="459" /> +<TGConnectingPoint num="59" id="460" /> +<TGConnectingPoint num="60" id="461" /> +<TGConnectingPoint num="61" id="462" /> +<TGConnectingPoint num="62" id="463" /> +<TGConnectingPoint num="63" id="464" /> +<TGConnectingPoint num="64" id="465" /> +<TGConnectingPoint num="65" id="466" /> +<TGConnectingPoint num="66" id="467" /> +<TGConnectingPoint num="67" id="468" /> +<TGConnectingPoint num="68" id="469" /> +<TGConnectingPoint num="69" id="470" /> +<TGConnectingPoint num="70" id="471" /> +<TGConnectingPoint num="71" id="472" /> +<tags value="deactivated" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5101" id="475" index="14" uid="89be3b98-b9db-494a-a77f-9dbc0bca66fb" > +<cdparam x="338" y="452" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="474" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="548" index="15" uid="053acb1a-5291-4723-ba27-e14bd7b4c640" > +<cdparam x="363" y="163" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state" /> +<new d="false" /> +<TGConnectingPoint num="0" id="476" /> +<TGConnectingPoint num="1" id="477" /> +<TGConnectingPoint num="2" id="478" /> +<TGConnectingPoint num="3" id="479" /> +<TGConnectingPoint num="4" id="480" /> +<TGConnectingPoint num="5" id="481" /> +<TGConnectingPoint num="6" id="482" /> +<TGConnectingPoint num="7" id="483" /> +<TGConnectingPoint num="8" id="484" /> +<TGConnectingPoint num="9" id="485" /> +<TGConnectingPoint num="10" id="486" /> +<TGConnectingPoint num="11" id="487" /> +<TGConnectingPoint num="12" id="488" /> +<TGConnectingPoint num="13" id="489" /> +<TGConnectingPoint num="14" id="490" /> +<TGConnectingPoint num="15" id="491" /> +<TGConnectingPoint num="16" id="492" /> +<TGConnectingPoint num="17" id="493" /> +<TGConnectingPoint num="18" id="494" /> +<TGConnectingPoint num="19" id="495" /> +<TGConnectingPoint num="20" id="496" /> +<TGConnectingPoint num="21" id="497" /> +<TGConnectingPoint num="22" id="498" /> +<TGConnectingPoint num="23" id="499" /> +<TGConnectingPoint num="24" id="500" /> +<TGConnectingPoint num="25" id="501" /> +<TGConnectingPoint num="26" id="502" /> +<TGConnectingPoint num="27" id="503" /> +<TGConnectingPoint num="28" id="504" /> +<TGConnectingPoint num="29" id="505" /> +<TGConnectingPoint num="30" id="506" /> +<TGConnectingPoint num="31" id="507" /> +<TGConnectingPoint num="32" id="508" /> +<TGConnectingPoint num="33" id="509" /> +<TGConnectingPoint num="34" id="510" /> +<TGConnectingPoint num="35" id="511" /> +<TGConnectingPoint num="36" id="512" /> +<TGConnectingPoint num="37" id="513" /> +<TGConnectingPoint num="38" id="514" /> +<TGConnectingPoint num="39" id="515" /> +<TGConnectingPoint num="40" id="516" /> +<TGConnectingPoint num="41" id="517" /> +<TGConnectingPoint num="42" id="518" /> +<TGConnectingPoint num="43" id="519" /> +<TGConnectingPoint num="44" id="520" /> +<TGConnectingPoint num="45" id="521" /> +<TGConnectingPoint num="46" id="522" /> +<TGConnectingPoint num="47" id="523" /> +<TGConnectingPoint num="48" id="524" /> +<TGConnectingPoint num="49" id="525" /> +<TGConnectingPoint num="50" id="526" /> +<TGConnectingPoint num="51" id="527" /> +<TGConnectingPoint num="52" id="528" /> +<TGConnectingPoint num="53" id="529" /> +<TGConnectingPoint num="54" id="530" /> +<TGConnectingPoint num="55" id="531" /> +<TGConnectingPoint num="56" id="532" /> +<TGConnectingPoint num="57" id="533" /> +<TGConnectingPoint num="58" id="534" /> +<TGConnectingPoint num="59" id="535" /> +<TGConnectingPoint num="60" id="536" /> +<TGConnectingPoint num="61" id="537" /> +<TGConnectingPoint num="62" id="538" /> +<TGConnectingPoint num="63" id="539" /> +<TGConnectingPoint num="64" id="540" /> +<TGConnectingPoint num="65" id="541" /> +<TGConnectingPoint num="66" id="542" /> +<TGConnectingPoint num="67" id="543" /> +<TGConnectingPoint num="68" id="544" /> +<TGConnectingPoint num="69" id="545" /> +<TGConnectingPoint num="70" id="546" /> +<TGConnectingPoint num="71" id="547" /> +<tags value="root stream1" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="550" index="16" uid="bf5c95fa-398e-4db4-a458-226810076c86" > +<cdparam x="368" y="83" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="549" /> +<tags value="root" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Receiver" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="557" index="0" uid="aecb061b-bc68-4379-a7e7-5634e537870b" > +<cdparam x="457" y="428" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="556" /> +<P1 x="457" y="428" id="603" /> +<P2 x="463" y="457" id="600" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="555" index="15" uid="6f4d70d8-e89e-4b55-b3a5-335a39994502" > +<father id="557" num="0" /> +<cdparam x="460" y="442" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="551" /> +<TGConnectingPoint num="1" id="552" /> +<TGConnectingPoint num="2" id="553" /> +<TGConnectingPoint num="3" id="554" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="564" index="1" uid="3fe278de-8f05-4793-998f-a9bfb28e2552" > +<cdparam x="400" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="563" /> +<P1 x="400" y="371" id="667" /> +<P2 x="457" y="398" id="602" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="562" index="16" uid="cf2959b5-fce4-42dc-84ff-39de1e969c8f" > +<father id="564" num="0" /> +<cdparam x="428" y="384" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="558" /> +<TGConnectingPoint num="1" id="559" /> +<TGConnectingPoint num="2" id="560" /> +<TGConnectingPoint num="3" id="561" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="571" index="2" uid="1ad35aa0-b588-4f0f-83b5-63a329e8b349" > +<cdparam x="579" y="287" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="570" /> +<P1 x="579" y="287" id="616" /> +<P2 x="611" y="346" id="613" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="569" index="17" uid="cc76b8f2-3f69-49f3-adce-68112608cf59" > +<father id="571" num="0" /> +<cdparam x="595" y="316" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="565" /> +<TGConnectingPoint num="1" id="566" /> +<TGConnectingPoint num="2" id="567" /> +<TGConnectingPoint num="3" id="568" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="578" index="3" uid="0288bf4c-2567-4c4b-8aa9-b9f4d9bc365e" > +<cdparam x="496" y="173" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="577" /> +<P1 x="496" y="173" id="727" /> +<P2 x="579" y="257" id="615" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="576" index="18" uid="dc237f74-4bba-4476-a430-ed5d7b3aea45" > +<father id="578" num="0" /> +<cdparam x="537" y="215" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="572" /> +<TGConnectingPoint num="1" id="573" /> +<TGConnectingPoint num="2" id="574" /> +<TGConnectingPoint num="3" id="575" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="585" index="4" uid="3b6d02b9-1112-4e15-9065-03f69489e6e6" > +<cdparam x="337" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="584" /> +<P1 x="337" y="371" id="689" /> +<P2 x="332" y="452" id="626" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="583" index="19" uid="9fc73436-dc35-4dc1-9228-3ac4ee592939" > +<father id="585" num="0" /> +<cdparam x="334" y="411" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="579" /> +<TGConnectingPoint num="1" id="580" /> +<TGConnectingPoint num="2" id="581" /> +<TGConnectingPoint num="3" id="582" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="592" index="5" uid="26189ccc-99aa-43d4-84ba-463a35af9258" > +<cdparam x="421" y="192" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="591" /> +<P1 x="421" y="192" id="715" /> +<P2 x="350" y="321" id="629" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="590" index="20" uid="7533fbd2-56fb-4845-9e8d-f1b64e176c10" > +<father id="592" num="0" /> +<cdparam x="385" y="256" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="586" /> +<TGConnectingPoint num="1" id="587" /> +<TGConnectingPoint num="2" id="588" /> +<TGConnectingPoint num="3" id="589" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="599" index="6" uid="d4d7697f-e6ea-4e41-8c2a-741e4136507b" > +<cdparam x="407" y="70" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="598" /> +<P1 x="407" y="70" id="774" /> +<P2 x="408" y="142" id="749" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="597" index="21" uid="4fab767d-9600-4910-bb49-5046c75a067f" > +<father id="599" num="0" /> +<cdparam x="407" y="106" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="593" /> +<TGConnectingPoint num="1" id="594" /> +<TGConnectingPoint num="2" id="595" /> +<TGConnectingPoint num="3" id="596" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="601" index="7" uid="f2c01cc2-449c-4aaf-bb7e-f68ee4e86509" > +<cdparam x="453" y="462" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="600" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5104" id="612" index="8" uid="aadf32f8-a045-435a-a508-b0a774b6cadb" > +<cdparam x="432" y="403" /> +<sizeparam width="50" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Receive signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="602" /> +<TGConnectingPoint num="1" id="603" /> +<TGConnectingPoint num="2" id="604" /> +<TGConnectingPoint num="3" id="605" /> +<TGConnectingPoint num="4" id="606" /> +<TGConnectingPoint num="5" id="607" /> +<TGConnectingPoint num="6" id="608" /> +<TGConnectingPoint num="7" id="609" /> +<TGConnectingPoint num="8" id="610" /> +<TGConnectingPoint num="9" id="611" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="614" index="9" uid="877de2ff-2665-4242-86f6-523354b01977" > +<cdparam x="601" y="351" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="613" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5104" id="625" index="10" uid="b39d00bf-1297-4fcf-822f-660e9601ac67" > +<cdparam x="554" y="262" /> +<sizeparam width="50" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Receive signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="615" /> +<TGConnectingPoint num="1" id="616" /> +<TGConnectingPoint num="2" id="617" /> +<TGConnectingPoint num="3" id="618" /> +<TGConnectingPoint num="4" id="619" /> +<TGConnectingPoint num="5" id="620" /> +<TGConnectingPoint num="6" id="621" /> +<TGConnectingPoint num="7" id="622" /> +<TGConnectingPoint num="8" id="623" /> +<TGConnectingPoint num="9" id="624" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="627" index="11" uid="80894984-0493-4aae-b611-4de62e6f9a12" > +<cdparam x="322" y="457" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="626" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="700" index="12" uid="2402c227-f6d9-4678-8426-b44cce788443" > +<cdparam x="300" y="321" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state22" /> +<new d="false" /> +<TGConnectingPoint num="0" id="628" /> +<TGConnectingPoint num="1" id="629" /> +<TGConnectingPoint num="2" id="630" /> +<TGConnectingPoint num="3" id="631" /> +<TGConnectingPoint num="4" id="632" /> +<TGConnectingPoint num="5" id="633" /> +<TGConnectingPoint num="6" id="634" /> +<TGConnectingPoint num="7" id="635" /> +<TGConnectingPoint num="8" id="636" /> +<TGConnectingPoint num="9" id="637" /> +<TGConnectingPoint num="10" id="638" /> +<TGConnectingPoint num="11" id="639" /> +<TGConnectingPoint num="12" id="640" /> +<TGConnectingPoint num="13" id="641" /> +<TGConnectingPoint num="14" id="642" /> +<TGConnectingPoint num="15" id="643" /> +<TGConnectingPoint num="16" id="644" /> +<TGConnectingPoint num="17" id="645" /> +<TGConnectingPoint num="18" id="646" /> +<TGConnectingPoint num="19" id="647" /> +<TGConnectingPoint num="20" id="648" /> +<TGConnectingPoint num="21" id="649" /> +<TGConnectingPoint num="22" id="650" /> +<TGConnectingPoint num="23" id="651" /> +<TGConnectingPoint num="24" id="652" /> +<TGConnectingPoint num="25" id="653" /> +<TGConnectingPoint num="26" id="654" /> +<TGConnectingPoint num="27" id="655" /> +<TGConnectingPoint num="28" id="656" /> +<TGConnectingPoint num="29" id="657" /> +<TGConnectingPoint num="30" id="658" /> +<TGConnectingPoint num="31" id="659" /> +<TGConnectingPoint num="32" id="660" /> +<TGConnectingPoint num="33" id="661" /> +<TGConnectingPoint num="34" id="662" /> +<TGConnectingPoint num="35" id="663" /> +<TGConnectingPoint num="36" id="664" /> +<TGConnectingPoint num="37" id="665" /> +<TGConnectingPoint num="38" id="666" /> +<TGConnectingPoint num="39" id="667" /> +<TGConnectingPoint num="40" id="668" /> +<TGConnectingPoint num="41" id="669" /> +<TGConnectingPoint num="42" id="670" /> +<TGConnectingPoint num="43" id="671" /> +<TGConnectingPoint num="44" id="672" /> +<TGConnectingPoint num="45" id="673" /> +<TGConnectingPoint num="46" id="674" /> +<TGConnectingPoint num="47" id="675" /> +<TGConnectingPoint num="48" id="676" /> +<TGConnectingPoint num="49" id="677" /> +<TGConnectingPoint num="50" id="678" /> +<TGConnectingPoint num="51" id="679" /> +<TGConnectingPoint num="52" id="680" /> +<TGConnectingPoint num="53" id="681" /> +<TGConnectingPoint num="54" id="682" /> +<TGConnectingPoint num="55" id="683" /> +<TGConnectingPoint num="56" id="684" /> +<TGConnectingPoint num="57" id="685" /> +<TGConnectingPoint num="58" id="686" /> +<TGConnectingPoint num="59" id="687" /> +<TGConnectingPoint num="60" id="688" /> +<TGConnectingPoint num="61" id="689" /> +<TGConnectingPoint num="62" id="690" /> +<TGConnectingPoint num="63" id="691" /> +<TGConnectingPoint num="64" id="692" /> +<TGConnectingPoint num="65" id="693" /> +<TGConnectingPoint num="66" id="694" /> +<TGConnectingPoint num="67" id="695" /> +<TGConnectingPoint num="68" id="696" /> +<TGConnectingPoint num="69" id="697" /> +<TGConnectingPoint num="70" id="698" /> +<TGConnectingPoint num="71" id="699" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="773" index="13" uid="6d44bb88-832a-48fe-adc0-ed5ea387f392" > +<cdparam x="396" y="142" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state21" /> +<new d="false" /> +<TGConnectingPoint num="0" id="701" /> +<TGConnectingPoint num="1" id="702" /> +<TGConnectingPoint num="2" id="703" /> +<TGConnectingPoint num="3" id="704" /> +<TGConnectingPoint num="4" id="705" /> +<TGConnectingPoint num="5" id="706" /> +<TGConnectingPoint num="6" id="707" /> +<TGConnectingPoint num="7" id="708" /> +<TGConnectingPoint num="8" id="709" /> +<TGConnectingPoint num="9" id="710" /> +<TGConnectingPoint num="10" id="711" /> +<TGConnectingPoint num="11" id="712" /> +<TGConnectingPoint num="12" id="713" /> +<TGConnectingPoint num="13" id="714" /> +<TGConnectingPoint num="14" id="715" /> +<TGConnectingPoint num="15" id="716" /> +<TGConnectingPoint num="16" id="717" /> +<TGConnectingPoint num="17" id="718" /> +<TGConnectingPoint num="18" id="719" /> +<TGConnectingPoint num="19" id="720" /> +<TGConnectingPoint num="20" id="721" /> +<TGConnectingPoint num="21" id="722" /> +<TGConnectingPoint num="22" id="723" /> +<TGConnectingPoint num="23" id="724" /> +<TGConnectingPoint num="24" id="725" /> +<TGConnectingPoint num="25" id="726" /> +<TGConnectingPoint num="26" id="727" /> +<TGConnectingPoint num="27" id="728" /> +<TGConnectingPoint num="28" id="729" /> +<TGConnectingPoint num="29" id="730" /> +<TGConnectingPoint num="30" id="731" /> +<TGConnectingPoint num="31" id="732" /> +<TGConnectingPoint num="32" id="733" /> +<TGConnectingPoint num="33" id="734" /> +<TGConnectingPoint num="34" id="735" /> +<TGConnectingPoint num="35" id="736" /> +<TGConnectingPoint num="36" id="737" /> +<TGConnectingPoint num="37" id="738" /> +<TGConnectingPoint num="38" id="739" /> +<TGConnectingPoint num="39" id="740" /> +<TGConnectingPoint num="40" id="741" /> +<TGConnectingPoint num="41" id="742" /> +<TGConnectingPoint num="42" id="743" /> +<TGConnectingPoint num="43" id="744" /> +<TGConnectingPoint num="44" id="745" /> +<TGConnectingPoint num="45" id="746" /> +<TGConnectingPoint num="46" id="747" /> +<TGConnectingPoint num="47" id="748" /> +<TGConnectingPoint num="48" id="749" /> +<TGConnectingPoint num="49" id="750" /> +<TGConnectingPoint num="50" id="751" /> +<TGConnectingPoint num="51" id="752" /> +<TGConnectingPoint num="52" id="753" /> +<TGConnectingPoint num="53" id="754" /> +<TGConnectingPoint num="54" id="755" /> +<TGConnectingPoint num="55" id="756" /> +<TGConnectingPoint num="56" id="757" /> +<TGConnectingPoint num="57" id="758" /> +<TGConnectingPoint num="58" id="759" /> +<TGConnectingPoint num="59" id="760" /> +<TGConnectingPoint num="60" id="761" /> +<TGConnectingPoint num="61" id="762" /> +<TGConnectingPoint num="62" id="763" /> +<TGConnectingPoint num="63" id="764" /> +<TGConnectingPoint num="64" id="765" /> +<TGConnectingPoint num="65" id="766" /> +<TGConnectingPoint num="66" id="767" /> +<TGConnectingPoint num="67" id="768" /> +<TGConnectingPoint num="68" id="769" /> +<TGConnectingPoint num="69" id="770" /> +<TGConnectingPoint num="70" id="771" /> +<TGConnectingPoint num="71" id="772" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="775" index="14" uid="9d3149de-29d7-4bb3-8dfa-8c656a3a2235" > +<cdparam x="400" y="50" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="774" /> +<tags value="" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +</Modeling> + + + + +<Modeling type="AVATAR Design" nameTab="Design3" tabs="Block Diagram$Sender$Receiver" > +<AVATARBlockDiagramPanel name="Block Diagram" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0000000000000002" > +<MainCode value="void __user_init() {"/> +<MainCode value="}"/> +<Optimized value="true" /> +<considerTimingOperators value="true" /> +<Validated value="" /> +<Ignored value="" /> + +<CONNECTOR type="5002" id="777" index="0" uid="d8e3926f-dd9d-4f9a-834f-26a201193e6b" > +<cdparam x="435" y="289" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="" /> +<TGConnectingPoint num="0" id="776" /> +<P1 x="435" y="289" id="823" /> +<P2 x="699" y="289" id="781" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +<extraparam> +<isd value="in sig1()" /> +<oso value="out sig1()" /> +<FIFOType asynchronous="false" synchronousCH="true" size="1" blocking="false" private="true" broadcast="false" lossy="false" ams="false" /> +</extraparam> +</CONNECTOR> +<COMPONENT type="5000" id="818" index="1" uid="ee58680a-9994-4b7c-93e6-a08ce20f5e18" > +<cdparam x="699" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block0" value="Receiver" /> +<new d="false" /> +<TGConnectingPoint num="0" id="778" /> +<TGConnectingPoint num="1" id="779" /> +<TGConnectingPoint num="2" id="780" /> +<TGConnectingPoint num="3" id="781" /> +<TGConnectingPoint num="4" id="782" /> +<TGConnectingPoint num="5" id="783" /> +<TGConnectingPoint num="6" id="784" /> +<TGConnectingPoint num="7" id="785" /> +<TGConnectingPoint num="8" id="786" /> +<TGConnectingPoint num="9" id="787" /> +<TGConnectingPoint num="10" id="788" /> +<TGConnectingPoint num="11" id="789" /> +<TGConnectingPoint num="12" id="790" /> +<TGConnectingPoint num="13" id="791" /> +<TGConnectingPoint num="14" id="792" /> +<TGConnectingPoint num="15" id="793" /> +<TGConnectingPoint num="16" id="794" /> +<TGConnectingPoint num="17" id="795" /> +<TGConnectingPoint num="18" id="796" /> +<TGConnectingPoint num="19" id="797" /> +<TGConnectingPoint num="20" id="798" /> +<TGConnectingPoint num="21" id="799" /> +<TGConnectingPoint num="22" id="800" /> +<TGConnectingPoint num="23" id="801" /> +<TGConnectingPoint num="24" id="802" /> +<TGConnectingPoint num="25" id="803" /> +<TGConnectingPoint num="26" id="804" /> +<TGConnectingPoint num="27" id="805" /> +<TGConnectingPoint num="28" id="806" /> +<TGConnectingPoint num="29" id="807" /> +<TGConnectingPoint num="30" id="808" /> +<TGConnectingPoint num="31" id="809" /> +<TGConnectingPoint num="32" id="810" /> +<TGConnectingPoint num="33" id="811" /> +<TGConnectingPoint num="34" id="812" /> +<TGConnectingPoint num="35" id="813" /> +<TGConnectingPoint num="36" id="814" /> +<TGConnectingPoint num="37" id="815" /> +<TGConnectingPoint num="38" id="816" /> +<TGConnectingPoint num="39" id="817" /> +<tags value="" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Signal value="in sig1()" attached="true" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5000" id="859" index="2" uid="0616c1e0-1028-43a9-b057-3ca6c9390ecd" > +<cdparam x="185" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block" value="Sender" /> +<new d="false" /> +<TGConnectingPoint num="0" id="819" /> +<TGConnectingPoint num="1" id="820" /> +<TGConnectingPoint num="2" id="821" /> +<TGConnectingPoint num="3" id="822" /> +<TGConnectingPoint num="4" id="823" /> +<TGConnectingPoint num="5" id="824" /> +<TGConnectingPoint num="6" id="825" /> +<TGConnectingPoint num="7" id="826" /> +<TGConnectingPoint num="8" id="827" /> +<TGConnectingPoint num="9" id="828" /> +<TGConnectingPoint num="10" id="829" /> +<TGConnectingPoint num="11" id="830" /> +<TGConnectingPoint num="12" id="831" /> +<TGConnectingPoint num="13" id="832" /> +<TGConnectingPoint num="14" id="833" /> +<TGConnectingPoint num="15" id="834" /> +<TGConnectingPoint num="16" id="835" /> +<TGConnectingPoint num="17" id="836" /> +<TGConnectingPoint num="18" id="837" /> +<TGConnectingPoint num="19" id="838" /> +<TGConnectingPoint num="20" id="839" /> +<TGConnectingPoint num="21" id="840" /> +<TGConnectingPoint num="22" id="841" /> +<TGConnectingPoint num="23" id="842" /> +<TGConnectingPoint num="24" id="843" /> +<TGConnectingPoint num="25" id="844" /> +<TGConnectingPoint num="26" id="845" /> +<TGConnectingPoint num="27" id="846" /> +<TGConnectingPoint num="28" id="847" /> +<TGConnectingPoint num="29" id="848" /> +<TGConnectingPoint num="30" id="849" /> +<TGConnectingPoint num="31" id="850" /> +<TGConnectingPoint num="32" id="851" /> +<TGConnectingPoint num="33" id="852" /> +<TGConnectingPoint num="34" id="853" /> +<TGConnectingPoint num="35" id="854" /> +<TGConnectingPoint num="36" id="855" /> +<TGConnectingPoint num="37" id="856" /> +<TGConnectingPoint num="38" id="857" /> +<TGConnectingPoint num="39" id="858" /> +<tags value="root" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Attribute access="0" var="0" id="x" value="" type="8" typeOther="" /> +<Signal value="out sig1()" attached="true" /> +</extraparam> +</COMPONENT> + + +</AVATARBlockDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Sender" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="866" index="0" uid="127c4d29-53ac-4222-ba5e-d842b189c3af" > +<cdparam x="795" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="865" /> +<P1 x="795" y="371" id="939" /> +<P2 x="795" y="492" id="936" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="864" index="19" uid="00f5f96d-8382-4b93-90ef-35bb2bc6e8d6" > +<father id="866" num="0" /> +<cdparam x="795" y="431" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="860" /> +<TGConnectingPoint num="1" id="861" /> +<TGConnectingPoint num="2" id="862" /> +<TGConnectingPoint num="3" id="863" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="873" index="1" uid="f726cd48-0a75-4342-9ed2-459cd307af69" > +<cdparam x="246" y="340" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="872" /> +<P1 x="246" y="339" id="926" /> +<P2 x="234" y="394" id="923" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="871" index="20" uid="1a65c4a3-7269-48ac-a3c1-bb1b10b4264c" > +<father id="873" num="0" /> +<cdparam x="240" y="367" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="867" /> +<TGConnectingPoint num="1" id="868" /> +<TGConnectingPoint num="2" id="869" /> +<TGConnectingPoint num="3" id="870" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="880" index="2" uid="685939bd-a5c1-4785-b180-75f5197ec801" > +<cdparam x="375" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="879" /> +<P1 x="375" y="213" id="1089" /> +<P2 x="246" y="309" id="925" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="878" index="21" uid="1336dabc-6e85-423c-bad2-f3d287bab60f" > +<father id="880" num="0" /> +<cdparam x="374" y="254" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="874" /> +<TGConnectingPoint num="1" id="875" /> +<TGConnectingPoint num="2" id="876" /> +<TGConnectingPoint num="3" id="877" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="887" index="3" uid="ef7e4579-d708-4fe2-9efd-2548bf434ff9" > +<cdparam x="659" y="306" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="886" /> +<P1 x="659" y="306" id="967" /> +<P2 x="795" y="341" id="938" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="885" index="22" uid="a5d645e6-5539-49c2-9a47-fa6ddb37fdf5" > +<father id="887" num="0" /> +<cdparam x="727" y="323" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="881" /> +<TGConnectingPoint num="1" id="882" /> +<TGConnectingPoint num="2" id="883" /> +<TGConnectingPoint num="3" id="884" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="894" index="4" uid="37674b11-35d0-4056-acfb-7686e203c3da" > +<cdparam x="604" y="414" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="893" /> +<P1 x="604" y="414" id="952" /> +<P2 x="595" y="441" id="949" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="892" index="23" uid="033d8562-bf26-440d-8620-ada2f03f5f26" > +<father id="894" num="0" /> +<cdparam x="599" y="427" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="888" /> +<TGConnectingPoint num="1" id="889" /> +<TGConnectingPoint num="2" id="890" /> +<TGConnectingPoint num="3" id="891" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="901" index="5" uid="3d5792a0-1306-4fb2-b7a3-96696e3f6e93" > +<cdparam x="596" y="319" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="900" /> +<P1 x="596" y="319" id="1015" /> +<P2 x="604" y="384" id="951" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="899" index="24" uid="0c9c2c44-82f7-454e-a27a-a42b3a970875" > +<father id="901" num="0" /> +<cdparam x="600" y="351" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="895" /> +<TGConnectingPoint num="1" id="896" /> +<TGConnectingPoint num="2" id="897" /> +<TGConnectingPoint num="3" id="898" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="908" index="6" uid="cfac121b-923e-4914-85f6-759f27e00fd7" > +<cdparam x="463" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="907" /> +<P1 x="463" y="213" id="1068" /> +<P2 x="584" y="269" id="994" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="906" index="25" uid="50d11ca2-8041-4b00-9b64-9479bf77dc21" > +<father id="908" num="0" /> +<cdparam x="464" y="238" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="902" /> +<TGConnectingPoint num="1" id="903" /> +<TGConnectingPoint num="2" id="904" /> +<TGConnectingPoint num="3" id="905" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="915" index="7" uid="ca47b921-070a-4914-a96b-be4283b3f9f8" > +<cdparam x="413" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="914" /> +<P1 x="413" y="213" id="1067" /> +<P2 x="348" y="447" id="1027" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="913" index="26" uid="309e267e-4ef5-43fb-8aac-1a58a5368316" > +<father id="915" num="0" /> +<cdparam x="414" y="231" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="909" /> +<TGConnectingPoint num="1" id="910" /> +<TGConnectingPoint num="2" id="911" /> +<TGConnectingPoint num="3" id="912" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="922" index="8" uid="bb18fecb-2742-4dc2-b2e8-445f85ca1520" > +<cdparam x="375" y="103" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="921" /> +<P1 x="375" y="103" id="1102" /> +<P2 x="375" y="163" id="1077" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="920" index="27" uid="15fc5dce-fef5-4e49-a11f-74c8ca3d2d81" > +<father id="922" num="0" /> +<cdparam x="375" y="133" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="916" /> +<TGConnectingPoint num="1" id="917" /> +<TGConnectingPoint num="2" id="918" /> +<TGConnectingPoint num="3" id="919" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="924" index="9" uid="228bc0ed-4c5f-4f8e-99b4-407df97105e1" > +<cdparam x="224" y="399" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="923" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="935" index="10" uid="0f666f88-bf19-4bdb-b529-02d90121f294" > +<cdparam x="225" y="314" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="925" /> +<TGConnectingPoint num="1" id="926" /> +<TGConnectingPoint num="2" id="927" /> +<TGConnectingPoint num="3" id="928" /> +<TGConnectingPoint num="4" id="929" /> +<TGConnectingPoint num="5" id="930" /> +<TGConnectingPoint num="6" id="931" /> +<TGConnectingPoint num="7" id="932" /> +<TGConnectingPoint num="8" id="933" /> +<TGConnectingPoint num="9" id="934" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="937" index="11" uid="87bfefb2-c0b8-4a84-a133-433ee18bddf8" > +<cdparam x="785" y="497" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="936" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="948" index="12" uid="c148f8b4-e27d-4d27-ab92-6f95480bf507" > +<cdparam x="774" y="346" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<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" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="950" index="13" uid="6b00a1af-5fdb-4787-baa8-b0e7807357cd" > +<cdparam x="585" y="446" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="949" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5108" id="953" index="14" uid="d97f7ad8-91ff-4d93-a48c-70c9ad4ec90f" > +<cdparam x="534" y="389" /> +<sizeparam width="140" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="TGComponent" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="951" /> +<TGConnectingPoint num="1" id="952" /> +<tags value="" /> +<extraparam> +<Data variable="x" minValue="0" maxValue="10" functionId="0" extraAttribute1="" extraAttribute2="" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="1026" index="15" uid="edfd2c47-c3a4-421d-ac50-8c857959f426" > +<cdparam x="559" y="269" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state0" value="rausState" /> +<new d="false" /> +<TGConnectingPoint num="0" id="954" /> +<TGConnectingPoint num="1" id="955" /> +<TGConnectingPoint num="2" id="956" /> +<TGConnectingPoint num="3" id="957" /> +<TGConnectingPoint num="4" id="958" /> +<TGConnectingPoint num="5" id="959" /> +<TGConnectingPoint num="6" id="960" /> +<TGConnectingPoint num="7" id="961" /> +<TGConnectingPoint num="8" id="962" /> +<TGConnectingPoint num="9" id="963" /> +<TGConnectingPoint num="10" id="964" /> +<TGConnectingPoint num="11" id="965" /> +<TGConnectingPoint num="12" id="966" /> +<TGConnectingPoint num="13" id="967" /> +<TGConnectingPoint num="14" id="968" /> +<TGConnectingPoint num="15" id="969" /> +<TGConnectingPoint num="16" id="970" /> +<TGConnectingPoint num="17" id="971" /> +<TGConnectingPoint num="18" id="972" /> +<TGConnectingPoint num="19" id="973" /> +<TGConnectingPoint num="20" id="974" /> +<TGConnectingPoint num="21" id="975" /> +<TGConnectingPoint num="22" id="976" /> +<TGConnectingPoint num="23" id="977" /> +<TGConnectingPoint num="24" id="978" /> +<TGConnectingPoint num="25" id="979" /> +<TGConnectingPoint num="26" id="980" /> +<TGConnectingPoint num="27" id="981" /> +<TGConnectingPoint num="28" id="982" /> +<TGConnectingPoint num="29" id="983" /> +<TGConnectingPoint num="30" id="984" /> +<TGConnectingPoint num="31" id="985" /> +<TGConnectingPoint num="32" id="986" /> +<TGConnectingPoint num="33" id="987" /> +<TGConnectingPoint num="34" id="988" /> +<TGConnectingPoint num="35" id="989" /> +<TGConnectingPoint num="36" id="990" /> +<TGConnectingPoint num="37" id="991" /> +<TGConnectingPoint num="38" id="992" /> +<TGConnectingPoint num="39" id="993" /> +<TGConnectingPoint num="40" id="994" /> +<TGConnectingPoint num="41" id="995" /> +<TGConnectingPoint num="42" id="996" /> +<TGConnectingPoint num="43" id="997" /> +<TGConnectingPoint num="44" id="998" /> +<TGConnectingPoint num="45" id="999" /> +<TGConnectingPoint num="46" id="1000" /> +<TGConnectingPoint num="47" id="1001" /> +<TGConnectingPoint num="48" id="1002" /> +<TGConnectingPoint num="49" id="1003" /> +<TGConnectingPoint num="50" id="1004" /> +<TGConnectingPoint num="51" id="1005" /> +<TGConnectingPoint num="52" id="1006" /> +<TGConnectingPoint num="53" id="1007" /> +<TGConnectingPoint num="54" id="1008" /> +<TGConnectingPoint num="55" id="1009" /> +<TGConnectingPoint num="56" id="1010" /> +<TGConnectingPoint num="57" id="1011" /> +<TGConnectingPoint num="58" id="1012" /> +<TGConnectingPoint num="59" id="1013" /> +<TGConnectingPoint num="60" id="1014" /> +<TGConnectingPoint num="61" id="1015" /> +<TGConnectingPoint num="62" id="1016" /> +<TGConnectingPoint num="63" id="1017" /> +<TGConnectingPoint num="64" id="1018" /> +<TGConnectingPoint num="65" id="1019" /> +<TGConnectingPoint num="66" id="1020" /> +<TGConnectingPoint num="67" id="1021" /> +<TGConnectingPoint num="68" id="1022" /> +<TGConnectingPoint num="69" id="1023" /> +<TGConnectingPoint num="70" id="1024" /> +<TGConnectingPoint num="71" id="1025" /> +<tags value="deactivated" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5101" id="1028" index="16" uid="c8745622-b84e-477c-a2bf-09486ad08d60" > +<cdparam x="338" y="452" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1027" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="1101" index="17" uid="90f0e646-6805-4d0b-9ae4-c43c3b01c997" > +<cdparam x="363" y="163" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1029" /> +<TGConnectingPoint num="1" id="1030" /> +<TGConnectingPoint num="2" id="1031" /> +<TGConnectingPoint num="3" id="1032" /> +<TGConnectingPoint num="4" id="1033" /> +<TGConnectingPoint num="5" id="1034" /> +<TGConnectingPoint num="6" id="1035" /> +<TGConnectingPoint num="7" id="1036" /> +<TGConnectingPoint num="8" id="1037" /> +<TGConnectingPoint num="9" id="1038" /> +<TGConnectingPoint num="10" id="1039" /> +<TGConnectingPoint num="11" id="1040" /> +<TGConnectingPoint num="12" id="1041" /> +<TGConnectingPoint num="13" id="1042" /> +<TGConnectingPoint num="14" id="1043" /> +<TGConnectingPoint num="15" id="1044" /> +<TGConnectingPoint num="16" id="1045" /> +<TGConnectingPoint num="17" id="1046" /> +<TGConnectingPoint num="18" id="1047" /> +<TGConnectingPoint num="19" id="1048" /> +<TGConnectingPoint num="20" id="1049" /> +<TGConnectingPoint num="21" id="1050" /> +<TGConnectingPoint num="22" id="1051" /> +<TGConnectingPoint num="23" id="1052" /> +<TGConnectingPoint num="24" id="1053" /> +<TGConnectingPoint num="25" id="1054" /> +<TGConnectingPoint num="26" id="1055" /> +<TGConnectingPoint num="27" id="1056" /> +<TGConnectingPoint num="28" id="1057" /> +<TGConnectingPoint num="29" id="1058" /> +<TGConnectingPoint num="30" id="1059" /> +<TGConnectingPoint num="31" id="1060" /> +<TGConnectingPoint num="32" id="1061" /> +<TGConnectingPoint num="33" id="1062" /> +<TGConnectingPoint num="34" id="1063" /> +<TGConnectingPoint num="35" id="1064" /> +<TGConnectingPoint num="36" id="1065" /> +<TGConnectingPoint num="37" id="1066" /> +<TGConnectingPoint num="38" id="1067" /> +<TGConnectingPoint num="39" id="1068" /> +<TGConnectingPoint num="40" id="1069" /> +<TGConnectingPoint num="41" id="1070" /> +<TGConnectingPoint num="42" id="1071" /> +<TGConnectingPoint num="43" id="1072" /> +<TGConnectingPoint num="44" id="1073" /> +<TGConnectingPoint num="45" id="1074" /> +<TGConnectingPoint num="46" id="1075" /> +<TGConnectingPoint num="47" id="1076" /> +<TGConnectingPoint num="48" id="1077" /> +<TGConnectingPoint num="49" id="1078" /> +<TGConnectingPoint num="50" id="1079" /> +<TGConnectingPoint num="51" id="1080" /> +<TGConnectingPoint num="52" id="1081" /> +<TGConnectingPoint num="53" id="1082" /> +<TGConnectingPoint num="54" id="1083" /> +<TGConnectingPoint num="55" id="1084" /> +<TGConnectingPoint num="56" id="1085" /> +<TGConnectingPoint num="57" id="1086" /> +<TGConnectingPoint num="58" id="1087" /> +<TGConnectingPoint num="59" id="1088" /> +<TGConnectingPoint num="60" id="1089" /> +<TGConnectingPoint num="61" id="1090" /> +<TGConnectingPoint num="62" id="1091" /> +<TGConnectingPoint num="63" id="1092" /> +<TGConnectingPoint num="64" id="1093" /> +<TGConnectingPoint num="65" id="1094" /> +<TGConnectingPoint num="66" id="1095" /> +<TGConnectingPoint num="67" id="1096" /> +<TGConnectingPoint num="68" id="1097" /> +<TGConnectingPoint num="69" id="1098" /> +<TGConnectingPoint num="70" id="1099" /> +<TGConnectingPoint num="71" id="1100" /> +<tags value="root stream1" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="1103" index="18" uid="6b0eeead-edfc-49bd-8e70-39e3fa35d3c5" > +<cdparam x="368" y="83" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1102" /> +<tags value="root" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Receiver" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="1110" index="0" uid="7edc85b4-ce30-45fb-9ce8-c138ec009cc1" > +<cdparam x="457" y="428" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1109" /> +<P1 x="457" y="428" id="1142" /> +<P2 x="463" y="457" id="1139" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1108" index="11" uid="96a97d82-dc12-49e4-ad27-6c9d728abcab" > +<father id="1110" num="0" /> +<cdparam x="460" y="442" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1104" /> +<TGConnectingPoint num="1" id="1105" /> +<TGConnectingPoint num="2" id="1106" /> +<TGConnectingPoint num="3" id="1107" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1117" index="1" uid="d699d879-0ba5-4a13-bf9a-bccfe4c24328" > +<cdparam x="400" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1116" /> +<P1 x="400" y="371" id="1193" /> +<P2 x="457" y="398" id="1141" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1115" index="12" uid="4f22c8b1-35be-45dd-8a8b-874598d99406" > +<father id="1117" num="0" /> +<cdparam x="428" y="384" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1111" /> +<TGConnectingPoint num="1" id="1112" /> +<TGConnectingPoint num="2" id="1113" /> +<TGConnectingPoint num="3" id="1114" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1124" index="2" uid="f17f61b3-b365-496f-bfc2-0862b28f8a12" > +<cdparam x="337" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1123" /> +<P1 x="337" y="371" id="1215" /> +<P2 x="332" y="452" id="1152" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1122" index="13" uid="d3a6424b-293d-42fd-9da4-e3b68f40a812" > +<father id="1124" num="0" /> +<cdparam x="334" y="411" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1118" /> +<TGConnectingPoint num="1" id="1119" /> +<TGConnectingPoint num="2" id="1120" /> +<TGConnectingPoint num="3" id="1121" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1131" index="3" uid="24c9af72-feb8-468e-b5ba-b27699d010ef" > +<cdparam x="421" y="192" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1130" /> +<P1 x="421" y="192" id="1241" /> +<P2 x="350" y="321" id="1155" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1129" index="14" uid="4d6809f8-f1a1-4174-a3fb-154ce370b54b" > +<father id="1131" num="0" /> +<cdparam x="385" y="256" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1125" /> +<TGConnectingPoint num="1" id="1126" /> +<TGConnectingPoint num="2" id="1127" /> +<TGConnectingPoint num="3" id="1128" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1138" index="4" uid="c9ada4e4-d056-482c-b186-5208ccf97086" > +<cdparam x="407" y="70" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1137" /> +<P1 x="407" y="70" id="1300" /> +<P2 x="408" y="142" id="1275" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1136" index="15" uid="d05d8d7a-b853-4770-bb4e-1a3170c175fd" > +<father id="1138" num="0" /> +<cdparam x="407" y="106" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1132" /> +<TGConnectingPoint num="1" id="1133" /> +<TGConnectingPoint num="2" id="1134" /> +<TGConnectingPoint num="3" id="1135" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="1140" index="5" uid="464baf5d-02e7-4786-a77c-283fc5622d70" > +<cdparam x="453" y="462" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1139" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5104" id="1151" index="6" uid="10d75f8e-6d0b-45b7-9c4e-7866ec5e29e5" > +<cdparam x="432" y="403" /> +<sizeparam width="50" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Receive signal" value="sig1()" /> +<new d="false" /> +<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" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="1153" index="7" uid="72546f13-f242-46e7-99d2-f463acaf17a3" > +<cdparam x="322" y="457" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1152" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="1226" index="8" uid="8f1ad72c-e4dc-468b-9ff2-86cfb85ef616" > +<cdparam x="300" y="321" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state22" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1154" /> +<TGConnectingPoint num="1" id="1155" /> +<TGConnectingPoint num="2" id="1156" /> +<TGConnectingPoint num="3" id="1157" /> +<TGConnectingPoint num="4" id="1158" /> +<TGConnectingPoint num="5" id="1159" /> +<TGConnectingPoint num="6" id="1160" /> +<TGConnectingPoint num="7" id="1161" /> +<TGConnectingPoint num="8" id="1162" /> +<TGConnectingPoint num="9" id="1163" /> +<TGConnectingPoint num="10" id="1164" /> +<TGConnectingPoint num="11" id="1165" /> +<TGConnectingPoint num="12" id="1166" /> +<TGConnectingPoint num="13" id="1167" /> +<TGConnectingPoint num="14" id="1168" /> +<TGConnectingPoint num="15" id="1169" /> +<TGConnectingPoint num="16" id="1170" /> +<TGConnectingPoint num="17" id="1171" /> +<TGConnectingPoint num="18" id="1172" /> +<TGConnectingPoint num="19" id="1173" /> +<TGConnectingPoint num="20" id="1174" /> +<TGConnectingPoint num="21" id="1175" /> +<TGConnectingPoint num="22" id="1176" /> +<TGConnectingPoint num="23" id="1177" /> +<TGConnectingPoint num="24" id="1178" /> +<TGConnectingPoint num="25" id="1179" /> +<TGConnectingPoint num="26" id="1180" /> +<TGConnectingPoint num="27" id="1181" /> +<TGConnectingPoint num="28" id="1182" /> +<TGConnectingPoint num="29" id="1183" /> +<TGConnectingPoint num="30" id="1184" /> +<TGConnectingPoint num="31" id="1185" /> +<TGConnectingPoint num="32" id="1186" /> +<TGConnectingPoint num="33" id="1187" /> +<TGConnectingPoint num="34" id="1188" /> +<TGConnectingPoint num="35" id="1189" /> +<TGConnectingPoint num="36" id="1190" /> +<TGConnectingPoint num="37" id="1191" /> +<TGConnectingPoint num="38" id="1192" /> +<TGConnectingPoint num="39" id="1193" /> +<TGConnectingPoint num="40" id="1194" /> +<TGConnectingPoint num="41" id="1195" /> +<TGConnectingPoint num="42" id="1196" /> +<TGConnectingPoint num="43" id="1197" /> +<TGConnectingPoint num="44" id="1198" /> +<TGConnectingPoint num="45" id="1199" /> +<TGConnectingPoint num="46" id="1200" /> +<TGConnectingPoint num="47" id="1201" /> +<TGConnectingPoint num="48" id="1202" /> +<TGConnectingPoint num="49" id="1203" /> +<TGConnectingPoint num="50" id="1204" /> +<TGConnectingPoint num="51" id="1205" /> +<TGConnectingPoint num="52" id="1206" /> +<TGConnectingPoint num="53" id="1207" /> +<TGConnectingPoint num="54" id="1208" /> +<TGConnectingPoint num="55" id="1209" /> +<TGConnectingPoint num="56" id="1210" /> +<TGConnectingPoint num="57" id="1211" /> +<TGConnectingPoint num="58" id="1212" /> +<TGConnectingPoint num="59" id="1213" /> +<TGConnectingPoint num="60" id="1214" /> +<TGConnectingPoint num="61" id="1215" /> +<TGConnectingPoint num="62" id="1216" /> +<TGConnectingPoint num="63" id="1217" /> +<TGConnectingPoint num="64" id="1218" /> +<TGConnectingPoint num="65" id="1219" /> +<TGConnectingPoint num="66" id="1220" /> +<TGConnectingPoint num="67" id="1221" /> +<TGConnectingPoint num="68" id="1222" /> +<TGConnectingPoint num="69" id="1223" /> +<TGConnectingPoint num="70" id="1224" /> +<TGConnectingPoint num="71" id="1225" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="1299" index="9" uid="0b4e9227-781c-4791-8c1a-8f930cd7686c" > +<cdparam x="396" y="142" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state21" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1227" /> +<TGConnectingPoint num="1" id="1228" /> +<TGConnectingPoint num="2" id="1229" /> +<TGConnectingPoint num="3" id="1230" /> +<TGConnectingPoint num="4" id="1231" /> +<TGConnectingPoint num="5" id="1232" /> +<TGConnectingPoint num="6" id="1233" /> +<TGConnectingPoint num="7" id="1234" /> +<TGConnectingPoint num="8" id="1235" /> +<TGConnectingPoint num="9" id="1236" /> +<TGConnectingPoint num="10" id="1237" /> +<TGConnectingPoint num="11" id="1238" /> +<TGConnectingPoint num="12" id="1239" /> +<TGConnectingPoint num="13" id="1240" /> +<TGConnectingPoint num="14" id="1241" /> +<TGConnectingPoint num="15" id="1242" /> +<TGConnectingPoint num="16" id="1243" /> +<TGConnectingPoint num="17" id="1244" /> +<TGConnectingPoint num="18" id="1245" /> +<TGConnectingPoint num="19" id="1246" /> +<TGConnectingPoint num="20" id="1247" /> +<TGConnectingPoint num="21" id="1248" /> +<TGConnectingPoint num="22" id="1249" /> +<TGConnectingPoint num="23" id="1250" /> +<TGConnectingPoint num="24" id="1251" /> +<TGConnectingPoint num="25" id="1252" /> +<TGConnectingPoint num="26" id="1253" /> +<TGConnectingPoint num="27" id="1254" /> +<TGConnectingPoint num="28" id="1255" /> +<TGConnectingPoint num="29" id="1256" /> +<TGConnectingPoint num="30" id="1257" /> +<TGConnectingPoint num="31" id="1258" /> +<TGConnectingPoint num="32" id="1259" /> +<TGConnectingPoint num="33" id="1260" /> +<TGConnectingPoint num="34" id="1261" /> +<TGConnectingPoint num="35" id="1262" /> +<TGConnectingPoint num="36" id="1263" /> +<TGConnectingPoint num="37" id="1264" /> +<TGConnectingPoint num="38" id="1265" /> +<TGConnectingPoint num="39" id="1266" /> +<TGConnectingPoint num="40" id="1267" /> +<TGConnectingPoint num="41" id="1268" /> +<TGConnectingPoint num="42" id="1269" /> +<TGConnectingPoint num="43" id="1270" /> +<TGConnectingPoint num="44" id="1271" /> +<TGConnectingPoint num="45" id="1272" /> +<TGConnectingPoint num="46" id="1273" /> +<TGConnectingPoint num="47" id="1274" /> +<TGConnectingPoint num="48" id="1275" /> +<TGConnectingPoint num="49" id="1276" /> +<TGConnectingPoint num="50" id="1277" /> +<TGConnectingPoint num="51" id="1278" /> +<TGConnectingPoint num="52" id="1279" /> +<TGConnectingPoint num="53" id="1280" /> +<TGConnectingPoint num="54" id="1281" /> +<TGConnectingPoint num="55" id="1282" /> +<TGConnectingPoint num="56" id="1283" /> +<TGConnectingPoint num="57" id="1284" /> +<TGConnectingPoint num="58" id="1285" /> +<TGConnectingPoint num="59" id="1286" /> +<TGConnectingPoint num="60" id="1287" /> +<TGConnectingPoint num="61" id="1288" /> +<TGConnectingPoint num="62" id="1289" /> +<TGConnectingPoint num="63" id="1290" /> +<TGConnectingPoint num="64" id="1291" /> +<TGConnectingPoint num="65" id="1292" /> +<TGConnectingPoint num="66" id="1293" /> +<TGConnectingPoint num="67" id="1294" /> +<TGConnectingPoint num="68" id="1295" /> +<TGConnectingPoint num="69" id="1296" /> +<TGConnectingPoint num="70" id="1297" /> +<TGConnectingPoint num="71" id="1298" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="1301" index="10" uid="50ef6957-9cb1-4154-bcb3-38bb5c746e21" > +<cdparam x="400" y="50" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1300" /> +<tags value="" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +</Modeling> + + + + +<Modeling type="AVATAR Design" nameTab="Design4" tabs="Block Diagram$Sender$Receiver" > +<AVATARBlockDiagramPanel name="Block Diagram" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0000000000000002" > +<MainCode value="void __user_init() {"/> +<MainCode value="}"/> +<Optimized value="true" /> +<considerTimingOperators value="true" /> +<Validated value="" /> +<Ignored value="" /> + +<CONNECTOR type="5002" id="1303" index="0" uid="b1e18f5c-44e5-49b5-9217-e928d63cff05" > +<cdparam x="435" y="289" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="" /> +<TGConnectingPoint num="0" id="1302" /> +<P1 x="435" y="289" id="1349" /> +<P2 x="699" y="289" id="1307" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +<extraparam> +<isd value="in sig1()" /> +<oso value="out sig1()" /> +<FIFOType asynchronous="false" synchronousCH="true" size="1" blocking="false" private="true" broadcast="false" lossy="false" ams="false" /> +</extraparam> +</CONNECTOR> +<COMPONENT type="5000" id="1344" index="1" uid="5828fd1d-1d6a-4fa8-a240-266a500da040" > +<cdparam x="699" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block0" value="Receiver" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1304" /> +<TGConnectingPoint num="1" id="1305" /> +<TGConnectingPoint num="2" id="1306" /> +<TGConnectingPoint num="3" id="1307" /> +<TGConnectingPoint num="4" id="1308" /> +<TGConnectingPoint num="5" id="1309" /> +<TGConnectingPoint num="6" id="1310" /> +<TGConnectingPoint num="7" id="1311" /> +<TGConnectingPoint num="8" id="1312" /> +<TGConnectingPoint num="9" id="1313" /> +<TGConnectingPoint num="10" id="1314" /> +<TGConnectingPoint num="11" id="1315" /> +<TGConnectingPoint num="12" id="1316" /> +<TGConnectingPoint num="13" id="1317" /> +<TGConnectingPoint num="14" id="1318" /> +<TGConnectingPoint num="15" id="1319" /> +<TGConnectingPoint num="16" id="1320" /> +<TGConnectingPoint num="17" id="1321" /> +<TGConnectingPoint num="18" id="1322" /> +<TGConnectingPoint num="19" id="1323" /> +<TGConnectingPoint num="20" id="1324" /> +<TGConnectingPoint num="21" id="1325" /> +<TGConnectingPoint num="22" id="1326" /> +<TGConnectingPoint num="23" id="1327" /> +<TGConnectingPoint num="24" id="1328" /> +<TGConnectingPoint num="25" id="1329" /> +<TGConnectingPoint num="26" id="1330" /> +<TGConnectingPoint num="27" id="1331" /> +<TGConnectingPoint num="28" id="1332" /> +<TGConnectingPoint num="29" id="1333" /> +<TGConnectingPoint num="30" id="1334" /> +<TGConnectingPoint num="31" id="1335" /> +<TGConnectingPoint num="32" id="1336" /> +<TGConnectingPoint num="33" id="1337" /> +<TGConnectingPoint num="34" id="1338" /> +<TGConnectingPoint num="35" id="1339" /> +<TGConnectingPoint num="36" id="1340" /> +<TGConnectingPoint num="37" id="1341" /> +<TGConnectingPoint num="38" id="1342" /> +<TGConnectingPoint num="39" id="1343" /> +<tags value="deactivated" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Signal value="in sig1()" attached="true" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5000" id="1385" index="2" uid="998d2acd-afae-4173-92a5-14879dd1adff" > +<cdparam x="185" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block" value="Sender" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1345" /> +<TGConnectingPoint num="1" id="1346" /> +<TGConnectingPoint num="2" id="1347" /> +<TGConnectingPoint num="3" id="1348" /> +<TGConnectingPoint num="4" id="1349" /> +<TGConnectingPoint num="5" id="1350" /> +<TGConnectingPoint num="6" id="1351" /> +<TGConnectingPoint num="7" id="1352" /> +<TGConnectingPoint num="8" id="1353" /> +<TGConnectingPoint num="9" id="1354" /> +<TGConnectingPoint num="10" id="1355" /> +<TGConnectingPoint num="11" id="1356" /> +<TGConnectingPoint num="12" id="1357" /> +<TGConnectingPoint num="13" id="1358" /> +<TGConnectingPoint num="14" id="1359" /> +<TGConnectingPoint num="15" id="1360" /> +<TGConnectingPoint num="16" id="1361" /> +<TGConnectingPoint num="17" id="1362" /> +<TGConnectingPoint num="18" id="1363" /> +<TGConnectingPoint num="19" id="1364" /> +<TGConnectingPoint num="20" id="1365" /> +<TGConnectingPoint num="21" id="1366" /> +<TGConnectingPoint num="22" id="1367" /> +<TGConnectingPoint num="23" id="1368" /> +<TGConnectingPoint num="24" id="1369" /> +<TGConnectingPoint num="25" id="1370" /> +<TGConnectingPoint num="26" id="1371" /> +<TGConnectingPoint num="27" id="1372" /> +<TGConnectingPoint num="28" id="1373" /> +<TGConnectingPoint num="29" id="1374" /> +<TGConnectingPoint num="30" id="1375" /> +<TGConnectingPoint num="31" id="1376" /> +<TGConnectingPoint num="32" id="1377" /> +<TGConnectingPoint num="33" id="1378" /> +<TGConnectingPoint num="34" id="1379" /> +<TGConnectingPoint num="35" id="1380" /> +<TGConnectingPoint num="36" id="1381" /> +<TGConnectingPoint num="37" id="1382" /> +<TGConnectingPoint num="38" id="1383" /> +<TGConnectingPoint num="39" id="1384" /> +<tags value="root" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Attribute access="0" var="0" id="x" value="" type="8" typeOther="" /> +<Signal value="out sig1()" attached="true" /> +</extraparam> +</COMPONENT> + + +</AVATARBlockDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Sender" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="1392" index="0" uid="bdef0772-b862-4483-8d16-eb9699b5c9c1" > +<cdparam x="795" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1391" /> +<P1 x="795" y="371" id="1465" /> +<P2 x="795" y="492" id="1462" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1390" index="19" uid="36663497-583a-4f37-bba5-9a4f54f69931" > +<father id="1392" num="0" /> +<cdparam x="795" y="431" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1386" /> +<TGConnectingPoint num="1" id="1387" /> +<TGConnectingPoint num="2" id="1388" /> +<TGConnectingPoint num="3" id="1389" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1399" index="1" uid="9bd3d411-94f6-4dbe-bcab-6365cf4ac64a" > +<cdparam x="246" y="340" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1398" /> +<P1 x="246" y="339" id="1452" /> +<P2 x="234" y="394" id="1449" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1397" index="20" uid="dc3ebf94-45de-4994-964e-05c1510e9cab" > +<father id="1399" num="0" /> +<cdparam x="240" y="367" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1393" /> +<TGConnectingPoint num="1" id="1394" /> +<TGConnectingPoint num="2" id="1395" /> +<TGConnectingPoint num="3" id="1396" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1406" index="2" uid="cbcbdf79-c168-47ee-976a-e3bb6438cf7a" > +<cdparam x="375" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1405" /> +<P1 x="375" y="213" id="1615" /> +<P2 x="246" y="309" id="1451" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1404" index="21" uid="f0a2f14f-444d-4e2d-9501-94481d804ae4" > +<father id="1406" num="0" /> +<cdparam x="374" y="254" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1400" /> +<TGConnectingPoint num="1" id="1401" /> +<TGConnectingPoint num="2" id="1402" /> +<TGConnectingPoint num="3" id="1403" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1413" index="3" uid="fc25341c-3ecb-4014-969b-404671ccffd0" > +<cdparam x="659" y="306" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1412" /> +<P1 x="659" y="306" id="1493" /> +<P2 x="795" y="341" id="1464" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1411" index="22" uid="59c82985-b823-4586-b3fd-7765dad421c1" > +<father id="1413" num="0" /> +<cdparam x="727" y="323" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1407" /> +<TGConnectingPoint num="1" id="1408" /> +<TGConnectingPoint num="2" id="1409" /> +<TGConnectingPoint num="3" id="1410" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1420" index="4" uid="9f84ba9a-bf11-4c6d-9906-790a8687dc27" > +<cdparam x="604" y="414" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1419" /> +<P1 x="604" y="414" id="1478" /> +<P2 x="595" y="441" id="1475" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1418" index="23" uid="46e684cf-75e3-4c23-89e2-68891a063b98" > +<father id="1420" num="0" /> +<cdparam x="599" y="427" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1414" /> +<TGConnectingPoint num="1" id="1415" /> +<TGConnectingPoint num="2" id="1416" /> +<TGConnectingPoint num="3" id="1417" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1427" index="5" uid="53610b6f-2c88-4967-aa90-96af96bf4233" > +<cdparam x="596" y="319" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1426" /> +<P1 x="596" y="319" id="1541" /> +<P2 x="604" y="384" id="1477" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1425" index="24" uid="90269e86-9693-4df3-8c58-db7df10cde15" > +<father id="1427" num="0" /> +<cdparam x="600" y="351" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1421" /> +<TGConnectingPoint num="1" id="1422" /> +<TGConnectingPoint num="2" id="1423" /> +<TGConnectingPoint num="3" id="1424" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1434" index="6" uid="7509c583-f289-4bc4-a157-889b6568a8f9" > +<cdparam x="463" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1433" /> +<P1 x="463" y="213" id="1594" /> +<P2 x="584" y="269" id="1520" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1432" index="25" uid="9607fbbb-e0f3-4462-bd0f-9ccadf12442a" > +<father id="1434" num="0" /> +<cdparam x="464" y="238" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1428" /> +<TGConnectingPoint num="1" id="1429" /> +<TGConnectingPoint num="2" id="1430" /> +<TGConnectingPoint num="3" id="1431" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1441" index="7" uid="0cad6163-88d9-489d-8683-9338567f8825" > +<cdparam x="413" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1440" /> +<P1 x="413" y="213" id="1593" /> +<P2 x="348" y="447" id="1553" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1439" index="26" uid="0f6e0df0-ee5d-4004-9ed6-ecf4198450c3" > +<father id="1441" num="0" /> +<cdparam x="414" y="231" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1435" /> +<TGConnectingPoint num="1" id="1436" /> +<TGConnectingPoint num="2" id="1437" /> +<TGConnectingPoint num="3" id="1438" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1448" index="8" uid="49e6745b-161f-4174-9f61-1cddc83dffcc" > +<cdparam x="375" y="103" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1447" /> +<P1 x="375" y="103" id="1628" /> +<P2 x="375" y="163" id="1603" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1446" index="27" uid="f341d572-f744-4e6f-b1f3-706caaf13b39" > +<father id="1448" num="0" /> +<cdparam x="375" y="133" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1442" /> +<TGConnectingPoint num="1" id="1443" /> +<TGConnectingPoint num="2" id="1444" /> +<TGConnectingPoint num="3" id="1445" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="1450" index="9" uid="23e4681d-adc8-43ca-9a46-76b167588959" > +<cdparam x="224" y="399" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1449" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="1461" index="10" uid="8cc5d094-4a34-4c1e-83af-e366d2050b00" > +<cdparam x="225" y="314" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1451" /> +<TGConnectingPoint num="1" id="1452" /> +<TGConnectingPoint num="2" id="1453" /> +<TGConnectingPoint num="3" id="1454" /> +<TGConnectingPoint num="4" id="1455" /> +<TGConnectingPoint num="5" id="1456" /> +<TGConnectingPoint num="6" id="1457" /> +<TGConnectingPoint num="7" id="1458" /> +<TGConnectingPoint num="8" id="1459" /> +<TGConnectingPoint num="9" id="1460" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="1463" index="11" uid="769b7878-2e15-40db-a5ae-067a17ea6114" > +<cdparam x="785" y="497" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1462" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="1474" index="12" uid="974df820-6a10-4ce5-968f-3c42282ab7ba" > +<cdparam x="774" y="346" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1464" /> +<TGConnectingPoint num="1" id="1465" /> +<TGConnectingPoint num="2" id="1466" /> +<TGConnectingPoint num="3" id="1467" /> +<TGConnectingPoint num="4" id="1468" /> +<TGConnectingPoint num="5" id="1469" /> +<TGConnectingPoint num="6" id="1470" /> +<TGConnectingPoint num="7" id="1471" /> +<TGConnectingPoint num="8" id="1472" /> +<TGConnectingPoint num="9" id="1473" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="1476" index="13" uid="25cb71ee-5d9f-4ea5-8859-c288e6c67b61" > +<cdparam x="585" y="446" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1475" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5108" id="1479" index="14" uid="2f34c034-2f1d-4376-9c71-1ee7b42d9634" > +<cdparam x="534" y="389" /> +<sizeparam width="140" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="TGComponent" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1477" /> +<TGConnectingPoint num="1" id="1478" /> +<tags value="" /> +<extraparam> +<Data variable="x" minValue="0" maxValue="10" functionId="0" extraAttribute1="" extraAttribute2="" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="1552" index="15" uid="60027b01-2b7d-4035-beb6-2e92e66dcad0" > +<cdparam x="559" y="269" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state0" value="rausState" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1480" /> +<TGConnectingPoint num="1" id="1481" /> +<TGConnectingPoint num="2" id="1482" /> +<TGConnectingPoint num="3" id="1483" /> +<TGConnectingPoint num="4" id="1484" /> +<TGConnectingPoint num="5" id="1485" /> +<TGConnectingPoint num="6" id="1486" /> +<TGConnectingPoint num="7" id="1487" /> +<TGConnectingPoint num="8" id="1488" /> +<TGConnectingPoint num="9" id="1489" /> +<TGConnectingPoint num="10" id="1490" /> +<TGConnectingPoint num="11" id="1491" /> +<TGConnectingPoint num="12" id="1492" /> +<TGConnectingPoint num="13" id="1493" /> +<TGConnectingPoint num="14" id="1494" /> +<TGConnectingPoint num="15" id="1495" /> +<TGConnectingPoint num="16" id="1496" /> +<TGConnectingPoint num="17" id="1497" /> +<TGConnectingPoint num="18" id="1498" /> +<TGConnectingPoint num="19" id="1499" /> +<TGConnectingPoint num="20" id="1500" /> +<TGConnectingPoint num="21" id="1501" /> +<TGConnectingPoint num="22" id="1502" /> +<TGConnectingPoint num="23" id="1503" /> +<TGConnectingPoint num="24" id="1504" /> +<TGConnectingPoint num="25" id="1505" /> +<TGConnectingPoint num="26" id="1506" /> +<TGConnectingPoint num="27" id="1507" /> +<TGConnectingPoint num="28" id="1508" /> +<TGConnectingPoint num="29" id="1509" /> +<TGConnectingPoint num="30" id="1510" /> +<TGConnectingPoint num="31" id="1511" /> +<TGConnectingPoint num="32" id="1512" /> +<TGConnectingPoint num="33" id="1513" /> +<TGConnectingPoint num="34" id="1514" /> +<TGConnectingPoint num="35" id="1515" /> +<TGConnectingPoint num="36" id="1516" /> +<TGConnectingPoint num="37" id="1517" /> +<TGConnectingPoint num="38" id="1518" /> +<TGConnectingPoint num="39" id="1519" /> +<TGConnectingPoint num="40" id="1520" /> +<TGConnectingPoint num="41" id="1521" /> +<TGConnectingPoint num="42" id="1522" /> +<TGConnectingPoint num="43" id="1523" /> +<TGConnectingPoint num="44" id="1524" /> +<TGConnectingPoint num="45" id="1525" /> +<TGConnectingPoint num="46" id="1526" /> +<TGConnectingPoint num="47" id="1527" /> +<TGConnectingPoint num="48" id="1528" /> +<TGConnectingPoint num="49" id="1529" /> +<TGConnectingPoint num="50" id="1530" /> +<TGConnectingPoint num="51" id="1531" /> +<TGConnectingPoint num="52" id="1532" /> +<TGConnectingPoint num="53" id="1533" /> +<TGConnectingPoint num="54" id="1534" /> +<TGConnectingPoint num="55" id="1535" /> +<TGConnectingPoint num="56" id="1536" /> +<TGConnectingPoint num="57" id="1537" /> +<TGConnectingPoint num="58" id="1538" /> +<TGConnectingPoint num="59" id="1539" /> +<TGConnectingPoint num="60" id="1540" /> +<TGConnectingPoint num="61" id="1541" /> +<TGConnectingPoint num="62" id="1542" /> +<TGConnectingPoint num="63" id="1543" /> +<TGConnectingPoint num="64" id="1544" /> +<TGConnectingPoint num="65" id="1545" /> +<TGConnectingPoint num="66" id="1546" /> +<TGConnectingPoint num="67" id="1547" /> +<TGConnectingPoint num="68" id="1548" /> +<TGConnectingPoint num="69" id="1549" /> +<TGConnectingPoint num="70" id="1550" /> +<TGConnectingPoint num="71" id="1551" /> +<tags value="deactivated" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5101" id="1554" index="16" uid="c860ed24-e49b-4436-a721-ead2dca497ed" > +<cdparam x="338" y="452" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1553" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="1627" index="17" uid="57c7e5ae-fbc9-4917-b3b2-576154e5ec57" > +<cdparam x="363" y="163" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1555" /> +<TGConnectingPoint num="1" id="1556" /> +<TGConnectingPoint num="2" id="1557" /> +<TGConnectingPoint num="3" id="1558" /> +<TGConnectingPoint num="4" id="1559" /> +<TGConnectingPoint num="5" id="1560" /> +<TGConnectingPoint num="6" id="1561" /> +<TGConnectingPoint num="7" id="1562" /> +<TGConnectingPoint num="8" id="1563" /> +<TGConnectingPoint num="9" id="1564" /> +<TGConnectingPoint num="10" id="1565" /> +<TGConnectingPoint num="11" id="1566" /> +<TGConnectingPoint num="12" id="1567" /> +<TGConnectingPoint num="13" id="1568" /> +<TGConnectingPoint num="14" id="1569" /> +<TGConnectingPoint num="15" id="1570" /> +<TGConnectingPoint num="16" id="1571" /> +<TGConnectingPoint num="17" id="1572" /> +<TGConnectingPoint num="18" id="1573" /> +<TGConnectingPoint num="19" id="1574" /> +<TGConnectingPoint num="20" id="1575" /> +<TGConnectingPoint num="21" id="1576" /> +<TGConnectingPoint num="22" id="1577" /> +<TGConnectingPoint num="23" id="1578" /> +<TGConnectingPoint num="24" id="1579" /> +<TGConnectingPoint num="25" id="1580" /> +<TGConnectingPoint num="26" id="1581" /> +<TGConnectingPoint num="27" id="1582" /> +<TGConnectingPoint num="28" id="1583" /> +<TGConnectingPoint num="29" id="1584" /> +<TGConnectingPoint num="30" id="1585" /> +<TGConnectingPoint num="31" id="1586" /> +<TGConnectingPoint num="32" id="1587" /> +<TGConnectingPoint num="33" id="1588" /> +<TGConnectingPoint num="34" id="1589" /> +<TGConnectingPoint num="35" id="1590" /> +<TGConnectingPoint num="36" id="1591" /> +<TGConnectingPoint num="37" id="1592" /> +<TGConnectingPoint num="38" id="1593" /> +<TGConnectingPoint num="39" id="1594" /> +<TGConnectingPoint num="40" id="1595" /> +<TGConnectingPoint num="41" id="1596" /> +<TGConnectingPoint num="42" id="1597" /> +<TGConnectingPoint num="43" id="1598" /> +<TGConnectingPoint num="44" id="1599" /> +<TGConnectingPoint num="45" id="1600" /> +<TGConnectingPoint num="46" id="1601" /> +<TGConnectingPoint num="47" id="1602" /> +<TGConnectingPoint num="48" id="1603" /> +<TGConnectingPoint num="49" id="1604" /> +<TGConnectingPoint num="50" id="1605" /> +<TGConnectingPoint num="51" id="1606" /> +<TGConnectingPoint num="52" id="1607" /> +<TGConnectingPoint num="53" id="1608" /> +<TGConnectingPoint num="54" id="1609" /> +<TGConnectingPoint num="55" id="1610" /> +<TGConnectingPoint num="56" id="1611" /> +<TGConnectingPoint num="57" id="1612" /> +<TGConnectingPoint num="58" id="1613" /> +<TGConnectingPoint num="59" id="1614" /> +<TGConnectingPoint num="60" id="1615" /> +<TGConnectingPoint num="61" id="1616" /> +<TGConnectingPoint num="62" id="1617" /> +<TGConnectingPoint num="63" id="1618" /> +<TGConnectingPoint num="64" id="1619" /> +<TGConnectingPoint num="65" id="1620" /> +<TGConnectingPoint num="66" id="1621" /> +<TGConnectingPoint num="67" id="1622" /> +<TGConnectingPoint num="68" id="1623" /> +<TGConnectingPoint num="69" id="1624" /> +<TGConnectingPoint num="70" id="1625" /> +<TGConnectingPoint num="71" id="1626" /> +<tags value="root stream1" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="1629" index="18" uid="872ad07f-c7bc-4ad6-989a-521c9de9126e" > +<cdparam x="368" y="83" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1628" /> +<tags value="root" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Receiver" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="1636" index="0" uid="d3e58ea7-90ee-44e2-be48-5c377991d50e" > +<cdparam x="457" y="428" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1635" /> +<P1 x="457" y="428" id="1668" /> +<P2 x="463" y="457" id="1665" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1634" index="11" uid="7508c0be-1537-43e6-8f60-9fe3f91701fd" > +<father id="1636" num="0" /> +<cdparam x="460" y="442" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1630" /> +<TGConnectingPoint num="1" id="1631" /> +<TGConnectingPoint num="2" id="1632" /> +<TGConnectingPoint num="3" id="1633" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1643" index="1" uid="e87eca91-de9e-44ae-b27e-85175c29cc5d" > +<cdparam x="400" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1642" /> +<P1 x="400" y="371" id="1719" /> +<P2 x="457" y="398" id="1667" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1641" index="12" uid="c9ed5d24-c492-4058-863c-f3b6c7ac6ebe" > +<father id="1643" num="0" /> +<cdparam x="428" y="384" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1637" /> +<TGConnectingPoint num="1" id="1638" /> +<TGConnectingPoint num="2" id="1639" /> +<TGConnectingPoint num="3" id="1640" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1650" index="2" uid="ca30af0d-df15-40ec-8973-913b740c579a" > +<cdparam x="337" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1649" /> +<P1 x="337" y="371" id="1741" /> +<P2 x="332" y="452" id="1678" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1648" index="13" uid="a01302ef-ee0f-4248-8d76-29d0864d20f0" > +<father id="1650" num="0" /> +<cdparam x="334" y="411" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1644" /> +<TGConnectingPoint num="1" id="1645" /> +<TGConnectingPoint num="2" id="1646" /> +<TGConnectingPoint num="3" id="1647" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1657" index="3" uid="90efab3d-8b86-4e14-a497-239f8a373aa8" > +<cdparam x="421" y="192" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1656" /> +<P1 x="421" y="192" id="1767" /> +<P2 x="350" y="321" id="1681" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1655" index="14" uid="d826d541-1ead-4b64-b758-40e14732c572" > +<father id="1657" num="0" /> +<cdparam x="385" y="256" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1651" /> +<TGConnectingPoint num="1" id="1652" /> +<TGConnectingPoint num="2" id="1653" /> +<TGConnectingPoint num="3" id="1654" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1664" index="4" uid="b032354e-c102-4f46-9f76-1ac768c87bdd" > +<cdparam x="407" y="70" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1663" /> +<P1 x="407" y="70" id="1826" /> +<P2 x="408" y="142" id="1801" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1662" index="15" uid="87f1e280-1652-4617-9970-c129d2d35133" > +<father id="1664" num="0" /> +<cdparam x="407" y="106" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1658" /> +<TGConnectingPoint num="1" id="1659" /> +<TGConnectingPoint num="2" id="1660" /> +<TGConnectingPoint num="3" id="1661" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="1666" index="5" uid="404b633f-1f46-46a0-ba2a-3c49b927d632" > +<cdparam x="453" y="462" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1665" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5104" id="1677" index="6" uid="0bc62215-feba-4e1f-a55d-8f39b9eb4434" > +<cdparam x="432" y="403" /> +<sizeparam width="50" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Receive signal" value="sig1()" /> +<new d="false" /> +<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" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="1679" index="7" uid="3751d512-4d7b-412d-a75f-aded83db26ac" > +<cdparam x="322" y="457" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1678" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="1752" index="8" uid="f4f845e5-0961-43d7-86e9-97f80416fc24" > +<cdparam x="300" y="321" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state22" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1680" /> +<TGConnectingPoint num="1" id="1681" /> +<TGConnectingPoint num="2" id="1682" /> +<TGConnectingPoint num="3" id="1683" /> +<TGConnectingPoint num="4" id="1684" /> +<TGConnectingPoint num="5" id="1685" /> +<TGConnectingPoint num="6" id="1686" /> +<TGConnectingPoint num="7" id="1687" /> +<TGConnectingPoint num="8" id="1688" /> +<TGConnectingPoint num="9" id="1689" /> +<TGConnectingPoint num="10" id="1690" /> +<TGConnectingPoint num="11" id="1691" /> +<TGConnectingPoint num="12" id="1692" /> +<TGConnectingPoint num="13" id="1693" /> +<TGConnectingPoint num="14" id="1694" /> +<TGConnectingPoint num="15" id="1695" /> +<TGConnectingPoint num="16" id="1696" /> +<TGConnectingPoint num="17" id="1697" /> +<TGConnectingPoint num="18" id="1698" /> +<TGConnectingPoint num="19" id="1699" /> +<TGConnectingPoint num="20" id="1700" /> +<TGConnectingPoint num="21" id="1701" /> +<TGConnectingPoint num="22" id="1702" /> +<TGConnectingPoint num="23" id="1703" /> +<TGConnectingPoint num="24" id="1704" /> +<TGConnectingPoint num="25" id="1705" /> +<TGConnectingPoint num="26" id="1706" /> +<TGConnectingPoint num="27" id="1707" /> +<TGConnectingPoint num="28" id="1708" /> +<TGConnectingPoint num="29" id="1709" /> +<TGConnectingPoint num="30" id="1710" /> +<TGConnectingPoint num="31" id="1711" /> +<TGConnectingPoint num="32" id="1712" /> +<TGConnectingPoint num="33" id="1713" /> +<TGConnectingPoint num="34" id="1714" /> +<TGConnectingPoint num="35" id="1715" /> +<TGConnectingPoint num="36" id="1716" /> +<TGConnectingPoint num="37" id="1717" /> +<TGConnectingPoint num="38" id="1718" /> +<TGConnectingPoint num="39" id="1719" /> +<TGConnectingPoint num="40" id="1720" /> +<TGConnectingPoint num="41" id="1721" /> +<TGConnectingPoint num="42" id="1722" /> +<TGConnectingPoint num="43" id="1723" /> +<TGConnectingPoint num="44" id="1724" /> +<TGConnectingPoint num="45" id="1725" /> +<TGConnectingPoint num="46" id="1726" /> +<TGConnectingPoint num="47" id="1727" /> +<TGConnectingPoint num="48" id="1728" /> +<TGConnectingPoint num="49" id="1729" /> +<TGConnectingPoint num="50" id="1730" /> +<TGConnectingPoint num="51" id="1731" /> +<TGConnectingPoint num="52" id="1732" /> +<TGConnectingPoint num="53" id="1733" /> +<TGConnectingPoint num="54" id="1734" /> +<TGConnectingPoint num="55" id="1735" /> +<TGConnectingPoint num="56" id="1736" /> +<TGConnectingPoint num="57" id="1737" /> +<TGConnectingPoint num="58" id="1738" /> +<TGConnectingPoint num="59" id="1739" /> +<TGConnectingPoint num="60" id="1740" /> +<TGConnectingPoint num="61" id="1741" /> +<TGConnectingPoint num="62" id="1742" /> +<TGConnectingPoint num="63" id="1743" /> +<TGConnectingPoint num="64" id="1744" /> +<TGConnectingPoint num="65" id="1745" /> +<TGConnectingPoint num="66" id="1746" /> +<TGConnectingPoint num="67" id="1747" /> +<TGConnectingPoint num="68" id="1748" /> +<TGConnectingPoint num="69" id="1749" /> +<TGConnectingPoint num="70" id="1750" /> +<TGConnectingPoint num="71" id="1751" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="1825" index="9" uid="a52501b6-c4ad-4569-a597-19d9bcaf3cd9" > +<cdparam x="396" y="142" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state21" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1753" /> +<TGConnectingPoint num="1" id="1754" /> +<TGConnectingPoint num="2" id="1755" /> +<TGConnectingPoint num="3" id="1756" /> +<TGConnectingPoint num="4" id="1757" /> +<TGConnectingPoint num="5" id="1758" /> +<TGConnectingPoint num="6" id="1759" /> +<TGConnectingPoint num="7" id="1760" /> +<TGConnectingPoint num="8" id="1761" /> +<TGConnectingPoint num="9" id="1762" /> +<TGConnectingPoint num="10" id="1763" /> +<TGConnectingPoint num="11" id="1764" /> +<TGConnectingPoint num="12" id="1765" /> +<TGConnectingPoint num="13" id="1766" /> +<TGConnectingPoint num="14" id="1767" /> +<TGConnectingPoint num="15" id="1768" /> +<TGConnectingPoint num="16" id="1769" /> +<TGConnectingPoint num="17" id="1770" /> +<TGConnectingPoint num="18" id="1771" /> +<TGConnectingPoint num="19" id="1772" /> +<TGConnectingPoint num="20" id="1773" /> +<TGConnectingPoint num="21" id="1774" /> +<TGConnectingPoint num="22" id="1775" /> +<TGConnectingPoint num="23" id="1776" /> +<TGConnectingPoint num="24" id="1777" /> +<TGConnectingPoint num="25" id="1778" /> +<TGConnectingPoint num="26" id="1779" /> +<TGConnectingPoint num="27" id="1780" /> +<TGConnectingPoint num="28" id="1781" /> +<TGConnectingPoint num="29" id="1782" /> +<TGConnectingPoint num="30" id="1783" /> +<TGConnectingPoint num="31" id="1784" /> +<TGConnectingPoint num="32" id="1785" /> +<TGConnectingPoint num="33" id="1786" /> +<TGConnectingPoint num="34" id="1787" /> +<TGConnectingPoint num="35" id="1788" /> +<TGConnectingPoint num="36" id="1789" /> +<TGConnectingPoint num="37" id="1790" /> +<TGConnectingPoint num="38" id="1791" /> +<TGConnectingPoint num="39" id="1792" /> +<TGConnectingPoint num="40" id="1793" /> +<TGConnectingPoint num="41" id="1794" /> +<TGConnectingPoint num="42" id="1795" /> +<TGConnectingPoint num="43" id="1796" /> +<TGConnectingPoint num="44" id="1797" /> +<TGConnectingPoint num="45" id="1798" /> +<TGConnectingPoint num="46" id="1799" /> +<TGConnectingPoint num="47" id="1800" /> +<TGConnectingPoint num="48" id="1801" /> +<TGConnectingPoint num="49" id="1802" /> +<TGConnectingPoint num="50" id="1803" /> +<TGConnectingPoint num="51" id="1804" /> +<TGConnectingPoint num="52" id="1805" /> +<TGConnectingPoint num="53" id="1806" /> +<TGConnectingPoint num="54" id="1807" /> +<TGConnectingPoint num="55" id="1808" /> +<TGConnectingPoint num="56" id="1809" /> +<TGConnectingPoint num="57" id="1810" /> +<TGConnectingPoint num="58" id="1811" /> +<TGConnectingPoint num="59" id="1812" /> +<TGConnectingPoint num="60" id="1813" /> +<TGConnectingPoint num="61" id="1814" /> +<TGConnectingPoint num="62" id="1815" /> +<TGConnectingPoint num="63" id="1816" /> +<TGConnectingPoint num="64" id="1817" /> +<TGConnectingPoint num="65" id="1818" /> +<TGConnectingPoint num="66" id="1819" /> +<TGConnectingPoint num="67" id="1820" /> +<TGConnectingPoint num="68" id="1821" /> +<TGConnectingPoint num="69" id="1822" /> +<TGConnectingPoint num="70" id="1823" /> +<TGConnectingPoint num="71" id="1824" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="1827" index="10" uid="b9dc703f-883e-481e-9e9d-1b655bbfe789" > +<cdparam x="400" y="50" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1826" /> +<tags value="" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +</Modeling> + + + + +<Modeling type="AVATAR Design" nameTab="Design5" tabs="Block Diagram$Sender$Receiver" > +<AVATARBlockDiagramPanel name="Block Diagram" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0000000000000002" > +<MainCode value="void __user_init() {"/> +<MainCode value="}"/> +<Optimized value="true" /> +<considerTimingOperators value="true" /> +<Validated value="Receiver;Sender;" /> +<Ignored value="" /> + +<CONNECTOR type="5002" id="1829" index="0" uid="7794a83e-1803-4d8e-b90e-569846c19119" > +<cdparam x="435" y="289" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="" /> +<TGConnectingPoint num="0" id="1828" /> +<P1 x="435" y="289" id="1875" /> +<P2 x="699" y="289" id="1833" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +<extraparam> +<isd value="in sig1()" /> +<oso value="out sig1()" /> +<FIFOType asynchronous="false" synchronousCH="true" size="1" blocking="false" private="true" broadcast="false" lossy="false" ams="false" /> +</extraparam> +</CONNECTOR> +<COMPONENT type="5000" id="1870" index="1" uid="5d537ea9-fd47-4522-a7f6-c466a4abe93c" > +<cdparam x="699" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block0" value="Receiver" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1830" /> +<TGConnectingPoint num="1" id="1831" /> +<TGConnectingPoint num="2" id="1832" /> +<TGConnectingPoint num="3" id="1833" /> +<TGConnectingPoint num="4" id="1834" /> +<TGConnectingPoint num="5" id="1835" /> +<TGConnectingPoint num="6" id="1836" /> +<TGConnectingPoint num="7" id="1837" /> +<TGConnectingPoint num="8" id="1838" /> +<TGConnectingPoint num="9" id="1839" /> +<TGConnectingPoint num="10" id="1840" /> +<TGConnectingPoint num="11" id="1841" /> +<TGConnectingPoint num="12" id="1842" /> +<TGConnectingPoint num="13" id="1843" /> +<TGConnectingPoint num="14" id="1844" /> +<TGConnectingPoint num="15" id="1845" /> +<TGConnectingPoint num="16" id="1846" /> +<TGConnectingPoint num="17" id="1847" /> +<TGConnectingPoint num="18" id="1848" /> +<TGConnectingPoint num="19" id="1849" /> +<TGConnectingPoint num="20" id="1850" /> +<TGConnectingPoint num="21" id="1851" /> +<TGConnectingPoint num="22" id="1852" /> +<TGConnectingPoint num="23" id="1853" /> +<TGConnectingPoint num="24" id="1854" /> +<TGConnectingPoint num="25" id="1855" /> +<TGConnectingPoint num="26" id="1856" /> +<TGConnectingPoint num="27" id="1857" /> +<TGConnectingPoint num="28" id="1858" /> +<TGConnectingPoint num="29" id="1859" /> +<TGConnectingPoint num="30" id="1860" /> +<TGConnectingPoint num="31" id="1861" /> +<TGConnectingPoint num="32" id="1862" /> +<TGConnectingPoint num="33" id="1863" /> +<TGConnectingPoint num="34" id="1864" /> +<TGConnectingPoint num="35" id="1865" /> +<TGConnectingPoint num="36" id="1866" /> +<TGConnectingPoint num="37" id="1867" /> +<TGConnectingPoint num="38" id="1868" /> +<TGConnectingPoint num="39" id="1869" /> +<tags value="deactivated" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Signal value="in sig1()" attached="true" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5000" id="1911" index="2" uid="7b2e001a-1e7d-4945-84bd-64ea02d5afb2" > +<cdparam x="185" y="189" /> +<sizeparam width="250" height="200" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="9" maxX="2499" minY="9" maxY="1499" /> +<infoparam name="Block" value="Sender" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1871" /> +<TGConnectingPoint num="1" id="1872" /> +<TGConnectingPoint num="2" id="1873" /> +<TGConnectingPoint num="3" id="1874" /> +<TGConnectingPoint num="4" id="1875" /> +<TGConnectingPoint num="5" id="1876" /> +<TGConnectingPoint num="6" id="1877" /> +<TGConnectingPoint num="7" id="1878" /> +<TGConnectingPoint num="8" id="1879" /> +<TGConnectingPoint num="9" id="1880" /> +<TGConnectingPoint num="10" id="1881" /> +<TGConnectingPoint num="11" id="1882" /> +<TGConnectingPoint num="12" id="1883" /> +<TGConnectingPoint num="13" id="1884" /> +<TGConnectingPoint num="14" id="1885" /> +<TGConnectingPoint num="15" id="1886" /> +<TGConnectingPoint num="16" id="1887" /> +<TGConnectingPoint num="17" id="1888" /> +<TGConnectingPoint num="18" id="1889" /> +<TGConnectingPoint num="19" id="1890" /> +<TGConnectingPoint num="20" id="1891" /> +<TGConnectingPoint num="21" id="1892" /> +<TGConnectingPoint num="22" id="1893" /> +<TGConnectingPoint num="23" id="1894" /> +<TGConnectingPoint num="24" id="1895" /> +<TGConnectingPoint num="25" id="1896" /> +<TGConnectingPoint num="26" id="1897" /> +<TGConnectingPoint num="27" id="1898" /> +<TGConnectingPoint num="28" id="1899" /> +<TGConnectingPoint num="29" id="1900" /> +<TGConnectingPoint num="30" id="1901" /> +<TGConnectingPoint num="31" id="1902" /> +<TGConnectingPoint num="32" id="1903" /> +<TGConnectingPoint num="33" id="1904" /> +<TGConnectingPoint num="34" id="1905" /> +<TGConnectingPoint num="35" id="1906" /> +<TGConnectingPoint num="36" id="1907" /> +<TGConnectingPoint num="37" id="1908" /> +<TGConnectingPoint num="38" id="1909" /> +<TGConnectingPoint num="39" id="1910" /> +<tags value="root" /> +<extraparam> +<blockType data="block" color="-4072719" /> +<CryptoBlock value="false" /> +<Attribute access="0" var="0" id="x" value="" type="8" typeOther="" /> +<Signal value="out sig1()" attached="true" /> +</extraparam> +</COMPONENT> + + +</AVATARBlockDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Sender" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="1918" index="0" uid="733278a9-ef9f-43aa-990e-b025687d8d62" > +<cdparam x="795" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1917" /> +<P1 x="795" y="371" id="1991" /> +<P2 x="795" y="492" id="1988" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1916" index="19" uid="05cfdbc5-9e18-4fd9-bfc2-1db9e18f8701" > +<father id="1918" num="0" /> +<cdparam x="795" y="431" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1912" /> +<TGConnectingPoint num="1" id="1913" /> +<TGConnectingPoint num="2" id="1914" /> +<TGConnectingPoint num="3" id="1915" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1925" index="1" uid="b2f23f9b-9036-48fa-9d49-f5b240808fa2" > +<cdparam x="246" y="340" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1924" /> +<P1 x="246" y="339" id="1978" /> +<P2 x="234" y="394" id="1975" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1923" index="20" uid="6e9db5b9-1ece-45b5-a37a-8e04e27cc740" > +<father id="1925" num="0" /> +<cdparam x="240" y="367" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1919" /> +<TGConnectingPoint num="1" id="1920" /> +<TGConnectingPoint num="2" id="1921" /> +<TGConnectingPoint num="3" id="1922" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1932" index="2" uid="f517909f-1d1d-4fa1-a4c3-c6ffbdc00de7" > +<cdparam x="375" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1931" /> +<P1 x="375" y="213" id="2141" /> +<P2 x="246" y="309" id="1977" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1930" index="21" uid="53aa5684-fc45-4ebc-ba73-25284b0b2539" > +<father id="1932" num="0" /> +<cdparam x="374" y="254" /> +<sizeparam width="63" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1926" /> +<TGConnectingPoint num="1" id="1927" /> +<TGConnectingPoint num="2" id="1928" /> +<TGConnectingPoint num="3" id="1929" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +<actions value="x = x + 1" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1939" index="3" uid="fe585417-9a7a-405d-994e-da152d1bc9da" > +<cdparam x="659" y="306" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1938" /> +<P1 x="659" y="306" id="2019" /> +<P2 x="795" y="341" id="1990" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1937" index="22" uid="566675fa-7fed-4b1f-a5bf-a62025189fbe" > +<father id="1939" num="0" /> +<cdparam x="727" y="323" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1933" /> +<TGConnectingPoint num="1" id="1934" /> +<TGConnectingPoint num="2" id="1935" /> +<TGConnectingPoint num="3" id="1936" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1946" index="4" uid="4d443174-8eba-4d8a-812a-6ab5b5760020" > +<cdparam x="604" y="414" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1945" /> +<P1 x="604" y="414" id="2004" /> +<P2 x="595" y="441" id="2001" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1944" index="23" uid="d18062cb-62c8-43c0-9a1e-39d08f14b5fe" > +<father id="1946" num="0" /> +<cdparam x="599" y="427" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1940" /> +<TGConnectingPoint num="1" id="1941" /> +<TGConnectingPoint num="2" id="1942" /> +<TGConnectingPoint num="3" id="1943" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1953" index="5" uid="a7ab2da6-c692-415b-a1ce-b80254abd7f7" > +<cdparam x="596" y="319" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1952" /> +<P1 x="596" y="319" id="2067" /> +<P2 x="604" y="384" id="2003" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1951" index="24" uid="eb2e2fbc-329e-4591-be36-908744b61093" > +<father id="1953" num="0" /> +<cdparam x="600" y="351" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1947" /> +<TGConnectingPoint num="1" id="1948" /> +<TGConnectingPoint num="2" id="1949" /> +<TGConnectingPoint num="3" id="1950" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1960" index="6" uid="51c76588-38c6-49e4-bfa2-543ac9634bec" > +<cdparam x="463" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1959" /> +<P1 x="463" y="213" id="2120" /> +<P2 x="584" y="269" id="2046" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1958" index="25" uid="c75a9907-eadd-4895-86a6-9e3ffd4d3cd6" > +<father id="1960" num="0" /> +<cdparam x="464" y="238" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1954" /> +<TGConnectingPoint num="1" id="1955" /> +<TGConnectingPoint num="2" id="1956" /> +<TGConnectingPoint num="3" id="1957" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1967" index="7" uid="ff0099c0-640a-4713-8fc3-32a43058525e" > +<cdparam x="413" y="213" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1966" /> +<P1 x="413" y="213" id="2119" /> +<P2 x="348" y="447" id="2079" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1965" index="26" uid="dd7722f3-bdad-419d-a462-69b7c147cf50" > +<father id="1967" num="0" /> +<cdparam x="414" y="231" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1961" /> +<TGConnectingPoint num="1" id="1962" /> +<TGConnectingPoint num="2" id="1963" /> +<TGConnectingPoint num="3" id="1964" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="1974" index="8" uid="5edd7c38-cb1c-481d-a071-9074b4e00c93" > +<cdparam x="375" y="103" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="1973" /> +<P1 x="375" y="103" id="2154" /> +<P2 x="375" y="163" id="2129" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="1972" index="27" uid="ed26a985-197f-4588-b7d9-ae7ac874366b" > +<father id="1974" num="0" /> +<cdparam x="375" y="133" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1968" /> +<TGConnectingPoint num="1" id="1969" /> +<TGConnectingPoint num="2" id="1970" /> +<TGConnectingPoint num="3" id="1971" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="1976" index="9" uid="69aa4b03-b2e6-4276-b82a-6f732aac274e" > +<cdparam x="224" y="399" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1975" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="1987" index="10" uid="c1a738cf-7120-4b65-b878-e4e1c9d6fbd0" > +<cdparam x="225" y="314" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1977" /> +<TGConnectingPoint num="1" id="1978" /> +<TGConnectingPoint num="2" id="1979" /> +<TGConnectingPoint num="3" id="1980" /> +<TGConnectingPoint num="4" id="1981" /> +<TGConnectingPoint num="5" id="1982" /> +<TGConnectingPoint num="6" id="1983" /> +<TGConnectingPoint num="7" id="1984" /> +<TGConnectingPoint num="8" id="1985" /> +<TGConnectingPoint num="9" id="1986" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="1989" index="11" uid="af3fb94c-8a53-45ab-96e0-e83607ddbf25" > +<cdparam x="785" y="497" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1988" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5103" id="2000" index="12" uid="69d34293-1c42-4b93-995e-f54edf6cc306" > +<cdparam x="774" y="346" /> +<sizeparam width="42" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Send signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1990" /> +<TGConnectingPoint num="1" id="1991" /> +<TGConnectingPoint num="2" id="1992" /> +<TGConnectingPoint num="3" id="1993" /> +<TGConnectingPoint num="4" id="1994" /> +<TGConnectingPoint num="5" id="1995" /> +<TGConnectingPoint num="6" id="1996" /> +<TGConnectingPoint num="7" id="1997" /> +<TGConnectingPoint num="8" id="1998" /> +<TGConnectingPoint num="9" id="1999" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="2002" index="13" uid="1217c87a-6752-4b01-b603-1832e96e8cd5" > +<cdparam x="585" y="446" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2001" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5108" id="2005" index="14" uid="bd830a0a-6f12-412c-a38c-5b5969334c94" > +<cdparam x="534" y="389" /> +<sizeparam width="140" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="TGComponent" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2003" /> +<TGConnectingPoint num="1" id="2004" /> +<tags value="" /> +<extraparam> +<Data variable="x" minValue="0" maxValue="10" functionId="0" extraAttribute1="" extraAttribute2="" /> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="2078" index="15" uid="3d9357d1-e4a2-496a-8f4c-99c02614a537" > +<cdparam x="559" y="269" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state0" value="rausState" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2006" /> +<TGConnectingPoint num="1" id="2007" /> +<TGConnectingPoint num="2" id="2008" /> +<TGConnectingPoint num="3" id="2009" /> +<TGConnectingPoint num="4" id="2010" /> +<TGConnectingPoint num="5" id="2011" /> +<TGConnectingPoint num="6" id="2012" /> +<TGConnectingPoint num="7" id="2013" /> +<TGConnectingPoint num="8" id="2014" /> +<TGConnectingPoint num="9" id="2015" /> +<TGConnectingPoint num="10" id="2016" /> +<TGConnectingPoint num="11" id="2017" /> +<TGConnectingPoint num="12" id="2018" /> +<TGConnectingPoint num="13" id="2019" /> +<TGConnectingPoint num="14" id="2020" /> +<TGConnectingPoint num="15" id="2021" /> +<TGConnectingPoint num="16" id="2022" /> +<TGConnectingPoint num="17" id="2023" /> +<TGConnectingPoint num="18" id="2024" /> +<TGConnectingPoint num="19" id="2025" /> +<TGConnectingPoint num="20" id="2026" /> +<TGConnectingPoint num="21" id="2027" /> +<TGConnectingPoint num="22" id="2028" /> +<TGConnectingPoint num="23" id="2029" /> +<TGConnectingPoint num="24" id="2030" /> +<TGConnectingPoint num="25" id="2031" /> +<TGConnectingPoint num="26" id="2032" /> +<TGConnectingPoint num="27" id="2033" /> +<TGConnectingPoint num="28" id="2034" /> +<TGConnectingPoint num="29" id="2035" /> +<TGConnectingPoint num="30" id="2036" /> +<TGConnectingPoint num="31" id="2037" /> +<TGConnectingPoint num="32" id="2038" /> +<TGConnectingPoint num="33" id="2039" /> +<TGConnectingPoint num="34" id="2040" /> +<TGConnectingPoint num="35" id="2041" /> +<TGConnectingPoint num="36" id="2042" /> +<TGConnectingPoint num="37" id="2043" /> +<TGConnectingPoint num="38" id="2044" /> +<TGConnectingPoint num="39" id="2045" /> +<TGConnectingPoint num="40" id="2046" /> +<TGConnectingPoint num="41" id="2047" /> +<TGConnectingPoint num="42" id="2048" /> +<TGConnectingPoint num="43" id="2049" /> +<TGConnectingPoint num="44" id="2050" /> +<TGConnectingPoint num="45" id="2051" /> +<TGConnectingPoint num="46" id="2052" /> +<TGConnectingPoint num="47" id="2053" /> +<TGConnectingPoint num="48" id="2054" /> +<TGConnectingPoint num="49" id="2055" /> +<TGConnectingPoint num="50" id="2056" /> +<TGConnectingPoint num="51" id="2057" /> +<TGConnectingPoint num="52" id="2058" /> +<TGConnectingPoint num="53" id="2059" /> +<TGConnectingPoint num="54" id="2060" /> +<TGConnectingPoint num="55" id="2061" /> +<TGConnectingPoint num="56" id="2062" /> +<TGConnectingPoint num="57" id="2063" /> +<TGConnectingPoint num="58" id="2064" /> +<TGConnectingPoint num="59" id="2065" /> +<TGConnectingPoint num="60" id="2066" /> +<TGConnectingPoint num="61" id="2067" /> +<TGConnectingPoint num="62" id="2068" /> +<TGConnectingPoint num="63" id="2069" /> +<TGConnectingPoint num="64" id="2070" /> +<TGConnectingPoint num="65" id="2071" /> +<TGConnectingPoint num="66" id="2072" /> +<TGConnectingPoint num="67" id="2073" /> +<TGConnectingPoint num="68" id="2074" /> +<TGConnectingPoint num="69" id="2075" /> +<TGConnectingPoint num="70" id="2076" /> +<TGConnectingPoint num="71" id="2077" /> +<tags value="deactivated" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5101" id="2080" index="16" uid="01cc2ab9-dc01-4858-a4b4-e392bd3bcb32" > +<cdparam x="338" y="452" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2079" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="2153" index="17" uid="87b2bd03-dc4b-4bba-810e-c727c24f3c90" > +<cdparam x="363" y="163" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2081" /> +<TGConnectingPoint num="1" id="2082" /> +<TGConnectingPoint num="2" id="2083" /> +<TGConnectingPoint num="3" id="2084" /> +<TGConnectingPoint num="4" id="2085" /> +<TGConnectingPoint num="5" id="2086" /> +<TGConnectingPoint num="6" id="2087" /> +<TGConnectingPoint num="7" id="2088" /> +<TGConnectingPoint num="8" id="2089" /> +<TGConnectingPoint num="9" id="2090" /> +<TGConnectingPoint num="10" id="2091" /> +<TGConnectingPoint num="11" id="2092" /> +<TGConnectingPoint num="12" id="2093" /> +<TGConnectingPoint num="13" id="2094" /> +<TGConnectingPoint num="14" id="2095" /> +<TGConnectingPoint num="15" id="2096" /> +<TGConnectingPoint num="16" id="2097" /> +<TGConnectingPoint num="17" id="2098" /> +<TGConnectingPoint num="18" id="2099" /> +<TGConnectingPoint num="19" id="2100" /> +<TGConnectingPoint num="20" id="2101" /> +<TGConnectingPoint num="21" id="2102" /> +<TGConnectingPoint num="22" id="2103" /> +<TGConnectingPoint num="23" id="2104" /> +<TGConnectingPoint num="24" id="2105" /> +<TGConnectingPoint num="25" id="2106" /> +<TGConnectingPoint num="26" id="2107" /> +<TGConnectingPoint num="27" id="2108" /> +<TGConnectingPoint num="28" id="2109" /> +<TGConnectingPoint num="29" id="2110" /> +<TGConnectingPoint num="30" id="2111" /> +<TGConnectingPoint num="31" id="2112" /> +<TGConnectingPoint num="32" id="2113" /> +<TGConnectingPoint num="33" id="2114" /> +<TGConnectingPoint num="34" id="2115" /> +<TGConnectingPoint num="35" id="2116" /> +<TGConnectingPoint num="36" id="2117" /> +<TGConnectingPoint num="37" id="2118" /> +<TGConnectingPoint num="38" id="2119" /> +<TGConnectingPoint num="39" id="2120" /> +<TGConnectingPoint num="40" id="2121" /> +<TGConnectingPoint num="41" id="2122" /> +<TGConnectingPoint num="42" id="2123" /> +<TGConnectingPoint num="43" id="2124" /> +<TGConnectingPoint num="44" id="2125" /> +<TGConnectingPoint num="45" id="2126" /> +<TGConnectingPoint num="46" id="2127" /> +<TGConnectingPoint num="47" id="2128" /> +<TGConnectingPoint num="48" id="2129" /> +<TGConnectingPoint num="49" id="2130" /> +<TGConnectingPoint num="50" id="2131" /> +<TGConnectingPoint num="51" id="2132" /> +<TGConnectingPoint num="52" id="2133" /> +<TGConnectingPoint num="53" id="2134" /> +<TGConnectingPoint num="54" id="2135" /> +<TGConnectingPoint num="55" id="2136" /> +<TGConnectingPoint num="56" id="2137" /> +<TGConnectingPoint num="57" id="2138" /> +<TGConnectingPoint num="58" id="2139" /> +<TGConnectingPoint num="59" id="2140" /> +<TGConnectingPoint num="60" id="2141" /> +<TGConnectingPoint num="61" id="2142" /> +<TGConnectingPoint num="62" id="2143" /> +<TGConnectingPoint num="63" id="2144" /> +<TGConnectingPoint num="64" id="2145" /> +<TGConnectingPoint num="65" id="2146" /> +<TGConnectingPoint num="66" id="2147" /> +<TGConnectingPoint num="67" id="2148" /> +<TGConnectingPoint num="68" id="2149" /> +<TGConnectingPoint num="69" id="2150" /> +<TGConnectingPoint num="70" id="2151" /> +<TGConnectingPoint num="71" id="2152" /> +<tags value="root stream1" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="2155" index="18" uid="8cb70440-902a-4ff0-a4bf-5740ae279056" > +<cdparam x="368" y="83" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2154" /> +<tags value="root" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +<AVATARStateMachineDiagramPanel name="Receiver" minX="10" maxX="2500" minY="10" maxY="1500" zoom="1.0" > +<CONNECTOR type="5102" id="2162" index="0" uid="3a681413-9f44-432e-8842-ed07a25e9e87" > +<cdparam x="457" y="428" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="2161" /> +<P1 x="457" y="428" id="2194" /> +<P2 x="463" y="457" id="2191" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="2160" index="11" uid="01560caf-80db-455d-a6f3-011c89831b04" > +<father id="2162" num="0" /> +<cdparam x="460" y="442" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2156" /> +<TGConnectingPoint num="1" id="2157" /> +<TGConnectingPoint num="2" id="2158" /> +<TGConnectingPoint num="3" id="2159" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="2169" index="1" uid="cafef4b0-da15-49a1-8e0b-2f5b5ea90c2b" > +<cdparam x="400" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="2168" /> +<P1 x="400" y="371" id="2245" /> +<P2 x="457" y="398" id="2193" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="2167" index="12" uid="2c3c85e3-93fa-4298-8c9b-335a9c828748" > +<father id="2169" num="0" /> +<cdparam x="428" y="384" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2163" /> +<TGConnectingPoint num="1" id="2164" /> +<TGConnectingPoint num="2" id="2165" /> +<TGConnectingPoint num="3" id="2166" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="2176" index="2" uid="9e990fc0-a62a-40e8-b08e-48fdda84d784" > +<cdparam x="337" y="371" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="2175" /> +<P1 x="337" y="371" id="2267" /> +<P2 x="332" y="452" id="2204" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="2174" index="13" uid="088ea582-eff4-405c-a922-8a08ec520b99" > +<father id="2176" num="0" /> +<cdparam x="334" y="411" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2170" /> +<TGConnectingPoint num="1" id="2171" /> +<TGConnectingPoint num="2" id="2172" /> +<TGConnectingPoint num="3" id="2173" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="2183" index="3" uid="07d5d341-e07a-43a0-9d0b-3f76d96526e2" > +<cdparam x="421" y="192" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="2182" /> +<P1 x="421" y="192" id="2293" /> +<P2 x="350" y="321" id="2207" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="2181" index="14" uid="cf7881de-1568-40ff-95c3-4c3a970eb719" > +<father id="2183" num="0" /> +<cdparam x="385" y="256" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2177" /> +<TGConnectingPoint num="1" id="2178" /> +<TGConnectingPoint num="2" id="2179" /> +<TGConnectingPoint num="3" id="2180" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<CONNECTOR type="5102" id="2190" index="4" uid="7a9ea02f-e4f9-41bc-bead-634f4b3eeeef" > +<cdparam x="407" y="70" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<infoparam name="connector" value="null" /> +<TGConnectingPoint num="0" id="2189" /> +<P1 x="407" y="70" id="2352" /> +<P2 x="408" y="142" id="2327" /> +<AutomaticDrawing data="true" /> +<new d="false" /> +</CONNECTOR><SUBCOMPONENT type="-1" id="2188" index="15" uid="28d2e1d7-2710-4e5a-ad35-42d94c0da074" > +<father id="2190" num="0" /> +<cdparam x="407" y="106" /> +<sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="List of all parameters of an Avatar SMD transition" value="" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2184" /> +<TGConnectingPoint num="1" id="2185" /> +<TGConnectingPoint num="2" id="2186" /> +<TGConnectingPoint num="3" id="2187" /> +<tags value="" /> +<extraparam> +<guard value="[ ]" enabled="true"/> +<afterMin value="" enabled="true"/> +<afterMax value="" enabled="true"/> +<extraDelay1 value="" enabled="true"/> +<extraDelay2 value="" enabled="true"/> +<delayDistributionLaw value="0" enabled="true"/> +<computeMin value="" enabled="true"/> +<computeMax value="" enabled="true"/> +<probability value="" enabled="true"/> +</extraparam> +</SUBCOMPONENT> + +<COMPONENT type="5101" id="2192" index="5" uid="14afbeb5-4e1d-4d1e-bd25-52187d6843ce" > +<cdparam x="453" y="462" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2191" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5104" id="2203" index="6" uid="cbfa851a-ffce-4ffb-bdb8-9eab7aafeeef" > +<cdparam x="432" y="403" /> +<sizeparam width="50" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="Receive signal" value="sig1()" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2193" /> +<TGConnectingPoint num="1" id="2194" /> +<TGConnectingPoint num="2" id="2195" /> +<TGConnectingPoint num="3" id="2196" /> +<TGConnectingPoint num="4" id="2197" /> +<TGConnectingPoint num="5" id="2198" /> +<TGConnectingPoint num="6" id="2199" /> +<TGConnectingPoint num="7" id="2200" /> +<TGConnectingPoint num="8" id="2201" /> +<TGConnectingPoint num="9" id="2202" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5101" id="2205" index="7" uid="6e3e7f28-bb9c-4963-ac2b-442f0fef2b2c" > +<cdparam x="322" y="457" /> +<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="stop state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2204" /> +<tags value="" /> +</COMPONENT> + +<COMPONENT type="5106" id="2278" index="8" uid="d6e6e539-d53c-4b11-be02-5e876cf4f180" > +<cdparam x="300" y="321" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state22" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2206" /> +<TGConnectingPoint num="1" id="2207" /> +<TGConnectingPoint num="2" id="2208" /> +<TGConnectingPoint num="3" id="2209" /> +<TGConnectingPoint num="4" id="2210" /> +<TGConnectingPoint num="5" id="2211" /> +<TGConnectingPoint num="6" id="2212" /> +<TGConnectingPoint num="7" id="2213" /> +<TGConnectingPoint num="8" id="2214" /> +<TGConnectingPoint num="9" id="2215" /> +<TGConnectingPoint num="10" id="2216" /> +<TGConnectingPoint num="11" id="2217" /> +<TGConnectingPoint num="12" id="2218" /> +<TGConnectingPoint num="13" id="2219" /> +<TGConnectingPoint num="14" id="2220" /> +<TGConnectingPoint num="15" id="2221" /> +<TGConnectingPoint num="16" id="2222" /> +<TGConnectingPoint num="17" id="2223" /> +<TGConnectingPoint num="18" id="2224" /> +<TGConnectingPoint num="19" id="2225" /> +<TGConnectingPoint num="20" id="2226" /> +<TGConnectingPoint num="21" id="2227" /> +<TGConnectingPoint num="22" id="2228" /> +<TGConnectingPoint num="23" id="2229" /> +<TGConnectingPoint num="24" id="2230" /> +<TGConnectingPoint num="25" id="2231" /> +<TGConnectingPoint num="26" id="2232" /> +<TGConnectingPoint num="27" id="2233" /> +<TGConnectingPoint num="28" id="2234" /> +<TGConnectingPoint num="29" id="2235" /> +<TGConnectingPoint num="30" id="2236" /> +<TGConnectingPoint num="31" id="2237" /> +<TGConnectingPoint num="32" id="2238" /> +<TGConnectingPoint num="33" id="2239" /> +<TGConnectingPoint num="34" id="2240" /> +<TGConnectingPoint num="35" id="2241" /> +<TGConnectingPoint num="36" id="2242" /> +<TGConnectingPoint num="37" id="2243" /> +<TGConnectingPoint num="38" id="2244" /> +<TGConnectingPoint num="39" id="2245" /> +<TGConnectingPoint num="40" id="2246" /> +<TGConnectingPoint num="41" id="2247" /> +<TGConnectingPoint num="42" id="2248" /> +<TGConnectingPoint num="43" id="2249" /> +<TGConnectingPoint num="44" id="2250" /> +<TGConnectingPoint num="45" id="2251" /> +<TGConnectingPoint num="46" id="2252" /> +<TGConnectingPoint num="47" id="2253" /> +<TGConnectingPoint num="48" id="2254" /> +<TGConnectingPoint num="49" id="2255" /> +<TGConnectingPoint num="50" id="2256" /> +<TGConnectingPoint num="51" id="2257" /> +<TGConnectingPoint num="52" id="2258" /> +<TGConnectingPoint num="53" id="2259" /> +<TGConnectingPoint num="54" id="2260" /> +<TGConnectingPoint num="55" id="2261" /> +<TGConnectingPoint num="56" id="2262" /> +<TGConnectingPoint num="57" id="2263" /> +<TGConnectingPoint num="58" id="2264" /> +<TGConnectingPoint num="59" id="2265" /> +<TGConnectingPoint num="60" id="2266" /> +<TGConnectingPoint num="61" id="2267" /> +<TGConnectingPoint num="62" id="2268" /> +<TGConnectingPoint num="63" id="2269" /> +<TGConnectingPoint num="64" id="2270" /> +<TGConnectingPoint num="65" id="2271" /> +<TGConnectingPoint num="66" id="2272" /> +<TGConnectingPoint num="67" id="2273" /> +<TGConnectingPoint num="68" id="2274" /> +<TGConnectingPoint num="69" id="2275" /> +<TGConnectingPoint num="70" id="2276" /> +<TGConnectingPoint num="71" id="2277" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5106" id="2351" index="9" uid="f686541c-4fb9-4084-b047-b70ea385c8cd" > +<cdparam x="396" y="142" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<enabled value="true" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="state" value="state21" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2279" /> +<TGConnectingPoint num="1" id="2280" /> +<TGConnectingPoint num="2" id="2281" /> +<TGConnectingPoint num="3" id="2282" /> +<TGConnectingPoint num="4" id="2283" /> +<TGConnectingPoint num="5" id="2284" /> +<TGConnectingPoint num="6" id="2285" /> +<TGConnectingPoint num="7" id="2286" /> +<TGConnectingPoint num="8" id="2287" /> +<TGConnectingPoint num="9" id="2288" /> +<TGConnectingPoint num="10" id="2289" /> +<TGConnectingPoint num="11" id="2290" /> +<TGConnectingPoint num="12" id="2291" /> +<TGConnectingPoint num="13" id="2292" /> +<TGConnectingPoint num="14" id="2293" /> +<TGConnectingPoint num="15" id="2294" /> +<TGConnectingPoint num="16" id="2295" /> +<TGConnectingPoint num="17" id="2296" /> +<TGConnectingPoint num="18" id="2297" /> +<TGConnectingPoint num="19" id="2298" /> +<TGConnectingPoint num="20" id="2299" /> +<TGConnectingPoint num="21" id="2300" /> +<TGConnectingPoint num="22" id="2301" /> +<TGConnectingPoint num="23" id="2302" /> +<TGConnectingPoint num="24" id="2303" /> +<TGConnectingPoint num="25" id="2304" /> +<TGConnectingPoint num="26" id="2305" /> +<TGConnectingPoint num="27" id="2306" /> +<TGConnectingPoint num="28" id="2307" /> +<TGConnectingPoint num="29" id="2308" /> +<TGConnectingPoint num="30" id="2309" /> +<TGConnectingPoint num="31" id="2310" /> +<TGConnectingPoint num="32" id="2311" /> +<TGConnectingPoint num="33" id="2312" /> +<TGConnectingPoint num="34" id="2313" /> +<TGConnectingPoint num="35" id="2314" /> +<TGConnectingPoint num="36" id="2315" /> +<TGConnectingPoint num="37" id="2316" /> +<TGConnectingPoint num="38" id="2317" /> +<TGConnectingPoint num="39" id="2318" /> +<TGConnectingPoint num="40" id="2319" /> +<TGConnectingPoint num="41" id="2320" /> +<TGConnectingPoint num="42" id="2321" /> +<TGConnectingPoint num="43" id="2322" /> +<TGConnectingPoint num="44" id="2323" /> +<TGConnectingPoint num="45" id="2324" /> +<TGConnectingPoint num="46" id="2325" /> +<TGConnectingPoint num="47" id="2326" /> +<TGConnectingPoint num="48" id="2327" /> +<TGConnectingPoint num="49" id="2328" /> +<TGConnectingPoint num="50" id="2329" /> +<TGConnectingPoint num="51" id="2330" /> +<TGConnectingPoint num="52" id="2331" /> +<TGConnectingPoint num="53" id="2332" /> +<TGConnectingPoint num="54" id="2333" /> +<TGConnectingPoint num="55" id="2334" /> +<TGConnectingPoint num="56" id="2335" /> +<TGConnectingPoint num="57" id="2336" /> +<TGConnectingPoint num="58" id="2337" /> +<TGConnectingPoint num="59" id="2338" /> +<TGConnectingPoint num="60" id="2339" /> +<TGConnectingPoint num="61" id="2340" /> +<TGConnectingPoint num="62" id="2341" /> +<TGConnectingPoint num="63" id="2342" /> +<TGConnectingPoint num="64" id="2343" /> +<TGConnectingPoint num="65" id="2344" /> +<TGConnectingPoint num="66" id="2345" /> +<TGConnectingPoint num="67" id="2346" /> +<TGConnectingPoint num="68" id="2347" /> +<TGConnectingPoint num="69" id="2348" /> +<TGConnectingPoint num="70" id="2349" /> +<TGConnectingPoint num="71" id="2350" /> +<tags value="" /> +<extraparam> +</extraparam> +</COMPONENT> + +<COMPONENT type="5100" id="2353" index="10" uid="462effb1-7700-43dd-a45d-2c77a7fff199" > +<cdparam x="400" y="50" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2352" /> +<tags value="" /> +</COMPONENT> + + +</AVATARStateMachineDiagramPanel> + +</Modeling> + + + + +</TURTLEGMODELING> \ No newline at end of file diff --git a/scripts/cidoc.md b/scripts/cidoc.md index 02e070b8e74fb891a438f816faeaa9719f604398..bd76d4f5285ee5bbd9c03b85f51f421794148482 100644 --- a/scripts/cidoc.md +++ b/scripts/cidoc.md @@ -17,7 +17,7 @@ docker run -it --rm ttoolci:latest bash - launch the gitlab-runner so as to start a docker machine for each pull -sudo gitlab-runner register -n --name ttool@yvrac -r GR13489416h8xwG1z62GLNe5Q1phV -u https://gitlab.telecom-paris.fr/ --executor docker --docker-image ttoolci:latest --docker-pull-policy never +sudo gitlab-runner register -n --name ttool@cadillac -r GR13489416h8xwG1z62GLNe5Q1phV -u https://gitlab.telecom-paris.fr/ --executor docker --docker-image ttoolci:latest --docker-pull-policy never # cadillac diff --git a/src/main/java/ai/AIUseCaseDiagram.java b/src/main/java/ai/AIUseCaseDiagram.java index 1fa761115c741f26d832950db005d878b2386b80..51b4ca8ef1775d6cff5c7cea3c39bbb223762d3d 100644 --- a/src/main/java/ai/AIUseCaseDiagram.java +++ b/src/main/java/ai/AIUseCaseDiagram.java @@ -63,9 +63,10 @@ public class AIUseCaseDiagram extends AIInteract { public static String KNOWLEDGE_ON_JSON_FOR_ACTORS = "When you are asked to identify actors, " + "return them as a JSON specification " + "formatted as follows:" + - "{actors: [{ \"name\": \"Name of actor\"...]}" + - "# Respect: Any actor identifier must no contain any space. Use \"_\" instead if necessary." + - "#Respect: The name of an actor must start with a noun"; + "{actors: [{ \"name\": \"Name of actor\"...]} " + + "#Respect: Any actor identifier must no contain any space. Use \"_\" instead if necessary. " + + "#Respect: The name of an actor must start with a noun. " + + "#Respect: Avoid using \"User\" or \"Environment\" for actor names, be more precise"; diff --git a/src/main/java/avatartranslator/AvatarBlock.java b/src/main/java/avatartranslator/AvatarBlock.java index 4dbb94046225807bb3293acedbdb828fa19e595d..31f8a7403312936229a29a6545a3c585629b69c0 100644 --- a/src/main/java/avatartranslator/AvatarBlock.java +++ b/src/main/java/avatartranslator/AvatarBlock.java @@ -351,26 +351,26 @@ public class AvatarBlock extends AvatarElement implements AvatarStateMachineOwne public String toString() { //Thread.currentThread().dumpStack(); - StringBuffer sb = new StringBuffer("block:" + getName() + " ID=" + getID() + " \n"); + StringBuffer sb = new StringBuffer("block:" + getName() + " ID=" + getID() + " tags=" + tagsToString() + " \n"); if (getFather() != null) { - sb.append(" subblock of: " + getFather().getName() + " ID=" + getFather().getID() + "\n"); + sb.append(" subblock of: " + getFather().getName() + " ID=" + getFather().getID() + " tags=" + tagsToString() + "\n"); } else { sb.append(" top level block\n"); } for (AvatarAttribute attribute : attributes) { - sb.append(" attribute: " + attribute.toString() + " ID=" + attribute.getID() + "\n"); + sb.append(" attribute: " + attribute.toString() + " ID=" + attribute.getID() + " tags=" + tagsToString() + "\n"); } for (AvatarAttribute attribute : originalAttributes) { - sb.append(" original attribute: " + attribute.toString() + " ID=" + attribute.getID() + "\n"); + sb.append(" original attribute: " + attribute.toString() + " ID=" + attribute.getID() + " tags=" + tagsToString() + "\n"); } for (AvatarMethod method : methods) { - sb.append(" method: " + method.toString() + " ID=" + method.getID() + "\n"); + sb.append(" method: " + method.toString() + " ID=" + method.getID() + " tags=" + tagsToString() + "\n"); } for (AvatarMethod method : methods) { - sb.append(" original method: " + method.toOriginalString() + " ID=" + method.getID() + "\n"); + sb.append(" original method: " + method.toOriginalString() + " ID=" + method.getID() + " tags=" + tagsToString() + "\n"); } for (AvatarSignal signal : signals) { - sb.append(" signal: " + signal.toString() + " ID=" + signal.getID() + "\n"); + sb.append(" signal: " + signal.toString() + " ID=" + signal.getID() + " tags=" + tagsToString() + "\n"); } if (asm != null) { sb.append(asm.toString()); @@ -383,23 +383,23 @@ public class AvatarBlock extends AvatarElement implements AvatarStateMachineOwne public String toStringRecursive() { //Thread.currentThread().dumpStack(); - StringBuffer sb = new StringBuffer("block:" + getName() + " ID=" + getID() + " \n"); + StringBuffer sb = new StringBuffer("block:" + getName() + " ID=" + getID() + " tags=" + tagsToString() + "\n"); if (getFather() != null) { - sb.append(" subblock of: " + getFather().getName() + " ID=" + getFather().getID() + "\n"); + sb.append(" subblock of: " + getFather().getName() + " ID=" + getFather().getID() + " tags=" + tagsToString() + "\n"); } else { sb.append(" top level block\n"); } for (AvatarAttribute attribute : attributes) { - sb.append(" attribute: " + attribute.toString() + " ID=" + attribute.getID() + "\n"); + sb.append(" attribute: " + attribute.toString() + " ID=" + attribute.getID() + " tags=" + tagsToString()+ "\n"); } for (AvatarAttribute attribute : originalAttributes) { - sb.append(" original attribute: " + attribute.toString() + " ID=" + attribute.getID() + "\n"); + sb.append(" original attribute: " + attribute.toString() + " ID=" + attribute.getID() + " tags=" + tagsToString() + "\n"); } for (AvatarMethod method : methods) { - sb.append(" method: " + method.toString() + " ID=" + method.getID() + "\n"); + sb.append(" method: " + method.toString() + " ID=" + method.getID() + " tags=" + tagsToString() + "\n"); } for (AvatarSignal signal : signals) { - sb.append(" signal: " + signal.toString() + " ID=" + signal.getID() + "\n"); + sb.append(" signal: " + signal.toString() + " ID=" + signal.getID() + " tags=" + tagsToString() + "\n"); } if (asm != null) { sb.append(asm.toStringRecursive()); @@ -1113,6 +1113,9 @@ public class AvatarBlock extends AvatarElement implements AvatarStateMachineOwne for (AvatarAttribute aa : attributes) { av.addAttribute(aa.advancedClone(av)); } + for (AvatarAttribute aa : originalAttributes) { + av.addOriginalAttribute(aa.advancedClone(av)); + } for (AvatarMethod am : methods) { av.addMethod(am.advancedClone(av)); } diff --git a/src/main/java/avatartranslator/AvatarCompactDependencyGraph.java b/src/main/java/avatartranslator/AvatarCompactDependencyGraph.java index 2b0efc82a696f484bbd23a777bc82bd88e6a0dba..c80012f09602750d7fb88b91f310300e4bac887a 100644 --- a/src/main/java/avatartranslator/AvatarCompactDependencyGraph.java +++ b/src/main/java/avatartranslator/AvatarCompactDependencyGraph.java @@ -39,9 +39,12 @@ package avatartranslator; +import common.CanBeTagged; +import common.Tags; import graph.AUTGraph; import graph.AUTState; import graph.AUTTransition; +import graph.GeneralGraph; import myutil.TraceManager; import org.apache.batik.anim.timing.Trace; import org.jfree.data.json.impl.JSONObject; @@ -205,6 +208,7 @@ public class AvatarCompactDependencyGraph { tr = new AUTTransition(newState.id, "", newStateD.id); tr.addTag(AUTGraph.COMM_TAG); + //TraceManager.addDev("**** Adding COMM Tag to transition " + tr); transitions.add(tr); newState.addOutTransition(tr); newStateD.addInTransition(tr); @@ -213,6 +217,7 @@ public class AvatarCompactDependencyGraph { if (!(ar.isAsynchronous())) { tr = new AUTTransition(newStateD.id, "", newState.id); tr.addTag(AUTGraph.COMM_TAG); + //TraceManager.addDev("**** Adding COMM Tag to transition " + tr); transitions.add(tr); newStateD.addOutTransition(tr); newState.addInTransition(tr); @@ -418,6 +423,8 @@ public class AvatarCompactDependencyGraph { // Make the graph graph = new AUTGraph(states, transitions); + TraceManager.addDev("Graph done"); + } @@ -568,11 +575,13 @@ public class AvatarCompactDependencyGraph { } // Handling all nexts + //TraceManager.addDev("Handling all nexts"); //if (!(_elt instanceof AvatarActionOnSignal)) { for (AvatarStateMachineElement eltN : _elt.getNexts()) { makeCompactDependencyGraphForAvatarElement(bl, eltN, state, _elt, _states, _transitions, withID, null); } //} + //TraceManager.addDev("Done."); return state; } @@ -716,6 +725,13 @@ public class AvatarCompactDependencyGraph { newBlock.addAttribute(newA); TraceManager.addDev("\t Adding attribute: " + newA.getName()); } + for (AvatarAttribute aa : ab.getOriginalAttributes()) { + AvatarAttribute newA = aa.advancedClone(newBlock); + newA.clearReferenceObject(); + newA.setReferenceObject(this); + newBlock.addOriginalAttribute(newA); + TraceManager.addDev("\t Adding original attribute: " + newA.getName()); + } for (AvatarMethod am : ab.getMethods()) { AvatarMethod newAm = am.advancedClone(newBlock); newAm.clearReferenceObject(); @@ -994,5 +1010,138 @@ public class AvatarCompactDependencyGraph { }*/ } + public AUTGraph reduceGraph(String[] tags) { + // print transitions with COMM_TAG + /*TraceManager.addDev("Transition with COMM TAG - Total of transitions:" + graph.getTransitions().size()); + for(AUTTransition tr: graph.getTransitions()) { + if (tr.hasTag(AUTGraph.COMM_TAG)) { + TraceManager.addDev("\t" + tr.toExtendedString()); + } + }*/ + + // 1. We remove all vertices which tags are all in tags + ArrayList<AUTState> toBeRemoved = new ArrayList<>(); + for(AUTState state: graph.getStates()) { + if ((state.referenceObject != null)) { + if (isTagged(state, tags)) { + toBeRemoved.add(state); + TraceManager.addDev("Removing first element: " + state + "/" + state.referenceObject); + removeCommElements(state, toBeRemoved); + } + } + } + + TraceManager.addDev("Tagged states removed. Working on dependencies"); + + // 2. We iteratively remove elements with no backward dependencies that are not a start state, with no incoming edge + boolean modified = true; + + while(modified) { + // We consider non-removed state. If they have no other dependency than nothing (but not a start state) or a remove state, + // they are added to remove + modified = false; + for(AUTState state: graph.getStates()) { + if (! toBeRemoved.contains(state)) { + if (!(hasStartStateInReference(state))) { + if (hasOnlyTransitionFromRemovedStatesOrComm(state, toBeRemoved)) { + toBeRemoved.add(state); + TraceManager.addDev("Removing secondary state: " + state + "/" + state.referenceObject + " of class " + + state.referenceObject.getClass()); + // We also need to remove all states leading to the remove state if they are comm elements + removeCommElements(state, toBeRemoved); + modified = true; + } + } + } + } + } + + + // We finally remove the state + TraceManager.addDev("Going to remove " + toBeRemoved.size() + " states"); + GeneralGraph gg = GeneralGraph.makeGeneralGraph(graph, toBeRemoved); + TraceManager.addDev("\nGeneral graph:\n" + gg.toString() + "\n"); + AUTGraph reducedGraph = gg.makeAUTGraph(); + return reducedGraph; + + + //graph.removeStates(toBeRemoved); + //return this; + } + + public boolean hasOnlyTransitionFromRemovedStatesOrComm(AUTState state, ArrayList<AUTState>toBeRemoved) { + for(AUTTransition tr: state.inTransitions) { + if (!(tr.hasTag(AUTGraph.COMM_TAG))) { + AUTState previous = graph.getState(tr.origin); + if (!(toBeRemoved.contains(previous))) { + return false; + } + } + } + return true; + } + + public void removeCommElements(AUTState state, ArrayList<AUTState>toBeRemoved) { + //TraceManager.addDev("Looking for comm transition starting from state " + state); + for(AUTTransition tr: state.outTransitions) { + AUTState next = graph.getState(tr.destination); + //TraceManager.addDev("Investigating transition " + tr.toExtendedString() + " from " + state + " TO " + next); + if (tr.hasTag(AUTGraph.COMM_TAG)) { + //TraceManager.addDev("Found comm tag in out transition from state " + state); + if (!toBeRemoved.contains(next)) { + //TraceManager.addDev("Removing comm state: " + state + "/" + state.referenceObject); + toBeRemoved.add(next); + } + } + } + } + + public boolean hasStartStateInReference(AUTState state) { + if (state.referenceObject == null) { + return false; + } + + if (!(state.referenceObject instanceof ArrayList)) { + return false; + } + + ArrayList al = (ArrayList) (state.referenceObject); + + for(Object o: al) { + if (o instanceof AvatarStartState) { + return true; + } + } + + return false; + + } + + public boolean isTagged(AUTState state, String[] tags) { + if (state.referenceObject == null) { + return false; + } + + if (!(state.referenceObject instanceof ArrayList)) { + return false; + } + + ArrayList al = (ArrayList) (state.referenceObject); + if (al.size() > 0) { + for(Object o: al) { + //TraceManager.addDev("Investigating object: " + o.toString() + " for state " + state); + if (o instanceof CanBeTagged) { + if (Tags.hasAtLeastOneTagOf((CanBeTagged) o, tags)) { + //TraceManager.addDev("tagged"); + return true; + } + } + } + } + + return false; + } + + } diff --git a/src/main/java/avatartranslator/AvatarDependencyGraph.java b/src/main/java/avatartranslator/AvatarDependencyGraph.java index 29152a8b35673610af64a12bb7f50d97ea942452..063d56b29943cee0bfaa783d05211930b41322c6 100644 --- a/src/main/java/avatartranslator/AvatarDependencyGraph.java +++ b/src/main/java/avatartranslator/AvatarDependencyGraph.java @@ -612,4 +612,6 @@ public class AvatarDependencyGraph { } + + } diff --git a/src/main/java/avatartranslator/AvatarElement.java b/src/main/java/avatartranslator/AvatarElement.java index f616b6a57acd436f3545d508c93f666cb4cfc9d2..9b404b993152737633a61662e93e4f0dbebaa4ca 100644 --- a/src/main/java/avatartranslator/AvatarElement.java +++ b/src/main/java/avatartranslator/AvatarElement.java @@ -38,9 +38,13 @@ package avatartranslator; +import common.CanBeTagged; +import common.Tag; +import common.Tags; import myutil.NameChecker; import myutil.TraceManager; +import java.util.ArrayList; import java.util.List; import java.util.UUID; import java.util.Vector; @@ -51,7 +55,7 @@ import java.util.Vector; * @version 1.0 20/05/2010 * @author Ludovic APVRILLE */ -public class AvatarElement implements NameChecker.NamedElement { +public class AvatarElement implements NameChecker.NamedElement, CanBeTagged { private static int ID=0; @@ -61,10 +65,13 @@ public class AvatarElement implements NameChecker.NamedElement { private int myID; protected boolean isNew; + protected Tags tags; + public AvatarElement(String _name, Object _referenceObject) { myID=++ID; name = _name; referenceObject = _referenceObject; + tags = new Tags(); } public void addReferenceObjectFrom(AvatarElement _elt) { @@ -175,4 +182,32 @@ public class AvatarElement implements NameChecker.NamedElement { } return false; } + + public Tags getTags() { + return tags; + } + + public void addTag(Tag tag) { + tags.addTag(tag); + } + public void removeAllTags() { + tags.removeAllTags(); + } + + public void removeTag(String tag) { + tags.removeTag(tag); + } + + public List<Tag> getAllTags() { + return tags.getAllTags(); + } + + + public boolean hasTag(String tag) { + return tags.hasTag(tag); + } + + public String tagsToString() { + return tags.tagsToString(); + } } diff --git a/src/main/java/avatartranslator/AvatarSpecification.java b/src/main/java/avatartranslator/AvatarSpecification.java index d073de496afdcd592d7b3a1207ccd688801b8149..4676e79b947bc01c526b7a7daaf52e30bf71f9d1 100644 --- a/src/main/java/avatartranslator/AvatarSpecification.java +++ b/src/main/java/avatartranslator/AvatarSpecification.java @@ -39,6 +39,8 @@ package avatartranslator; import avatartranslator.intboolsolver.AvatarIBSolver; +import common.CanBeTagged; +import common.Tag; import myutil.Conversion; import myutil.NameChecker; import myutil.TraceManager; @@ -1758,4 +1760,62 @@ public class AvatarSpecification extends AvatarElement implements IBSParamSpec { return extraTypes; } + public void makeAllTags() { + for(AvatarBlock ab: blocks) { + makeTags(ab); + AvatarStateMachine asm = ab.getStateMachine(); + if (asm != null) { + for(AvatarStateMachineElement asme: asm.getListOfElements()) { + makeTags(asme); + } + // All tags of blocks are also added to all elements of their stage machines + List<Tag> tags = ab.getAllTags(); + for(AvatarStateMachineElement asme: asm.getListOfElements()) { + enforceTags(asme, tags); + } + } + + } + + for(AvatarRelation ar: relations) { + makeTags(ar); + for(AvatarSignal sig: ar.getSignals1()) { + makeTags(sig); + } + for(AvatarSignal sig: ar.getSignals2()) { + makeTags(sig); + } + } + + for(AvatarDataType adt: dataTypes) { + makeTags(adt); + } + + + } + + public void enforceTags(AvatarElement elt, List<Tag> listOfTags) { + for(Tag t: listOfTags) { + elt.addTag(t); + } + } + + public void makeTags(AvatarElement elt) { + elt.removeAllTags(); + if ((elt.referenceObject != null) && (elt.referenceObject instanceof CanBeTagged)) { + for(Tag t: ((CanBeTagged) elt.referenceObject).getAllTags()) { + elt.addTag(t); + } + } + if (elt.getReferenceObjects() != null) { + for (Object ref : elt.getReferenceObjects()) { + if (ref instanceof CanBeTagged) { + for (Tag t : ((CanBeTagged) ref).getAllTags()) { + elt.addTag(t); + } + } + } + } + } + } diff --git a/src/main/java/avatartranslator/AvatarStateMachine.java b/src/main/java/avatartranslator/AvatarStateMachine.java index 8f0aaa35446221e86a852da66a301765ec63cd4e..84d34ac3ce0b1eac4e37857706e12d3eb0a8eeef 100644 --- a/src/main/java/avatartranslator/AvatarStateMachine.java +++ b/src/main/java/avatartranslator/AvatarStateMachine.java @@ -438,10 +438,10 @@ public class AvatarStateMachine extends AvatarElement { @Override public String toString() { - StringBuffer sb = new StringBuffer("State machine Id=" + getID() + "\n"); + StringBuffer sb = new StringBuffer("State machine Id=" + getID() + " tags=" + tagsToString() + "\n"); for (AvatarStateMachineElement element : elements) { - sb.append("\t" + element.getClass() + "->" + element.toString() + "\n"); + sb.append("\t" + element.getClass() + "->" + element.toString() + " tags=" + tagsToString() + "\n"); } @@ -469,10 +469,10 @@ public class AvatarStateMachine extends AvatarElement { public String toStringRecursiveElt(AvatarStateMachineElement _asme) { //TraceManager.addDev("Handling element:" + _asme.toString()); String ret = ""; - ret += "* " + _asme.toStringExtendedID() + "\n"; + ret += "* " + _asme.toStringExtendedID() + " tags=" + tagsToString() + "\n"; for (AvatarStateMachineElement asme : _asme.getNexts()) { - ret += "\tnext: " + asme.toStringExtendedID() + "\n"; + ret += "\tnext: " + asme.toStringExtendedID() + " tags=" + tagsToString() + "\n"; } for (AvatarStateMachineElement asme : _asme.getNexts()) { diff --git a/src/main/java/avatartranslator/AvatarStateMachineElement.java b/src/main/java/avatartranslator/AvatarStateMachineElement.java index da7d5026d2c64a8c9f12129ce389ffd954241a30..72679d4532ef8171566a0fb267ea27895e731800 100644 --- a/src/main/java/avatartranslator/AvatarStateMachineElement.java +++ b/src/main/java/avatartranslator/AvatarStateMachineElement.java @@ -231,7 +231,7 @@ public abstract class AvatarStateMachineElement extends AvatarElement implements } public String toStringExtendedID() { - return getExtendedName() + " ID=" + getID(); + return getExtendedName() + " ID=" + getID() + " tags=" + tagsToString(); } @Override @@ -240,7 +240,7 @@ public abstract class AvatarStateMachineElement extends AvatarElement implements } protected String toString(String val) { - String ret = getExtendedName() + " ID=" + getID(); + String ret = getExtendedName() + " ID=" + getID() + " tags=" + tagsToString(); if (myState == null) { ret += " / top level operator\n"; } else { diff --git a/src/main/java/cli/Action.java b/src/main/java/cli/Action.java index ce0adc24c9cae2e0f390865755232faed756f8c1..275cda3c7c0994393184df39e2c602aa5f05bc5d 100644 --- a/src/main/java/cli/Action.java +++ b/src/main/java/cli/Action.java @@ -49,6 +49,7 @@ import avatartranslator.modelcheckervalidator.ModelCheckerValidator; import avatartranslator.mutation.ApplyMutationException; import avatartranslator.mutation.AvatarMutation; import avatartranslator.mutation.ParseMutationException; +import avatartranslator.tosysmlv2.AVATAR2SysMLV2; import common.ConfigurationTTool; import common.SpecConfigTTool; import graph.AUTGraph; @@ -141,8 +142,11 @@ public class Action extends Command implements ProVerifOutputListener { private final static String ATTACK_TREE_DUPLICATE = "attack-tree-duplicate"; + private final static String CREATE_NEW_TAG = "create-new-tag"; + private final static String AVATAR_MUTATION = "avatar-mutation"; private final static String AVATAR_MUTATION_BATCH = "avatar-mutation-batch"; + private final static String AVATAR_REMOVE_TAG = "avatar-remove-optimize-tag"; private final static String AVATAR_DRAW = "avatar-draw"; private final static String AVATAR_PRINT = "avatar-print"; private final static String AVATAR_RG_GENERATION = "avatar-rg"; @@ -153,6 +157,7 @@ public class Action extends Command implements ProVerifOutputListener { private final static String AVATAR_SIMULATION_OPEN_WINDOW = "avatar-simulation-open-window"; private final static String AVATAR_SIMULATION_GENERIC = "avatar-simulation-generic"; private final static String AVATAR_LOAD_FROM_SYSMLV2 = "avatar-load-sysmlv2"; + private final static String AVATAR_SAVE_FROM_SYSMLV2 = "avatar-save-sysmlv2"; private final static String AVATAR_SYNTAX_CHECKER = "avatar-syntax-checker"; private final static String AVATAR_COMPLEXITY = "avatar-complexity"; @@ -194,6 +199,10 @@ public class Action extends Command implements ProVerifOutputListener { return "Can be used to trigger an action in TTool"; } + public void clearAvatarSpecification() { + as = null; + } + /*public String executeCommand(String command, Interpreter interpreter) { int index = command.indexOf(" "); @@ -1332,6 +1341,52 @@ public class Action extends Command implements ProVerifOutputListener { } }; + Command createNewTag = new Command() { + public String getCommand() { + return CREATE_NEW_TAG; + } + + public String getShortCommand() { + return "cnt"; + } + + public String getDescription() { + return "Creates a new tag for tagging model elements"; + } + + public String getUsage() { + return "[tag name]\n"; + } + + public String getExample() { + return "cnt mylovelytag"; + } + + public String executeCommand(String command, Interpreter interpreter) { + if (!interpreter.isTToolStarted()) { + return Interpreter.TTOOL_NOT_STARTED; + } + + String[] commands = command.split(" "); + if (commands.length < 1) { + return Interpreter.BAD; + } + + String tags = ModelParameters.getStringValueFromID("TAGS"); + String newTag = commands[0]; + for(String s: tags.split(" ")) { + if (s.compareTo(newTag) == 0) { + return Interpreter.TAG_ALREADY_EXISTS; + } + } + tags = tags + " " + newTag; + + ModelParameters.setValueForID("TAGS", tags); + + return null; + } + }; + Command movePanelToTheLeftPanel = new Command() { public String getCommand() { @@ -1543,6 +1598,72 @@ public class Action extends Command implements ProVerifOutputListener { } }; + Command optimizeAvatarSpecRemoveTags = new Command() { + public String getCommand() { + return AVATAR_REMOVE_TAG; + } + + public String getShortCommand() { + return "art"; + } + + public String getDescription() { + return "Removes elements with a given tag from an avatar spec, and optimize the avatar spec"; + } + + public String getUsage() { + return "[list of tags to be removed]\n"; + } + + public String getExample() { + return "art deactivated stream1"; + } + + public String executeCommand(String command, Interpreter interpreter) { + + if (!interpreter.isTToolStarted()) { + return Interpreter.TTOOL_NOT_STARTED; + } + + String[] commands = command.split(" "); + if (commands.length < 1) { + return Interpreter.BAD; + } + + AvatarSpecification spec = getAvatarSpecification(interpreter); + + if (spec == null) { + return "No AVATAR specification"; + } + + // 1. Generate Dependency graph from Avatar Spec + AvatarCompactDependencyGraph acdg = new AvatarCompactDependencyGraph(); + acdg.buildGraph(spec, true); + + RG rg = new RG("Dependency Graph"); + rg.graph = acdg.getGraph(); + rg.nbOfStates = rg.graph.getNbOfStates(); + rg.nbOfTransitions = rg.graph.getNbOfTransitions(); + interpreter.mgui.addRG(rg); + + // 2. Reduce graph by removing elements with given tags + their dependencies + AvatarCompactDependencyGraph acdgReduced = acdg.clone(); + AUTGraph result = acdgReduced.reduceGraph(commands); + + rg = new RG("Dependency Graph"); + rg.graph = result; + rg.nbOfStates = rg.graph.getNbOfStates(); + rg.nbOfTransitions = rg.graph.getNbOfTransitions(); + + interpreter.mgui.addRG(rg); + + // 3. Generate new Avatar spec + as = acdgReduced.makeAvatarSpecification(); + + return null; + } + }; + @@ -1568,15 +1689,9 @@ public class Action extends Command implements ProVerifOutputListener { public String executeCommand(String command, Interpreter interpreter) { - AvatarSpecification spec = as; + AvatarSpecification spec = getAvatarSpecification(interpreter); if (spec == null) { - if (!interpreter.isTToolStarted()) { - return Interpreter.TTOOL_NOT_STARTED; - } - spec = interpreter.mgui.gtm.getAvatarSpecification(); - if (spec == null) { - return "No AVATAR specification"; - } + return "No AVATAR specification"; } TraceManager.addUser(spec.toString()); @@ -2371,6 +2486,67 @@ public class Action extends Command implements ProVerifOutputListener { } }; + Command avatarSaveFromSysMLV2 = new Command() { + public String getCommand() { + return AVATAR_SAVE_FROM_SYSMLV2; + } + + public String getShortCommand() { + return "ass2"; + } + + public String getDescription() { + return "Save an Avatar specification to a SysML v2 textual description"; + } + + public String getUsage() { + String usage = "avatar-save-sysmlv2 <path-to-file>\n"; + return usage; + + } + + public String executeCommand(String command, Interpreter interpreter) { + + String[] commands = command.split(" "); + + if (commands.length < 1) { + return Interpreter.BAD; + } + + AvatarSpecification spec = as; + if (spec == null) { + if (interpreter.hasAModel()) { + spec = interpreter.mgui.gtm.getAvatarSpecification(); + } + if (spec == null) { + return Interpreter.AVATAR_NO_SPEC; + } + } + + List<AvatarError> errors = AvatarSyntaxChecker.checkSyntaxErrors(spec); + + if (errors.size() > 0) { + return Interpreter.BAD_AVATAR_SPEC; + } + + AVATAR2SysMLV2 toS = new AVATAR2SysMLV2(spec); + StringBuffer sb = toS.generateSysMLV2Spec(true, true, null); + + if (sb == null) { + return Interpreter.BAD_AVATAR_SPEC; + } + + try { + FileUtils.saveFile(new File(commands[0]), sb.toString()); + } catch (Exception e) { + return interpreter.BAD_FILE_NAME; + } + + return null; + } + }; + + Command avatarSyntaxChecker = new Command() { public String getCommand() { return AVATAR_SYNTAX_CHECKER; @@ -2565,17 +2741,20 @@ public class Action extends Command implements ProVerifOutputListener { addAndSortSubcommand(movePanelToTheRightPanel); addAndSortSubcommand(selectPanel); addAndSortSubcommand(compareUppaal); + addAndSortSubcommand(createNewTag); addAndSortSubcommand(printAvatarSpec); addAndSortSubcommand(makeMutationFromAvatar); addAndSortSubcommand(makeComplexityAction); addAndSortSubcommand(makeMutationBatchFromAvatar); + addAndSortSubcommand(optimizeAvatarSpecRemoveTags); addAndSortSubcommand(drawAvatarSpec); addAndSortSubcommand(avatarSimulationToBrk); addAndSortSubcommand(avatarSimulationSelectTrace); addAndSortSubcommand(avatarSimulationOpenWindow); addAndSortSubcommand(avatarSimulationGeneric); addAndSortSubcommand(avatarLoadFromSysMLV2); + addAndSortSubcommand(avatarSaveFromSysMLV2); addAndSortSubcommand(avatarSyntaxChecker); addAndSortSubcommand(generic); @@ -2698,4 +2877,15 @@ public class Action extends Command implements ProVerifOutputListener { TraceManager.addUser(buffer.toString()); } + private AvatarSpecification getAvatarSpecification(Interpreter interpreter) { + AvatarSpecification spec = as; + if (spec == null) { + if (!interpreter.isTToolStarted()) { + return null; + } + spec = interpreter.mgui.gtm.getAvatarSpecification(); + } + return spec; + } + } diff --git a/src/main/java/cli/PatternHandling.java b/src/main/java/cli/DiplodocusPatternHandling.java similarity index 99% rename from src/main/java/cli/PatternHandling.java rename to src/main/java/cli/DiplodocusPatternHandling.java index 406fcd48e5c936fb5fe67469ef92c6aaf15a366f..a455b572dc0289cf94778bec23a9f0ad7edcfe26 100644 --- a/src/main/java/cli/PatternHandling.java +++ b/src/main/java/cli/DiplodocusPatternHandling.java @@ -83,7 +83,7 @@ import ui.TURTLEPanel; * @author Jawher JERRAY */ -public class PatternHandling extends Command { +public class DiplodocusPatternHandling extends Command { private final static String SYNTAX_ERROR = "Syntax Error"; private final static String NO_NAME_NO_TASK_FOR_PATTERN = "No name or no tasks is giving for the pattern"; @@ -134,7 +134,7 @@ public class PatternHandling extends Command { private String selectedPatternToIntergrate, selectedPatternPathToIntergrate, selectedJsonFilePath; - public PatternHandling() { + public DiplodocusPatternHandling() { } diff --git a/src/main/java/cli/Interpreter.java b/src/main/java/cli/Interpreter.java index 52e9afed35952ff6b9d8c9be2ef03ae53ad32598..101e0f00c2e7a8b6824804181ab31a923a152897 100644 --- a/src/main/java/cli/Interpreter.java +++ b/src/main/java/cli/Interpreter.java @@ -60,7 +60,7 @@ import java.util.Vector; public class Interpreter implements Runnable, TerminalProviderInterface { public final static Command[] commands = {new Action(), new Chat(), new Help(), new HelpTTool(), new History(), new Print(), - new Plan(), new PluginAction(), new PatternHandling(), new Quit(), + new Plan(), new PluginAction(), new DiplodocusPatternHandling(), new Quit(), new TestSpecific(), new TML(), new Set(), new Wait(), new Robot(), new BF(), new SimulatorScript()}; // Errors @@ -80,12 +80,14 @@ public class Interpreter implements Runnable, TerminalProviderInterface { public final static String BAD_DIRECTORY = "Unvalid directory identifier"; public final static String BAD_FILE = "Badly formatted file"; public final static String AVATAR_NO_SPEC = "No Avatar specification"; + public final static String BAD_AVATAR_SPEC = "Avatar specification is incorrect"; public final static String TML_NO_SPEC = "No TML specification"; public final static String TMAP_NO_SPEC = "No TMAP specification"; public final static String NO_WINDOW = "The targeted window does not exist"; public final static String NO_AI_INTERFACE = "No AI interface of this type could be queried"; public final static String GEN_FAILED = "code generation failed"; public final static String BAD_TYPE = "Invalid type"; + public final static String TAG_ALREADY_EXISTS = "Provided tag already exists"; @@ -111,6 +113,12 @@ public class Interpreter implements Runnable, TerminalProviderInterface { formerCommands = new Vector<>(); } + public static void clearAvatarSpecification() { + if (commands != null) { + ((Action) (commands[0])).clearAvatarSpecification(); + } + } + @Override public void run() { interact(); diff --git a/src/main/java/common/CanBeTagged.java b/src/main/java/common/CanBeTagged.java new file mode 100644 index 0000000000000000000000000000000000000000..1bd910b649749cbaded6759598b7c4c1bd54b61e --- /dev/null +++ b/src/main/java/common/CanBeTagged.java @@ -0,0 +1,66 @@ +/* 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.util.List; + +/** + * Class CanBeTagged + * Creation: 12/07/2024 + * @version 1.1 12/07/2024 + * @author Ludovic APVRILLE + */ +public interface CanBeTagged { + + void addTag(Tag tag); + void removeAllTags(); + + void removeTag(String tag); + + List<Tag> getAllTags(); + + + boolean hasTag(String tag); + + String tagsToString(); + +} diff --git a/src/main/java/common/Tag.java b/src/main/java/common/Tag.java new file mode 100644 index 0000000000000000000000000000000000000000..3926538759b70442856c355e442c0275e209b942 --- /dev/null +++ b/src/main/java/common/Tag.java @@ -0,0 +1,71 @@ +/* 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; + +/** + * Class Tag + * Creation: 12/07/2024 + * @version 1.1 12/07/2024 + * @author Ludovic APVRILLE + */ +public class Tag { + + private String tag; + + public Tag(String _tag) { + tag = _tag; + } + + public String getTag() { + return tag; + } + + public String toString() { return tag;} + + public boolean equals(Tag t) { + if (t == null) { + return false; + } + + return t.toString().compareTo(tag) == 0; + } +} diff --git a/src/main/java/common/Tags.java b/src/main/java/common/Tags.java new file mode 100644 index 0000000000000000000000000000000000000000..0157db22417c45dc869b6cd4c92111fffc0e377f --- /dev/null +++ b/src/main/java/common/Tags.java @@ -0,0 +1,160 @@ +/* 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 myutil.TraceManager; + +import java.util.ArrayList; +import java.util.List; + +/** + * Class Tags + * Creation: 12/07/2024 + * @version 1.1 12/07/2024 + * @author Ludovic APVRILLE + + */ +public class Tags implements CanBeTagged { + + private ArrayList<Tag> tags; + + public Tags() { + tags = new ArrayList<>(); + } + + public List<Tag> getAllTags() { + return tags; + } + public void removeAllTags() { + tags.clear(); + } + + public boolean hasTag(String s) { + return getTag(s) != null; + } + + public void addTag(String s) { + if (s.length() == 0) { + return; + } + if (!hasTag(s)) { + Tag newTag = new Tag(s); + tags.add(newTag); + } + } + + public void addTag(Tag g) { + if (!hasTag(g.toString())) { + tags.add(g); + } + } + + public Tag getTag(String _tag) { + for(Tag g: tags) { + if (g.getTag().compareTo(_tag) == 0) { + return g; + } + } + return null; + } + + public void removeTag(String s) { + if (tags == null) { + return; + } + + int index = 0; + boolean found = false; + for(Tag t: tags) { + if (t.toString().compareTo(s) == 0) { + found = true; + break; + } + index ++; + } + + if (found) { + tags.remove(index); + } + } + + public String tagsToString() { + String ret = ""; + for(Tag t: tags) { + ret += t.toString() + " "; + } + return ret.trim(); + } + + public static boolean hasAtLeastOneTagOf(CanBeTagged cbt, String[] tags) { + for(String t: tags) { + if (cbt.hasTag(t)) { + //TraceManager.addDev("Tag found:>" + t + "<"); + return true; + } + } + return false; + } + + public static boolean hasNoExtraTag(CanBeTagged cbt, String[] tags) { + for(Tag t: cbt.getAllTags()) { + boolean found = false; + for(String s: tags) { + if (t.getTag().compareTo(s) == 0) { + + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; + } + + + + + + +} diff --git a/src/main/java/graph/AUTGraph.java b/src/main/java/graph/AUTGraph.java index 46745c872d7d5db70926ac0f6f8a19b9b20661a5..0ebd1363e10aef5155d1662be196f90a76da48e1 100755 --- a/src/main/java/graph/AUTGraph.java +++ b/src/main/java/graph/AUTGraph.java @@ -548,11 +548,21 @@ public class AUTGraph implements myutil.Graph { //newGraph.computeStates(); for (AUTState st : getStates()) { AUTState newSt = st.clone(); + if (st.tags != null) { + for(AUTTag t: st.tags) { + newSt.addTag(t); + } + } statesN.add(newSt); } for (AUTTransition tr : transitions) { AUTTransition newTr = new AUTTransition(tr.origin, tr.transition, tr.destination); + if (tr.tags != null) { + for(AUTTag t: tr.tags) { + newTr.addTag(t); + } + } trN.add(newTr); // Update receiving and destination states AUTState s = statesN.get(tr.origin); diff --git a/src/main/java/graph/AUTState.java b/src/main/java/graph/AUTState.java index f6b994ca1a612b6e5d65fdd31193fa9c8442c20f..bbebdcf9545b9c0af79b3194fa31372d5dcefb86 100755 --- a/src/main/java/graph/AUTState.java +++ b/src/main/java/graph/AUTState.java @@ -302,5 +302,15 @@ public class AUTState implements Comparable<AUTState> { return tags.contains(_tag); } + public void makeAllTags(ArrayList<AUTTag> tags) { + if (tags == null) { + return; + } + + for(AUTTag t: tags) { + addTag(t); + } + } + } diff --git a/src/main/java/graph/AUTTransition.java b/src/main/java/graph/AUTTransition.java index 5825d7ddd4069db0f25c1e29ab4467bad584e982..081da58e707c1b55ab8f58dcb1abf20fd90e2b10 100755 --- a/src/main/java/graph/AUTTransition.java +++ b/src/main/java/graph/AUTTransition.java @@ -93,6 +93,25 @@ public class AUTTransition implements Comparable<AUTTransition> { return "(" + origin + " ," + transition + ", " + destination + ")"; } + public String toExtendedString() { + return "(" + origin + " ," + transition + ", " + destination + ") AUTTag:" + AUTTagsToString(); + } + + + public String AUTTagsToString() { + if ((tags == null) || tags.size() == 0) { + return ""; + } + + String ret = ""; + for(AUTTag t: tags) { + ret += t.getID() + " "; + } + return ret.trim(); + + + } + public String getLabel() { int index0 = transition.indexOf("("); int index1 = transition.indexOf(")"); @@ -184,5 +203,15 @@ public class AUTTransition implements Comparable<AUTTransition> { return tags.contains(_tag); } + public void makeAllTags(ArrayList<AUTTag> tags) { + if (tags == null) { + return; + } + + for(AUTTag t: tags) { + addTag(t); + } + } + } diff --git a/src/main/java/graph/GeneralGraph.java b/src/main/java/graph/GeneralGraph.java new file mode 100755 index 0000000000000000000000000000000000000000..f18bb73ddb2ab6e1c048303b3633c7b5e360eb37 --- /dev/null +++ b/src/main/java/graph/GeneralGraph.java @@ -0,0 +1,145 @@ +/* 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 graph; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Random; + +/** + * Class GeneralGraph + * Creation : 19/07/2014 + * * @version 1.0 19/07/2024 + * + * @author Ludovic APVRILLE + */ +public class GeneralGraph { + + public ArrayList<GeneralState> states; + public Object referenceObject; + + + + public GeneralGraph() { + states = new ArrayList<>(); + } + + public String toString() { + StringBuffer sb = new StringBuffer(); + for(GeneralState st: states) { + sb.append(st.toString() + "\n"); + } + return sb.toString(); + } + + public static GeneralGraph makeGeneralGraph(AUTGraph graph, ArrayList<AUTState> toBeRemoved) { + + GeneralGraph gg = new GeneralGraph(); + + // Making states + HashMap<AUTState, GeneralState> mapOfStates = new HashMap<>(); + for(AUTState state: graph.getStates()) { + if(!toBeRemoved.contains(state)) { + GeneralState gs = new GeneralState(state.info); + gs.referenceObject = state.referenceObject; + gs.makeAllTags(state.tags); + gg.states.add(gs); + mapOfStates.put(state, gs); + } + } + + // Making transitions + for(AUTState state: graph.getStates()) { + if(!toBeRemoved.contains(state)) { + for (AUTTransition trout : state.outTransitions) { + // We need to know if the destination was removed or not + AUTState destinationState = graph.states.get(trout.destination); + if(!toBeRemoved.contains(destinationState)) { + GeneralState stO = mapOfStates.get(state); + GeneralState stD = mapOfStates.get(destinationState); + if ((stO != null) && (stD != null)) { + GeneralTransition gt = new GeneralTransition(stO, trout.transition, stD); + gt.makeAllTags(trout.tags); + stO.outTransitions.add(gt); + stD.inTransitions.add(gt); + } + } + } + } + } + + return gg; + } + + public AUTGraph makeAUTGraph() { + ArrayList<AUTState> autStates = new ArrayList<>() ; + ArrayList<AUTTransition> autTransitions = new ArrayList<>() ; + + int id = 0; + for(GeneralState state: states) { + AUTState newSt = new AUTState(id); + newSt.info = state.info; + newSt.makeAllTags(state.tags); + newSt.referenceObject = state.referenceObject; + autStates.add(newSt); + id++; + } + + id = 0; + for(GeneralState state: states) { + for(GeneralTransition trOut: state.outTransitions) { + AUTState state1 = autStates.get(id); + AUTState state2 = autStates.get(states.indexOf(trOut.destination)); + AUTTransition newTr = new AUTTransition(id, trOut.transition, states.indexOf(trOut.destination)); + newTr.makeAllTags(trOut.tags); + state1.addOutTransition(newTr); + state2.addInTransition(newTr); + autTransitions.add(newTr); + } + id ++; + } + + AUTGraph autg = new AUTGraph(autStates, autTransitions); + return autg; + } + + +} diff --git a/src/main/java/tmltranslator/compareTMLTest/CompareTMAP.java b/src/main/java/graph/GeneralState.java old mode 100644 new mode 100755 similarity index 54% rename from src/main/java/tmltranslator/compareTMLTest/CompareTMAP.java rename to src/main/java/graph/GeneralState.java index b08417817eecb81d64c065f48951813124d6d70c..44367d28584d748f964131f51cfdd1125d2f9bc5 --- a/src/main/java/tmltranslator/compareTMLTest/CompareTMAP.java +++ b/src/main/java/graph/GeneralState.java @@ -37,75 +37,81 @@ */ -package tmltranslator.compareTMLTest; +package graph; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; import java.util.ArrayList; -import java.util.List; +import java.util.LinkedList; +import java.util.Random; /** - * Class CompareTMAP - * - * Creation: 13/11/2023 + * Class GeneralState + * Creation : 19/07/2024 + * * @version 1.0 19/07/2024 * - * @author Jawher JERRAY - * @version 1.0 13/11/2023 + * @author Ludovic APVRILLE */ +public class GeneralState { -public class CompareTMAP { - public CompareTMAP () { + public String info; + public ArrayList<GeneralTransition> inTransitions; // Arriving to that state + public ArrayList<GeneralTransition> outTransitions; // Departing from that state + public Object referenceObject; - } + public ArrayList<AUTTag> tags; - public boolean CompareTMAPFiles(File expected, File clone) throws Exception { - BufferedReader expectedReader = new BufferedReader(new FileReader(expected)); - BufferedReader cloneReader = new BufferedReader(new FileReader(clone)); + public GeneralState(String _info) { + info = _info; + inTransitions = new ArrayList<GeneralTransition>(); + outTransitions = new ArrayList<GeneralTransition>(); + } - String s1; - String s2; - List<String> expectedStringArray = new ArrayList<String>(); - List<String> cloneStringArray = new ArrayList<String>(); - - while ((s1 = expectedReader.readLine()) != null) { - if (s1.indexOf("//") >= 0) { - s1 = s1.substring(0, s1.indexOf("//")); - } - if (!s1.contains("#include") && s1.length() > 0) { - s1 = s1.trim(); - expectedStringArray.add(s1); - } - } + public String toString() { + String s = "" + info + " "; - while ((s2 = cloneReader.readLine()) != null){ - if (s2.indexOf("//") >= 0) { - s2 = s2.substring(0, s2.indexOf("//")); - } - if (!s2.contains("#include") && s2.length() > 0) { - s2 = s2.trim(); - cloneStringArray.add(s2); + s += "\n"; + for (GeneralTransition tr : inTransitions) { + s += "\t in: " + tr.toString() + "\n"; + } + for (GeneralTransition tr : outTransitions) { + s += "\tout: " + tr.toString() + "\n"; + } + if (tags != null) { + StringBuffer ta = new StringBuffer(""); + for (AUTTag t : tags) { + ta.append(t.getID()); + ta.append(" "); } + s += "\ttags: " + ta.toString().trim() + "\n"; } - expectedReader.close(); - cloneReader.close(); - - return checkEquality(expectedStringArray, cloneStringArray); + return s; } - public boolean checkEquality(List<String> s1, List<String> s2) { - for (String s : s1) { - if (s2.contains(s)) { - s2.remove(s); - } + // Tags + + public void makeAllTags(ArrayList<AUTTag> tags) { + if (tags == null) { + return; } - if (s2.size() == 0) { - return true; + for(AUTTag t: tags) { + addTag(t); + } + } + public void addTag(AUTTag _tag) { + if (tags == null) { + tags = new ArrayList<>(); } + tags.add(_tag); + } - return false; + public boolean hasTag(AUTTag _tag) { + if (tags == null) { + return false; + } + return tags.contains(_tag); } + + } diff --git a/src/main/java/graph/GeneralTransition.java b/src/main/java/graph/GeneralTransition.java new file mode 100755 index 0000000000000000000000000000000000000000..2b1070fce87b62fa94a5a68f3b1e7e4622bcdf88 --- /dev/null +++ b/src/main/java/graph/GeneralTransition.java @@ -0,0 +1,96 @@ +/* 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 graph; + +import java.util.ArrayList; + +/** + * Class GeneralTransition + * Creation : 19/07/2024 + * * @version 1.0 19/07/2024 + * + * @author Ludovic APVRILLE + */ +public class GeneralTransition { + + public GeneralState origin; + public GeneralState destination; + public String transition; + public boolean isTau; + + public ArrayList<AUTTag> tags; + + public GeneralTransition(GeneralState _origin, String _transition, GeneralState _destination) { + origin = _origin; + destination = _destination; + transition = _transition; + } + + + public String toString() { + return "(" + origin.info + " ," + transition + ", " + destination.info + ")"; + } + + public void makeAllTags(ArrayList<AUTTag> tags) { + if (tags == null) { + return; + } + + for(AUTTag t: tags) { + addTag(t); + } + } + + public void addTag(AUTTag _tag) { + if (tags == null) { + tags = new ArrayList<>(); + } + tags.add(_tag); + } + + public boolean hasTag(AUTTag _tag) { + if (tags == null) { + return false; + } + return tags.contains(_tag); + } + + +} diff --git a/src/main/java/myutil/FileUtils.java b/src/main/java/myutil/FileUtils.java index 063a44612a954e62e7a8a4a0565881387f2d37db..7d48e070e637d2025019d6803b3e9d06a9cd38b5 100644 --- a/src/main/java/myutil/FileUtils.java +++ b/src/main/java/myutil/FileUtils.java @@ -40,6 +40,8 @@ package myutil; import java.io.*; +import java.util.ArrayList; +import java.util.List; /** @@ -343,4 +345,100 @@ public class FileUtils extends org.apache.commons.io.FileUtils { } } + public static boolean compareTMLFiles(File expected, File clone) throws Exception { + + BufferedReader expectedReader = new BufferedReader(new FileReader(expected)); + BufferedReader cloneReader = new BufferedReader(new FileReader(clone)); + + String expectedString = ""; + String cloneString = ""; + String s1; + String s2; + + while ((s1 = expectedReader.readLine()) != null) { + if (!s1.contains("//") && s1.length() > 0) { + s1 = s1.trim(); + expectedString += s1; + } + } + + while ((s2 = cloneReader.readLine()) != null){ + if (!s2.contains("//") && s2.length() > 0) { + s2 = s2.trim(); + cloneString += s2; + } + } + + String[] expectedStringArray = expectedString.split("\\s+"); + String[] cloneStringArray = cloneString.split("\\s+"); + return checkEqualityForTMLFiles(expectedStringArray, cloneStringArray); + } + + private static boolean checkEqualityForTMLFiles(String[] s1, String[] s2) { + if (s1 == s2) + return true; + + if (s1 == null || s2 == null) + return false; + + int n = s1.length; + if (n != s2.length) + return false; + + for (int i = 0; i < n; i++) { + if (!s1[i].equals(s2[i])) + return false; + } + + return true; + } + + public static boolean CompareTMAPFiles(File expected, File clone) throws Exception { + + BufferedReader expectedReader = new BufferedReader(new FileReader(expected)); + BufferedReader cloneReader = new BufferedReader(new FileReader(clone)); + + String s1; + String s2; + List<String> expectedStringArray = new ArrayList<String>(); + List<String> cloneStringArray = new ArrayList<String>(); + + while ((s1 = expectedReader.readLine()) != null) { + if (s1.indexOf("//") >= 0) { + s1 = s1.substring(0, s1.indexOf("//")); + } + if (!s1.contains("#include") && s1.length() > 0) { + s1 = s1.trim(); + expectedStringArray.add(s1); + } + } + + while ((s2 = cloneReader.readLine()) != null){ + if (s2.indexOf("//") >= 0) { + s2 = s2.substring(0, s2.indexOf("//")); + } + if (!s2.contains("#include") && s2.length() > 0) { + s2 = s2.trim(); + cloneStringArray.add(s2); + } + } + expectedReader.close(); + cloneReader.close(); + + return checkEqualityForTMAPFiles(expectedStringArray, cloneStringArray); + } + + private static boolean checkEqualityForTMAPFiles(List<String> s1, List<String> s2) { + for (String s : s1) { + if (s2.contains(s)) { + s2.remove(s); + } + } + + if (s2.size() == 0) { + return true; + } + + return false; + } } // Class diff --git a/src/main/java/tmltranslator/HwA.java b/src/main/java/tmltranslator/HwA.java index 963517c6df6bf23998069ac5ed600020c37757d0..e20c2cb0eb7a07b77466d7c6ecad7f28f5af4410 100755 --- a/src/main/java/tmltranslator/HwA.java +++ b/src/main/java/tmltranslator/HwA.java @@ -41,8 +41,6 @@ package tmltranslator; -import java.util.Objects; - /** * Class HwA * Creation: 23/11/2007 @@ -79,9 +77,9 @@ public class HwA extends HwExecutionNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwA)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwA hwA = (HwA) o; return byteDataSize == hwA.byteDataSize; } diff --git a/src/main/java/tmltranslator/HwBridge.java b/src/main/java/tmltranslator/HwBridge.java index def07d9b05f75c23064a17d7310a9bce2c9de35b..05a6ad8ba0fe088238f9b6acd67123751c64ed9e 100755 --- a/src/main/java/tmltranslator/HwBridge.java +++ b/src/main/java/tmltranslator/HwBridge.java @@ -43,9 +43,7 @@ package tmltranslator; import java.util.ArrayList; import java.util.List; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Objects; +import java.util.HashSet; /** * Class HwBridge @@ -72,9 +70,9 @@ public class HwBridge extends HwCommunicationNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwBridge)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwBridge hwBridge = (HwBridge) o; return latency == hwBridge.latency && bufferByteSize == hwBridge.bufferByteSize && diff --git a/src/main/java/tmltranslator/HwBus.java b/src/main/java/tmltranslator/HwBus.java index 56ba2dd6e5b568ca93cd0a695dc1cc0f059b3cae..b5e073a221124787457d35fca812a02b2491e4f2 100755 --- a/src/main/java/tmltranslator/HwBus.java +++ b/src/main/java/tmltranslator/HwBus.java @@ -39,10 +39,6 @@ package tmltranslator; -import myutil.TraceManager; - -import java.util.Objects; - /** * Class HwBus * Creation: 05/09/2007 @@ -82,10 +78,10 @@ public class HwBus extends HwCommunicationNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwBus)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwBus hwBus = (HwBus) o; //TraceManager.addDev("Testing equality in HwBus for " + toXML() + " and " + toXML()); diff --git a/src/main/java/tmltranslator/HwCPU.java b/src/main/java/tmltranslator/HwCPU.java index aa1baf76a52fdfded835c49d931107c49318576f..6368f1316bbb87b8d088a950f10bd2741f4bd799 100755 --- a/src/main/java/tmltranslator/HwCPU.java +++ b/src/main/java/tmltranslator/HwCPU.java @@ -124,9 +124,9 @@ public class HwCPU extends HwExecutionNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwCPU)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwCPU hwCPU = (HwCPU) o; return encryption == hwCPU.encryption && nbOfCores == hwCPU.nbOfCores && @@ -139,7 +139,7 @@ public class HwCPU extends HwExecutionNode { cacheMiss == hwCPU.cacheMiss && schedulingPolicy == hwCPU.schedulingPolicy && sliceTime == hwCPU.sliceTime && - MEC.equalSpec(hwCPU.MEC); + MEC.equalsSpec(hwCPU.MEC); } public HwCPU deepClone(TMLArchitecture _archi) throws TMLCheckingError { diff --git a/src/main/java/tmltranslator/HwCommunicationNode.java b/src/main/java/tmltranslator/HwCommunicationNode.java index 11902437c0df581b5fa0c053b7847af60527e119..e6dea749792880b123fb487d79b2e8591eea95a4 100755 --- a/src/main/java/tmltranslator/HwCommunicationNode.java +++ b/src/main/java/tmltranslator/HwCommunicationNode.java @@ -42,10 +42,6 @@ package tmltranslator; -import myutil.TraceManager; - -import java.util.Objects; - /** * Class HwCommunicationNode * Creation: 23/11/2007 @@ -66,10 +62,10 @@ public abstract class HwCommunicationNode extends HwNode { super(_name); } - public boolean equalSpec(Object o) { - //TraceManager.addDev("equalSpec in HwCommunicationNode"); + @Override + public boolean equalsSpec(Object o) { if(!(o instanceof HwCommunicationNode)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwCommunicationNode that = (HwCommunicationNode) o; //TraceManager.addDev("Comparing HwCommunicationNode " + getName() + " with " + that.getName()); return privacy == that.privacy; diff --git a/src/main/java/tmltranslator/HwCrossbar.java b/src/main/java/tmltranslator/HwCrossbar.java index 8959660687b79182214b211273ed84e0ccaa4a39..3220d631344a6876e22a4886aeb9058b50c0f55f 100755 --- a/src/main/java/tmltranslator/HwCrossbar.java +++ b/src/main/java/tmltranslator/HwCrossbar.java @@ -64,9 +64,9 @@ public class HwCrossbar extends HwCommunicationNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwCrossbar)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwCrossbar hwCrossbar = (HwCrossbar) o; return byteDataSize == hwCrossbar.byteDataSize; } diff --git a/src/main/java/tmltranslator/HwDMA.java b/src/main/java/tmltranslator/HwDMA.java index 162058fa217a56393ee39651056aa98ab3c36005..0cbfb60728f3b7c7c69b16482f1f8a4fdc1bee88 100755 --- a/src/main/java/tmltranslator/HwDMA.java +++ b/src/main/java/tmltranslator/HwDMA.java @@ -41,8 +41,6 @@ package tmltranslator; -import java.util.Objects; - /** * Class HwDMA * Creation: 26/09/2011 @@ -68,9 +66,9 @@ public class HwDMA extends HwCommunicationNode { } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwDMA)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwDMA hwDMA = (HwDMA) o; return byteDataSize == hwDMA.byteDataSize && nbOfChannels == hwDMA.nbOfChannels; diff --git a/src/main/java/tmltranslator/HwExecutionNode.java b/src/main/java/tmltranslator/HwExecutionNode.java index 98b56d2fef9fdfefee376899902c305b6de36e7c..1c19529932fadb1f91cad41ed15a8d031e101c59 100755 --- a/src/main/java/tmltranslator/HwExecutionNode.java +++ b/src/main/java/tmltranslator/HwExecutionNode.java @@ -41,8 +41,6 @@ package tmltranslator; -import java.util.Objects; - /** * Class HwExecutionNode * Creation: 23/11/2007 @@ -99,9 +97,9 @@ public abstract class HwExecutionNode extends HwNode { return false; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwExecutionNode)) return false; - if(!super.equalSpec(o)) return false; + if(!super.equalsSpec(o)) return false; HwExecutionNode that = (HwExecutionNode) o; return maximumNbOfTasks == that.maximumNbOfTasks && execiTime == that.execiTime && diff --git a/src/main/java/tmltranslator/HwFPGA.java b/src/main/java/tmltranslator/HwFPGA.java index a79337ff1be461f5a5585153f59e7970611f48da..978d53fa40123cae2f47e177abdaa7681c67b7a3 100755 --- a/src/main/java/tmltranslator/HwFPGA.java +++ b/src/main/java/tmltranslator/HwFPGA.java @@ -39,8 +39,6 @@ package tmltranslator; -import tmltranslator.modelcompiler.ArchUnitMEC; - /** * Class HwFPGA @@ -93,9 +91,9 @@ public class HwFPGA extends HwExecutionNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwFPGA)) return false; - if(!super.equalSpec(o)) return false; + if(!super.equalsSpec(o)) return false; HwFPGA hwFPGA = (HwFPGA) o; return byteDataSize == hwFPGA.byteDataSize && goIdleTime == hwFPGA.goIdleTime && diff --git a/src/main/java/tmltranslator/HwLink.java b/src/main/java/tmltranslator/HwLink.java index 8c0f828656829c30d5cad1d31ba2f5cf527265b9..dc297fae0b3ffd92b5d9fbe509b4cce19684962a 100755 --- a/src/main/java/tmltranslator/HwLink.java +++ b/src/main/java/tmltranslator/HwLink.java @@ -109,7 +109,7 @@ public class HwLink implements Comparable<HwLink> { return (nodeBus == bus) || (nodeBus == vgmn) || (nodeBus == crossbar); } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; HwLink hwLink = (HwLink) o; diff --git a/src/main/java/tmltranslator/HwMemory.java b/src/main/java/tmltranslator/HwMemory.java index a603b91cecc3491f0d73df82a6cae04a2d13e140..8f985799f0e3a26c69a4b14404ad745fafd67a7f 100755 --- a/src/main/java/tmltranslator/HwMemory.java +++ b/src/main/java/tmltranslator/HwMemory.java @@ -41,8 +41,6 @@ package tmltranslator; -import java.util.Objects; - /** * Class HwMemory * Creation: 23/11/2007 @@ -70,9 +68,9 @@ public class HwMemory extends HwCommunicationNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwMemory)) return false; - if(!super.equalSpec(o)) return false; + if(!super.equalsSpec(o)) return false; HwMemory hwMemory = (HwMemory) o; return bufferType == hwMemory.bufferType && byteDataSize == hwMemory.byteDataSize && diff --git a/src/main/java/tmltranslator/HwNoC.java b/src/main/java/tmltranslator/HwNoC.java index c96fe876c0ecda9d475aba75218aecb005dd1cf2..0a03ab7bb9f3699066f582d48cef63663f1677a5 100755 --- a/src/main/java/tmltranslator/HwNoC.java +++ b/src/main/java/tmltranslator/HwNoC.java @@ -44,7 +44,6 @@ package tmltranslator; import myutil.TraceManager; import java.awt.*; -import java.util.ArrayList; import java.util.HashMap; @@ -213,9 +212,9 @@ public class HwNoC extends HwCommunicationNode { } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwNoC)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwNoC hwNoC = (HwNoC) o; if (placementMap != null) { diff --git a/src/main/java/tmltranslator/HwNode.java b/src/main/java/tmltranslator/HwNode.java index 89b0b752155e5e79c3e0f286c48b9e7405c75d34..53012662579e7c1d6d12d1294321b264c01f68b7 100755 --- a/src/main/java/tmltranslator/HwNode.java +++ b/src/main/java/tmltranslator/HwNode.java @@ -41,11 +41,8 @@ package tmltranslator; -import myutil.TraceManager; import tmltranslator.modelcompiler.ArchUnitMEC; -import java.util.Objects; - /** * Class HwNode @@ -80,12 +77,12 @@ public abstract class HwNode extends DIPLOElement { public abstract String toXML(); - public boolean equalSpec(Object o) { - TraceManager.addDev("equalSpec in HwNode"); + public boolean equalsSpec(Object o) { +// TraceManager.addDev("equalsSpec in HwNode"); if (!(o instanceof HwNode)) return false; HwNode hwNode = (HwNode) o; - if (mec != null && (!mec.equalSpec(hwNode.getArchUnitMEC()))) + if (mec != null && (!mec.equalsSpec(hwNode.getArchUnitMEC()))) return false; return maximumNbOfMappedElement == hwNode.maximumNbOfMappedElement && clockRatio == hwNode.clockRatio && diff --git a/src/main/java/tmltranslator/HwVGMN.java b/src/main/java/tmltranslator/HwVGMN.java index 20e90aea6e09304be5f85a9c1d4ecfc648749a95..e0179783b37fbf3bbcada41888c38065e5dab668 100755 --- a/src/main/java/tmltranslator/HwVGMN.java +++ b/src/main/java/tmltranslator/HwVGMN.java @@ -63,9 +63,9 @@ public class HwVGMN extends HwCommunicationNode { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof HwVGMN)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; HwVGMN hwVGMN = (HwVGMN) o; return byteDataSize == hwVGMN.byteDataSize; diff --git a/src/main/java/tmltranslator/SecurityPattern.java b/src/main/java/tmltranslator/SecurityPattern.java index cea922d4eb7b5a96ad4212a5d41b78ee8b735c3c..11e627093a04f477bbc5ed2070ba010fd490f6da 100644 --- a/src/main/java/tmltranslator/SecurityPattern.java +++ b/src/main/java/tmltranslator/SecurityPattern.java @@ -43,7 +43,6 @@ package tmltranslator; import avatartranslator.AvatarState; import myutil.TraceManager; -import java.util.Locale; import java.util.Objects; @@ -226,7 +225,7 @@ public class SecurityPattern { this.algorithm = algorithm; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof SecurityPattern)) return false; SecurityPattern securityPattern = (SecurityPattern) o; diff --git a/src/main/java/tmltranslator/TMLActivity.java b/src/main/java/tmltranslator/TMLActivity.java index 3e3dd772d4f9dc0482cbd9549f2b47367ea92170..bbd20dcfa6c1fab513a210fb701822ef7e96e1a7 100755 --- a/src/main/java/tmltranslator/TMLActivity.java +++ b/src/main/java/tmltranslator/TMLActivity.java @@ -870,18 +870,16 @@ public class TMLActivity extends TMLElement { - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLActivity)) return false; - if(!super.equalSpec(o)) return false; + if(!super.equalsSpec(o)) return false; TMLActivity tmlActivity = (TMLActivity) o; - TMLComparingMethod comp = new TMLComparingMethod(); if (first != null) { - if (!first.equalSpec(tmlActivity.getFirst())) return false; + return first.equalsSpec(tmlActivity.getFirst()); } else { - if (tmlActivity.getFirst() != null) return false; + return tmlActivity.getFirst() == null; } - return comp.isTMLActivityEltListEquals(elements, tmlActivity.getElements()); } public void nullifyDelayOperators(boolean execOp, boolean timeOp) { diff --git a/src/main/java/tmltranslator/TMLActivityElement.java b/src/main/java/tmltranslator/TMLActivityElement.java index 7059a425937f45be3194df91f92e6755301dfa45..1184b2fe409a65a71c46ecac7ea8fc7f9c5b5506 100755 --- a/src/main/java/tmltranslator/TMLActivityElement.java +++ b/src/main/java/tmltranslator/TMLActivityElement.java @@ -156,13 +156,12 @@ public abstract class TMLActivityElement extends TMLElement { public abstract String customExtraToXML(); - public boolean equalSpec(Object o) { - if (!(o instanceof TMLActivityElement)) return false; - if(!super.equalSpec(o)) return false; + public boolean equalsSpec(Object o) { + if (o == null || getClass() != o.getClass()) return false; + TMLActivityElement tmlActEtls = (TMLActivityElement) o; - TMLComparingMethod comp = new TMLComparingMethod(); - return Objects.equals(value,tmlActEtls.getValue()) && - comp.isTMLActivityEltListEquals(nexts,tmlActEtls.getNexts()); + return Objects.equals(value, tmlActEtls.getValue()) && TMLComparingMethod.areSecurityPatternsEqual(securityPattern, tmlActEtls.getSecurityPattern()) && + TMLComparingMethod.areTMLActivityEltListsEqual(nexts, tmlActEtls.getNexts()); } public void setCheckableAccessibility(boolean b) { diff --git a/src/main/java/tmltranslator/TMLActivityElementChannel.java b/src/main/java/tmltranslator/TMLActivityElementChannel.java index bc0f37b20fa65445d68d0f97e8ce5c14c230cbe1..cca4bf1710f4c444a63828f0545d4d529be687cd 100755 --- a/src/main/java/tmltranslator/TMLActivityElementChannel.java +++ b/src/main/java/tmltranslator/TMLActivityElementChannel.java @@ -125,14 +125,14 @@ public abstract class TMLActivityElementChannel extends TMLActivityElement { return s; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLActivityElementChannel)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLActivityElementChannel tmlActEltChannel = (TMLActivityElementChannel) o; - return Objects.equals(nbOfSamples, ((TMLActivityElementChannel) o).getNbOfSamples()) && - isAttacker == tmlActEltChannel.isAttacker()/* && - isEncForm == tmlActEltChannel.getEncForm() */; - + // Check if the two TMLActivityElementChannel have the same channels list. + // if (!TMLComparingMethod.areTMLChannelListsEqual(channels, tmlActEltChannel.channels)) return false; + return Objects.equals(nbOfSamples, tmlActEltChannel.getNbOfSamples()) && + isAttacker == tmlActEltChannel.isAttacker(); } public void fillValues(TMLActivityElementChannel newElt, TMLModeling tmlm) throws TMLCheckingError { diff --git a/src/main/java/tmltranslator/TMLActivityElementEvent.java b/src/main/java/tmltranslator/TMLActivityElementEvent.java index c4a7a49278b39ef30636ec5523698441352e3614..7ef6aa3e71806ef9a2aa6778bd08e2f461ebb186 100755 --- a/src/main/java/tmltranslator/TMLActivityElementEvent.java +++ b/src/main/java/tmltranslator/TMLActivityElementEvent.java @@ -144,11 +144,22 @@ public abstract class TMLActivityElementEvent extends TMLActivityElement { return datas; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLActivityElementEvent)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLActivityElementEvent tmlActivityElementEvent = (TMLActivityElementEvent) o; - + // Check if the two TMLActivityElementEvent have the same events list. + /*for (TMLEvent evt1 : events) { + boolean isEqualEvt = false; + for (TMLEvent evt2 : tmlActivityElementEvent.getEvents()) { + if (evt1.equalsSpec(evt2)) { + isEqualEvt = true; + break; + } + } + if (!isEqualEvt) return false; + } + if (!event.equalsSpec(tmlActivityElementEvent.getEvent())) return false;*/ return (new HashSet<>(datas)).equals(new HashSet<>(tmlActivityElementEvent.getDatas())) && Objects.equals(variable, tmlActivityElementEvent.getVariable()); } diff --git a/src/main/java/tmltranslator/TMLActivityElementWithAction.java b/src/main/java/tmltranslator/TMLActivityElementWithAction.java index 5e2fad559e09082f1bff8ec42d6d1e2e1a7f1141..3e0b548ccaba0dc69629495e50b0b3b8c74e1e4b 100755 --- a/src/main/java/tmltranslator/TMLActivityElementWithAction.java +++ b/src/main/java/tmltranslator/TMLActivityElementWithAction.java @@ -41,8 +41,6 @@ package tmltranslator; -import translator.CheckingError; - import java.util.Objects; /** @@ -78,9 +76,9 @@ public abstract class TMLActivityElementWithAction extends TMLActivityElement { return s; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLActivityElementWithAction)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLActivityElementWithAction tmlActivityElementWithAction = (TMLActivityElementWithAction) o; return Objects.equals(action, tmlActivityElementWithAction.getAction()); } diff --git a/src/main/java/tmltranslator/TMLActivityElementWithIntervalAction.java b/src/main/java/tmltranslator/TMLActivityElementWithIntervalAction.java index c375f24a57b28ba5c3346e90b33a5b6d26554373..105e7fa464b275c3e1abec0871bd2e0b0186dba2 100755 --- a/src/main/java/tmltranslator/TMLActivityElementWithIntervalAction.java +++ b/src/main/java/tmltranslator/TMLActivityElementWithIntervalAction.java @@ -82,9 +82,10 @@ public abstract class TMLActivityElementWithIntervalAction extends TMLActivityEl public void setActiveDelay(boolean _b){ isActiveDelay = _b;} public boolean getActiveDelay(){return isActiveDelay;} - public boolean equalSpec(Object o) { - if (!(o instanceof TMLActivityElementWithIntervalAction)) return false; - if (!super.equalSpec(o)) return false; + + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLActivityElementWithIntervalAction tmlAEIAction = (TMLActivityElementWithIntervalAction) o; return Objects.equals(minDelay, tmlAEIAction.getMinDelay()) && diff --git a/src/main/java/tmltranslator/TMLArchitecture.java b/src/main/java/tmltranslator/TMLArchitecture.java index 71d27850747115bff20307359d8977bbc45857ab..f38b69b54d17ad617c6961ec1d03f44515745d5a 100755 --- a/src/main/java/tmltranslator/TMLArchitecture.java +++ b/src/main/java/tmltranslator/TMLArchitecture.java @@ -38,8 +38,6 @@ package tmltranslator; -import myutil.TraceManager; - import java.util.*; /** @@ -556,7 +554,7 @@ public class TMLArchitecture { return (noc == null ? -1 : noc.size); } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) @@ -564,12 +562,10 @@ public class TMLArchitecture { TMLArchitecture that = (TMLArchitecture) o; - TMLComparingMethod comp = new TMLComparingMethod(); - - if (!comp.isHwNodeListEquals(hwnodes, that.hwnodes)) + if (!TMLComparingMethod.areHwNodeListsEqual(hwnodes, that.hwnodes)) return false; - if (!comp.isHwlinkListEquals(hwlinks, that.hwlinks)) + if (!TMLComparingMethod.areHwlinkListsEqual(hwlinks, that.hwlinks)) return false; return masterClockFrequency == that.masterClockFrequency; diff --git a/src/main/java/tmltranslator/TMLAttribute.java b/src/main/java/tmltranslator/TMLAttribute.java index 1ff191a0792a4073481ada8e3d9e46ecd9600617..7c67ad8dc0c976bf86383e2fe9f80f09690b96c1 100755 --- a/src/main/java/tmltranslator/TMLAttribute.java +++ b/src/main/java/tmltranslator/TMLAttribute.java @@ -139,17 +139,24 @@ public class TMLAttribute extends DIPLOElement { return "unknown"; } - @Override public boolean equals( Object o ) { - if( !(o instanceof TMLAttribute ) ) { + @Override + public boolean equals(Object o) { + if (!(o instanceof TMLAttribute)) { return false; } - else { - TMLAttribute attr = (TMLAttribute)o; - return ( name.equals( attr.getName() ) && ( type.equals( attr.getType()) ) ); - } + TMLAttribute attr = (TMLAttribute) o; + return (name.equals(attr.getName()) && (type.equals(attr.getType()))); //return ( (name.equals( _other.getName() )) && ( initialValue.equals( _other.getInitialValue() )) && (type.equals( _other.getType() )) ); } + public boolean equalsSpec(Object o) { + if (!(o instanceof TMLAttribute)) { + return false; + } + TMLAttribute attr = (TMLAttribute) o; + return (name.equals(attr.getName())) && (initialValue.equals(attr.getInitialValue())) && (type.equalsSpec(attr.getType())); + } + @Override public int hashCode() { int result = 17; if( name == null ) { diff --git a/src/main/java/tmltranslator/TMLChannel.java b/src/main/java/tmltranslator/TMLChannel.java index bfe881cf24499a1e14de33f6a5e6590f53184e4f..d02b555335ef6122744decf6f02de1b083d0d7da 100755 --- a/src/main/java/tmltranslator/TMLChannel.java +++ b/src/main/java/tmltranslator/TMLChannel.java @@ -54,6 +54,8 @@ import java.util.List; */ public class TMLChannel extends TMLCommunicationElement { + public static final int DEFAULT_PRIORITY = 5; + public static final int BRBW = 0; public static final int BRNBW = 1; public static final int NBRNBW = 2; @@ -78,13 +80,13 @@ public class TMLChannel extends TMLCommunicationElement { private String TAB2 = "\t\t"; private String CR = "\n"; private String SP = " "; - private int priority; + private int priority = DEFAULT_PRIORITY; private int vc = 0; //Security - private boolean ensureConf; // Ensure the confidentiality for this channel - private boolean ensureWeakAuth; // Ensure the weak authenticity for this channel - private boolean ensureStrongAuth; // Ensure the strong authenticity for this channel + private boolean securityGoalConf; // Ensure the confidentiality for this channel + private boolean securityGoalWeakAuth; // Ensure the weak authenticity for this channel + private boolean securityGoalStrongAuth; // Ensure the strong authenticity for this channel //A reference to the original origin and destination tasks @@ -204,27 +206,27 @@ public class TMLChannel extends TMLCommunicationElement { return vc; } - public boolean isEnsureConf() { - return ensureConf; + public boolean isSecurityGoalConf() { + return securityGoalConf; } - public boolean isEnsureWeakAuth() { - return ensureWeakAuth; + public boolean isSecurityGoalWeakAuth() { + return securityGoalWeakAuth; } - public boolean isEnsureStrongAuth() { - return ensureStrongAuth; + public boolean isSecurityGoalStrongAuth() { + return securityGoalStrongAuth; } - public void setEnsureConf(boolean _ensureConf) { - ensureConf = _ensureConf; + public void setSecurityGoalConf(boolean _ensureConf) { + securityGoalConf = _ensureConf; } - public void setEnsureWeakAuth(boolean _ensureWeakAuth) { - ensureWeakAuth = _ensureWeakAuth; + public void setSecurityGoalWeakAuth(boolean _ensureWeakAuth) { + securityGoalWeakAuth = _ensureWeakAuth; } - public void setEnsureStrongAuth(boolean _ensureStrongAuth) { - ensureStrongAuth = _ensureStrongAuth; + public void setSecurityGoalStrongAuth(boolean _ensureStrongAuth) { + securityGoalStrongAuth = _ensureStrongAuth; } public void setVC(int vc) { @@ -656,41 +658,40 @@ public class TMLChannel extends TMLCommunicationElement { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLChannel)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; TMLChannel channel = (TMLChannel) o; - TMLComparingMethod comp = new TMLComparingMethod(); //TraceManager.addDev("Comparing channel ports"); if (originPort != null) { - if (!originPort.equalSpec(channel.getOriginPort())) + if (!originPort.equalsSpec(channel.getOriginPort())) return false; } if (destinationPort != null) { - if (!destinationPort.equalSpec(channel.getDestinationPort())) return false; + if (!destinationPort.equalsSpec(channel.getDestinationPort())) return false; } //TraceManager.addDev("Comparing channel tasks"); if (originTask != null) { - if (!originTask.equalSpec(channel.getOriginTask())) + if (!originTask.equalsSpec(channel.getOriginTask())) return false; } if (destinationTask != null) { - if (!destinationTask.equalSpec(channel.getDestinationTask())) return false; + if (!destinationTask.equalsSpec(channel.getDestinationTask())) return false; } //TraceManager.addDev("Comparing other attributes"); boolean ret = checkConf == channel.checkConf && checkAuth == channel.checkAuth && - ensureConf == channel.ensureConf && - ensureWeakAuth == channel.ensureWeakAuth && - ensureStrongAuth == channel.ensureStrongAuth && + securityGoalConf == channel.securityGoalConf && + securityGoalWeakAuth == channel.securityGoalWeakAuth && + securityGoalStrongAuth == channel.securityGoalStrongAuth && size == channel.size && type == channel.type && max == channel.max && @@ -701,10 +702,10 @@ public class TMLChannel extends TMLCommunicationElement { //TraceManager.addDev("ret 1 = " + ret); ret = ret && - comp.isTasksListEquals(originTasks, channel.getOriginTasks()) && - comp.isTasksListEquals(destinationTasks, channel.getDestinationTasks()) && - comp.isPortListEquals(originPorts, channel.getOriginPorts()) && - comp.isPortListEquals(destinationPorts, channel.getDestinationPorts()); + TMLComparingMethod.areTaskListsEqual(originTasks, channel.getOriginTasks()) && + TMLComparingMethod.areTaskListsEqual(destinationTasks, channel.getDestinationTasks()) && + TMLComparingMethod.arePortListsEqual(originPorts, channel.getOriginPorts()) && + TMLComparingMethod.arePortListsEqual(destinationPorts, channel.getDestinationPorts()); //TraceManager.addDev("ret 2 = " + ret); @@ -766,9 +767,9 @@ public class TMLChannel extends TMLCommunicationElement { TMLChannel newC = new TMLChannel(getName(), getReferenceObject()); newC.checkConf = isCheckConfChannel(); newC.checkAuth = isCheckAuthChannel(); - newC.ensureConf = isEnsureConf(); - newC.ensureWeakAuth = isEnsureWeakAuth(); - newC.ensureStrongAuth = isEnsureStrongAuth(); + newC.securityGoalConf = isSecurityGoalConf(); + newC.securityGoalWeakAuth = isSecurityGoalWeakAuth(); + newC.securityGoalStrongAuth = isSecurityGoalStrongAuth(); newC.port = port; newC.ports = new ArrayList<>(); diff --git a/src/main/java/tmltranslator/TMLChoice.java b/src/main/java/tmltranslator/TMLChoice.java index 45d9543ee5205ff0afebb12163c195b1190d79b9..e47cfd5beb67b207392284152004d0d4834aa442 100755 --- a/src/main/java/tmltranslator/TMLChoice.java +++ b/src/main/java/tmltranslator/TMLChoice.java @@ -39,12 +39,10 @@ package tmltranslator; import myutil.Conversion; -import translator.CheckingError; import java.util.ArrayList; import java.util.HashSet; import java.util.List; -import java.util.Objects; /** * Class TMLChoice @@ -350,9 +348,10 @@ public class TMLChoice extends TMLActivityElement{ private List<String> getGuards () { return guards; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLChoice)) return false; - if (!super.equalSpec(o)) return false; + + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLChoice tmlChoice = (TMLChoice) o; return (new HashSet<>(guards)).equals(new HashSet<>(tmlChoice.getGuards())); } diff --git a/src/main/java/tmltranslator/TMLCommunicationElement.java b/src/main/java/tmltranslator/TMLCommunicationElement.java index 6f8c7d3872d5c840a0e4f6c44d3ecc708a74c2ee..ed7d711eed28290e420f058254cb514b01ab6d21 100755 --- a/src/main/java/tmltranslator/TMLCommunicationElement.java +++ b/src/main/java/tmltranslator/TMLCommunicationElement.java @@ -43,8 +43,6 @@ package tmltranslator; import myutil.TraceManager; -import java.util.Objects; - /** * Class TMLCommunicationElement * Creation: 22/11/2005 @@ -93,9 +91,9 @@ public abstract class TMLCommunicationElement extends TMLElement { maxNbOfLoss = _maxNbOfLoss; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLCommunicationElement)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; TMLCommunicationElement that = (TMLCommunicationElement) o; return isLossy == that.isLossy && lossPercentage == that.lossPercentage && diff --git a/src/main/java/tmltranslator/TMLComparingMethod.java b/src/main/java/tmltranslator/TMLComparingMethod.java index f6c1bbddaa2196060e72bb056ef77ec8e49f05e0..703def709a55f3f33e415a1e50f4abf779eff31e 100644 --- a/src/main/java/tmltranslator/TMLComparingMethod.java +++ b/src/main/java/tmltranslator/TMLComparingMethod.java @@ -7,7 +7,7 @@ import java.util.*; public class TMLComparingMethod { TMLComparingMethod() {} - public boolean isOncommondesListEquals(List<HwCommunicationNode> list1, List<HwCommunicationNode> list2){ + public static boolean areOncommondesListsEqual(List<HwCommunicationNode> list1, List<HwCommunicationNode> list2){ if (list1 == null && list2 == null) { return true; } @@ -32,22 +32,22 @@ public class TMLComparingMethod { for (int i = 0; i < list1.size(); i++) { TraceManager.addDev("Testing equality for " + list1.get(i).getName() + " and " + list2.get(i).getName()); - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } return true; } - public boolean isMappedcommeltsListEquals(List<TMLElement> list1, List<TMLElement> list2){ + public static boolean areMappedcommeltsListsEqual(List<TMLElement> list1, List<TMLElement> list2){ if (list1 == null && list2 == null) { return true; } //Only one of them is null - else if(list1 == null || list2 == null) { + else if (list1 == null || list2 == null) { return false; } - else if(list1.size() != list2.size()) { + else if (list1.size() != list2.size()) { return false; } @@ -55,20 +55,20 @@ public class TMLComparingMethod { list1 = new ArrayList<>(list1); list2 = new ArrayList<>(list2); - Collections.sort(list1, Comparator.comparing(TMLElement::getID)); - Collections.sort(list2, Comparator.comparing(TMLElement::getID)); + Collections.sort(list1, Comparator.comparing(TMLElement::getName)); + Collections.sort(list2, Comparator.comparing(TMLElement::getName)); boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } return true; } - public boolean isTasksListEquals(List<TMLTask> list1, List<TMLTask> list2){ + public static boolean areTaskListsEqual(List<TMLTask> list1, List<TMLTask> list2){ if (list1 == null && list2 == null) { return true; } @@ -90,14 +90,14 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } return true; } - public boolean isOnExecutionNodeListEquals(List<HwExecutionNode> list1, List<HwExecutionNode> list2){ + public static boolean areOnExecutionNodeListsEqual(List<HwExecutionNode> list1, List<HwExecutionNode> list2){ if (list1 == null && list2 == null) { return true; } @@ -119,14 +119,14 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } return true; } - public boolean isListOfStringArrayEquals(List<String[]> list1, List<String[]> list2) { + public static boolean areListsOfStringArrayEqual(List<String[]> list1, List<String[]> list2) { if (list1 == null && list2 == null) { return true; @@ -179,7 +179,7 @@ public class TMLComparingMethod { return true; } - public boolean isSecurityPatternMapEquals(Map<SecurityPattern, List<HwMemory>> map1, Map<SecurityPattern, List<HwMemory>> map2) { + public static boolean areKeysMappingEqual(Map<SecurityPattern, List<HwMemory>> map1, Map<SecurityPattern, List<HwMemory>> map2) { if (map1 == null && map2 == null) { return true; @@ -192,15 +192,23 @@ public class TMLComparingMethod { } boolean test; - for (SecurityPattern sp : map1.keySet()) { - test = isHwMemoryListEquals(map1.get(sp), map2.get(sp)); - if (!test) return false; + for (SecurityPattern spMap1 : map1.keySet()) { + boolean isEqual = false; + for (SecurityPattern spMap2 : map2.keySet()) { + if (spMap1.getName().equals(spMap2.getName())) { + test = areHwMemoryListsEqual(map1.get(spMap1), map2.get(spMap2)); + if (!test) return false; + isEqual = true; + break; + } + } + if (!isEqual) return false; } return true; } - public boolean isHwMemoryListEquals (List<HwMemory> list1, List<HwMemory> list2) { + public static boolean areHwMemoryListsEqual(List<HwMemory> list1, List<HwMemory> list2) { if (list1 == null && list2 == null) { return true; } @@ -222,43 +230,32 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } return true; } - public boolean isTMLActivityEltListEquals(List<TMLActivityElement> list1, List<TMLActivityElement> list2){ + public static boolean areTMLActivityEltListsEqual(List<TMLActivityElement> list1, List<TMLActivityElement> list2){ if (list1 == null && list2 == null) { return true; } //Only one of them is null - else if(list1 == null || list2 == null) { + else if (list1 == null || list2 == null) { return false; } - else if(list1.size() != list2.size()) { + else if (list1.size() != list2.size()) { return false; } - //copying to avoid rearranging original lists - list1 = new ArrayList<>(list1); - list2 = new ArrayList<>(list2); - - Collections.sort(list1, Comparator.comparing(TMLActivityElement::getName)); - Collections.sort(list2, Comparator.comparing(TMLActivityElement::getName)); - - boolean test; - for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); - if (!test) return false; + if (!list1.get(i).equalsSpec(list2.get(i))) return false; } - return true; } - public boolean isHwNodeListEquals(List<HwNode> list1, List<HwNode> list2){ + public static boolean areHwNodeListsEqual(List<HwNode> list1, List<HwNode> list2){ if (list1 == null && list2 == null) { return true; } @@ -280,7 +277,7 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } @@ -288,7 +285,7 @@ public class TMLComparingMethod { } - public boolean isHwlinkListEquals(List<HwLink> list1, List<HwLink> list2){ + public static boolean areHwlinkListsEqual(List<HwLink> list1, List<HwLink> list2){ if (list1 == null && list2 == null) { return true; } @@ -310,14 +307,14 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } return true; } - public boolean isPortListEquals(List<TMLPort> list1, List<TMLPort> list2){ + public static boolean arePortListsEqual(List<TMLPort> list1, List<TMLPort> list2){ if (list1 == null && list2 == null) { return true; } @@ -339,16 +336,16 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } return true; } - public boolean isTMLChannelSetEquals(Set<TMLChannel> channelSet1, Set<TMLChannel> channelSet2) { + public static boolean areTMLChannelSetsEqual(Set<TMLChannel> channelSet1, Set<TMLChannel> channelSet2) { if (channelSet1 == null && channelSet2 == null) return true; - if (channelSet1 == null|| channelSet2 == null) return false; + if (channelSet1 == null || channelSet2 == null) return false; if(channelSet1.size() != channelSet2.size()) return false; @@ -361,14 +358,14 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < channels1.size(); i++) { - test = channels1.get(i).equalSpec(channels2.get(i)); + test = channels1.get(i).equalsSpec(channels2.get(i)); if (!test) return false; } return true; } - public boolean isTMLEventSetEquals(Set<TMLEvent> eventSet1, Set<TMLEvent> eventSet2) { + public static boolean areTMLEventSetsEqual(Set<TMLEvent> eventSet1, Set<TMLEvent> eventSet2) { if (eventSet1 == null && eventSet2 == null) return true; if (eventSet1 == null|| eventSet2 == null) return false; @@ -383,11 +380,56 @@ public class TMLComparingMethod { boolean test; for (int i = 0; i < events1.size(); i++) { - test = events1.get(i).equalSpec(events2.get(i)); + test = events1.get(i).equalsSpec(events2.get(i)); if (!test) return false; } + return true; + } + + // Check equality of two security pattern specifications + public static boolean areSecurityPatternsEqual(SecurityPattern sp1, SecurityPattern sp2) { + if (sp1 == null && sp2 == null) return true; + else if (sp1 == null || sp2 == null) { + return false; + } + return (sp1.equalsSpec(sp2)); + } + // Check equality of two TMLAttribute Lists + public static boolean areTMLAttributeListsEqual(List<TMLAttribute> attributeList1, List<TMLAttribute> attributeList2) { + if (attributeList1 == null && attributeList2 == null) return true; + if (attributeList1 == null || attributeList2 == null) return false; + if(attributeList1.size() != attributeList2.size()) return false; + + for (TMLAttribute attrib : attributeList1) { + boolean isEqualAttrib = false; + for (TMLAttribute attrib2 : attributeList2) { + if (attrib.equalsSpec(attrib2)) { + isEqualAttrib = true; + break; + } + } + if (!isEqualAttrib) return false; + } return true; } + // Check if the two TMLActivityElementChannel have the same channels list. + public static boolean areTMLChannelListsEqual(List<TMLChannel> channelList1, List<TMLChannel> channelList2) { + if (channelList1 == null && channelList2 == null) return true; + if (channelList1 == null || channelList2 == null) return false; + if(channelList1.size() != channelList2.size()) return false; + + for (TMLChannel ch : channelList1) { + boolean isEqualChan = false; + for (TMLChannel ch2 : channelList2) { + if (!ch.equalsSpec(ch2)) { + isEqualChan = true; + break; + } + } + if (!isEqualChan) return false; + } + return true; + } } diff --git a/src/main/java/tmltranslator/TMLDelay.java b/src/main/java/tmltranslator/TMLDelay.java index 5572d77ba17f59fb8dca3744555c3b3b190e39eb..24d437038b63adf392cd12b196ce3f8989823831 100755 --- a/src/main/java/tmltranslator/TMLDelay.java +++ b/src/main/java/tmltranslator/TMLDelay.java @@ -93,9 +93,9 @@ public class TMLDelay extends TMLActivityElementWithIntervalAction { return ""; } - public boolean equalSpec(Object o) { - if (! (o instanceof TMLDelay)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLDelay tmlDelay = (TMLDelay) o; return Objects.equals(timeUnit,tmlDelay.getUnit()); diff --git a/src/main/java/tmltranslator/TMLElement.java b/src/main/java/tmltranslator/TMLElement.java index 76c10130e842a4a75128aa479973f4f7152988ad..7de0254822d65ce6f97bc3f5ab9728d140ba17a3 100755 --- a/src/main/java/tmltranslator/TMLElement.java +++ b/src/main/java/tmltranslator/TMLElement.java @@ -97,7 +97,7 @@ public class TMLElement extends DIPLOElement { this.referenceObject = _referenceObject; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TMLElement that = (TMLElement) o; diff --git a/src/main/java/tmltranslator/TMLEvent.java b/src/main/java/tmltranslator/TMLEvent.java index 91b67b8b72c419b4200475fec87147d165771e90..3b4a5ee87f62c3e83d7f444cff99103d64db6076 100755 --- a/src/main/java/tmltranslator/TMLEvent.java +++ b/src/main/java/tmltranslator/TMLEvent.java @@ -39,8 +39,6 @@ package tmltranslator; -import myutil.TraceManager; -import org.apache.batik.anim.timing.Trace; import translator.CheckingError; import java.util.ArrayList; @@ -357,33 +355,31 @@ public class TMLEvent extends TMLCommunicationElement { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLEvent)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; TMLEvent event = (TMLEvent) o; - TMLComparingMethod comp = new TMLComparingMethod(); - //TraceManager.addDev(("Event: testing origin port")); if (originPort != null) { - if (!originPort.equalSpec(event.getOriginPort())) + if (!originPort.equalsSpec(event.getOriginPort())) return false; } //TraceManager.addDev(("Event: testing destination port")); if (destinationPort != null) { - if (!destinationPort.equalSpec(event.getDestinationPort())) return false; + if (!destinationPort.equalsSpec(event.getDestinationPort())) return false; } //TraceManager.addDev(("Event: testing origin")); if (origin != null) { - if (!origin.equalSpec(event.getOriginTask())) + if (!origin.equalsSpec(event.getOriginTask())) return false; } //TraceManager.addDev(("Event: testing destination")); if (destination != null) { - if (!destination.equalSpec(event.getDestinationTask())) return false; + if (!destination.equalsSpec(event.getDestinationTask())) return false; } //TraceManager.addDev(("Event: testing params")); @@ -396,10 +392,10 @@ public class TMLEvent extends TMLCommunicationElement { checkAuth == event.checkAuth && checkConf == event.checkConf && canBeNotified == event.canBeNotified() && - comp.isTasksListEquals(originTasks, event.getOriginTasks()) && - comp.isTasksListEquals(destinationTasks, event.getDestinationTasks()) && - comp.isPortListEquals(originPorts, event.getOriginPorts()) && - comp.isPortListEquals(destinationPorts, event.getDestinationPorts()); + TMLComparingMethod.areTaskListsEqual(originTasks, event.getOriginTasks()) && + TMLComparingMethod.areTaskListsEqual(destinationTasks, event.getDestinationTasks()) && + TMLComparingMethod.arePortListsEqual(originPorts, event.getOriginPorts()) && + TMLComparingMethod.arePortListsEqual(destinationPorts, event.getDestinationPorts()); } public TMLEvent deepClone(TMLModeling tmlm) throws TMLCheckingError { diff --git a/src/main/java/tmltranslator/TMLExecC.java b/src/main/java/tmltranslator/TMLExecC.java index 79d323cb05b362af1a1fd8621c93f13fa9467efb..f0d8c399acdd36077987724630fa01c2f8fb6eca 100755 --- a/src/main/java/tmltranslator/TMLExecC.java +++ b/src/main/java/tmltranslator/TMLExecC.java @@ -44,6 +44,8 @@ package tmltranslator; import translator.CheckingError; +import java.util.Objects; + /** * Class TMLExecC * Creation: 21/05/2008 @@ -70,6 +72,13 @@ public class TMLExecC extends TMLActivityElementWithAction { } } + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; + TMLExecC tmlExecC = (TMLExecC) o; + return Objects.equals(isDecryptionProcess, tmlExecC.isDecryptionProcess()); + } + public TMLExecC deepClone(TMLModeling tmlm) throws TMLCheckingError { TMLExecC newElt = new TMLExecC(getName(), getReferenceObject()); fillValues(newElt, tmlm); diff --git a/src/main/java/tmltranslator/TMLForLoop.java b/src/main/java/tmltranslator/TMLForLoop.java index b7d2e9b0b65bada6384f033615cd392d54b9cb15..b6fb1be533509b68290c5a5a846df19ed7339fa3 100755 --- a/src/main/java/tmltranslator/TMLForLoop.java +++ b/src/main/java/tmltranslator/TMLForLoop.java @@ -83,9 +83,9 @@ public class TMLForLoop extends TMLActivityElement { return " init=\"" + Conversion.transformToXMLString(init) + "\" condition=\"" + Conversion.transformToXMLString(condition) + "\" increment=\"" + Conversion.transformToXMLString(increment) + "\" isInfinite=\"" + isInfinite + "\" "; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLForLoop)) return false; - if(!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if(!super.equalsSpec(o)) return false; TMLForLoop tmlForLoop = (TMLForLoop) o; return Objects.equals(init, tmlForLoop.getInit()) && Objects.equals(condition, tmlForLoop.getCondition()) && diff --git a/src/main/java/tmltranslator/TMLMapping.java b/src/main/java/tmltranslator/TMLMapping.java index 8a2d3490412dd6663c1e1c69b151aa7d08d67edd..b32bd9bd2a636634add21eec6979e1394b2db810 100755 --- a/src/main/java/tmltranslator/TMLMapping.java +++ b/src/main/java/tmltranslator/TMLMapping.java @@ -53,7 +53,6 @@ import tmltranslator.toproverif.TML2ProVerif; import translator.CheckingError; import java.util.*; -import java.util.stream.Collectors; /** * Class TMLMapping Creation: 05/09/2007 @@ -1917,43 +1916,42 @@ public class TMLMapping<E> { return cpt; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLMapping)) return false; TMLMapping<?> that = (TMLMapping<?>) o; - TMLComparingMethod comp = new TMLComparingMethod(); //TraceManager.addDev("Testing isOncommondesListEquals"); - if (!comp.isOncommondesListEquals(oncommnodes, that.getCommunicationNodes())) + if (!TMLComparingMethod.areOncommondesListsEqual(oncommnodes, that.getCommunicationNodes())) return false; //TraceManager.addDev("Testing isMappedcommeltsListEquals"); - if (!comp.isMappedcommeltsListEquals(mappedcommelts, that.getMappedCommunicationElement())) + if (!TMLComparingMethod.areMappedcommeltsListsEqual(mappedcommelts, that.getMappedCommunicationElement())) return false; ////TraceManager.addDev("Testing isTasksListEquals"); - if (!comp.isTasksListEquals(mappedtasks, that.getMappedTasks())) + if (!TMLComparingMethod.areTaskListsEqual(mappedtasks, that.getMappedTasks())) return false; //TraceManager.addDev("Testing isOnExecutionNodeListEquals"); - if (!comp.isOnExecutionNodeListEquals(onnodes, that.getNodes())) + if (!TMLComparingMethod.areOnExecutionNodeListsEqual(onnodes, that.getNodes())) return false; //TraceManager.addDev("Testing pragmas"); - if (!comp.isListOfStringArrayEquals(pragmas, that.getPragmas())) + if (!TMLComparingMethod.areListsOfStringArrayEqual(pragmas, that.getPragmas())) return false; //TraceManager.addDev("Testing mapped secu"); - if (!comp.isSecurityPatternMapEquals(mappedSecurity, that.mappedSecurity)) + if (!TMLComparingMethod.areKeysMappingEqual(mappedSecurity, that.mappedSecurity)) return false; - return tmlm.equalSpec(that.tmlm) && tmla.equalSpec(that.tmla) && firewall == that.firewall; + return tmlm.equalsSpec(that.tmlm) && tmla.equalsSpec(that.tmla) && firewall == that.firewall; } public void remap(HwExecutionNode src, HwExecutionNode dst) { @@ -2022,7 +2020,7 @@ public class TMLMapping<E> { return mappedSecurity.get(_sp); } - public void NullifyAutomata() { + public void resetMinimalMapping() { aut = null; nodesToStates = null; commNodes = null; diff --git a/src/main/java/tmltranslator/TMLModeling.java b/src/main/java/tmltranslator/TMLModeling.java index 71775e10efd95b3686a8de481094841d26fc7f7f..471d834c631bf9fffacaf6a6051b6739bedba425 100755 --- a/src/main/java/tmltranslator/TMLModeling.java +++ b/src/main/java/tmltranslator/TMLModeling.java @@ -2381,10 +2381,10 @@ public class TMLModeling<E> { chans[i].setSize(_ch.getSize()); chans[i].originalOriginTasks = originTasks; chans[i].originalDestinationTasks = destTasks; - TraceManager.addDev("Channel " + _ch.getName() + " must ensure confidentiality?" + _ch.isEnsureConf()); - chans[i].setEnsureConf(_ch.isEnsureConf()); - chans[i].setEnsureWeakAuth(_ch.isEnsureWeakAuth()); - chans[i].setEnsureStrongAuth(_ch.isEnsureStrongAuth()); + TraceManager.addDev("Channel " + _ch.getName() + " must ensure confidentiality?" + _ch.isSecurityGoalConf()); + chans[i].setSecurityGoalConf(_ch.isSecurityGoalConf()); + chans[i].setSecurityGoalWeakAuth(_ch.isSecurityGoalWeakAuth()); + chans[i].setSecurityGoalStrongAuth(_ch.isSecurityGoalStrongAuth()); _newChannels.add(chans[i]); } @@ -2616,9 +2616,9 @@ public class TMLModeling<E> { chans[i].setSize(_ch.getSize()); chans[i].originalOriginTasks = originTasks; chans[i].originalDestinationTasks = destTasks; - chans[i].setEnsureConf(_ch.isEnsureConf()); - chans[i].setEnsureWeakAuth(_ch.isEnsureWeakAuth()); - chans[i].setEnsureStrongAuth(_ch.isEnsureStrongAuth()); + chans[i].setSecurityGoalConf(_ch.isSecurityGoalConf()); + chans[i].setSecurityGoalWeakAuth(_ch.isSecurityGoalWeakAuth()); + chans[i].setSecurityGoalStrongAuth(_ch.isSecurityGoalStrongAuth()); _newChannels.add(chans[i]); } @@ -2803,7 +2803,7 @@ public class TMLModeling<E> { } } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { TraceManager.addDev("Equal Spec: testing"); @@ -2865,7 +2865,7 @@ public class TMLModeling<E> { TraceManager.addDev("List of tasks sorted"); for (int i = 0; i < list1.size(); i++) { TraceManager.addDev("Comparing " + list1.get(i).getName() + " with " + list2.get(i).getName()); - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) { TraceManager.addDev("Returning false"); return false; @@ -2896,7 +2896,7 @@ public class TMLModeling<E> { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } @@ -2925,7 +2925,7 @@ public class TMLModeling<E> { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } @@ -2953,7 +2953,7 @@ public class TMLModeling<E> { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } @@ -2981,7 +2981,7 @@ public class TMLModeling<E> { boolean test; for (int i = 0; i < list1.size(); i++) { - test = list1.get(i).equalSpec(list2.get(i)); + test = list1.get(i).equalsSpec(list2.get(i)); if (!test) return false; } diff --git a/src/main/java/tmltranslator/TMLPort.java b/src/main/java/tmltranslator/TMLPort.java index f7565e7ef324f2d115477094fb3440e1e896e33e..e00c4081d981849ccd30d3ca05286e4a29c50b5f 100755 --- a/src/main/java/tmltranslator/TMLPort.java +++ b/src/main/java/tmltranslator/TMLPort.java @@ -104,9 +104,9 @@ public class TMLPort extends TMLElement { dataFlowType = _dataFlowType; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLPort)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; TMLPort tmlPort = (TMLPort) o; return prex == tmlPort.isPrex() && diff --git a/src/main/java/tmltranslator/TMLRandom.java b/src/main/java/tmltranslator/TMLRandom.java index c59f805276a70b834c3c16c7c50180564d2c1f97..3213477c804ab881aed49e39e855ac9b66eb6f7a 100755 --- a/src/main/java/tmltranslator/TMLRandom.java +++ b/src/main/java/tmltranslator/TMLRandom.java @@ -74,9 +74,9 @@ public class TMLRandom extends TMLActivityElement { return " politics=\"" + functionId + "\" variable=\"" + variable + "\" minValue=\"" + minValue + "\" maxValue=\"" + maxValue + "\" "; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLRandom)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLRandom tmlRandom = (TMLRandom) o; return Objects.equals(variable, tmlRandom.getVariable()) && diff --git a/src/main/java/tmltranslator/TMLRandomSequence.java b/src/main/java/tmltranslator/TMLRandomSequence.java index 9b049db9e08068c8d253c962e9453ade7c4cc549..2f1ab1f519feac0bbdf1e2cce1251e0a10af1c25 100755 --- a/src/main/java/tmltranslator/TMLRandomSequence.java +++ b/src/main/java/tmltranslator/TMLRandomSequence.java @@ -106,9 +106,9 @@ public class TMLRandomSequence extends TMLActivityElement { return indexes; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLRandomSequence)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLRandomSequence tmlRS = (TMLRandomSequence) o; return (new HashSet<>(indexes)).equals(new HashSet<>(tmlRS.getIndexes())); diff --git a/src/main/java/tmltranslator/TMLRequest.java b/src/main/java/tmltranslator/TMLRequest.java index d3e2fc3a16bc21088a2f25723d5eb65ec5bf1e3f..ae3a0cb35c1e8c205781dbfa8fed3fd0e0ec863f 100755 --- a/src/main/java/tmltranslator/TMLRequest.java +++ b/src/main/java/tmltranslator/TMLRequest.java @@ -180,11 +180,10 @@ public class TMLRequest extends TMLCommunicationElement { return s; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLRequest)) return false; - if (!super.equalSpec(o)) return false; + if (!super.equalsSpec(o)) return false; TMLRequest request = (TMLRequest) o; - TMLComparingMethod comp = new TMLComparingMethod(); if (destinationTask != null) { if (destinationTask.getName().compareTo(request.getDestinationTask().getName()) != 0) return false; @@ -199,7 +198,7 @@ public class TMLRequest extends TMLCommunicationElement { return confStatus == request.confStatus && checkConf == request.checkConf && checkAuth == request.checkAuth && - comp.isTasksListEquals(originTasks, request.getOriginTasks()); + TMLComparingMethod.areTaskListsEqual(originTasks, request.getOriginTasks()); } public TMLRequest deepClone(TMLModeling tmlm) throws TMLCheckingError { diff --git a/src/main/java/tmltranslator/TMLSendRequest.java b/src/main/java/tmltranslator/TMLSendRequest.java index 8941997de17173e7e80abcae6b1b7116d4dc6301..8b5cfc07cc1ffc521aa235c0653972f6ebbcdd59 100755 --- a/src/main/java/tmltranslator/TMLSendRequest.java +++ b/src/main/java/tmltranslator/TMLSendRequest.java @@ -123,11 +123,12 @@ public class TMLSendRequest extends TMLActivityElement { return datas; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLSendRequest)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLSendRequest tmlSendRequest = (TMLSendRequest) o; + //if (!request.equalsSpec(tmlSendRequest.getRequest())) return false; return (new HashSet<>(datas)).equals(new HashSet<>(tmlSendRequest.getDatas())); } diff --git a/src/main/java/tmltranslator/TMLSequence.java b/src/main/java/tmltranslator/TMLSequence.java index acb205ad48e26f129ad854bd24f3e1e4f2377d72..8c63f37aa963e1ef71111bb126b07781513841c7 100755 --- a/src/main/java/tmltranslator/TMLSequence.java +++ b/src/main/java/tmltranslator/TMLSequence.java @@ -101,9 +101,9 @@ public class TMLSequence extends TMLActivityElement { return indexes; } - public boolean equalSpec(Object o) { - if (!(o instanceof TMLSequence)) return false; - if (!super.equalSpec(o)) return false; + @Override + public boolean equalsSpec(Object o) { + if (!super.equalsSpec(o)) return false; TMLSequence tmlSequence = (TMLSequence) o; return (new HashSet<>(indexes)).equals(new HashSet<>(tmlSequence.getIndexes())); diff --git a/src/main/java/tmltranslator/TMLTask.java b/src/main/java/tmltranslator/TMLTask.java index 6517fd4f09c3e1859718d8a024878b7d6c863673..d8969413bc87bedb86eeec8c66d744fabb12b053 100755 --- a/src/main/java/tmltranslator/TMLTask.java +++ b/src/main/java/tmltranslator/TMLTask.java @@ -39,8 +39,6 @@ package tmltranslator; -import myutil.TraceManager; - import java.util.*; /** @@ -51,12 +49,14 @@ import java.util.*; * @version 1.0 17/11/2005 */ public class TMLTask extends TMLElement { + public static final int DEFAULT_PRIORITY = 5; + protected TMLActivity activity; private boolean isRequested = false; private TMLRequest request; private List<TMLAttribute> attributes; private boolean mustExit = false; - private int priority; + private int priority = DEFAULT_PRIORITY; private Set<TMLChannel> channelsList; private Set<TMLChannel> readTMLChannelsList; private Set<TMLChannel> writeTMLChannelsList; @@ -554,22 +554,21 @@ public class TMLTask extends TMLElement { return eventsList; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof TMLTask)) { //TraceManager.addDev("Returning false 1"); return false; } - if (!super.equalSpec(o)) { + if (!super.equalsSpec(o)) { //TraceManager.addDev("Returning false 2"); return false; } TMLTask tmlTask = (TMLTask) o; - TMLComparingMethod comp = new TMLComparingMethod(); //TraceManager.addDev("Going to compare requests of task " + getName() + " with task " + tmlTask.getName()); if (request != null) { - if (!request.equalSpec(tmlTask.getRequest())) { + if (!request.equalsSpec(tmlTask.getRequest())) { //TraceManager.addDev("Returning false 3"); return false; } @@ -581,9 +580,7 @@ public class TMLTask extends TMLElement { } //TraceManager.addDev("Going to compare attributes"); - - if (!(new HashSet<>(attributes).equals(new HashSet<>(tmlTask.attributes)))) - return false; + if (!TMLComparingMethod.areTMLAttributeListsEqual(attributes, tmlTask.getAttributes())) return false; //TraceManager.addDev("HashSet of attributes ok"); @@ -598,11 +595,11 @@ public class TMLTask extends TMLElement { Objects.equals(operation, tmlTask.operation) && Objects.equals(operationMEC, tmlTask.operationMEC) && mustExit == tmlTask.exits() && - activity.equalSpec(tmlTask.activity) && - comp.isTMLChannelSetEquals(channelsList, tmlTask.getChannelSet()) && - comp.isTMLChannelSetEquals(readTMLChannelsList, tmlTask.getReadTMLChannelSet()) && - comp.isTMLChannelSetEquals(writeTMLChannelsList, tmlTask.getWriteTMLChannelSet()) && - comp.isTMLEventSetEquals(eventsList, tmlTask.getEventSet()); + activity.equalsSpec(tmlTask.activity) && + TMLComparingMethod.areTMLChannelSetsEqual(channelsList, tmlTask.getChannelSet()) && + TMLComparingMethod.areTMLChannelSetsEqual(readTMLChannelsList, tmlTask.getReadTMLChannelSet()) && + TMLComparingMethod.areTMLChannelSetsEqual(writeTMLChannelsList, tmlTask.getWriteTMLChannelSet()) && + TMLComparingMethod.areTMLEventSetsEqual(eventsList, tmlTask.getEventSet()); //TraceManager.addDev("Returning: " + ret); diff --git a/src/main/java/tmltranslator/TMLTextSpecification.java b/src/main/java/tmltranslator/TMLTextSpecification.java index a7903cc125494afd77332b0699c5947ae159f4bc..ecc268ef908fb346170f516c46113d7938b2f2ca 100755 --- a/src/main/java/tmltranslator/TMLTextSpecification.java +++ b/src/main/java/tmltranslator/TMLTextSpecification.java @@ -2790,13 +2790,12 @@ public class TMLTextSpecification<E> { if ((_split[10].compareTo("" + DECRYPTION_PROCESS) == 0) || (_split[10].compareTo("" + ENCRYPTION_PROCESS) == 0)) { //Security operation TraceManager.addDev("Found security pattern: " + _split[2]); - TMLExecC execc = new TMLExecC("encrypt_" + _split[2], null); + TMLExecC execc = new TMLExecC(_split[2], null); execc.setAction(_split[1]); SecurityPattern sp = securityPatternMap.get(_split[2]); execc.setSecurityPattern(sp); if (_split[10].compareTo("" + DECRYPTION_PROCESS) == 0) { execc.setDecryptionProcess(true); - execc.setName("decrypt_" + _split[2]); } if (!tmlm.getSecurityTaskMap().containsKey(sp)) { tmlm.getSecurityTaskMap().put(sp, new ArrayList<TMLTask>()); diff --git a/src/main/java/tmltranslator/TMLType.java b/src/main/java/tmltranslator/TMLType.java index 2b3bff733aa445a980c1b6a5448031658693516a..8640c2b73b8b65f204b3e3b1228d5e1f7e2dac25 100755 --- a/src/main/java/tmltranslator/TMLType.java +++ b/src/main/java/tmltranslator/TMLType.java @@ -162,14 +162,20 @@ public class TMLType { return getStringType(type); } - public boolean equals( Object o ) { - if( !( o instanceof TMLType ) ) { + public boolean equals(Object o) { + if (!(o instanceof TMLType)) { return false; } - else { - TMLType tt = (TMLType)o; - return ( getType() == tt.getType() ); + TMLType tt = (TMLType) o; + return (getType() == tt.getType()); + } + + public boolean equalsSpec(Object o) { + if (!(o instanceof TMLType)) { + return false; } + TMLType tt = (TMLType) o; + return (getType() == tt.getType()) && typeOther.equals(tt.getTypeOther()); } @Override public int hashCode() { diff --git a/src/main/java/tmltranslator/compareTMLTest/CompareTML.java b/src/main/java/tmltranslator/compareTMLTest/CompareTML.java deleted file mode 100644 index c2224290c71b3d7870b5b9a6de64b504e05fdb56..0000000000000000000000000000000000000000 --- a/src/main/java/tmltranslator/compareTMLTest/CompareTML.java +++ /dev/null @@ -1,59 +0,0 @@ -package tmltranslator.compareTMLTest; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -public class CompareTML { - - public CompareTML () { - - } - //#issue 82 - public boolean compareTML(File expected, File clone) throws Exception { - - BufferedReader expectedReader = new BufferedReader(new FileReader(expected)); - BufferedReader cloneReader = new BufferedReader(new FileReader(clone)); - - String expectedString = ""; - String cloneString = ""; - String s1; - String s2; - - while ((s1 = expectedReader.readLine()) != null) { - if (!s1.contains("//") && s1.length() > 0) { - s1 = s1.trim(); - expectedString += s1; - } - } - - while ((s2 = cloneReader.readLine()) != null){ - if (!s2.contains("//") && s2.length() > 0) { - s2 = s2.trim(); - cloneString += s2; - } - } - - String[] expectedStringArray = expectedString.split("\\s+"); - String[] cloneStringArray = cloneString.split("\\s+"); - return checkEquality(expectedStringArray,cloneStringArray); - } - - public boolean checkEquality(String[] s1, String[] s2) { - if (s1 == s2) - return true; - - if (s1 == null || s2 == null) - return false; - - int n = s1.length; - if (n != s2.length) - return false; - - for (int i = 0; i < n; i++) { - if (!s1[i].equals(s2[i])) - return false; - } - - return true; - } -} diff --git a/src/main/java/tmltranslator/modelcompiler/ArchUnitMEC.java b/src/main/java/tmltranslator/modelcompiler/ArchUnitMEC.java index 4ae26f0991f1156373ee0c2bf95477eea93dd408..df173e6ceab9fdaf7c249e8e6cc2cba1b168324d 100644 --- a/src/main/java/tmltranslator/modelcompiler/ArchUnitMEC.java +++ b/src/main/java/tmltranslator/modelcompiler/ArchUnitMEC.java @@ -39,7 +39,6 @@ package tmltranslator.modelcompiler; -import tmltranslator.HwNode; import tmltranslator.TMLArchitecture; import tmltranslator.TMLCheckingError; @@ -103,7 +102,7 @@ public abstract class ArchUnitMEC { return stringTypesArr[index]; } - public boolean equalSpec(Object o) { + public boolean equalsSpec(Object o) { if (!(o instanceof ArchUnitMEC)) return false; ArchUnitMEC that = (ArchUnitMEC) o; return index == that.getIndex() && diff --git a/src/main/java/tmltranslator/patternhandling/PatternIntegration.java b/src/main/java/tmltranslator/patternhandling/PatternIntegration.java index 58ab3ce81574422318423837d629477ce71b3db9..2b26dba8fc744049977ac11a72c3553fab279313 100644 --- a/src/main/java/tmltranslator/patternhandling/PatternIntegration.java +++ b/src/main/java/tmltranslator/patternhandling/PatternIntegration.java @@ -1835,16 +1835,16 @@ public class PatternIntegration implements Runnable { TMLChannel chSec = correspChannels.get(_tmapPattern.getChannelByName(channelWithSec.getChannelName())); if (chSec != null) { if (channelWithSec.isConfidential()) { - chSec.setEnsureConf(true); + chSec.setSecurityGoalConf(true); chSec.checkConf = true; } if (channelWithSec.getAuthenticity() == PatternChannelWithSecurity.WEAK_AUTHENTICITY) { - chSec.setEnsureWeakAuth(true); + chSec.setSecurityGoalWeakAuth(true); chSec.checkAuth = true; } if (channelWithSec.getAuthenticity() == PatternChannelWithSecurity.STRONG_AUTHENTICITY) { - chSec.setEnsureStrongAuth(true); - chSec.setEnsureWeakAuth(true); + chSec.setSecurityGoalStrongAuth(true); + chSec.setSecurityGoalWeakAuth(true); chSec.checkAuth = true; } hasSecChannel = true; @@ -1855,7 +1855,8 @@ public class PatternIntegration implements Runnable { if (_appTabName != "") { _tmapModel = putBackPrefixNames(_tmapModel, _appTabName); - SecurityGenerationForTMAP secgen = new SecurityGenerationForTMAP(_appTabName, _tmapModel, "100", "0", "100", new HashMap<String, java.util.List<String>>()); + SecurityGenerationForTMAP secgen = new SecurityGenerationForTMAP(_appTabName, _tmapModel, "100", "0", "100", new ArrayList<>(), + false); _tmapModel = secgen.startThread(); _tmapModel = secgen.autoMapKeys(); _tmapModel = removePrefixNames(_tmapModel); diff --git a/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java b/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java index fca3ef06d8d7dd0c762df6f230ae96e64667c679..2c39262489b5734349fb88cdf1046df860b82743 100644 --- a/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java +++ b/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java @@ -40,99 +40,139 @@ package tmltranslator.patternhandling; /** * Class SecurityGenerationForTMAP - * + * * Creation: 28/09/2023 * * @author Jawher JERRAY * @version 1.0 28/09/2023 */ - + import avatartranslator.AvatarPragma; import avatartranslator.AvatarPragmaAuthenticity; import avatartranslator.AvatarPragmaSecret; import avatartranslator.AvatarSpecification; import avatartranslator.toproverif.AVATAR2ProVerif; import common.ConfigurationTTool; -import launcher.RshClient; +import myutil.FileUtils; import myutil.TraceManager; +import org.apache.commons.math3.util.Pair; import proverifspec.*; import tmltranslator.*; import tmltranslator.toavatarsec.TML2Avatar; import ui.TGComponent; +import java.io.BufferedReader; +import java.io.InputStreamReader; import java.io.Reader; import java.util.*; +import java.util.concurrent.*; public class SecurityGenerationForTMAP implements Runnable { - private String appName; - private TMLMapping<?> tmap; - private String encComp; - private String overhead; - private String decComp; - private Map<String, List<String>> selectedCPUTasks; - private int channelIndex = 0; - - private AVATAR2ProVerif avatar2proverif; - - private Map<TMLChannel, Integer> channelIndexMap = new HashMap<TMLChannel, Integer>(); - - private Map<String, List<HSMChannel>> hsmChannelMap = new HashMap<String, List<HSMChannel>>(); - - private Map<TMLTask, String> taskHSMMap = new HashMap<TMLTask, String>(); - private List<TMLTask> hsmTasks = new ArrayList<TMLTask>(); - - private Map<TMLChannel, SecurityPattern> channelSecMap = new HashMap<TMLChannel, SecurityPattern>(); - private TMLMapping<?> newMap; + //final private String SELECT_CHOICE_HSM = "channelIndex"; + + private final String appName; + private final TMLMapping<?> tmap; + private final String encComp; + private final String overhead; + private final String decComp; + private final List<String> selectedTasks; + private final boolean linkedHSMs; + private int timeOutInSeconds = 0; + + private final Map<TMLTask, List<TMLTask>> taskAndItsHSMMap = new HashMap<>(); + private final Map<TMLTask, List<HwCommunicationNode>> taskHSMCommunicationNodesMap = new HashMap<>(); + private final Map<TMLTask, HwBus> taskAndHSMBusMap = new HashMap<>(); + private final Map<TMLTask, TMLActivityElement> hsmTaskOperationMap = new HashMap<>(); + private final Map<TMLChannel, SecurityPattern> channelNonceSPMap = new HashMap<>(); + private final Map<TMLChannel, TMLChannel> channelTochannelNonceMap = new HashMap<>(); + private final Map<TMLChannel, TMLChannel> channelNonceToHsmMap = new HashMap<>(); + private final Map<TMLChannel, TMLChannel> channelNonceFromHsmMap = new HashMap<>(); + private final Map<TMLTask, TMLRequest> hsmTaskRequestMap = new HashMap<>(); + private final Map<Pair<TMLTask, TMLChannel>, TMLChannel> channelToHsmMap = new HashMap<>(); + private final Map<Pair<TMLTask, TMLChannel>, TMLChannel> channelFromHsmMap = new HashMap<>(); + + public SecurityGenerationForTMAP(String appName, TMLMapping<?> tmap, String encComp, String overhead, String decComp, + List<String> selectedTasks, boolean isLinkedHSMs) { + this.appName = appName; + this.tmap = tmap; + this.overhead = overhead; + this.decComp = decComp; + this.encComp = encComp; + this.selectedTasks = selectedTasks; + this.linkedHSMs = isLinkedHSMs; + } - public SecurityGenerationForTMAP(String appName, TMLMapping<?> tmap, String encComp, String overhead, String decComp, Map<String, List<String>> selectedCPUTasks) { + public SecurityGenerationForTMAP(String appName, TMLMapping<?> tmap, String encComp, String overhead, String decComp, + List<String> selectedTasks, boolean isLinkedHSMs, int timeOutInSeconds) { this.appName = appName; this.tmap = tmap; - this.newMap = tmap; this.overhead = overhead; this.decComp = decComp; this.encComp = encComp; - this.selectedCPUTasks = selectedCPUTasks; + this.selectedTasks = selectedTasks; + this.linkedHSMs = isLinkedHSMs; + this.timeOutInSeconds = timeOutInSeconds; } - public void proverifAnalysis(TMLMapping<?> tmap, List<TMLChannel> nonConfChans, List<TMLChannel> nonWeakAuthChans, List<TMLChannel> nonStrongAuthChans) { + private void proverifAnalysis(TMLMapping<?> tmap, List<TMLChannel> nonConfChans, List<TMLChannel> nonWeakAuthChans, + List<TMLChannel> nonStrongAuthChans) { if (tmap == null) { TraceManager.addDev("No mapping"); return; } //Perform ProVerif Analysis - Object o = null; if (tmap.getTMLModeling().getReference() instanceof TGComponent) { o = ((TGComponent)(tmap.getTMLModeling().getReference())).getTDiagramPanel().tp; } - TML2Avatar t2a = new TML2Avatar(newMap, false, true, o); + TML2Avatar t2a = new TML2Avatar(tmap, false, true, o); AvatarSpecification avatarspec = t2a.generateAvatarSpec("1"); if (avatarspec == null) { TraceManager.addDev("No avatar spec"); return; } - avatar2proverif = new AVATAR2ProVerif(avatarspec); + AVATAR2ProVerif avatar2proverif = new AVATAR2ProVerif(avatarspec); try { - ProVerifSpec proverif = avatar2proverif.generateProVerif(true, true, 3, true, true); - //warnings = avatar2proverif.getWarnings(); - - if (!avatar2proverif.saveInFile("pvspec")) { - return; + ProVerifSpec proverifSpec =avatar2proverif.generateProVerif(true, true, 3, true, true); + + FileUtils.saveFile(ConfigurationTTool.ProVerifCodeDirectory + "pvspec", proverifSpec.getStringSpec()); + String cmd = ConfigurationTTool.ProVerifVerifierPath + " -in pitype " + ConfigurationTTool.ProVerifCodeDirectory + "pvspec"; + final Process[] process = new Process[1]; + final Reader[] data = new Reader[1]; + final ExecutorService executor = Executors.newSingleThreadExecutor(); + if (timeOutInSeconds > 0) { + final Future<?> future = executor.submit(() -> { + try { + process[0] = Runtime.getRuntime().exec(cmd); + data[0] = new BufferedReader(new InputStreamReader(process[0].getInputStream())); + } catch (Exception e) { + TraceManager.addDev("FAILED: executing: " + cmd + ": " + e.getMessage()); + throw new RuntimeException(e); + } + }); + try { + future.get(timeOutInSeconds, TimeUnit.SECONDS); + } catch (TimeoutException | InterruptedException | ExecutionException e) { + future.cancel(true); + throw new RuntimeException(e); + } finally { + executor.shutdown(); + } + } else { + try { + process[0] = Runtime.getRuntime().exec(cmd); + data[0] = new BufferedReader(new InputStreamReader(process[0].getInputStream())); + } catch (Exception e) { + TraceManager.addDev("FAILED: executing: " + cmd + ": " + e.getMessage()); + throw new RuntimeException(e); + } } - - RshClient rshc = new RshClient(ConfigurationTTool.ProVerifVerifierHost); - - rshc.setCmd(ConfigurationTTool.ProVerifVerifierPath + " -in pitype pvspec"); - rshc.sendExecuteCommandRequest(); - Reader data = rshc.getDataReaderFromProcess(); - - ProVerifOutputAnalyzer pvoa = avatar2proverif.getOutputAnalyzer(); - pvoa.analyzeOutput(data, true); + pvoa.analyzeOutput(data[0], true); if (pvoa.getResults().isEmpty()) { TraceManager.addDev("SECGEN ERROR: No security results"); @@ -143,7 +183,7 @@ public class SecurityGenerationForTMAP implements Runnable { Map<AvatarPragmaAuthenticity, ProVerifQueryAuthResult> authenticityResults = pvoa.getAuthenticityResults(); for (TMLChannel ch : tmap.getTMLModeling().getSecChannelMap().keySet()) { if (ch.isCheckConfChannel()) { - List<Integer> confStatus = new ArrayList<Integer>(); + List<Integer> confStatus = new ArrayList<>(); for (AvatarPragma pragma : tmap.getTMLModeling().getSecChannelMap().get(ch)) { if (pragma instanceof AvatarPragmaSecret) { AvatarPragmaSecret pragmaSecret = (AvatarPragmaSecret) pragma; @@ -173,8 +213,8 @@ public class SecurityGenerationForTMAP implements Runnable { } } if (ch.isCheckAuthChannel()) { - List<Integer> weakAuthStatus = new ArrayList<Integer>(); - List<Integer> strongAuthStatus = new ArrayList<Integer>(); + List<Integer> weakAuthStatus = new ArrayList<>(); + List<Integer> strongAuthStatus = new ArrayList<>(); for (AvatarPragma pragma : tmap.getTMLModeling().getSecChannelMap().get(ch)) { if (pragma instanceof AvatarPragmaAuthenticity) { AvatarPragmaAuthenticity pragmaAuth = (AvatarPragmaAuthenticity) pragma; @@ -229,8 +269,7 @@ public class SecurityGenerationForTMAP implements Runnable { } } catch (Exception e) { - System.out.println("SECGEN EXCEPTION " + e); - + TraceManager.addDev("SECGEN EXCEPTION " + e); } } @@ -241,1893 +280,1172 @@ public class SecurityGenerationForTMAP implements Runnable { t.join(); } catch (Exception e) { TraceManager.addDev("SECGEN. Error in Security Generation Thread"); - System.out.println("SECGEN. Error in Security Generation Thread"); } return tmap; } - public boolean portInTask(TMLTask task, TMLChannel ch) { - TMLActivity adTask = task.getActivityDiagram(); - for (TMLActivityElement elem : adTask.getElements()) { - if (elem instanceof TMLWriteChannel) { - TMLWriteChannel writeChannel = (TMLWriteChannel) elem; - for (int i = 0; i < writeChannel.getNbOfChannels(); i++) { - if (writeChannel.getChannel(i).equals(ch)) { - return true; - } - } - } else if (elem instanceof TMLReadChannel) { - TMLReadChannel readChannel = (TMLReadChannel) elem; - for (int i = 0; i < readChannel.getNbOfChannels(); i++) { - if (readChannel.getChannel(i).equals(ch)) { - return true; - } - } - } - } - return false; - } - public void run() { - String title = appName; - // oldmodel = tmap.getTMLModeling(); - Map<TMLTask, HashSet<TMLTask>> toSecure = new HashMap<TMLTask, HashSet<TMLTask>>(); - Map<TMLTask, HashSet<TMLTask>> toSecureRev = new HashMap<TMLTask, HashSet<TMLTask>>(); - Map<TMLTask, HashSet<TMLChannel>> secOutChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - Map<TMLTask, HashSet<TMLChannel>> secInChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - Map<TMLTask, HashSet<TMLChannel>> nonceOutChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - Map<TMLTask, HashSet<TMLChannel>> nonceInChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - Map<TMLTask, HashSet<TMLChannel>> macOutChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - Map<TMLTask, HashSet<TMLChannel>> macInChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - - Map<TMLTask, HashSet<TMLChannel>> hsmSecInChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - Map<TMLTask, HashSet<TMLChannel>> hsmSecOutChannels = new HashMap<TMLTask, HashSet<TMLChannel>>(); - - //TraceManager.addDev("mapping " + tmap.getSummaryTaskMapping()); - - // Map<String, HSMChannel> secChannels = new HashMap<String, HSMChannel>(); - //Map<String, HSMChannel> hsmChannels = new HashMap<String, HSMChannel>(); - - - for (String cpuName : selectedCPUTasks.keySet()) { - for (String task : selectedCPUTasks.get(cpuName)) { - String taskLongName = appName + "__" + task; - hsmTasks.add(tmap.getTaskByName(taskLongName)); - taskHSMMap.put(tmap.getTaskByName(taskLongName), cpuName); - } - hsmChannelMap.put(cpuName, new ArrayList<HSMChannel>()); - } - TMLModeling<?> tmlmodel = tmap.getTMLModeling(); //Proverif Analysis channels - List<TMLChannel> nonConfChans = new ArrayList<TMLChannel>(); - List<TMLChannel> nonWeakAuthChans = new ArrayList<TMLChannel>(); - List<TMLChannel> nonStrongAuthChans = new ArrayList<TMLChannel>(); + List<TMLChannel> nonConfChans = new ArrayList<>(); + List<TMLChannel> nonWeakAuthChans = new ArrayList<>(); + List<TMLChannel> nonStrongAuthChans = new ArrayList<>(); List<TMLChannel> channels = tmlmodel.getChannels(); for (TMLChannel channel : channels) { for (TMLPortWithSecurityInformation p : channel.ports) { - channel.checkConf = channel.checkConf || channel.isEnsureConf()|| p.getCheckConf(); - channel.checkAuth = channel.checkAuth || channel.isEnsureWeakAuth() || channel.isEnsureStrongAuth() || p.getCheckAuth(); + channel.checkConf = channel.checkConf || channel.isSecurityGoalConf()|| p.getCheckConf(); + channel.checkAuth = channel.checkAuth || channel.isSecurityGoalWeakAuth() || channel.isSecurityGoalStrongAuth() || p.getCheckAuth(); } } proverifAnalysis(tmap, nonConfChans, nonWeakAuthChans, nonStrongAuthChans); - - - - //System.out.println("Nonauth " + nonAuthChans); - //System.out.println("NonConf " + nonConfChans); - - //Create clone of Component Diagram + Activity diagrams to secure - // TMLComponentDesignPanel tmlcdp = tmap.getTMLCDesignPanel(); - - //TMLComponentTaskDiagramPanel tcdp = tmlcdp.tmlctdp; - //Create clone of architecture panel and tmap tasks to it - //newarch.renameMapping(tabName, tabName + "_" + name); - - for (TMLTask task : tmap.getTMLModeling().getTasks()) { - HashSet<TMLChannel> tmp = new HashSet<TMLChannel>(); - HashSet<TMLChannel> tmp2 = new HashSet<TMLChannel>(); - HashSet<TMLTask> tmp3 = new HashSet<TMLTask>(); - HashSet<TMLTask> tmp4 = new HashSet<TMLTask>(); - HashSet<TMLChannel> tmp5 = new HashSet<TMLChannel>(); - HashSet<TMLChannel> tmp6 = new HashSet<TMLChannel>(); - HashSet<TMLChannel> tmp7 = new HashSet<TMLChannel>(); - HashSet<TMLChannel> tmp8 = new HashSet<TMLChannel>(); - HashSet<TMLChannel> tmp9 = new HashSet<TMLChannel>(); - HashSet<TMLChannel> tmp10 = new HashSet<TMLChannel>(); - - - 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); - - hsmSecInChannels.put(task, tmp9); - hsmSecOutChannels.put(task, tmp10); - + for (String task : selectedTasks) { + String taskLongName = appName + "__" + task; + initHSMArchDiagram(tmap.getTaskByName(taskLongName)); } - //ToSecure keeps a tmap of origin task: {dest task} for which security operators need to be added - //ToSecureRev keeps a tmap of dest task: {origin task} for which security operators need to be added - - //SecOutChannels are channels which need symmetric encryption operators added - //SecInChannels are channels which need sym decryption operators added - //nonceInChannels are channels which need to send a nonce before receiving the channel data - //nonceOutChannels are channels which need to receive a nonce before sending the channel data - //macInChannels are channels which need verifymac operators added - //macOutChannels are channels which need mac operators added - - //hsmSecInChannels need to send data to the hsm to decrypt after receiving channel data - //hsmSecOutChannels need to send data to the hsm to encrypt before sending channel data //With the proverif results, check which channels need to be secured - for (TMLTask task : tmap.getTMLModeling().getTasks()) { - //Check if all channel operators are secured - TMLActivity taskAD = task.getActivityDiagram(); //FIXME getActivityDiagramName( task ) ) - if (taskAD == null) { - TraceManager.addDev("SECGEN. Null Activity Diagram for " + task.getName()); - continue; - } - - for (TMLChannel chan : tmlmodel.getChannels(task)) { - //Origin and Destination ports can have different names. Therefore, we need to put both names in the list of channels to secure. - /*List<String> portNames = new ArrayList<String>();*/ - boolean nonConf = nonConfChans.contains(chan); - boolean nonWeakAuth = nonWeakAuthChans.contains(chan); - boolean nonStrongAuth = nonStrongAuthChans.contains(chan); - - - /*if (chan.isBasicChannel()) { - portNames.add(chan.getOriginPort().getName()); - portNames.add(chan.getDestinationPort().getName()); - if (nonConfChans.contains(chan.getOriginTask().getTaskName() + "__" + chan.getOriginPort().getName() + "_chData")) { - nonConf = true; - TraceManager.addDev("SECGEN. non conf basic ch = true"); - } - - if (nonAuthChans.contains(chan.getDestinationTask().getTaskName() + "__" + title + "__" + chan.getDestinationPort().getName())) { - nonAuth = true; - } - - //When port names are different - if (nonAuthChans.contains(chan.getDestinationTask().getTaskName() + "__" + chan.getDestinationPort().getName())) { - nonAuth = true; - } - } else { - for (TMLPort port : chan.getOriginPorts()) { - for (TMLTask origTask : chan.getOriginTasks()) { - if (nonConfChans.contains(origTask.getName().split("__")[1] + "__" + port.getName() + "_chData")) { - nonConf = true; - TraceManager.addDev("SECGEN. non conf port ch = true"); - } - } - portNames.add(port.getName()); - } - - - for (TMLTask destTask : chan.getDestinationTasks()) { - for (TMLPort port : chan.getDestinationPorts()) { - if (nonAuthChans.contains(destTask.getName().split("__")[1] + "__" + title + "__" + port.getName())) { - nonAuth = true; - } - if (!portNames.contains(port.getName())) { - portNames.add(port.getName()); - } - } - //System.out.println(destTask.getName().split("__")[1] + "__" + chan.getName()); - if (nonAuthChans.contains(destTask.getName().split("__")[1] + "__" + chan.getDestinationPort().getName())) { - nonAuth = true; - } - - } - //When port names are different - - }*/ - - String secName = chan.getChannelName(); - - //for (String chanName : portNames) { - //Classify channels based on the type of security requirements and unsatisfied properties - if (chan.isBasicChannel()) { - if (chan.isEnsureConf() && nonConf) { - toSecure.get(chan.getOriginTask()).add(chan.getDestinationTask()); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - toSecureRev.get(chan.getDestinationTask()).add(chan.getOriginTask()); - } - if (hsmTasks.contains(chan.getOriginTask())) { - SecurityPattern secPattern = new SecurityPattern("hsmSec_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - if (!hsmSecOutChannels.get(chan.getOriginTask()).contains(chan) && portInTask(chan.getOriginTask(), chan)) { - HSMChannel hsmchan = new HSMChannel(chan, chan.getOriginTask(), HSMChannel.SENC); - hsmChannelMap.get(taskHSMMap.get(chan.getOriginTask())).add(hsmchan); - hsmSecOutChannels.get(chan.getOriginTask()).add(chan); - - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceOutChannels.get(chan.getOriginTask()).add(chan); - hsmchan.nonceName = "nonce_" + chan.getDestinationTask().getTaskName() + "_" + chan.getOriginTask().getTaskName(); - } - } - } else { - if (!secOutChannels.get(chan.getOriginTask()).contains(chan)) { - secOutChannels.get(chan.getOriginTask()).add(chan); - SecurityPattern secPattern = new SecurityPattern("autoEncrypt_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceOutChannels.get(chan.getOriginTask()).add(chan); - } - } - } - - if (hsmTasks.contains(chan.getDestinationTask())) { - if (!hsmSecInChannels.get(chan.getDestinationTask()).contains(chan) && portInTask(chan.getDestinationTask(), chan)) { - HSMChannel hsmchan = new HSMChannel(chan, chan.getDestinationTask(), HSMChannel.DEC); - hsmChannelMap.get(taskHSMMap.get(chan.getDestinationTask())).add(hsmchan); - hsmSecInChannels.get(chan.getDestinationTask()).add(chan); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceInChannels.get(chan.getDestinationTask()).add(chan); - hsmchan.nonceName = - "nonce_" + chan.getDestinationTask().getTaskName() + "_" + chan.getOriginTask().getTaskName(); - } - } - } else { - if (!secInChannels.get(chan.getDestinationTask()).contains(chan)) { - secInChannels.get(chan.getDestinationTask()).add(chan); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceInChannels.get(chan.getDestinationTask()).add(chan); - } - } - } - - } else if (chan.isEnsureWeakAuth() && nonWeakAuth) { - toSecure.get(chan.getOriginTask()).add(chan.getDestinationTask()); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - toSecureRev.get(chan.getDestinationTask()).add(chan.getOriginTask()); - /*} - else { - TMLChannel chantmp = oldmodel.getChannelByShortName("__"+chan.getName()); - System.out.println("Channel found "+ chantmp); - }*/ - - } - if (hsmTasks.contains(chan.getOriginTask())) { - SecurityPattern secPattern = new SecurityPattern("hsmSec_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - if (!hsmSecOutChannels.get(chan.getOriginTask()).contains(chan) && portInTask(chan.getOriginTask(), chan)) { - HSMChannel hsmchan = new HSMChannel(chan, chan.getOriginTask(), HSMChannel.MAC); - hsmChannelMap.get(taskHSMMap.get(chan.getOriginTask())).add(hsmchan); - hsmSecOutChannels.get(chan.getOriginTask()).add(chan); - - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceOutChannels.get(chan.getOriginTask()).add(chan); - hsmchan.nonceName = "nonce_" + chan.getDestinationTask().getTaskName() + "_" + chan.getOriginTask().getTaskName(); - } - } - } else { - if (!macInChannels.get(chan.getOriginTask()).contains(chan)) { - macOutChannels.get(chan.getOriginTask()).add(chan); - SecurityPattern secPattern = new SecurityPattern("autoEncrypt_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceOutChannels.get(chan.getOriginTask()).add(chan); - } - } - } - if (hsmTasks.contains(chan.getDestinationTask())) { - if (!hsmSecInChannels.get(chan.getDestinationTask()).contains(chan) && portInTask(chan.getDestinationTask(), chan)) { - HSMChannel hsmchan = new HSMChannel(chan, chan.getDestinationTask(), HSMChannel.DEC); - hsmChannelMap.get(taskHSMMap.get(chan.getDestinationTask())).add(hsmchan); - hsmSecInChannels.get(chan.getDestinationTask()).add(chan); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceInChannels.get(chan.getDestinationTask()).add(chan); - hsmchan.nonceName = "nonce_" + chan.getDestinationTask().getTaskName() + "_" + chan.getOriginTask().getTaskName(); - } - } - } else { - if (!secInChannels.get(chan.getDestinationTask()).contains(chan)) { - secInChannels.get(chan.getDestinationTask()).add(chan); - if (chan.isEnsureStrongAuth() && nonStrongAuth) { - nonceInChannels.get(chan.getDestinationTask()).add(chan); - } - } - } - } - } else { - //Ignore strong authenticity for fork and join channels - //Only add hsm channel for own port - for (TMLTask orig : chan.getOriginTasks()) { - for (TMLTask dest : chan.getDestinationTasks()) { - if (chan.isEnsureConf() && nonConf) { - toSecure.get(orig).add(dest); - /*if (chan.checkAuth && autoStrongAuth) { - if (!toSecureRev.get(dest).contains(orig)) { - toSecureRev.get(dest).add(orig); - } - }*/ - if (hsmTasks.contains(orig)) { - SecurityPattern secPattern = new SecurityPattern("hsmSec_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - if (!hsmSecOutChannels.get(orig).contains(chan) && portInTask(orig, chan)) { - HSMChannel hsmchan = new HSMChannel(chan, orig, HSMChannel.SENC); - hsmChannelMap.get(taskHSMMap.get(orig)).add(hsmchan); - hsmSecOutChannels.get(orig).add(chan); - - /* if (chan.checkAuth && autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ - } - } else { - if (!secOutChannels.get(orig).contains(chan)) { - secOutChannels.get(orig).add(chan); - SecurityPattern secPattern = new SecurityPattern("autoEncrypt_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - /* if (chan.checkAuth && autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - }*/ - } - } + LinkedHashSet<TMLChannel> chAddCSA = new LinkedHashSet<>(); + LinkedHashSet<TMLChannel> chAddCWA = new LinkedHashSet<>(); + LinkedHashSet<TMLChannel> chAddSA = new LinkedHashSet<>(); + LinkedHashSet<TMLChannel> chAddWA = new LinkedHashSet<>(); + LinkedHashSet<TMLChannel> chAddC = new LinkedHashSet<>(); + + for (TMLChannel chan : tmlmodel.getChannels()) { + boolean nonConf = nonConfChans.contains(chan); + boolean nonWeakAuth = nonWeakAuthChans.contains(chan); + boolean nonStrongAuth = nonStrongAuthChans.contains(chan); + // add Confidentiality and Strong Authenticity + if (chan.isSecurityGoalConf() && chan.isSecurityGoalStrongAuth() && (nonStrongAuth || nonConf)) { + chAddCSA.add(chan); + } + // add Confidentiality and Weak Authenticity + else if (chan.isSecurityGoalConf() && chan.isSecurityGoalWeakAuth() && (nonWeakAuth || nonConf)) { + chAddCWA.add(chan); + } + // add Strong Authenticity + else if (chan.isSecurityGoalStrongAuth() && nonStrongAuth) { + chAddSA.add(chan); + } + // add Weak Authenticity + else if (chan.isSecurityGoalWeakAuth() && nonWeakAuth) { + chAddWA.add(chan); + } + // add Confidentiality + else if (chan.isSecurityGoalConf() && nonConf) { + chAddC.add(chan); + } + } + for (TMLChannel ch : chAddCSA) { + SecurityPattern spNonce = findOrCreateNonceSecurityPattern(ch); + boolean nonceChannelExist = nonceChannelIsCreated(ch); + TMLChannel chNonce = findOrCreateNonceChannel(ch); + String secPatternNameInit = "se_" + ch.getChannelName(); + String secPatternName = secPatternNameInit; + int index = 0; + while (tmap.getSecurityPatternByName(secPatternName) != null) { + secPatternName = secPatternNameInit + index; + index ++; + } - if (hsmTasks.contains(dest)) { - if (!hsmSecInChannels.get(dest).contains(chan) && portInTask(dest, chan)) { - HSMChannel hsmchan = new HSMChannel(chan, dest, HSMChannel.DEC); - hsmChannelMap.get(taskHSMMap.get(dest)).add(hsmchan); - hsmSecInChannels.get(dest).add(chan); - /* if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ - } - } else { - /*if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - }*/ - secInChannels.get(dest).add(chan); - } + SecurityPattern secPattern = new SecurityPattern(secPatternName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", + encComp, decComp, spNonce.getName(), "", ""); + handleSecurityGoalsForChannels(tmlmodel, ch, secPattern, !nonceChannelExist, spNonce, chNonce, linkedHSMs); + } + LinkedHashSet<TMLChannel> chAddCAndCWA = new LinkedHashSet<>(chAddCWA); + chAddCAndCWA.addAll(chAddC); + + for (TMLChannel ch : chAddCAndCWA) { + String secPatternNameInit = "se_" + ch.getChannelName(); + String secPatternName = secPatternNameInit; + int index = 0; + while (tmap.getSecurityPatternByName(secPatternName) != null) { + secPatternName = secPatternNameInit + index; + index ++; + } - } else if (chan.isEnsureWeakAuth() && nonWeakAuth) { - toSecure.get(orig).add(dest); - /* if (autoStrongAuth) { - /* if (chan.getOriginTask().getReferenceObject() instanceof TMLCPrimitiveComponent && chan.getDestinationTask().getReferenceObject() instanceof TMLCPrimitiveComponent) {*/ - /*if (!toSecureRev.get(dest).contains(orig)) { - toSecureRev.get(dest).add(orig); - }*/ - /*} - else { - TMLChannel chantmp = oldmodel.getChannelByShortName("__"+chan.getName()); - System.out.println("Channel found "+ chantmp); - } - - }*/ - if (hsmTasks.contains(orig)) { - SecurityPattern secPattern = new SecurityPattern("hsmSec_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - if (!hsmSecOutChannels.get(orig).contains(chan) && portInTask(orig, chan)) { - HSMChannel hsmchan = new HSMChannel(chan, orig, HSMChannel.MAC); - hsmChannelMap.get(taskHSMMap.get(orig)).add(hsmchan); - hsmSecOutChannels.get(orig).add(chan); - - /*if (autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ - } - } else { - if (!macInChannels.get(orig).contains(chan)) { - macOutChannels.get(orig).add(chan); - SecurityPattern secPattern = new SecurityPattern("autoEncrypt_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); - channelSecMap.put(chan, secPattern); - /* if (autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - }*/ - } - } + SecurityPattern secPattern = new SecurityPattern(secPatternName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", + encComp, decComp, "", "", ""); + handleSecurityGoalsForChannels(tmlmodel, ch, secPattern, false, null, null, linkedHSMs); + } - if (hsmTasks.contains(dest)) { + for (TMLChannel ch : chAddSA) { + SecurityPattern spNonce = findOrCreateNonceSecurityPattern(ch); + boolean nonceChannelExist = nonceChannelIsCreated(ch); + TMLChannel chNonce = findOrCreateNonceChannel(ch); + String secPatternNameInit = "mac_" + ch.getChannelName(); + String secPatternName = secPatternNameInit; + int index = 0; + while (tmap.getSecurityPatternByName(secPatternName) != null) { + secPatternName = secPatternNameInit + index; + index ++; + } - if (!hsmSecInChannels.get(dest).contains(chan) && portInTask(dest, chan)) { - HSMChannel hsmchan = new HSMChannel(chan, dest, HSMChannel.DEC); - hsmChannelMap.get(taskHSMMap.get(dest)).add(hsmchan); - hsmSecInChannels.get(dest).add(chan); - /*if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ - } - } else { - /*if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - }*/ - secInChannels.get(dest).add(chan); - } - } - } - } - } + SecurityPattern secPattern = new SecurityPattern(secPatternName, SecurityPattern.MAC_PATTERN, overhead, "", + encComp, decComp, spNonce.getName(), "", ""); + handleSecurityGoalsForChannels(tmlmodel, ch, secPattern, !nonceChannelExist, spNonce, chNonce, linkedHSMs); + } - //} + for (TMLChannel ch : chAddWA) { + String secPatternNameInit = "mac_" + ch.getChannelName(); + String secPatternName = secPatternNameInit; + int index = 0; + while (tmap.getSecurityPatternByName(secPatternName) != null) { + secPatternName = secPatternNameInit + index; + index ++; } - } - // System.out.println("hsmchannelmap" + hsmChannelMap); - for (TMLChannel chSec : channelSecMap.keySet()) { - TraceManager.addDev("secChannelMap: key=" + chSec + " value= " + channelSecMap.get(chSec).getName()); - } - for (TMLTask tk : macOutChannels.keySet()) { - TraceManager.addDev("macoutchans: key= " + tk.getName() + " value= " + macOutChannels.get(tk)); - } - for (TMLTask tk : macInChannels.keySet()) { - TraceManager.addDev("macinchans: key= " + tk.getName() + " value= " + macInChannels.get(tk)); + SecurityPattern secPattern = new SecurityPattern(secPatternName, SecurityPattern.MAC_PATTERN, overhead, "", + encComp, decComp, "", "", ""); + handleSecurityGoalsForChannels(tmlmodel, ch, secPattern, false, null, null, linkedHSMs); } - for (TMLTask tk : secInChannels.keySet()) { - TraceManager.addDev("nonsecin: key= " + tk.getName() + " value= " + secInChannels.get(tk)); - } - for (TMLTask tk : secOutChannels.keySet()) { - TraceManager.addDev("nonsecout: key= " + tk.getName() + " value= " + secOutChannels.get(tk)); - } - for (TMLTask tk : nonceInChannels.keySet()) { - TraceManager.addDev("noncein: key= " + tk.getName() + " value= " + nonceInChannels.get(tk)); - } - for (TMLTask tk : nonceOutChannels.keySet()) { - TraceManager.addDev("nonceout: key= " + tk.getName() + " value= " + nonceOutChannels.get(tk)); - } - for (TMLTask tk : hsmSecInChannels.keySet()) { - TraceManager.addDev("hsmsecin: key= " + tk.getName() + " value= " + hsmSecInChannels.get(tk)); - } - for (TMLTask tk : hsmSecOutChannels.keySet()) { - TraceManager.addDev("hsmsecout: key= " + tk.getName() + " value= " + hsmSecOutChannels.get(tk)); - } - for (TMLTask tk : toSecureRev.keySet()) { - TraceManager.addDev("tosecrev: key= " + tk.getName() + " value= " + toSecureRev.get(tk)); - } - //Add a HSM Task for each selected CPU on the component diagram, add associated channels, etc - Map<String, List<TMLChannel>> hsmChannelsToMap = new HashMap<String, List<TMLChannel>>(); - //Map<TMLChannel, Set<TMLChannel>> mapHSMChannelsInSameBusesAs = new HashMap<TMLChannel, Set<TMLChannel>>(); - for (String cpuName : selectedCPUTasks.keySet()) { - TMLTask hsm = new TMLTask("HSM_" + cpuName, tmap.getTMLModeling().getTasks().get(0).getReferenceObject(), null); - - TMLAttribute index = new TMLAttribute("channelIndex", new TMLType(TMLType.NATURAL), "0"); - hsm.addAttribute(index); - tmlmodel.addTask(hsm); - //Find all associated tasks - List<TMLTask> comps = new ArrayList<TMLTask>(); - //Find the component to add a HSM to + for (TMLTask hsmTask : hsmTaskOperationMap.keySet()) { + buildHSMActivityDiagram(hsmTask, hsmTaskOperationMap.get(hsmTask)); + TMLTask taskOfHSM = hsmTaskRequestMap.get(hsmTask).getOriginTasks().get(0); + updateHSMArchDiagram(hsmTask, taskAndHSMBusMap.get(taskOfHSM)); + } + } - for (TMLTask task : tmlmodel.getTasks()) { - for (String compName : selectedCPUTasks.get(cpuName)) { - if (task.getTaskName().equals(compName)) { - comps.add(task); - break; - } + private void handleSecurityGoalsForChannels(TMLModeling<?> tmlmodel, TMLChannel ch, SecurityPattern secPattern, boolean nonceGenerationNeeded, + SecurityPattern spNonce, TMLChannel chNonce, boolean isDirectCommunicationHSMs) { + tmlmodel.addSecurityPattern(secPattern); + List<TMLWriteChannel> listWr = writeOperatorsOfChannel(ch.getOriginTask(), ch); + List<TMLReadChannel> listRd = readOperatorsOfChannel(ch.getDestinationTask(), ch); + TMLTask hsmTaskForOriginTask = null; + TMLTask hsmTaskForDestinationTask = null; + TMLChannel chToHSM; + TMLChannel chFromHSM; + TMLChannel chToDestinationHSM = null; + TMLChannel chFromOriginHSM = null; + TMLChannel chSendNonceToHSM; + TMLChannel chReceiveNonceFromHSM; + if (taskAndItsHSMMap.containsKey(ch.getOriginTask())) { + hsmTaskForOriginTask = initHSMTaskDiagram(ch.getOriginTask(), "Encrypt_" + ch.getChannelName()); + } + if (taskAndItsHSMMap.containsKey(ch.getDestinationTask())) { + hsmTaskForDestinationTask = initHSMTaskDiagram(ch.getDestinationTask(), "Decrypt_" + ch.getChannelName()); + if (isDirectCommunicationHSMs) { + if (hsmTaskForOriginTask != null) { + chToDestinationHSM = findOrCreateChannelToHSM(hsmTaskForDestinationTask, hsmTaskForOriginTask, ch); + } else { + chToDestinationHSM = findOrCreateChannelToHSM(hsmTaskForDestinationTask, ch.getOriginTask(), ch); } } - if (comps.isEmpty()) { - //System.out.println("No Components found"); - continue; + } + if (hsmTaskForOriginTask != null) { + chToHSM = findOrCreateChannelToHSM(hsmTaskForOriginTask, ch.getOriginTask(), ch); + addToSecurityTaskMap(hsmTaskForOriginTask, secPattern); + if (!isDirectCommunicationHSMs) { + chFromHSM = findOrCreateChannelFromHSM(hsmTaskForOriginTask, ch.getOriginTask(), ch); + } else { + if (hsmTaskForDestinationTask != null) { + chFromHSM = chToDestinationHSM; + } else { + chFromHSM = findOrCreateChannelFromHSM(hsmTaskForOriginTask, ch.getDestinationTask(), ch); + chFromHSM.checkConf = true; + chFromHSM.checkAuth = true; + chFromHSM.setDestinationTask(ch.getDestinationTask()); + chFromOriginHSM = chFromHSM; + } } - for (TMLTask comp : comps) { - - //Map<String, HSMChannel> compChannels = new HashMap<String, HSMChannel>(); - //String compName = comp.getValue(); - - List<ChannelData> hsmChans = new ArrayList<ChannelData>(); - ChannelData chd = new ChannelData("startHSM_" + cpuName, false, false); - hsmChans.add(chd); - for (HSMChannel hsmChan : hsmChannelMap.get(cpuName)) { - if (!hsmChan.task.equals(comp)) { - continue; - } - if (!channelIndexMap.containsKey(hsmChan.channel)) { - channelIndexMap.put(hsmChan.channel, channelIndex); - channelIndex++; + if (nonceGenerationNeeded) { + if (isDirectCommunicationHSMs) { + chNonce.setDestinationTask(hsmTaskForOriginTask); + chSendNonceToHSM = chNonce; + } else { + chSendNonceToHSM = findOrCreateChannelToSendNonceToHSM(chNonce, hsmTaskForOriginTask); + } + Pair <TMLActivityElement, TMLActivityElement> headerBottomNonceBranch = addNonceExchangeBranchHSM(hsmTaskForOriginTask, chSendNonceToHSM, spNonce, + false); + try { + TMLActivityElement branch = addBranchHSMWithNonce(hsmTaskForOriginTask, chToHSM, chFromHSM, secPattern, true, + headerBottomNonceBranch.getKey(), headerBottomNonceBranch.getValue()); + hsmTaskOperationMap.put(hsmTaskForOriginTask, branch); + } catch (TMLCheckingError e) { + throw new RuntimeException(e); + } + for (TMLWriteChannel wr : listWr) { + if (isDirectCommunicationHSMs) { + communicationWithHSMAD(ch.getOriginTask(), wr, chToHSM, hsmTaskRequestMap.get(hsmTaskForOriginTask)); + } else { + communicationADWithHSMIncludingNonce(ch.getOriginTask(), wr, secPattern, chToHSM, chFromHSM, + hsmTaskRequestMap.get(hsmTaskForOriginTask), spNonce, chNonce, chSendNonceToHSM); } - chd = new ChannelData("data_" + hsmChan.channel.getChannelName() + "_" + hsmChan.task.getTaskName(), false, true); - hsmChans.add(chd); - chd = new ChannelData("retData_" + hsmChan.channel.getChannelName() + "_" + hsmChan.task.getTaskName(), true, true); - hsmChans.add(chd); } - for (ChannelData hsmChan : hsmChans) { - if (!hsmChan.isChan) { - TMLRequest request = new TMLRequest(hsmChan.name, hsm.getReferenceObject()); - if (hsmChan.isOrigin) { - request.addOriginTask(hsm); - request.setDestinationTask(comp); - } else { - request.addOriginTask(comp); - request.setDestinationTask(hsm); - } - hsm.setRequest(request); - comp.setRequest(request); - request.addParam(new TMLType(TMLType.NATURAL)); - tmlmodel.addRequest(request); + } else { + try { + TMLActivityElement branch = addBranchHSM(hsmTaskForOriginTask, chToHSM, chFromHSM, secPattern, true); + hsmTaskOperationMap.put(hsmTaskForOriginTask, branch); + } catch (TMLCheckingError e) { + throw new RuntimeException(e); + } + for (TMLWriteChannel wr : listWr) { + if (isDirectCommunicationHSMs) { + communicationWithHSMAD(ch.getOriginTask(), wr, chToHSM, hsmTaskRequestMap.get(hsmTaskForOriginTask)); } else { - TMLChannel channel = new TMLChannel(hsmChan.name, hsm.getReferenceObject()); - channel.setPorts(new TMLPort(channel.getName(), channel.getReferenceObject()), new TMLPort(channel.getName(), channel.getReferenceObject())); - if (hsmChan.isOrigin) { - channel.setOriginTask(hsm); - channel.setDestinationTask(comp); - comp.addReadTMLChannel(channel); - hsm.addWriteTMLChannel(channel); - } else { - channel.setOriginTask(comp); - channel.setDestinationTask(hsm); - hsm.addReadTMLChannel(channel); - comp.addWriteTMLChannel(channel); - } - - if (hsmChannelsToMap.containsKey(cpuName)) { - if (!hsmChannelsToMap.get(cpuName).contains(channel)) { - hsmChannelsToMap.get(cpuName).add(channel); - } - } else { - List<TMLChannel> hsmChannels = new ArrayList<TMLChannel>(); - - hsmChannels.add(channel); - hsmChannelsToMap.put(cpuName, hsmChannels); - } - - /*Set<TMLChannel> channelsWithSameMapping = new HashSet<TMLChannel>(); - for (TMLReadChannel rdCh: comp.getReadChannels()) { - for(int i=0; i<rdCh.getNbOfChannels(); i++) { - if (rdCh.getChannel(i).isEnsureConf() || rdCh.getChannel(i).isEnsureWeakAuth()) { - if (!channelsWithSameMapping.contains(rdCh.getChannel(i))) { - channelsWithSameMapping.add(rdCh.getChannel(i)); - } - } - } - } - - for (TMLWriteChannel wrCh: comp.getWriteChannels()) { - for(int i=0; i<wrCh.getNbOfChannels(); i++) { - if (wrCh.getChannel(i).isEnsureConf() || wrCh.getChannel(i).isEnsureWeakAuth()) { - if (!channelsWithSameMapping.contains(wrCh.getChannel(i))) { - channelsWithSameMapping.add(wrCh.getChannel(i)); - } - } - } - } - if (mapHSMChannelsInSameBusesAs.containsKey(channel)) { - mapHSMChannelsInSameBusesAs.get(channel).addAll(channelsWithSameMapping); - } else { - mapHSMChannelsInSameBusesAs.put(channel, channelsWithSameMapping); - }*/ - - //hsm.addTMLChannel(channel); /// IN TMLChannel and WriteTMLChannel ?? - - //comp.addTMLChannel(channel); - tmlmodel.addChannel(channel); + communicationWithHSMAD(ch.getOriginTask(), wr, secPattern, chToHSM, chFromHSM, hsmTaskRequestMap.get(hsmTaskForOriginTask)); } } } + } else { + addToSecurityTaskMap(ch.getOriginTask(), secPattern); + TMLActivityElement headElem = ch.getOriginTask().getActivityDiagram().getFirst(); + if (nonceGenerationNeeded) { + headElem = addNonceReceiveAD(ch.getOriginTask(), chNonce, spNonce, listWr, headElem); + } + try { + if (chToDestinationHSM != null) { + addEncryptionADConnectedToOtherHSM(ch.getOriginTask(), listWr, secPattern, chToDestinationHSM, headElem); + } else { + addEncryptionAD(ch.getOriginTask(), listWr, secPattern, headElem); + } + } catch (TMLCheckingError e) { + throw new RuntimeException(e); + } } - /*for (TMLChannel ch : mapHSMChannelsInSameBusesAs.keySet()) { - for (TMLChannel chAs : mapHSMChannelsInSameBusesAs.get(ch)) { - for (HwCommunicationNode comm : tmap.getAllCommunicationNodesOfChannel(chAs)) { - if (comm instanceof HwBus) { - if (!tmap.isCommNodeMappedOn(ch, comm)) { - tmap.addCommToHwCommNode(ch, comm); - } - } - } + if (hsmTaskForDestinationTask != null) { + chFromHSM = findOrCreateChannelFromHSM(hsmTaskForDestinationTask, ch.getDestinationTask(), ch); + addToSecurityTaskMap(hsmTaskForDestinationTask, secPattern); + if (!isDirectCommunicationHSMs) { + chToHSM = findOrCreateChannelToHSM(hsmTaskForDestinationTask, ch.getDestinationTask(), ch); + } else { + chToHSM = chToDestinationHSM; + chToHSM.checkConf = true; + chToHSM.checkAuth = true; } - }*/ - - for (TMLTask task : toSecureRev.keySet()) { - // TraceManager.addDev("Adding nonces to " + task.getName()); - List<TMLChannel> chans = tmlmodel.getChannelsFromMe(task); - for (TMLTask task2 : toSecureRev.get(task)) { - boolean addChan = true; - for (TMLChannel chan : chans) { - if (chan.getDestinationTask() == task2) { - addChan = false; + if (nonceGenerationNeeded) { + if (isDirectCommunicationHSMs) { + chNonce.setOriginTask(hsmTaskForDestinationTask); + chReceiveNonceFromHSM = chNonce; + } else { + chReceiveNonceFromHSM = findOrCreateChannelToReceiveNonceFromHSM(chNonce, hsmTaskForDestinationTask); + } + Pair <TMLActivityElement, TMLActivityElement> headerBottomNonceBranch = addNonceExchangeBranchHSM(hsmTaskForDestinationTask, chReceiveNonceFromHSM, + spNonce, true); + try { + TMLActivityElement branch = addBranchHSMWithNonce(hsmTaskForDestinationTask, chToHSM, chFromHSM, secPattern, false, + headerBottomNonceBranch.getKey(), headerBottomNonceBranch.getValue()); + hsmTaskOperationMap.put(hsmTaskForDestinationTask, branch); + } catch (TMLCheckingError e) { + throw new RuntimeException(e); + } + for (TMLReadChannel rd : listRd) { + if (isDirectCommunicationHSMs) { + communicationWithHSMAD(ch.getDestinationTask(), rd, chFromHSM, hsmTaskRequestMap.get(hsmTaskForDestinationTask)); + } else { + communicationADWithHSMIncludingNonce(ch.getDestinationTask(), rd, secPattern, chToHSM, chFromHSM, + hsmTaskRequestMap.get(hsmTaskForDestinationTask), spNonce, chNonce, chReceiveNonceFromHSM); } } - if (addChan) { - TMLChannel channel = new TMLChannel("nonceCh" + task.getTaskName() + "_" + - task2.getTaskName(), task.getReferenceObject()); - if (tmlmodel.getChannelByName(channel.getName()) == null) { - if (hsmTasks.contains(task)) { - channel.setOriginTask(tmap.getTaskByName("HSM_" + taskHSMMap.get(task))); - tmap.getTaskByName("HSM_" + taskHSMMap.get(task)).addWriteTMLChannel(channel); - } else { - channel.setOriginTask(task); - task.addWriteTMLChannel(channel); - } - - if (hsmTasks.contains(task2)) { - channel.setDestinationTask(tmap.getTaskByName("HSM_" + taskHSMMap.get(task2))); - tmap.getTaskByName("HSM_" + taskHSMMap.get(task2)).addReadTMLChannel(channel); - } else { - channel.setDestinationTask(task2); - task2.addReadTMLChannel(channel); - } - - channel.setPorts(new TMLPort(channel.getName(), channel.getReferenceObject()), new TMLPort(channel.getName(), channel.getReferenceObject())); - tmlmodel.addChannel(channel); + } else { + try { + TMLActivityElement branch = addBranchHSM(hsmTaskForDestinationTask, chToHSM, chFromHSM, secPattern, false); + hsmTaskOperationMap.put(hsmTaskForDestinationTask, branch); + } catch (TMLCheckingError e) { + throw new RuntimeException(e); + } + for (TMLReadChannel rd : listRd) { + if (isDirectCommunicationHSMs) { + communicationWithHSMAD(ch.getDestinationTask(), rd, chFromHSM, hsmTaskRequestMap.get(hsmTaskForDestinationTask)); + } else { + communicationWithHSMAD(ch.getDestinationTask(), rd, secPattern, chToHSM, chFromHSM, hsmTaskRequestMap.get(hsmTaskForDestinationTask)); } - } } - } - - for (String cpuName : selectedCPUTasks.keySet()) { + } else { + if (nonceGenerationNeeded) { + addNonceSendAD(ch.getDestinationTask(), chNonce, spNonce, listRd, ch.getDestinationTask().getActivityDiagram().getFirst(), + hsmTaskForOriginTask != null); + } try { - buildHSMActivityDiagram(cpuName); + if (chFromOriginHSM != null) { + addDecryptionADConnectedToOtherHSM(ch.getDestinationTask(), listRd, secPattern, chFromOriginHSM); + } else { + addDecryptionAD(ch.getDestinationTask(), listRd, secPattern); + } } catch (TMLCheckingError e) { throw new RuntimeException(e); } - //Add a private bus to Hardware Accelerator with the task for hsm - - //Find the CPU the task is mapped to - TMLArchitecture arch = tmap.getArch(); - HwCPU cpu = arch.getHwCPUByName(cpuName); - - if (cpu == null) { - return; + + addToSecurityTaskMap(ch.getDestinationTask(), secPattern); + } + if (nonceGenerationNeeded && !isDirectCommunicationHSMs) { + for (HwCommunicationNode commNode : tmap.getAllCommunicationNodesOfChannel(ch)) { + if (!tmap.isCommNodeMappedOn(chNonce, commNode)) { + tmap.addCommToHwCommNode(chNonce, commNode); + } + } + } + Map<TMLChannel, Set<HwCommunicationNode>> chCommNodesMap = mapHSMChannelsInCommunicationNodes(hsmTaskForOriginTask, + hsmTaskForDestinationTask, ch); + for (TMLChannel chCommNode : chCommNodesMap.keySet()) { + for (HwCommunicationNode commNode : chCommNodesMap.get(chCommNode)) { + tmap.addCommToHwCommNode(chCommNode, commNode); } + } + if (isDirectCommunicationHSMs && (hsmTaskForOriginTask != null || hsmTaskForDestinationTask != null)) { + tmap.getTMLModeling().removeChannel(ch); + tmap.removeCommMapping(ch); + } + } - //Add new memory - HwMemory mem = new HwMemory("HSMMemory_" + cpuName); - arch.addHwNode(mem); - - //Add Hardware Accelerator - HwA hwa = new HwA("HSM_" + cpuName); - arch.addHwNode(hwa); - - //Add hsm task to hwa - TMLTask task = tmap.getTaskByName("HSM_" + cpuName); - if (task != null) { - tmap.addTaskToHwExecutionNode(task, hwa); + private void mergeBusToCommNodeList(List<HwCommunicationNode> listCommNode, Map<TMLChannel, Set<HwCommunicationNode>> chCommNodesMap, + TMLChannel ch) { + for (HwCommunicationNode commNode : listCommNode) { + if (!(commNode instanceof HwMemory)) { + chCommNodesMap.get(ch).add(commNode); } - //Add bus to be connecting to the HWA - HwBus bus = new HwBus("HSMBus_" + cpuName); - bus.privacy = HwBus.BUS_PRIVATE; - arch.addHwNode(bus); - - //Add bridge to be connecting to the 2 buses - HwBridge bridge = new HwBridge("HSMBridge_" + cpuName); - arch.addHwNode(bridge); - - //get bus connected to CPU - HwBus busOfCPU = null; - for (HwLink link : tmap.getArch().getHwLinks()) { - if (link.hwnode == cpu) { - busOfCPU = link.bus; - break; - } + } + } + + private void mergeMemoryToCommNodeList(List<HwCommunicationNode> listCommNode, Map<TMLChannel, Set<HwCommunicationNode>> chCommNodesMap, + TMLChannel ch) { + for (HwCommunicationNode commNode : listCommNode) { + if ((commNode instanceof HwMemory) || chCommNodesMap.get(ch).stream().noneMatch(c -> c instanceof HwMemory)) { + chCommNodesMap.get(ch).add(commNode); } + } + } - for (TMLChannel ch : hsmChannelsToMap.get(cpuName)) { - tmap.addCommToHwCommNode(ch, mem); - tmap.addCommToHwCommNode(ch, bus); - tmap.addCommToHwCommNode(ch, busOfCPU); + private HwBus getAssociatedBusOfTask(TMLTask task) { + HwExecutionNode execNode = tmap.getHwNodeOf(task); + for (HwLink link : tmap.getArch().getHwLinks()) { + if (link.hwnode == execNode) { + return link.bus; } + } + return null; + } - //Connect new Bus and Bridge - HwLink linkBridgeWithNewBus = new HwLink("link_" + bridge.getName() + "_to_" + bus.getName()); - linkBridgeWithNewBus.bus = bus; - linkBridgeWithNewBus.hwnode = bridge; - arch.addHwLink(linkBridgeWithNewBus); - - //Connect the Bus of CPU and Bridge - if (busOfCPU != null) { - HwLink linkBridgeWithBus = new HwLink("link_" + bridge.getName() + "_to_" + busOfCPU.getName()); - linkBridgeWithBus.bus = busOfCPU; - linkBridgeWithBus.hwnode = bridge; - arch.addHwLink(linkBridgeWithBus); + private HwMemory getAssociatedMemoryOfBus(HwBus bus) { + for (HwLink link : tmap.getArch().getHwLinks()) { + if (link.bus == bus && link.hwnode instanceof HwMemory) { + return (HwMemory) link.hwnode; } + } + return null; + } - //Connect Bus and HWA - HwLink linkHWAWithBus = new HwLink("link_" + hwa.getName() + "_to_" + bus.getName()); - linkHWAWithBus.bus = bus; - linkHWAWithBus.hwnode = hwa; - arch.addHwLink(linkHWAWithBus); - - //Connect Bus and Memory - HwLink linkMemoryWithBus = new HwLink("link_" + mem.getName() + "_to_" + bus.getName()); - linkMemoryWithBus.bus = bus; - linkMemoryWithBus.hwnode = mem; - arch.addHwLink(linkMemoryWithBus); - } - - for (TMLTask task : toSecureRev.keySet()) { - // TraceManager.addDev("Adding nonces to " + task.getName()); - - for (TMLTask task2 : toSecureRev.get(task)) { - TMLChannel channel = tmlmodel.getChannelByName("nonceCh" + task.getTaskName() + "_" + task2.getTaskName()); - - List<TMLChannel> chans, chans2; - - chans = tmlmodel.getChannelsToMe(task); - HwMemory memToPutChannel = null; - for (TMLChannel chan : chans) { - if (chan.isCheckAuthChannel()) { - for (HwCommunicationNode mappedNode : tmap.getAllCommunicationNodesOfChannel(chan)) { - if (!(mappedNode instanceof HwMemory)) { - if (!tmap.isCommNodeMappedOn(channel, mappedNode)) { - tmap.addCommToHwCommNode(channel, mappedNode); - } - } - } - HwMemory memoryOfChannel = tmap.getMemoryOfChannel(chan); - if (memoryOfChannel != null) { - memToPutChannel = memoryOfChannel; - } - } + private Map<TMLChannel, Set<HwCommunicationNode>> mapHSMChannelsInCommunicationNodes(TMLTask hsmTaskForOriginTask, + TMLTask hsmTaskForDestinationTask, TMLChannel ch) { + Map<TMLChannel, Set<HwCommunicationNode>> chCommNodesMap = new HashMap<>(); + TMLModeling<?> tmlmodel = tmap.getTMLModeling(); + if (hsmTaskForOriginTask != null) { + TMLTask taskOfHSM = hsmTaskRequestMap.get(hsmTaskForOriginTask).getOriginTasks().get(0); + for (TMLChannel chHSMOrigin : tmlmodel.getChannelsFromMe(hsmTaskForOriginTask)) { + if (!chCommNodesMap.containsKey(chHSMOrigin)) { + chCommNodesMap.put(chHSMOrigin, new LinkedHashSet<>()); } - - if (hsmTasks.contains(task)) { - chans = tmlmodel.getChannelsFromMe(tmap.getTaskByName("HSM_" + taskHSMMap.get(task))); - for (TMLChannel chan : chans) { - for (HwCommunicationNode mappedNode : tmap.getAllCommunicationNodesOfChannel(chan)) { - if (!(mappedNode instanceof HwMemory)) { - if (!tmap.isCommNodeMappedOn(channel, mappedNode)) { - tmap.addCommToHwCommNode(channel, mappedNode); - } - } - } - HwMemory memoryOfChannel = tmap.getMemoryOfChannel(chan); - if (memoryOfChannel != null) { - memToPutChannel = memoryOfChannel; - } - } + if (taskHSMCommunicationNodesMap.containsKey(taskOfHSM)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(taskOfHSM), chCommNodesMap, chHSMOrigin); + mergeMemoryToCommNodeList(taskHSMCommunicationNodesMap.get(taskOfHSM), chCommNodesMap, chHSMOrigin); } - if (memToPutChannel != null) { - if (!tmap.isCommNodeMappedOn(channel, memToPutChannel)) { - tmap.addCommToHwCommNode(channel, memToPutChannel); - } + TMLTask corresTask = null; + if (hsmTaskRequestMap.containsKey(chHSMOrigin.getDestinationTask())) { + corresTask = hsmTaskRequestMap.get(chHSMOrigin.getDestinationTask()).getOriginTasks().get(0); } - chans2 = tmlmodel.getChannelsFromMe(task2); - for (TMLChannel chan2 : chans2) { - if (chan2.isCheckAuthChannel()) { - for (HwCommunicationNode mappedNode : tmap.getAllCommunicationNodesOfChannel(chan2)) { - if (!(mappedNode instanceof HwMemory)) { - if (!tmap.isCommNodeMappedOn(channel, mappedNode)) { - tmap.addCommToHwCommNode(channel, mappedNode); - } - } - } - } + if (corresTask != null && taskHSMCommunicationNodesMap.containsKey(corresTask)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(corresTask), chCommNodesMap, chHSMOrigin); + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMOrigin); + } else if (chHSMOrigin.getDestinationTask().equals(ch.getOriginTask())) { + chCommNodesMap.get(chHSMOrigin).add(getAssociatedBusOfTask(chHSMOrigin.getDestinationTask())); + } else { + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMOrigin); } + } - if (hsmTasks.contains(task2)) { - chans2 = tmlmodel.getChannelsToMe(tmap.getTaskByName("HSM_" + taskHSMMap.get(task2))); - for (TMLChannel chan2 : chans2) { - for (HwCommunicationNode mappedNode : tmap.getAllCommunicationNodesOfChannel(chan2)) { - if (!(mappedNode instanceof HwMemory)) { - if (!tmap.isCommNodeMappedOn(channel, mappedNode)) { - tmap.addCommToHwCommNode(channel, mappedNode); - } - } - } - } + for (TMLChannel chHSMOrigin : tmlmodel.getChannelsToMe(hsmTaskForOriginTask)) { + if (!chCommNodesMap.containsKey(chHSMOrigin)) { + chCommNodesMap.put(chHSMOrigin, new LinkedHashSet<>()); + } + if (taskHSMCommunicationNodesMap.containsKey(taskOfHSM)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(taskOfHSM), chCommNodesMap, chHSMOrigin); + } + TMLTask corresTask = null; + if (hsmTaskRequestMap.containsKey(chHSMOrigin.getOriginTask())) { + corresTask = hsmTaskRequestMap.get(chHSMOrigin.getOriginTask()).getOriginTasks().get(0); + } + if (corresTask != null && taskHSMCommunicationNodesMap.containsKey(corresTask)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(corresTask), chCommNodesMap, chHSMOrigin); + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMOrigin); + } else if (chHSMOrigin.getOriginTask().equals(ch.getOriginTask())) { + mapChannelsInArch(chCommNodesMap, taskOfHSM, chHSMOrigin); + } else { + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMOrigin); + mapChannelsInArch(chCommNodesMap, taskOfHSM, chHSMOrigin); + } + } + } + if (hsmTaskForDestinationTask != null) { + TMLTask taskOfHSM = hsmTaskRequestMap.get(hsmTaskForDestinationTask).getOriginTasks().get(0); + for (TMLChannel chHSMDestination : tmlmodel.getChannelsFromMe(hsmTaskForDestinationTask)) { + if (!chCommNodesMap.containsKey(chHSMDestination)) { + chCommNodesMap.put(chHSMDestination, new LinkedHashSet<>()); + } + if (taskHSMCommunicationNodesMap.containsKey(taskOfHSM)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(taskOfHSM), chCommNodesMap, chHSMDestination); + mergeMemoryToCommNodeList(taskHSMCommunicationNodesMap.get(taskOfHSM), chCommNodesMap, chHSMDestination); + } + TMLTask corresTask = null; + if (hsmTaskRequestMap.containsKey(chHSMDestination.getDestinationTask())) { + corresTask = hsmTaskRequestMap.get(chHSMDestination.getDestinationTask()).getOriginTasks().get(0); + } + if (corresTask != null && taskHSMCommunicationNodesMap.containsKey(corresTask)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(corresTask), chCommNodesMap, chHSMDestination); + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMDestination); + } else if (chHSMDestination.getDestinationTask().equals(ch.getDestinationTask())) { + chCommNodesMap.get(chHSMDestination).add(getAssociatedBusOfTask(chHSMDestination.getDestinationTask())); + } else { + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMDestination); + } + } + for (TMLChannel chHSMDestination : tmlmodel.getChannelsToMe(hsmTaskForDestinationTask)) { + if (!chCommNodesMap.containsKey(chHSMDestination)) { + chCommNodesMap.put(chHSMDestination, new LinkedHashSet<>()); + } + if (taskHSMCommunicationNodesMap.containsKey(taskOfHSM)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(taskOfHSM), chCommNodesMap, chHSMDestination); + } + TMLTask corresTask = null; + if (hsmTaskRequestMap.containsKey(chHSMDestination.getOriginTask())) { + corresTask = hsmTaskRequestMap.get(chHSMDestination.getOriginTask()).getOriginTasks().get(0); + } + if (corresTask != null && taskHSMCommunicationNodesMap.containsKey(corresTask)) { + mergeBusToCommNodeList(taskHSMCommunicationNodesMap.get(corresTask), chCommNodesMap, chHSMDestination); + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMDestination); + } else if (chHSMDestination.getOriginTask().equals(ch.getDestinationTask())) { + mapChannelsInArch(chCommNodesMap, taskOfHSM, chHSMDestination); + } else { + mergeBusToCommNodeList(tmap.getAllCommunicationNodesOfChannel(ch), chCommNodesMap, chHSMDestination); + mapChannelsInArch(chCommNodesMap, taskOfHSM, chHSMDestination); } } } + return chCommNodesMap; + } - // } - //Add encryption/nonces to activity diagram - for (TMLTask task : toSecure.keySet()) { - TraceManager.addDev("Securing task " + task.getName()); - TMLActivity taskAD = task.getActivityDiagram(); - if (taskAD == null) { - continue; + private void mapChannelsInArch(Map<TMLChannel, Set<HwCommunicationNode>> chCommNodesMap, TMLTask taskOfHSM, TMLChannel chHSMDestination) { + List<HwCommunicationNode> listCommNode = new ArrayList<>(); + HwBus bus = getAssociatedBusOfTask(chHSMDestination.getOriginTask()); + if (bus != null) { + listCommNode.add(bus); + mergeBusToCommNodeList(listCommNode, chCommNodesMap, chHSMDestination); + HwMemory mem = getAssociatedMemoryOfBus(bus); + if (mem != null) { + listCommNode.clear(); + listCommNode.add(mem); + mergeMemoryToCommNodeList(listCommNode, chCommNodesMap, chHSMDestination); + } else { + mergeMemoryToCommNodeList(taskHSMCommunicationNodesMap.get(taskOfHSM), chCommNodesMap, chHSMDestination); } - - TMLActivityElement fromStart = taskAD.getFirst(); - //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 (TMLChannel channel : secOutChannels.get(task)) { - Set<TMLActivityElement> channelInstances = new HashSet<TMLActivityElement>(); - //First, find the connector that points to it. We will add the encryption, nonce operators directly before the write channel operator - for (TMLActivityElement elem : taskAD.getElements()) { - if (elem instanceof TMLWriteChannel) { - TMLWriteChannel writeChannel = (TMLWriteChannel) elem; - for (int i = 0; i < writeChannel.getNbOfChannels(); i++) { - if (writeChannel.getChannel(i).getName().equals(channel.getName()) && writeChannel.getSecurityPattern() == null) { - if (fromStart != null) { - channelInstances.add(elem); - } - } - } - } - } - for (TMLActivityElement elem : channelInstances) { - - //Add encryption operator - TMLExecC encC = new TMLExecC(channelSecMap.get(channel).getName(), taskAD.getReferenceObject()); - encC.setSecurityPattern(channelSecMap.get(channel)); - encC.setAction(Integer.toString(channelSecMap.get(channel).getEncTime())); - tmlmodel.addSecurityPattern(channelSecMap.get(channel)); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(channel))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(channel)).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(channel)).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(channel), listTask); - } - - TMLActivityElement prevElem = taskAD.getPrevious(elem); - if (nonceOutChannels.get(task).contains(channel)) { - SecurityPattern secPatternNonce = new SecurityPattern("nonce_" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName(), SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - encC.getSecurityPattern().setNonce(secPatternNonce.getName()); - boolean addNewReadNonce = true; - for (TMLActivityElement elemT : taskAD.getElements()) { - if (elemT instanceof TMLReadChannel) { - TMLReadChannel readElem = (TMLReadChannel) elemT; - if (readElem.getSecurityPattern() != null) { - if(readElem.getSecurityPattern().getName().equals(secPatternNonce.getName())) { - addNewReadNonce = false; - break; - } - } - } - } - if (addNewReadNonce) { - //Receive any nonces if ensuring authenticity - TMLReadChannel rd = new TMLReadChannel("", taskAD.getReferenceObject()); - //System.out.println("tmlc " + tmlc); - //System.out.println("Checking "+ tmlc.getDestinationTask() + " " + tmlc.getOriginTask()); - List<TMLChannel> matches = tmlmodel.getChannels(channel.getDestinationTask(), channel.getOriginTask()); - - if (!matches.isEmpty()) { - rd.setName(matches.get(0).getChannelName()); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - } else { - rd.setName("nonceCh" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName()); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - } - rd.setSecurityPattern(secPatternNonce); - rd.setNbOfSamples("1"); - TMLActivityElement nextFirst = taskAD.getFirst().getNextElement(0); - taskAD.getFirst().setNewNext(nextFirst, rd); - rd.addNext(nextFirst); - taskAD.addElement(rd); - //Move encryption operator after receive nonce component - - } - } - prevElem = taskAD.getPrevious(elem); - prevElem.setNewNext(elem, encC); - encC.addNext(elem); - taskAD.addElement(encC); - - //Add security contexts to write channels - for (TMLActivityElement elemAC : taskAD.getElements()) { - if (elemAC instanceof TMLWriteChannel) { - TMLWriteChannel wChannel = (TMLWriteChannel) elemAC; - for (int i=0; i < wChannel.getNbOfChannels(); i++) { - if (channel.equals(wChannel.getChannel(i)) && wChannel.getSecurityPattern() == null) { - wChannel.setSecurityPattern(channelSecMap.get(channel)); - // wChannel.setEncForm(true); - } - } - } - } - } + } + } + + private TMLTask initHSMTaskDiagram(TMLTask task, String nameHSM) { + String hsmTaskNameInit = appName + "__" + "HSM_" + task.getTaskName() + "_" + nameHSM; + int index = 0; + String hsmTaskName = hsmTaskNameInit; + while (tmap.getTaskByName(hsmTaskName) != null) { + hsmTaskName = hsmTaskNameInit + index; + index ++; + } + TMLTask hsm = new TMLTask(hsmTaskName, task.getReferenceObject(), null); + //TMLAttribute attribute = new TMLAttribute(SELECT_CHOICE_HSM, new TMLType(TMLType.NATURAL), "0"); + //hsm.addAttribute(attribute); + tmap.getTMLModeling().addTask(hsm); + if (taskAndItsHSMMap.containsKey(task)) { + if (!taskAndItsHSMMap.get(task).contains(hsm)) { + taskAndItsHSMMap.get(task).add(hsm); } + } - for (TMLChannel channel : macOutChannels.get(task)) { - //Add MAC before writechannel - Set<TMLActivityElement> channelInstances = new HashSet<TMLActivityElement>(); - for (TMLActivityElement elem : taskAD.getElements()) { - if (elem instanceof TMLWriteChannel) { - TMLWriteChannel writeChannel = (TMLWriteChannel) elem; - for (int i=0; i < writeChannel.getNbOfChannels(); i++) { - if (writeChannel.getChannel(i).getName().equals(channel.getName()) && writeChannel.getSecurityPattern() == null) { - fromStart = taskAD.getPrevious(elem); - if (fromStart != null) { - channelInstances.add(elem); - } - } - } - } - } - for (TMLActivityElement elem : channelInstances) { - //SecurityPattern secPattern = new SecurityPattern(channelSecMap.get(channel), SecurityPattern.MAC_PATTERN, overhead, overhead, encComp, decComp, "", "", ""); - channelSecMap.get(channel).setType(SecurityPattern.MAC_PATTERN); - TMLExecC encC = new TMLExecC(channelSecMap.get(channel).getName(), taskAD.getReferenceObject()); - encC.setSecurityPattern(channelSecMap.get(channel)); - encC.setAction(Integer.toString(channelSecMap.get(channel).getEncTime())); - tmlmodel.addSecurityPattern(channelSecMap.get(channel)); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(channel))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(channel)).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(channel)).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(channel), listTask); - } + String hsmRequestNameInit = appName + "__" + "req_" + hsm.getTaskName(); + int indexRequest = 0; + String hsmRequestName = hsmRequestNameInit; + while (tmap.getTMLModeling().getRequestByName(hsmRequestName) != null) { + hsmRequestName = hsmRequestNameInit + indexRequest; + indexRequest ++; + } + TMLRequest request = new TMLRequest(hsmRequestName, hsm.getReferenceObject()); + request.addOriginTask(task); + request.setDestinationTask(hsm); + hsm.setRequest(request); + hsm.setRequested(true); + //task.setRequest(request); + // request.addParam(new TMLType(TMLType.NATURAL)); + tmap.getTMLModeling().addRequest(request); + hsmTaskRequestMap.put(hsm, request); + // taskHSMBranchesMap.put(hsm, new ArrayList<>()); + return hsm; + } - TMLActivityElement prevElem = taskAD.getPrevious(elem); - if (nonceOutChannels.get(task).contains(channel)) { - SecurityPattern secPatternNonce = new SecurityPattern("nonce_" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName(), SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - encC.getSecurityPattern().setNonce(secPatternNonce.getName()); - boolean addNewReadNonce = true; - for (TMLActivityElement elemT : taskAD.getElements()) { - if (elemT instanceof TMLReadChannel) { - TMLReadChannel readElem = (TMLReadChannel) elemT; - if (readElem.getSecurityPattern() != null) { - if(readElem.getSecurityPattern().getName().equals(secPatternNonce.getName())) { - addNewReadNonce = false; - break; - } - } - } - } - if (addNewReadNonce) { - //If we need to receive a nonce - TMLReadChannel rd = new TMLReadChannel("", taskAD.getReferenceObject()); - //Receive any nonces if ensuring authenticity - List<TMLChannel> matches = tmlmodel.getChannels(channel.getDestinationTask(), channel.getOriginTask()); - if (!matches.isEmpty()) { - rd.setName(matches.get(0).getChannelName()); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - } else { - rd.setName("nonceCh" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName()); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - } - rd.setSecurityPattern(secPatternNonce); - rd.setNbOfSamples("1"); - TMLActivityElement nextFirst = taskAD.getFirst().getNextElement(0); - taskAD.getFirst().setNewNext(nextFirst, rd); - rd.addNext(nextFirst); - taskAD.addElement(rd); - - } - } - //Add encryption operator - prevElem = taskAD.getPrevious(elem); - prevElem.setNewNext(elem, encC); - encC.addNext(elem); - taskAD.addElement(encC); - //Add security contexts to write channels - for (TMLActivityElement elemA : taskAD.getElements()) { - if (elemA instanceof TMLWriteChannel) { - TMLWriteChannel wChannel = (TMLWriteChannel) elemA; - for (int i=0; i < wChannel.getNbOfChannels(); i++) { - if (channel.equals(wChannel.getChannel(i)) && wChannel.getSecurityPattern() == null) { - wChannel.setSecurityPattern(channelSecMap.get(channel)); - // wChannel.setEncForm(true); - } - } - } - } - } - } - for (TMLChannel channel : hsmSecOutChannels.get(task)) { - Set<TMLActivityElement> channelInstances = new HashSet<TMLActivityElement>(); - for (TMLActivityElement elem : taskAD.getElements()) { - if (elem instanceof TMLWriteChannel) { - TMLWriteChannel writeChannel = (TMLWriteChannel) elem; - for (int i=0; i < writeChannel.getNbOfChannels(); i++) { - if (writeChannel.getChannel(i).equals(channel) && writeChannel.getSecurityPattern() == null) { - fromStart = taskAD.getPrevious(elem); - if (fromStart != null) { - channelInstances.add(elem); - } - } - } - } - } - for (TMLActivityElement chan : channelInstances) { - TMLWriteChannel writeChannel = (TMLWriteChannel) chan; - //String chanName = writeChannel.getChannel(0).getName().replaceAll(title + "__", ""); - writeChannel.setSecurityPattern(channelSecMap.get(channel)); - // writeChannel.setEncForm(true); - fromStart = taskAD.getPrevious(chan); - - TMLSendRequest reqSend = new TMLSendRequest("startHSM_" + taskHSMMap.get(task), taskAD.getReferenceObject()); - - TMLRequest req = tmlmodel.getRequestByName(reqSend.getName()); - if (req != null) { - reqSend.setRequest(req); - } + private void buildHSMActivityDiagram(TMLTask hsmTask, TMLActivityElement branchHeader) { + TMLActivity hsmTaskAD = hsmTask.getActivityDiagram(); + TMLActivityElement start = hsmTaskAD.getFirst(); + if (start == null) { + start = new TMLStartState("start", hsmTaskAD.getReferenceObject()); + hsmTaskAD.setFirst(start); + } + start.addNext(branchHeader); + } - if (reqSend.getNbOfParams() > 0) { - reqSend.setParam(Integer.toString(channelIndexMap.get(channel)), 0); - } else { - reqSend.addParam(Integer.toString(channelIndexMap.get(channel))); - } - - fromStart.setNewNext(chan, reqSend); - taskAD.addElement(reqSend); - //Add write channel operator - TMLWriteChannel wr = new TMLWriteChannel("data_" + channel.getChannelName() + "_" + task.getTaskName(), - taskAD.getReferenceObject()); - if (tmlmodel.getChannelByName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByName(wr.getName())); - } else if (tmlmodel.getChannelByShortName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByShortName(wr.getName())); - } - wr.setNbOfSamples("1"); - // wr.setEncForm(false); - //wr.securityPattern = channelSecMap.get(chanName); - taskAD.addElement(wr); - reqSend.addNext(wr); - wr.addNext(chan); - //Receive any nonces if ensuring authenticity - /* if (nonceOutChannels.get(task).contains(channel)) { - //Read nonce from rec task - - List<TMLChannel> matches = tmlmodel.getChannels(tmlc.getDestinationTask(), tmlc.getOriginTask()); - TMLReadChannel rd = new TMLReadChannel("", taskAD.getReferenceObject()); - if (matches.size() > 0) { - rd.setName(matches.get(0).getName().replaceAll(title + "__", "")); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - } else { - rd.setName("nonceCh" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - } - SecurityPattern secPatternNonce = new SecurityPattern("nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1], SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - secPatternNonce.originTask = rd.getChannel(0).getOriginTask().getName().replaceAll(title + "__", ""); - rd.securityPattern = secPatternNonce; - rd.setNbOfSamples("1"); - taskAD.addElement(rd); - fromStart.setNewNext(reqSend, rd); - rd.addNext(reqSend); - //wr.setNewNext(chan, rd); - - TMLWriteChannel wr2 = new TMLWriteChannel("data_" + chanName + "_" + task.getName().split("__")[1], taskAD.getReferenceObject()); - if (tmlmodel.getChannelByName(wr2.getName()) != null) { - wr2.addChannel(tmlmodel.getChannelByName(wr2.getName())); - } else if (tmlmodel.getChannelByShortName(wr2.getName()) != null) { - wr2.addChannel(tmlmodel.getChannelByShortName(wr2.getName())); - } - wr2.setNbOfSamples("1"); - wr2.securityPattern = secPatternNonce; - taskAD.addElement(wr2); - reqSend.setNewNext(wr, wr2); - wr2.addNext(wr); - } */ - - //Read channel operator to receive hsm data - TMLReadChannel rd2 = new TMLReadChannel("retData_" + channel.getChannelName() + "_" + task.getTaskName(), - taskAD.getReferenceObject()); - if (tmlmodel.getChannelByName(rd2.getName()) != null) { - rd2.addChannel(tmlmodel.getChannelByName(rd2.getName())); - } else if (tmlmodel.getChannelByShortName(rd2.getName()) != null) { - rd2.addChannel(tmlmodel.getChannelByShortName(rd2.getName())); - } - rd2.setSecurityPattern(channelSecMap.get(channel)); - rd2.setNbOfSamples("1"); - taskAD.addElement(rd2); + private void updateHSMArchDiagram(TMLTask hsmTask, HwBus bus) { + TMLArchitecture arch = tmap.getArch(); + //Add Hardware Accelerator + HwA hwa = new HwA("HwA_" + hsmTask.getTaskName()); + arch.addHwNode(hwa); + + //Connect Bus and HWA + HwLink linkHWAWithBus = new HwLink("link_" + hwa.getName() + "_to_" + bus.getName()); + linkHWAWithBus.bus = bus; + linkHWAWithBus.hwnode = hwa; + arch.addHwLink(linkHWAWithBus); + tmap.addTaskToHwExecutionNode(hsmTask, hwa); + } - fromStart = taskAD.getPrevious(chan); - fromStart.setNewNext(chan, rd2); - rd2.addNext(chan); - } + private void initHSMArchDiagram(TMLTask task) { + TMLArchitecture arch = tmap.getArch(); + List<HwCommunicationNode> communicationNodesOfHSM = new ArrayList<>(); + //Find the CPU where the task is mapped to + HwExecutionNode cpuTask = tmap.getHwNodeOf(task); + + if (cpuTask == null) { + return; + } + + //Add new memory + HwMemory mem = new HwMemory("Memory_HSM_" + task.getTaskName()); + arch.addHwNode(mem); + communicationNodesOfHSM.add(mem); + + //Add bus to be connecting to the HWA and new memory + HwBus bus = new HwBus("Bus_HSM_" + task.getTaskName()); + bus.privacy = HwBus.BUS_PRIVATE; + arch.addHwNode(bus); + communicationNodesOfHSM.add(bus); + taskAndHSMBusMap.put(task, bus); + + //Add bridge to be connecting to the 2 buses + HwBridge bridge = new HwBridge("Bridge_HSM_" + task.getTaskName()); + arch.addHwNode(bridge); + + //get bus connected to CPU + HwBus busOfCPUTask = null; + for (HwLink link : tmap.getArch().getHwLinks()) { + if (link.hwnode == cpuTask) { + busOfCPUTask = link.bus; + break; } + } - for (TMLChannel channel : hsmSecInChannels.get(task)) { - //System.out.println("Checking hsmsecinchannel " + channel + " " + task.getName()); - Set<TMLActivityElement> channelInstances = new HashSet<TMLActivityElement>(); - //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); - for (TMLActivityElement elem : taskAD.getElements()) { - if (elem instanceof TMLReadChannel) { - TMLReadChannel readChannel = (TMLReadChannel) elem; - for (int i=0; i<readChannel.getNbOfChannels(); i++) { - if (readChannel.getChannel(i).equals(channel) && readChannel.getSecurityPattern() == null) { - fromStart = taskAD.getPrevious(elem); - if (fromStart != null) { - channelInstances.add(elem); - } - } - } - } - } - //System.out.println("matches " + channelInstances); - for (TMLActivityElement chan : channelInstances) { - TMLReadChannel readChannel = (TMLReadChannel) chan; - //String chanName = readChannel.getChannel(0).getName().replaceAll(title + "__", ""); - - readChannel.setSecurityPattern(channelSecMap.get(channel)); - // readChannel.setEncForm(true); - - fromStart = taskAD.getPrevious(chan); - TMLActivityElement nextReadCh = chan.getNextElement(0); - - TMLSendRequest reqSend = new TMLSendRequest("startHSM_" + taskHSMMap.get(task), taskAD.getReferenceObject()); - TMLRequest req = tmlmodel.getRequestByName(reqSend.getName()); - if (req != null) { - reqSend.setRequest(req); - } - if (reqSend.getNbOfParams() > 0) { - reqSend.setParam(Integer.toString(channelIndexMap.get(channel)), 0); - } else { - reqSend.addParam(Integer.toString(channelIndexMap.get(channel))); - } - taskAD.addElement(reqSend); - fromStart.setNewNext(chan, reqSend); - reqSend.addNext(chan); - - //Add write channel operator - TMLWriteChannel wr = new TMLWriteChannel("data_" + channel.getChannelName() + "_" + task.getTaskName(), - taskAD.getReferenceObject()); - if (tmlmodel.getChannelByName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByName(wr.getName())); - } else if (tmlmodel.getChannelByShortName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByShortName(wr.getName())); - } - wr.setSecurityPattern(channelSecMap.get(channel)); - wr.setNbOfSamples("1"); - taskAD.addElement(wr); - - //Add connector between request and write - chan.setNewNext(nextReadCh, wr); - - - /*if (nonceInChannels.get(task).contains(channel)) { - //Create a nonce operator and a write channel operator - TMLExecC nonce = new TMLExecC("nonce_" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1], taskAD.getReferenceObject()); - SecurityPattern secNonce = new SecurityPattern(nonce.getName(), SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - - nonce.securityPattern = secNonce; - nonce.securityPattern.setProcess(SecurityPattern.ENCRYPTION_PROCESS); - nonce.setAction(Integer.toString(secNonce.encTime)); - - tmlmodel.addSecurityPattern(secNonce); - if (tmlmodel.securityTaskMap.containsKey(secNonce)) { - if (!tmlmodel.securityTaskMap.get(secNonce).contains(task)) { - tmlmodel.securityTaskMap.get(secNonce).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.securityTaskMap.put(secNonce, listTask); - } - - taskAD.addElement(nonce); - fromStart.setNewNext(chan, nonce); - - TMLWriteChannel wr3 = new TMLWriteChannel("", taskAD.getReferenceObject()); - //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) { - wr3.setName(matches.get(0).getName().replaceAll(title + "__", "")); - if (tmlmodel.getChannelByName(wr3.getName()) != null) { - wr3.addChannel(tmlmodel.getChannelByName(wr3.getName())); - } else if (tmlmodel.getChannelByShortName(wr3.getName()) != null) { - wr3.addChannel(tmlmodel.getChannelByShortName(wr3.getName())); - } - } else { - wr3.setName("nonceCh" + tmlc.getDestinationTask().getName().split("__")[1] + "_" + tmlc.getOriginTask().getName().split("__")[1]); - if (tmlmodel.getChannelByName(wr3.getName()) != null) { - wr3.addChannel(tmlmodel.getChannelByName(wr3.getName())); - } else if (tmlmodel.getChannelByShortName(wr3.getName()) != null) { - wr3.addChannel(tmlmodel.getChannelByShortName(wr3.getName())); - } - } - //send the nonce along the channel - secNonce.originTask = wr3.getChannel(0).getOriginTask().getName().replaceAll(title + "__", ""); - wr3.securityPattern = secNonce; - - wr3.setNbOfSamples("1"); - taskAD.addElement(wr3); - nonce.addNext(wr3); - wr3.addNext(chan); - - //Also send nonce to hsm - TMLWriteChannel wr2 = new TMLWriteChannel("data_" + chanName + "_" + task.getName().split("__")[1], taskAD.getReferenceObject()); - if (tmlmodel.getChannelByName(wr2.getName()) != null) { - wr2.addChannel(tmlmodel.getChannelByName(wr2.getName())); - } else if (tmlmodel.getChannelByShortName(wr2.getName()) != null) { - wr2.addChannel(tmlmodel.getChannelByShortName(wr2.getName())); - } - wr2.securityPattern = secNonce; - wr2.setNbOfSamples("1"); - taskAD.addElement(wr2); + //Connect new Bus and Bridge + HwLink linkBridgeWithNewBus = new HwLink("link_" + bridge.getName() + "_to_" + bus.getName()); + linkBridgeWithNewBus.bus = bus; + linkBridgeWithNewBus.hwnode = bridge; + arch.addHwLink(linkBridgeWithNewBus); + + //Connect the Bus of CPU and Bridge + if (busOfCPUTask != null) { + HwLink linkBridgeWithBus = new HwLink("link_" + bridge.getName() + "_to_" + busOfCPUTask.getName()); + linkBridgeWithBus.bus = busOfCPUTask; + linkBridgeWithBus.hwnode = bridge; + arch.addHwLink(linkBridgeWithBus); + communicationNodesOfHSM.add(busOfCPUTask); + } - reqSend.setNewNext(wr, wr2); - wr2.addNext(wr); - }*/ + //Connect Bus and Memory + HwLink linkMemoryWithBus = new HwLink("link_" + mem.getName() + "_to_" + bus.getName()); + linkMemoryWithBus.bus = bus; + linkMemoryWithBus.hwnode = mem; + arch.addHwLink(linkMemoryWithBus); + taskHSMCommunicationNodesMap.put(task, communicationNodesOfHSM); + List<TMLTask> listTask = new ArrayList<>(); + taskAndItsHSMMap.put(task, listTask); + } - //Add read channel operator + private TMLActivityElement addBranchHSM(TMLTask hsmTask, TMLChannel dataCh, TMLChannel retrieveDataCh, SecurityPattern sp, + boolean isEncryption) throws TMLCheckingError { + TMLActivity hsmTaskAD = hsmTask.getActivityDiagram(); + TMLReadChannel rd = new TMLReadChannel(dataCh.getName(), hsmTaskAD.getReferenceObject()); + rd.addChannel(dataCh); + rd.setNbOfSamples("1"); + if (!isEncryption) { + rd.setSecurityPattern(sp); + } + hsmTaskAD.addElement(rd); + + TMLExecC exec = new TMLExecC(sp.getName(), hsmTaskAD.getReferenceObject()); + exec.setSecurityPattern(sp); + exec.setDecryptionProcess(!isEncryption); + exec.setAction(Integer.toString(sp.getEncTime())); + hsmTaskAD.addElement(exec); + rd.addNext(exec); + + TMLWriteChannel wr = new TMLWriteChannel(retrieveDataCh.getName(), hsmTaskAD.getReferenceObject()); + wr.addChannel(retrieveDataCh); + hsmTaskAD.addElement(wr); + wr.setNbOfSamples("1"); + if (isEncryption) { + wr.setSecurityPattern(sp); + } + exec.addNext(wr); - TMLReadChannel rd = new TMLReadChannel("retData_" + channel.getChannelName() + "_" + task.getTaskName(), - taskAD.getReferenceObject()); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - //rd.securityPattern = channelSecMap.get(chanName); - rd.setNbOfSamples("1"); - // rd.setEncForm(false); - taskAD.addElement(rd); + TMLStopState stop = new TMLStopState("stop", hsmTaskAD.getReferenceObject()); + hsmTaskAD.addElement(stop); + //Connect stop and write channel + wr.addNext(stop); - wr.addNext(rd); - rd.addNext(nextReadCh); + return rd; + } - } - } - for (TMLChannel channel : macInChannels.get(task)) { - //Add decryptmac after readchannel - Set<TMLActivityElement> channelInstances = new HashSet<TMLActivityElement>(); - //Find read channel operator - - for (TMLActivityElement elem : taskAD.getElements()) { - if (elem instanceof TMLReadChannel) { - TMLReadChannel readChannel = (TMLReadChannel) elem; - for (int i = 0; i<readChannel.getNbOfChannels(); i++) { - if (readChannel.getChannel(i).getName().equals(channel.getName()) && readChannel.getSecurityPattern() == null) { - fromStart = taskAD.getPrevious(elem); - if (fromStart != null) { - channelInstances.add(elem); - } - } - } - } - } - for (TMLActivityElement elem : channelInstances) { - fromStart = taskAD.getPrevious(elem); - - TMLReadChannel readChannel = (TMLReadChannel) elem; - readChannel.setSecurityPattern(channelSecMap.get(readChannel.getChannel(0))); - //Create nonce and send it - if (nonceInChannels.get(task).contains(channel)) { - TMLExecC nonce = new TMLExecC("nonce_" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName(), taskAD.getReferenceObject()); - SecurityPattern secNonce = new SecurityPattern(nonce.getName(), SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - nonce.setSecurityPattern(secNonce); - nonce.setAction(Integer.toString(secNonce.getEncTime())); - boolean addNewExecCNonce = true; - for (TMLActivityElement elemT : taskAD.getElements()) { - if (elemT instanceof TMLExecC) { - TMLExecC exeCElem = (TMLExecC) elemT; - if (exeCElem.getSecurityPattern() != null) { - if(exeCElem.getSecurityPattern().getName().equals(secNonce.getName())) { - addNewExecCNonce = false; - break; - } - } - } - } - if (addNewExecCNonce) { - //Create a nonce operator and a write channel operator - tmlmodel.addSecurityPattern(secNonce); - if (tmlmodel.getSecurityTaskMap().containsKey(secNonce)) { - if (!tmlmodel.getSecurityTaskMap().get(secNonce).contains(task)) { - tmlmodel.getSecurityTaskMap().get(secNonce).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(secNonce, listTask); - } - TMLActivityElement first = taskAD.getFirst(); - TMLActivityElement nextFirst = first.getNextElement(0); - taskAD.addElement(nonce); - first.setNewNext(nextFirst, nonce); - TMLWriteChannel wr = new TMLWriteChannel("", taskAD.getReferenceObject()); - //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(channel.getDestinationTask(), channel.getOriginTask()); - - if (!matches.isEmpty()) { - wr.setName(matches.get(0).getChannelName()); - if (tmlmodel.getChannelByName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByName(wr.getName())); - } else if (tmlmodel.getChannelByShortName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByShortName(wr.getName())); - } - } else { - wr.setName("nonceCh" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName()); - if (tmlmodel.getChannelByName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByName(wr.getName())); - } else if (tmlmodel.getChannelByShortName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByShortName(wr.getName())); - } - } - //send the nonce along the channel - wr.setNbOfSamples("1"); - wr.setSecurityPattern(secNonce); - taskAD.addElement(wr); - nonce.addNext(wr); - wr.addNext(nextFirst); - } - } + private TMLActivityElement addBranchHSMWithNonce(TMLTask hsmTask, TMLChannel dataCh, TMLChannel retrieveDataCh, SecurityPattern sp, + boolean isEncryption, TMLActivityElement header, TMLActivityElement bottom) throws TMLCheckingError { + TMLActivity hsmTaskAD = hsmTask.getActivityDiagram(); - //Add decryption operator if it does not already exist - TMLExecC dec = new TMLExecC(channelSecMap.get(readChannel.getChannel(0)).getName(), taskAD.getReferenceObject()); - dec.setSecurityPattern(channelSecMap.get(readChannel.getChannel(0))); - dec.setAction(Integer.toString(dec.getSecurityPattern().getEncTime())); - tmlmodel.addSecurityPattern(channelSecMap.get(readChannel.getChannel(0))); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(readChannel.getChannel(0)))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(readChannel.getChannel(0))).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(readChannel.getChannel(0))).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(readChannel.getChannel(0)), listTask); - } - try { - dec.setDecryptionProcess(true); - } catch (TMLCheckingError e) { - throw new RuntimeException(e); - } - taskAD.addElement(dec); - dec.addNext(readChannel.getNextElement(0)); - readChannel.setNewNext(readChannel.getNextElement(0), dec); - //Shift everything down - for (TMLActivityElement elemA : taskAD.getElements()) { - if (elemA instanceof TMLReadChannel) { - TMLReadChannel rdOfSameCh = (TMLReadChannel) elemA; - for (int i=0; i<rdOfSameCh.getNbOfChannels(); i++) { - if (channel.equals(rdOfSameCh.getChannel(i)) && rdOfSameCh.getSecurityPattern() == null) { - rdOfSameCh.setSecurityPattern(channelSecMap.get(channel)); - // rdOfSameCh.setEncForm(true); - } - } - } - } - } - } - for (TMLChannel channel : secInChannels.get(task)) { - TraceManager.addDev("securing channel " + channel); - //Find read channel operator - - HashSet<TMLActivityElement> channelInstances = new HashSet<TMLActivityElement>(); - for (TMLActivityElement elem : taskAD.getElements()) { - if (elem instanceof TMLReadChannel) { - TMLReadChannel readChannel = (TMLReadChannel) elem; - for (int i=0; i<readChannel.getNbOfChannels(); i++) { - if (readChannel.getChannel(i).getName().equals(channel.getName()) && readChannel.getSecurityPattern() == null) { - fromStart = taskAD.getPrevious(elem); - if (fromStart != null) { - channelInstances.add(elem); - } - } - } - } - } + TMLReadChannel rd = new TMLReadChannel(dataCh.getName(), hsmTaskAD.getReferenceObject()); + rd.addChannel(dataCh); + rd.setNbOfSamples("1"); + if (!isEncryption) { + rd.setSecurityPattern(sp); + } + hsmTaskAD.addElement(rd); + bottom.addNext(rd); + + TMLExecC exec = new TMLExecC(sp.getName(), hsmTaskAD.getReferenceObject()); + exec.setSecurityPattern(sp); + exec.setDecryptionProcess(!isEncryption); + exec.setAction(Integer.toString(sp.getEncTime())); + hsmTaskAD.addElement(exec); + rd.addNext(exec); + + TMLWriteChannel wr = new TMLWriteChannel(retrieveDataCh.getName(), hsmTaskAD.getReferenceObject()); + wr.addChannel(retrieveDataCh); + hsmTaskAD.addElement(wr); + wr.setNbOfSamples("1"); + if (isEncryption) { + wr.setSecurityPattern(sp); + } + exec.addNext(wr); - for (TMLActivityElement elem : channelInstances) { - TMLReadChannel readChannel = (TMLReadChannel) elem; - fromStart = taskAD.getPrevious(elem); - if (nonceInChannels.get(task).contains(channel)) { - //Create a nonce operator and a write channel operator - TMLExecC nonce = new TMLExecC("nonce_" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName(), taskAD.getReferenceObject()); - SecurityPattern secNonce = new SecurityPattern(nonce.getName(), SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - nonce.setSecurityPattern(secNonce); - nonce.setAction(Integer.toString(secNonce.getEncTime())); - boolean addNewExecCNonce = true; - for (TMLActivityElement elemT : taskAD.getElements()) { - if (elemT instanceof TMLExecC) { - TMLExecC exeCElem = (TMLExecC) elemT; - if (exeCElem.getSecurityPattern() != null) { - if(exeCElem.getSecurityPattern().getName().equals(secNonce.getName())) { - addNewExecCNonce = false; - break; - } - } - } - } - if (addNewExecCNonce) { - tmlmodel.addSecurityPattern(secNonce); - if (tmlmodel.getSecurityTaskMap().containsKey(secNonce)) { - if (!tmlmodel.getSecurityTaskMap().get(secNonce).contains(task)) { - tmlmodel.getSecurityTaskMap().get(secNonce).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(secNonce, listTask); - } + TMLStopState stop = new TMLStopState("stop", hsmTaskAD.getReferenceObject()); + hsmTaskAD.addElement(stop); + //Connect stop and write channel + wr.addNext(stop); - taskAD.addElement(nonce); - TMLActivityElement first = taskAD.getFirst(); - TMLActivityElement nextFirst = first.getNextElement(0); - first.setNewNext(nextFirst, nonce); - TMLWriteChannel wr = new TMLWriteChannel("", taskAD.getReferenceObject()); - //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(channel.getDestinationTask(), channel.getOriginTask()); - - if (!matches.isEmpty()) { - wr.setName(matches.get(0).getChannelName()); - if (tmlmodel.getChannelByName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByName(wr.getName())); - } else if (tmlmodel.getChannelByShortName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByShortName(wr.getName())); - } - } else { - wr.setName("nonceCh" + channel.getDestinationTask().getTaskName() + "_" + channel.getOriginTask().getTaskName()); - if (tmlmodel.getChannelByName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByName(wr.getName())); - } else if (tmlmodel.getChannelByShortName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByShortName(wr.getName())); - } - } - //secNonce.setOriginTask(wr.getChannel(0).getOriginTask().getName().replaceAll(title + "__", "")); - //send the nonce along the channel - wr.setNbOfSamples("1"); - wr.setSecurityPattern(secNonce); - taskAD.addElement(wr); - nonce.addNext(wr); - wr.addNext(nextFirst); - } - } + return header; + } - //Now add the decrypt operator - readChannel.setSecurityPattern(channelSecMap.get(readChannel.getChannel(0))); - // readChannel.setEncForm(true); - //Add decryption operator if it does not already exist - TMLExecC dec = new TMLExecC(channelSecMap.get(readChannel.getChannel(0)).getName(), taskAD.getReferenceObject()); - dec.setSecurityPattern(channelSecMap.get(readChannel.getChannel(0))); - try { - dec.setDecryptionProcess(true); - } catch (TMLCheckingError e) { - throw new RuntimeException(e); - } - dec.setAction(Integer.toString(channelSecMap.get(readChannel.getChannel(0)).getEncTime())); + private Pair<TMLActivityElement, TMLActivityElement> addNonceExchangeBranchHSM(TMLTask hsmTask, TMLChannel nonceCh, SecurityPattern sp, + boolean isNonceSender) { + TMLActivity hsmTaskAD = hsmTask.getActivityDiagram(); + if (isNonceSender) { + TMLExecC exec = new TMLExecC(sp.getName(), hsmTaskAD.getReferenceObject()); + exec.setSecurityPattern(sp); + exec.setAction(Integer.toString(sp.getEncTime())); + hsmTaskAD.addElement(exec); + + TMLWriteChannel wr = new TMLWriteChannel(nonceCh.getName(), hsmTaskAD.getReferenceObject()); + wr.addChannel(nonceCh); + hsmTaskAD.addElement(wr); + wr.setNbOfSamples("1"); + wr.setSecurityPattern(sp); + exec.addNext(wr); + + return new Pair<>(exec, wr); + } else { + TMLReadChannel rd = new TMLReadChannel(nonceCh.getName(), hsmTaskAD.getReferenceObject()); + rd.addChannel(nonceCh); + rd.setSecurityPattern(sp); + rd.setNbOfSamples("1"); + hsmTaskAD.addElement(rd); - tmlmodel.addSecurityPattern(channelSecMap.get(readChannel.getChannel(0))); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(readChannel.getChannel(0)))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(readChannel.getChannel(0))).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(readChannel.getChannel(0))).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(readChannel.getChannel(0)), listTask); - } + return new Pair<>(rd, rd); + } + } + private void communicationADWithHSMIncludingNonce(TMLTask task, TMLActivityElementChannel comm, SecurityPattern sp, TMLChannel dataCh, + TMLChannel retrieveDataCh, TMLRequest request, SecurityPattern spNonce, TMLChannel chNonce, + TMLChannel chNonceWithHSM) { + TMLActivity taskAD = task.getActivityDiagram(); + TMLSendRequest reqSend = new TMLSendRequest(request.getName(), taskAD.getReferenceObject()); + reqSend.setRequest(request); + //reqSend.addParam(Integer.toString(indexRequest)); + taskAD.addElement(reqSend); + + TMLWriteChannel wr = new TMLWriteChannel(dataCh.getName(), taskAD.getReferenceObject()); + wr.addChannel(dataCh); + wr.setNbOfSamples(comm.getNbOfSamples()); + taskAD.addElement(wr); + + TMLReadChannel rd = new TMLReadChannel(retrieveDataCh.getName(), taskAD.getReferenceObject()); + rd.addChannel(retrieveDataCh); + rd.setNbOfSamples(comm.getNbOfSamples()); + taskAD.addElement(rd); + + TMLActivityElement prevComm = taskAD.getPrevious(comm); + + comm.setSecurityPattern(sp); + + if (comm instanceof TMLWriteChannel) { + TMLWriteChannel wrNonceToHSM = new TMLWriteChannel(chNonceWithHSM.getName(), taskAD.getReferenceObject()); + wrNonceToHSM.addChannel(chNonceWithHSM); + wrNonceToHSM.setNbOfSamples("1"); + wrNonceToHSM.setSecurityPattern(spNonce); + taskAD.addElement(wrNonceToHSM); + + TMLReadChannel rdNonce = new TMLReadChannel(chNonce.getName(), taskAD.getReferenceObject()); + rdNonce.addChannel(chNonce); + rdNonce.setNbOfSamples("1"); + rdNonce.setSecurityPattern(spNonce); + taskAD.addElement(rdNonce); + + rd.setSecurityPattern(sp); + + prevComm.setNewNext(comm, rdNonce); + rdNonce.addNext(reqSend); + reqSend.addNext(wrNonceToHSM); + wrNonceToHSM.addNext(wr); + wr.addNext(rd); + rd.addNext(comm); + + } else if (comm instanceof TMLReadChannel) { + TMLReadChannel rdNonceFromHSM = new TMLReadChannel(chNonceWithHSM.getName(), taskAD.getReferenceObject()); + rdNonceFromHSM.addChannel(chNonceWithHSM); + rdNonceFromHSM.setNbOfSamples("1"); + rdNonceFromHSM.setSecurityPattern(spNonce); + taskAD.addElement(rdNonceFromHSM); + + TMLWriteChannel wrNonce = new TMLWriteChannel(chNonce.getName(), taskAD.getReferenceObject()); + wrNonce.addChannel(chNonce); + wrNonce.setNbOfSamples("1"); + wrNonce.setSecurityPattern(spNonce); + taskAD.addElement(wrNonce); + + wr.setSecurityPattern(sp); + + TMLActivityElement origNextComm = comm.getNextElement(0); + + prevComm.setNewNext(comm, reqSend); + reqSend.addNext(rdNonceFromHSM); + rdNonceFromHSM.addNext(wrNonce); + wrNonce.addNext(comm); + comm.setNewNext(origNextComm, wr); + wr.addNext(rd); + rd.addNext(origNextComm); + } + } - taskAD.addElement(dec); - dec.addNext(readChannel.getNextElement(0)); - readChannel.setNewNext(readChannel.getNextElement(0), dec); - //Shift everything down - for (TMLActivityElement elemA : taskAD.getElements()) { - if (elemA instanceof TMLReadChannel) { - TMLReadChannel rdOfSameCh = (TMLReadChannel) elemA; - for (int i=0; i < rdOfSameCh.getNbOfChannels(); i++) { - if (channel.equals(rdOfSameCh.getChannel(i)) && rdOfSameCh.getSecurityPattern() == null) { - rdOfSameCh.setSecurityPattern(channelSecMap.get(rdOfSameCh.getChannel(i))); - // rdOfSameCh.setEncForm(true); - } - } - } - } - } - } + private void communicationWithHSMAD(TMLTask task, TMLActivityElementChannel comm, SecurityPattern sp, TMLChannel dataCh, + TMLChannel retrieveDataCh, TMLRequest request) { + TMLActivity taskAD = task.getActivityDiagram(); + TMLSendRequest reqSend = new TMLSendRequest(request.getName(), taskAD.getReferenceObject()); + reqSend.setRequest(request); + //reqSend.addParam(Integer.toString(indexRequest)); + taskAD.addElement(reqSend); + + TMLWriteChannel wr = new TMLWriteChannel(dataCh.getName(), taskAD.getReferenceObject()); + wr.addChannel(dataCh); + wr.setNbOfSamples(comm.getNbOfSamples()); + taskAD.addElement(wr); + + TMLReadChannel rd = new TMLReadChannel(retrieveDataCh.getName(), taskAD.getReferenceObject()); + rd.addChannel(retrieveDataCh); + rd.setNbOfSamples(comm.getNbOfSamples()); + taskAD.addElement(rd); + + TMLActivityElement prevComm = taskAD.getPrevious(comm); + + + comm.setSecurityPattern(sp); + if (comm instanceof TMLWriteChannel) { + prevComm.setNewNext(comm, reqSend); + rd.setSecurityPattern(sp); + reqSend.addNext(wr); + wr.addNext(rd); + rd.addNext(comm); + + } else if (comm instanceof TMLReadChannel) { + wr.setSecurityPattern(sp); + TMLActivityElement origNextComm = comm.getNextElement(0); + comm.setNewNext(origNextComm, reqSend); + reqSend.addNext(wr); + wr.addNext(rd); + rd.addNext(origNextComm); } - return; } - public void buildHSMActivityDiagram(String cpuName) throws TMLCheckingError { - TMLModeling<?> tmlmodel = tmap.getTMLModeling(); - //Build HSM Activity diagram - TMLTask task = tmap.getTaskByName("HSM_" + cpuName); + private void communicationWithHSMAD(TMLTask task, TMLActivityElementChannel comm, TMLChannel dataCh, TMLRequest request) { TMLActivity taskAD = task.getActivityDiagram(); - if (taskAD == null) { - return; + TMLSendRequest reqSend = new TMLSendRequest(request.getName(), taskAD.getReferenceObject()); + reqSend.setRequest(request); + taskAD.addElement(reqSend); + TMLActivityElement prevComm = taskAD.getPrevious(comm); + TMLActivityElement origNextComm = comm.getNextElement(0); + + if (comm instanceof TMLWriteChannel) { + TMLWriteChannel wr = new TMLWriteChannel(dataCh.getName(), taskAD.getReferenceObject()); + wr.addChannel(dataCh); + wr.setNbOfSamples(comm.getNbOfSamples()); + taskAD.addElement(wr); + prevComm.setNewNext(comm, reqSend); + reqSend.addNext(wr); + taskAD.removeElement(comm); + wr.addNext(origNextComm); + } else if (comm instanceof TMLReadChannel) { + TMLReadChannel rd = new TMLReadChannel(dataCh.getName(), taskAD.getReferenceObject()); + rd.addChannel(dataCh); + rd.setNbOfSamples(comm.getNbOfSamples()); + taskAD.addElement(rd); + prevComm.setNewNext(comm, reqSend); + reqSend.addNext(rd); + taskAD.removeElement(comm); + rd.addNext(origNextComm); } + } - TMLActivityElement start = taskAD.getFirst(); - if (start == null) { - start = new TMLStartState("start", taskAD.getReferenceObject()); - taskAD.setFirst(start); + + private void addDecryptionAD(TMLTask task, List<TMLReadChannel> readComms, SecurityPattern sp) throws TMLCheckingError { + TMLActivity taskAD = task.getActivityDiagram(); + for (TMLReadChannel readComm : readComms) { + TMLExecC exec = new TMLExecC(sp.getName(), taskAD.getReferenceObject()); + exec.setSecurityPattern(sp); + exec.setDecryptionProcess(true); + exec.setAction(Integer.toString(sp.getEncTime())); + taskAD.addElement(exec); + + readComm.setSecurityPattern(sp); + TMLActivityElement origNextComm = readComm.getNextElement(0); + readComm.setNewNext(origNextComm, exec); + exec.addNext(origNextComm); } - - //fromStart = new TGConnectorTMLAD(xpos, ypos, tad.getMinX(), tad.getMaxX(), tad.getMinY(), tad.getMaxY(), false, null, tad, null, null, new Vector<Point>()); + } - if (hsmChannelMap.get(cpuName).isEmpty()) { - TMLStopState stop = new TMLStopState("stop", taskAD.getReferenceObject()); - taskAD.addElement(stop); - //Connect stop and start - start.addNext(stop); - return; + private void addDecryptionADConnectedToOtherHSM(TMLTask task, List<TMLReadChannel> readComms, SecurityPattern sp, TMLChannel chToDestHSM) throws TMLCheckingError { + TMLActivity taskAD = task.getActivityDiagram(); + for (TMLReadChannel readComm : readComms) { + TMLExecC exec = new TMLExecC(sp.getName(), taskAD.getReferenceObject()); + exec.setSecurityPattern(sp); + exec.setDecryptionProcess(true); + exec.setAction(Integer.toString(sp.getEncTime())); + taskAD.addElement(exec); + + readComm.replaceChannelWith(readComm.getChannel(0), chToDestHSM); + readComm.setName(chToDestHSM.getName()); + readComm.setSecurityPattern(sp); + TMLActivityElement origNextComm = readComm.getNextElement(0); + readComm.setNewNext(origNextComm, exec); + exec.addNext(origNextComm); } - TMLActionState req = new TMLActionState("action", taskAD.getReferenceObject()); - if (task.getAttributeByName("channelIndex") == null) { - TMLAttribute attrib = new TMLAttribute("channelIndex", new TMLType(TMLType.NATURAL), "0"); - task.addAttribute(attrib); - } - if (task.getAttributeByName("arg0__req") == null) { - TMLAttribute attrib = new TMLAttribute("arg0__req", new TMLType(TMLType.NATURAL), "0"); - task.addAttribute(attrib); - } - req.setAction("channelIndex = arg0__req"); - taskAD.addElement(req); - //Connect start and readrequest - start.addNext(req); - - TMLActivityElement lastCurElem = req; - List<String> readNonces = new ArrayList<String>(); - List<String> writeNonces = new ArrayList<String>(); - for (HSMChannel ch : hsmChannelMap.get(cpuName)) { - if (!ch.nonceName.equals("")) { - if (ch.secType == HSMChannel.DEC) { - TMLExecC nonce = new TMLExecC("nonce_" + ch.task.getTaskName() + "_" + ch.channel.getOriginTask().getTaskName(), - taskAD.getReferenceObject()); - SecurityPattern secNonce = new SecurityPattern(nonce.getName(), SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - nonce.setSecurityPattern(secNonce); - nonce.setAction(Integer.toString(secNonce.getEncTime())); - if (!writeNonces.contains(nonce.getName())) { - tmlmodel.addSecurityPattern(secNonce); - if (tmlmodel.getSecurityTaskMap().containsKey(secNonce)) { - if (!tmlmodel.getSecurityTaskMap().get(secNonce).contains(task)) { - tmlmodel.getSecurityTaskMap().get(secNonce).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(secNonce, listTask); - } + } - taskAD.addElement(nonce); + private void addNonceSendAD(TMLTask task, TMLChannel nonceCh, SecurityPattern spNonce, List<TMLReadChannel> readComms, + TMLActivityElement headerElement, boolean origTaskHasHSM) { + TMLActivity taskAD = task.getActivityDiagram(); - if (lastCurElem.getNbNext()>0) { - lastCurElem.setNewNext(lastCurElem.getNextElement(0), nonce); - } else { - lastCurElem.addNext(nonce); - } - TMLWriteChannel wr = new TMLWriteChannel("", taskAD.getReferenceObject()); - wr.setName("nonceCh" + ch.task.getTaskName() + "_" + ch.channel.getOriginTask().getTaskName()); - if (tmlmodel.getChannelByName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByName(wr.getName())); - } else if (tmlmodel.getChannelByShortName(wr.getName()) != null) { - wr.addChannel(tmlmodel.getChannelByShortName(wr.getName())); - } - //secNonce.setOriginTask(task.getName()); - //send the nonce along the channel - wr.setNbOfSamples("1"); - wr.setSecurityPattern(secNonce); - taskAD.addElement(wr); - nonce.addNext(wr); - lastCurElem = wr; - writeNonces.add(nonce.getName()); - } - } else { - SecurityPattern secPatternNonce = - new SecurityPattern("nonce_" + ch.channel.getDestinationTask().getTaskName() + "_" + ch.task.getTaskName(), - SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - if (!readNonces.contains(secPatternNonce.getName())) { - //If we need to receive a nonce - TMLReadChannel rd = new TMLReadChannel("", taskAD.getReferenceObject()); - //Receive any nonces if ensuring authenticity - rd.setName("nonceCh" + ch.channel.getDestinationTask().getTaskName() + "_" + ch.task.getTaskName()); - if (tmlmodel.getChannelByName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByName(rd.getName())); - } else if (tmlmodel.getChannelByShortName(rd.getName()) != null) { - rd.addChannel(tmlmodel.getChannelByShortName(rd.getName())); - } - //secPatternNonce.setOriginTask(rd.getChannel(0).getOriginTask().getName().replaceAll(appName + "__", "")); - rd.setSecurityPattern(secPatternNonce); - rd.setNbOfSamples("1"); - if (lastCurElem.getNbNext() > 0) { - lastCurElem.setNewNext(lastCurElem.getNextElement(0), rd); - } else { - lastCurElem.addNext(rd); - } - lastCurElem = rd; - taskAD.addElement(rd); - readNonces.add(secPatternNonce.getName()); - } - } + TMLExecC exec = new TMLExecC(spNonce.getName(), taskAD.getReferenceObject()); + exec.setSecurityPattern(spNonce); + exec.setAction(Integer.toString(spNonce.getEncTime())); + taskAD.addElement(exec); + for (TMLReadChannel readComm : readComms) { + TMLWriteChannel wrNonce = new TMLWriteChannel(nonceCh.getName(), taskAD.getReferenceObject()); + wrNonce.addChannel(nonceCh); + wrNonce.setNbOfSamples("1"); + wrNonce.setSecurityPattern(spNonce); + TMLActivityElement prevOfRead = taskAD.getPrevious(readComm); + if (readComms.size() == 1) { + prevOfRead.setNewNext(readComm, exec); + exec.addNext(wrNonce); + } else { + prevOfRead.setNewNext(readComm, wrNonce); } + wrNonce.addNext(readComm); + taskAD.addElement(wrNonce); } - + if (readComms.size() > 1) { + if (origTaskHasHSM) { + TMLActivityElement origNextComm = headerElement.getNextElement(0); + headerElement.setNewNext(origNextComm, exec); + exec.addNext(origNextComm); + } else { + TMLWriteChannel wrNonce = new TMLWriteChannel(nonceCh.getName(), taskAD.getReferenceObject()); + wrNonce.addChannel(nonceCh); + wrNonce.setNbOfSamples("1"); + wrNonce.setSecurityPattern(spNonce); + taskAD.addElement(wrNonce); + + TMLActivityElement origNextComm = headerElement.getNextElement(0); + headerElement.setNewNext(origNextComm, exec); + exec.addNext(wrNonce); + wrNonce.addNext(origNextComm); + } - TMLChoice choice = new TMLChoice("choice", taskAD.getReferenceObject()); - taskAD.addElement(choice); + } + } - //Connect lastCurElem and choice - lastCurElem.addNext(choice); - //Allows 9 channels max to simplify the diagram + private TMLActivityElement addNonceReceiveAD(TMLTask task, TMLChannel nonceCh, SecurityPattern spNonce, List<TMLWriteChannel> writeComms, + TMLActivityElement headerElement) { + TMLActivity taskAD = task.getActivityDiagram(); + for(TMLWriteChannel writeCh : writeComms) { + TMLReadChannel rdNonce = new TMLReadChannel(nonceCh.getName(), taskAD.getReferenceObject()); + rdNonce.addChannel(nonceCh); + rdNonce.setNbOfSamples("1"); + rdNonce.setSecurityPattern(spNonce); + taskAD.addElement(rdNonce); + TMLActivityElement prevOfWrite = taskAD.getPrevious(writeCh); + prevOfWrite.setNewNext(writeCh, rdNonce); + rdNonce.addNext(writeCh); + } + if (writeComms.size() > 1) { + TMLReadChannel rdNonce = new TMLReadChannel(nonceCh.getName(), taskAD.getReferenceObject()); + rdNonce.addChannel(nonceCh); + rdNonce.setNbOfSamples("1"); + rdNonce.setSecurityPattern(spNonce); + taskAD.addElement(rdNonce); + + TMLActivityElement origNextComm = headerElement.getNextElement(0); + headerElement.setNewNext(origNextComm, rdNonce); + rdNonce.addNext(origNextComm); + return rdNonce; + } + return headerElement; + } - //If more than 3 channels, build 2 levels of choices + private void addEncryptionAD(TMLTask task, List<TMLWriteChannel> writeComms, SecurityPattern sp, TMLActivityElement headerElement) throws TMLCheckingError { + TMLActivity taskAD = task.getActivityDiagram(); + TMLExecC exec = new TMLExecC(sp.getName(), taskAD.getReferenceObject()); + exec.setSecurityPattern(sp); + exec.setDecryptionProcess(false); + exec.setAction(Integer.toString(sp.getEncTime())); + taskAD.addElement(exec); + if (writeComms.size() == 1) { + TMLActivityElement prevOfWrite = taskAD.getPrevious(writeComms.get(0)); + prevOfWrite.setNewNext(writeComms.get(0), exec); + exec.addNext(writeComms.get(0)); + writeComms.get(0).setSecurityPattern(sp); + } else { + TMLActivityElement origNextHeader = headerElement.getNextElement(0); + headerElement.setNewNext(origNextHeader, exec); + exec.addNext(origNextHeader); + for (TMLWriteChannel writeComm : writeComms) { + writeComm.setSecurityPattern(sp); + } + } + } - if (hsmChannelMap.get(cpuName).size() > 3) { - TMLChoice choice2 = new TMLChoice("choice2", taskAD.getReferenceObject()); - int i = 0; - for (HSMChannel ch : hsmChannelMap.get(cpuName)) { - if (i > 8) { - break; - } - if (i % 3 == 0) { - //Add a new choice every third channel - choice2 = new TMLChoice("choice2", taskAD.getReferenceObject()); - taskAD.addElement(choice2); - //Connect new choice operator to top choice - choice.addGuard(""); - choice.addNext(choice2); - } - choice2.addGuard("[channelIndex==" + channelIndexMap.get(ch.channel) + "]"); + private void addEncryptionADConnectedToOtherHSM(TMLTask task, List<TMLWriteChannel> writeComms, SecurityPattern sp, TMLChannel chToDestHSM, + TMLActivityElement headerElement) throws TMLCheckingError { + TMLActivity taskAD = task.getActivityDiagram(); + TMLExecC exec = new TMLExecC(sp.getName(), taskAD.getReferenceObject()); + exec.setSecurityPattern(sp); + exec.setDecryptionProcess(false); + exec.setAction(Integer.toString(sp.getEncTime())); + taskAD.addElement(exec); + if (writeComms.size() == 1) { + writeComms.get(0).replaceChannelWith(writeComms.get(0).getChannel(0), chToDestHSM); + writeComms.get(0).setName(chToDestHSM.getName()); + TMLActivityElement prevOfWrite = taskAD.getPrevious(writeComms.get(0)); + prevOfWrite.setNewNext(writeComms.get(0), exec); + exec.addNext(writeComms.get(0)); + writeComms.get(0).setSecurityPattern(sp); + } else { + TMLActivityElement origNextHeader = headerElement.getNextElement(0); + headerElement.setNewNext(origNextHeader, exec); + exec.addNext(origNextHeader); + for (TMLWriteChannel writeComm : writeComms) { + writeComm.replaceChannelWith(writeComm.getChannel(0), chToDestHSM); + writeComm.setName(chToDestHSM.getName()); + writeComm.setSecurityPattern(sp); + } + } + } - if (choice.getGuard(choice.getNbGuard()-1).length() == 2) { - choice.setGuardAt(choice.getNbGuard()-1,"[(" + choice2.getGuard(choice2.getNbGuard()-1).substring(1, choice2.getGuard(choice2.getNbGuard()-1).length()-1) + ")]"); - } else { - choice.setGuardAt(choice.getNbGuard()-1, choice.getGuard(choice.getNbGuard()-1).substring(0, choice.getGuard(choice.getNbGuard()-1).length()-1) + " or (" + choice2.getGuard(choice2.getNbGuard()-1).substring(1, choice2.getGuard(choice2.getNbGuard()-1).length()-1) + ")]"); - } - - TMLActivityElement prevRd = choice2; - //If needed, receive nonce from task - /*if (!ch.nonceName.equals("")) { - //Connect choice and readchannel - TMLReadChannel rdNonce = new TMLReadChannel(("data_" + ch.name + "_" + ch.task), taskAD.getReferenceObject()); - rdNonce.addChannel(tmlmodel.getChannelByName("data_" + ch.name + "_" + ch.task)); - rdNonce.securityPattern = new SecurityPattern(ch.nonceName, SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - rdNonce.securityPattern.originTask = rdNonce.getChannel(0).getOriginTask().getName().replaceAll(appName + "__", ""); - rdNonce.setNbOfSamples("1"); - taskAD.addElement(rdNonce); - - //choice2.getNextElement(choice2.getNbNext()-1).addNext(rd); - choice2.addNext(rdNonce); - prevRd = rdNonce; - }*/ - - TMLReadChannel rd = new TMLReadChannel("data_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName(), taskAD.getReferenceObject()); - rd.addChannel(tmlmodel.getChannelByName("data_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName())); - // - rd.setNbOfSamples("1"); - taskAD.addElement(rd); - prevRd.addNext(rd); - //Recieve plaintext data if encrypting - /* if (ch.secType != HSMChannel.DEC) { - rd.setEncForm(false); - } */ - - TMLWriteChannel wr = new TMLWriteChannel("retData_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName(), taskAD.getReferenceObject()); - wr.addChannel(tmlmodel.getChannelByName("retData_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName())); - taskAD.addElement(wr); - wr.setNbOfSamples("1"); - if (ch.secType == HSMChannel.DEC) { - rd.setSecurityPattern(channelSecMap.get(ch.channel)); - TMLExecC dec = new TMLExecC(channelSecMap.get(ch.channel).getName(), taskAD.getReferenceObject()); - dec.setSecurityPattern(channelSecMap.get(ch.channel)); - dec.setDecryptionProcess(true); - dec.setAction(Integer.toString(channelSecMap.get(ch.channel).getEncTime())); - - tmlmodel.addSecurityPattern(channelSecMap.get(ch.channel)); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(ch.channel))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(ch.channel), listTask); + private List<TMLReadChannel> readOperatorsOfChannel(TMLTask task, TMLChannel ch) { + List<TMLReadChannel> elems = new ArrayList<>(); + for (TMLActivityElement elem : task.getActivityDiagram().getElements()) { + if (elem instanceof TMLReadChannel) { + TMLReadChannel rc = (TMLReadChannel) elem; + for (int i = 0; i < rc.getNbOfChannels(); i++) { + if (rc.getChannel(i).equals(ch)) { + elems.add(rc); } + } + } + } + return elems; + } - taskAD.addElement(dec); - rd.addNext(dec); - - //Connect decrypt and writechannel - dec.addNext(wr); - //Add Stop - TMLStopState stop = new TMLStopState("stop", taskAD.getReferenceObject()); - taskAD.addElement(stop); - - //Connext stop and write channel - wr.addNext(stop); - } else { - wr.setSecurityPattern(channelSecMap.get(ch.channel)); - TMLExecC enc = new TMLExecC(channelSecMap.get(ch.channel).getName(), taskAD.getReferenceObject()); - enc.setSecurityPattern(channelSecMap.get(ch.channel)); - enc.setAction(Integer.toString(channelSecMap.get(ch.channel).getEncTime())); - - tmlmodel.addSecurityPattern(channelSecMap.get(ch.channel)); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(ch.channel))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(ch.channel), listTask); - } - - if (ch.secType == HSMChannel.SENC) { - enc.getSecurityPattern().setType(SecurityPattern.SYMMETRIC_ENC_PATTERN); - } else if (ch.secType == HSMChannel.AENC) { - enc.getSecurityPattern().setType(SecurityPattern.ASYMMETRIC_ENC_PATTERN); - } else if (ch.secType == HSMChannel.MAC) { - enc.getSecurityPattern().setType(SecurityPattern.MAC_PATTERN); - } else if (ch.secType == HSMChannel.NONCE) { - enc.getSecurityPattern().setType(SecurityPattern.NONCE_PATTERN); + private List<TMLWriteChannel> writeOperatorsOfChannel(TMLTask task, TMLChannel ch) { + List<TMLWriteChannel> elems = new ArrayList<>(); + for (TMLActivityElement elem : task.getActivityDiagram().getElements()) { + if (elem instanceof TMLWriteChannel) { + TMLWriteChannel wc = (TMLWriteChannel) elem; + for (int i = 0; i < wc.getNbOfChannels(); i++) { + if (wc.getChannel(i).equals(ch)) { + elems.add(wc); } - - enc.getSecurityPattern().setOverhead(Integer.parseInt(overhead)); - enc.getSecurityPattern().setEncTime(Integer.parseInt(encComp)); - enc.getSecurityPattern().setDecTime(Integer.parseInt(decComp)); - enc.getSecurityPattern().setNonce(ch.nonceName); - taskAD.addElement(enc); - - //Connect encrypt and readchannel - rd.addNext(enc); - //Connect encrypt and writechannel - enc.addNext(wr); - - //Add Stop - TMLStopState stop = new TMLStopState("stop", taskAD.getReferenceObject()); - taskAD.addElement(stop); - - //Connext stop and write channel - wr.addNext(stop); } - i++; } - } else { + } + return elems; + } - for (HSMChannel ch : hsmChannelMap.get(cpuName)) { - //Add guard as channelindex - choice.addGuard("[channelIndex==" + channelIndexMap.get(ch.channel) + "]"); - - TMLActivityElement prevRd = choice; - //If needed, receive nonce from task - /*if (!ch.nonceName.equals("")) { - TMLReadChannel rdNonce = new TMLReadChannel(("data_" + ch.name + "_" + ch.task), taskAD.getReferenceObject()); - rdNonce.addChannel(tmlmodel.getChannelByName("data_" + ch.name + "_" + ch.task)); - rdNonce.securityPattern = new SecurityPattern(ch.nonceName, SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); - rdNonce.securityPattern.originTask = rdNonce.getChannel(0).getOriginTask().getName().replaceAll(appName + "__", ""); - rdNonce.setNbOfSamples("1"); - taskAD.addElement(rdNonce); - - choice.addNext(rdNonce); - prevRd = rdNonce; - }*/ - - TMLReadChannel rd = new TMLReadChannel("data_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName(), taskAD.getReferenceObject()); - rd.addChannel(tmlmodel.getChannelByName("data_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName())); - - rd.setNbOfSamples("1"); - taskAD.addElement(rd); - - //Recieve plaintext data if encrypting - /* if (ch.secType != HSMChannel.DEC) { - rd.setEncForm(false); - } */ - - //Connect choice and readchannel - prevRd.addNext(rd); - - //Send data back to task - TMLWriteChannel wr = new TMLWriteChannel("retData_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName(), taskAD.getReferenceObject()); - wr.addChannel(tmlmodel.getChannelByName("retData_" + ch.channel.getChannelName() + "_" + ch.task.getTaskName())); - - //Return plaintext data if decrypting - /* if (ch.secType == HSMChannel.DEC) { - wr.setEncForm(false); - } */ - wr.setNbOfSamples("1"); - - taskAD.addElement(wr); - if (ch.secType == HSMChannel.DEC) { - rd.setSecurityPattern(channelSecMap.get(ch.channel)); - TraceManager.addDev("Add Decrypt operator"); - //Add Decrypt operator - TMLExecC dec = new TMLExecC(channelSecMap.get(ch.channel).getName(), taskAD.getReferenceObject()); - dec.setSecurityPattern(channelSecMap.get(ch.channel)); - dec.setDecryptionProcess(true); - dec.setAction(Integer.toString(channelSecMap.get(ch.channel).getEncTime())); - - tmlmodel.addSecurityPattern(channelSecMap.get(ch.channel)); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(ch.channel))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(ch.channel), listTask); - } - - taskAD.addElement(dec); + private SecurityPattern findOrCreateNonceSecurityPattern(TMLChannel ch) { + if (channelNonceSPMap.containsKey(ch)) { + return channelNonceSPMap.get(ch); + } + SecurityPattern secPatternNonce = + new SecurityPattern("nonce_" + ch.getDestinationTask().getTaskName() + "_" + ch.getOriginTask().getTaskName() + "_" + ch.getChannelName(), + SecurityPattern.NONCE_PATTERN, overhead, "", encComp, decComp, "", "", ""); + channelNonceSPMap.put(ch, secPatternNonce); + tmap.getTMLModeling().addSecurityPattern(secPatternNonce); + return secPatternNonce; + } - //Connect decrypt and readchannel - rd.addNext(dec); + private boolean nonceChannelIsCreated(TMLChannel ch) { + return channelTochannelNonceMap.containsKey(ch); + } - //Connect decrypt and writechannel - dec.addNext(wr); + private TMLChannel findOrCreateNonceChannel(TMLChannel ch) { + if (nonceChannelIsCreated(ch)) { + return channelTochannelNonceMap.get(ch); + } - //Add Stop - TMLStopState stop = new TMLStopState("stop", taskAD.getReferenceObject()); - taskAD.addElement(stop); + String channelNameInit = + appName + "__" + "nonceCh" + ch.getDestinationTask().getTaskName() + "_" + ch.getOriginTask().getTaskName() + "_" + ch.getChannelName(); + int index = 0; + String channelName = channelNameInit; + while (tmap.getChannelByName(channelName) != null) { + channelName = channelNameInit + index; + index ++; + } - //Connect stop and write channel - wr.addNext(stop); + TMLChannel chNonce = new TMLChannel(channelName, ch.getReferenceObject()); + chNonce.setOriginTask(ch.getDestinationTask()); + chNonce.setDestinationTask(ch.getOriginTask()); + chNonce.setPorts(new TMLPort(chNonce.getName(), chNonce.getReferenceObject()), new TMLPort(chNonce.getName(), chNonce.getReferenceObject())); + tmap.getTMLModeling().addChannel(chNonce); - } else { - wr.setSecurityPattern(channelSecMap.get(ch.channel)); - TraceManager.addDev("Add Encrypt operator"); - TMLExecC enc = new TMLExecC(channelSecMap.get(ch.channel).getName(), taskAD.getReferenceObject()); - enc.setSecurityPattern(channelSecMap.get(ch.channel)); - enc.setAction(Integer.toString(channelSecMap.get(ch.channel).getEncTime())); - - tmlmodel.addSecurityPattern(channelSecMap.get(ch.channel)); - if (tmlmodel.getSecurityTaskMap().containsKey(channelSecMap.get(ch.channel))) { - if (!tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).contains(task)) { - tmlmodel.getSecurityTaskMap().get(channelSecMap.get(ch.channel)).add(task); - } - } else { - List<TMLTask> listTask = new ArrayList<TMLTask>(); - listTask.add(task); - tmlmodel.getSecurityTaskMap().put(channelSecMap.get(ch.channel), listTask); - } + channelTochannelNonceMap.put(ch, chNonce); + return chNonce; + } - if (ch.secType == HSMChannel.SENC) { - enc.getSecurityPattern().setType(SecurityPattern.SYMMETRIC_ENC_PATTERN); - } else if (ch.secType == HSMChannel.AENC) { - enc.getSecurityPattern().setType(SecurityPattern.ASYMMETRIC_ENC_PATTERN); - } else if (ch.secType == HSMChannel.MAC) { - enc.getSecurityPattern().setType(SecurityPattern.MAC_PATTERN); - } else if (ch.secType == HSMChannel.NONCE) { - enc.getSecurityPattern().setType(SecurityPattern.NONCE_PATTERN); - } + private TMLChannel findOrCreateChannelToSendNonceToHSM(TMLChannel chNonce, TMLTask hsmOfDestinationTaskNonce) { + if (channelNonceToHsmMap.containsKey(chNonce)) { + return channelNonceToHsmMap.get(chNonce); + } + TMLTask originTaskOfNonce = chNonce.getOriginTask(); + TMLTask destinationTaskOfNonce = chNonce.getDestinationTask(); + String channelNameHSMInit = appName + "__" + "dataNonceCh" + destinationTaskOfNonce.getTaskName() + "_" + originTaskOfNonce.getTaskName(); + int indexHSM = 0; + String channelNameHSM = channelNameHSMInit; + while (tmap.getChannelByName(channelNameHSM) != null) { + channelNameHSM = channelNameHSMInit + indexHSM; + indexHSM ++; + } + TMLChannel chNonceHSMOfDestinationTask = new TMLChannel(channelNameHSM, destinationTaskOfNonce.getReferenceObject()); + chNonceHSMOfDestinationTask.setOriginTask(destinationTaskOfNonce); + chNonceHSMOfDestinationTask.setDestinationTask(hsmOfDestinationTaskNonce); + chNonceHSMOfDestinationTask.setPorts(new TMLPort(chNonceHSMOfDestinationTask.getName(), chNonceHSMOfDestinationTask.getReferenceObject()), + new TMLPort(chNonceHSMOfDestinationTask.getName(), chNonceHSMOfDestinationTask.getReferenceObject())); + tmap.getTMLModeling().addChannel(chNonceHSMOfDestinationTask); + channelNonceToHsmMap.put(chNonce, chNonceHSMOfDestinationTask); + return chNonceHSMOfDestinationTask; + } - enc.getSecurityPattern().setOverhead(Integer.parseInt(overhead)); - enc.getSecurityPattern().setEncTime(Integer.parseInt(encComp)); - enc.getSecurityPattern().setDecTime(Integer.parseInt(decComp)); - enc.getSecurityPattern().setNonce(ch.nonceName); - taskAD.addElement(enc); + private TMLChannel findOrCreateChannelToReceiveNonceFromHSM(TMLChannel chNonce, TMLTask hsmOfOriginTaskNonce) { + if (channelNonceFromHsmMap.containsKey(chNonce)) { + return channelNonceFromHsmMap.get(chNonce); + } + TMLTask originTaskOfNonce = chNonce.getOriginTask(); ; + TMLTask destinationTaskOfNonce = chNonce.getDestinationTask(); + String channelNameHSMInit = appName + "__" + "retDataNonceCh" + destinationTaskOfNonce.getTaskName() + "_" + originTaskOfNonce.getTaskName(); + int indexHSM = 0; + String channelNameHSM = channelNameHSMInit; + while (tmap.getChannelByName(channelNameHSM) != null) { + channelNameHSM = channelNameHSMInit + indexHSM; + indexHSM ++; + } + + TMLChannel chNonceHSMOfOriginTask = new TMLChannel(channelNameHSM, hsmOfOriginTaskNonce.getReferenceObject()); + chNonceHSMOfOriginTask.setOriginTask(hsmOfOriginTaskNonce); + chNonceHSMOfOriginTask.setDestinationTask(originTaskOfNonce); + chNonceHSMOfOriginTask.setPorts(new TMLPort(chNonceHSMOfOriginTask.getName(), chNonceHSMOfOriginTask.getReferenceObject()), + new TMLPort(chNonceHSMOfOriginTask.getName(), chNonceHSMOfOriginTask.getReferenceObject())); + tmap.getTMLModeling().addChannel(chNonceHSMOfOriginTask); + channelNonceFromHsmMap.put(chNonce, chNonceHSMOfOriginTask); + return chNonceHSMOfOriginTask; + } - //Connect encrypt and readchannel - rd.addNext(enc); + private TMLChannel findOrCreateChannelToHSM(TMLTask hsmTask, TMLTask task, TMLChannel ch) { + Pair<TMLTask, TMLChannel> taskChannelPair = new Pair<>(task, ch); + if (channelToHsmMap.containsKey(taskChannelPair)) { + return channelToHsmMap.get(taskChannelPair); + } + String channelNameHSMInit = appName + "__" + "dataCh_" + task.getTaskName() + "_" + ch.getChannelName(); + int indexHSM = 0; + String channelNameHSM = channelNameHSMInit; + while (tmap.getChannelByName(channelNameHSM) != null) { + channelNameHSM = channelNameHSMInit + indexHSM; + indexHSM ++; + } + TMLChannel chToHSM = new TMLChannel(channelNameHSM, task.getReferenceObject()); + chToHSM.setOriginTask(task); + chToHSM.setDestinationTask(hsmTask); + chToHSM.setPorts(new TMLPort(chToHSM.getName(), chToHSM.getReferenceObject()), + new TMLPort(chToHSM.getName(), chToHSM.getReferenceObject())); + tmap.getTMLModeling().addChannel(chToHSM); + channelToHsmMap.put(taskChannelPair, chToHSM); + + return chToHSM; + } - //Connect encrypt and writechannel - enc.addNext(wr); + private TMLChannel findOrCreateChannelFromHSM(TMLTask hsmTask, TMLTask task, TMLChannel ch) { + Pair<TMLTask, TMLChannel> taskChannelPair = new Pair<>(task, ch); + if (channelFromHsmMap.containsKey(taskChannelPair)) { + return channelFromHsmMap.get(taskChannelPair); + } + String channelNameHSMInit = appName + "__" + "retDataCh_" + task.getTaskName() + "_" + ch.getChannelName(); + int indexHSM = 0; + String channelNameHSM = channelNameHSMInit; + while (tmap.getChannelByName(channelNameHSM) != null) { + channelNameHSM = channelNameHSMInit + indexHSM; + indexHSM ++; + } + TMLChannel chFromHSM = new TMLChannel(channelNameHSM, task.getReferenceObject()); + chFromHSM.setOriginTask(hsmTask); + chFromHSM.setDestinationTask(task); + chFromHSM.setPorts(new TMLPort(chFromHSM.getName(), chFromHSM.getReferenceObject()), + new TMLPort(chFromHSM.getName(), chFromHSM.getReferenceObject())); + tmap.getTMLModeling().addChannel(chFromHSM); + channelFromHsmMap.put(taskChannelPair, chFromHSM); + + return chFromHSM; + } - //Add Stop - TMLStopState stop = new TMLStopState("stop", taskAD.getReferenceObject()); - taskAD.addElement(stop); - //Connect stop and write channel - wr.addNext(stop); - } + private void addToSecurityTaskMap(TMLTask task, SecurityPattern sec) { + TMLModeling<?> tmlmodel = tmap.getTMLModeling(); + if (tmlmodel.getSecurityTaskMap().containsKey(sec)) { + if (!tmlmodel.getSecurityTaskMap().get(sec).contains(task)) { + tmlmodel.getSecurityTaskMap().get(sec).add(task); } - + } else { + List<TMLTask> listTask = new ArrayList<>(); + listTask.add(task); + tmlmodel.getSecurityTaskMap().put(sec, listTask); } } public TMLMapping<?> autoMapKeys() { if (tmap == null) { - return tmap; + return null; } //Find all Security Patterns, if they don't have an associated memory at encrypt and decrypt, tmap them TMLModeling<?> tmlm = tmap.getTMLModeling(); @@ -2135,7 +1453,8 @@ public class SecurityGenerationForTMAP implements Runnable { return tmap; } for (SecurityPattern sp : tmlm.getSecurityTaskMap().keySet()) { - if (sp.getType().equals(SecurityPattern.SYMMETRIC_ENC_PATTERN) || sp.getType().equals(SecurityPattern.MAC_PATTERN) || sp.getType().equals(SecurityPattern.ASYMMETRIC_ENC_PATTERN)) { + if (sp.getType().equals(SecurityPattern.SYMMETRIC_ENC_PATTERN) || sp.getType().equals(SecurityPattern.MAC_PATTERN) || + sp.getType().equals(SecurityPattern.ASYMMETRIC_ENC_PATTERN)) { for (TMLTask t : tmlm.getSecurityTaskMap().get(sp)) { HwExecutionNode node1 = tmap.getHwNodeOf(t); boolean taskMappedToCPU = false; @@ -2152,7 +1471,6 @@ public class SecurityGenerationForTMAP implements Runnable { HwBus curBus = link.bus; boolean keyFound = false; HwMemory memNodeToMap = null; - outer: for (HwLink linkBus : tmap.getArch().getHwLinks()) { if (linkBus.bus == curBus) { if (linkBus.hwnode instanceof HwMemory) { @@ -2161,7 +1479,7 @@ public class SecurityGenerationForTMAP implements Runnable { if (keys.contains(sp)) { keyFound = true; keyMappedtoMem = true; - break outer; + break; } } } @@ -2170,7 +1488,6 @@ public class SecurityGenerationForTMAP implements Runnable { if (memNodeToMap != null) { TraceManager.addDev("Adding " + sp.getName() + " key to " + memNodeToMap.getName()); tmap.addSecurityPattern(memNodeToMap, sp); - keyMappedtoMem = true; } else { HwMemory newHwMemory = new HwMemory(cpuNode.getName() + "KeysMemory"); TraceManager.addDev("Creating new memory: " + newHwMemory.getName()); @@ -2182,8 +1499,8 @@ public class SecurityGenerationForTMAP implements Runnable { tmap.getArch().getHwLinks().add(linkNewMemWithBus); tmap.addSecurityPattern(newHwMemory, sp); TraceManager.addDev("Adding " + sp.getName() + " key to " + newHwMemory.getName()); - keyMappedtoMem = true; } + keyMappedtoMem = true; } } } @@ -2211,7 +1528,6 @@ public class SecurityGenerationForTMAP implements Runnable { tmap.addSecurityPattern(memNodeToMap, sp); TraceManager.addDev("Adding " + sp.getName() + " key to " + memNodeToMap.getName()); - keyMappedtoMem = true; //Connect Bus and Memory HwLink newLinkBusMemory = new HwLink("Link_"+newPrivateBus.getName() + "_" + memNodeToMap.getName()); @@ -2259,36 +1575,8 @@ public class SecurityGenerationForTMAP implements Runnable { return tmap; } - class HSMChannel { - 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 TMLChannel channel; - public TMLTask task; - public int secType; - public String nonceName = ""; - - public HSMChannel(TMLChannel n, TMLTask t, int type) { - channel = n; - task = t; - secType = type; - } - } - - class ChannelData { - public String name; - public boolean isOrigin; - public boolean isChan; - - public ChannelData(String n, boolean orig, boolean isCh) { - name = n; - isOrigin = orig; - isChan = isCh; - } - + public void setTimeOutInSeconds(int timeOutInSeconds) { + this.timeOutInSeconds = timeOutInSeconds; } } diff --git a/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java b/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java index 9bab70e7b272f1a3fbe583007e09b2f663405990..b38ec5fb382b676f522043d296d77854902c1c07 100644 --- a/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java +++ b/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java @@ -58,56 +58,54 @@ public class TML2Avatar { private final static Integer channelPrivate = 1; private final static Integer channelUnreachable = 2; //private AvatarAttribute pKey; - private Map<TMLTask, AvatarBlock> taskBlockMap = new HashMap<TMLTask, AvatarBlock>(); - private Map<String, Integer> originDestMap = new HashMap<String, Integer>(); - private Map<String, Object> stateObjectMap = new HashMap<String, Object>(); - private Map<TMLTask, List<SecurityPattern>> accessKeys = new HashMap<TMLTask, List<SecurityPattern>>(); - private ArrayList<SecurityPattern> secPatterns = new ArrayList<SecurityPattern>(); + private final Map<TMLTask, AvatarBlock> taskBlockMap = new HashMap<>(); + private final Map<String, Integer> originDestMap = new HashMap<>(); + private final Map<String, Object> stateObjectMap = new HashMap<>(); + private final Map<TMLTask, List<SecurityPattern>> accessKeys = new HashMap<>(); + private final List<SecurityPattern> secPatterns = new ArrayList<>(); private int loopLimit = 1; - private HashMap<TMLActivityElement, Set<String>> channelsSecAttributes = new HashMap<TMLActivityElement, Set<String>>(); - private HashMap<TMLChannel, Set<AvatarPragma>> secChannelMap = new HashMap<TMLChannel, Set<AvatarPragma>>(); - private Map<TMLWriteChannel, Set<AvatarPragma>> confPragmaMap = new HashMap<TMLWriteChannel, Set<AvatarPragma>>();; - private Map<TMLActivityElement, Set<AvatarPragma>> authPragmaMap = new HashMap<TMLActivityElement, Set<AvatarPragma>>();; - private HashMap<String, List<AvatarAttributeState>> signalAuthOriginMap = new HashMap<String, List<AvatarAttributeState>>(); - private HashMap<String, List<AvatarAttributeState>> signalAuthDestMap = new HashMap<String, List<AvatarAttributeState>>(); - private List<AvatarSignal> signals = new ArrayList<AvatarSignal>(); + private final HashMap<TMLActivityElement, Set<String>> channelsSecAttributes = new HashMap<>(); + private final HashMap<TMLChannel, Set<AvatarPragma>> secChannelMap = new HashMap<>(); + private final Map<TMLWriteChannel, Set<AvatarPragma>> confPragmaMap = new HashMap<>(); + private final Map<TMLActivityElement, Set<AvatarPragma>> authPragmaMap = new HashMap<>(); + private final HashMap<String, List<AvatarAttributeState>> signalAuthOriginMap = new HashMap<>(); + private final HashMap<String, List<AvatarAttributeState>> signalAuthDestMap = new HashMap<>(); + private final List<AvatarSignal> signals = new ArrayList<>(); private AvatarSpecification avspec; - private ArrayList<String> attrsToCheck; - private List<String> allStates; - private boolean mc = false; - private boolean security = false; - private TMLMapping<?> tmlmap; - private TMLModeling<?> tmlmodel; - private Set<SecurityPattern> keysPublicBus = new HashSet<SecurityPattern>(); - private Map<SecurityPattern, List<AvatarAttribute>> symKeys = new HashMap<SecurityPattern, List<AvatarAttribute>>(); - private Map<SecurityPattern, List<AvatarAttribute>> pubKeys = new HashMap<SecurityPattern, List<AvatarAttribute>>(); - - private Map<SecurityPattern, AvatarAttribute> secPatternEncAttribute = new HashMap<SecurityPattern, AvatarAttribute>(); - private Map<SecurityPattern, AvatarAttribute> secPatternDecAttribute = new HashMap<SecurityPattern, AvatarAttribute>(); - private Map<SecurityPattern, AvatarPragmaSecret> secPatternPragmaMap = new HashMap<SecurityPattern, AvatarPragmaSecret>(); - private Map<String, String> nameMap = new HashMap<String, String>(); - private Map<String, AvatarSignal> signalInMap = new HashMap<String, AvatarSignal>(); - private Map<String, AvatarSignal> signalOutMap = new HashMap<String, AvatarSignal>(); - - private Object referenceObject; + private final List<String> allStates; + private final boolean mc; + private final boolean security; + private final TMLMapping<?> tmlmap; + private final TMLModeling<?> tmlmodel; + private final Set<SecurityPattern> keysPublicBus = new HashSet<>(); + private final Map<SecurityPattern, List<AvatarAttribute>> symKeys = new HashMap<>(); + private final Map<SecurityPattern, List<AvatarAttribute>> pubKeys = new HashMap<>(); + + private final Map<SecurityPattern, AvatarAttribute> secPatternEncAttribute = new HashMap<>(); + private final Map<SecurityPattern, AvatarAttribute> secPatternDecAttribute = new HashMap<>(); + private final Map<SecurityPattern, AvatarPragmaSecret> secPatternPragmaMap = new HashMap<>(); + private final Map<String, String> nameMap = new HashMap<>(); + private final Map<String, AvatarSignal> signalInMap = new HashMap<>(); + private final Map<String, AvatarSignal> signalOutMap = new HashMap<>(); + + private final Object referenceObject; public TML2Avatar(TMLMapping<?> tmlmap, boolean modelcheck, boolean sec, Object _referenceObject) { this.tmlmap = tmlmap; this.tmlmodel = tmlmap.getTMLModeling(); - allStates = new ArrayList<String>(); - attrsToCheck = new ArrayList<String>(); + allStates = new ArrayList<>(); mc = modelcheck; security = sec; referenceObject = _referenceObject; } - public void checkConnections() { + private void checkConnections() { List<HwLink> links = tmlmap.getTMLArchitecture().getHwLinks(); for (TMLTask t1 : tmlmodel.getTasks()) { - List<SecurityPattern> keys = new ArrayList<SecurityPattern>(); + List<SecurityPattern> keys = new ArrayList<>(); accessKeys.put(t1, keys); for (HwLink link : links) { if (link.bus.privacy == HwBus.BUS_PUBLIC && link.hwnode instanceof HwMemory) { @@ -118,9 +116,9 @@ public class TML2Avatar { HwExecutionNode node1 = tmlmap.getHwNodeOf(t1); //Try to find memory using only private buses from origin - List<HwNode> toVisit = new ArrayList<HwNode>(); + List<HwNode> toVisit = new ArrayList<>(); //List<HwNode> toMemory = new ArrayList<HwNode>(); - List<HwNode> complete = new ArrayList<HwNode>(); + List<HwNode> complete = new ArrayList<>(); for (HwLink link : links) { if (link.hwnode == node1) { if (link.bus.privacy == 1) { @@ -130,7 +128,7 @@ public class TML2Avatar { } boolean memory = false; //memloop: - while (toVisit.size() > 0) { + while (!toVisit.isEmpty()) { HwNode curr = toVisit.remove(0); for (HwLink link : links) { if (curr == link.bus) { @@ -167,20 +165,20 @@ public class TML2Avatar { //Navigate architecture for node //HwNode last = node1; - List<HwNode> found = new ArrayList<HwNode>(); - List<HwNode> done = new ArrayList<HwNode>(); - List<HwNode> path = new ArrayList<HwNode>(); - Map<HwNode, List<HwNode>> pathMap = new HashMap<HwNode, List<HwNode>>(); + List<HwNode> found = new ArrayList<>(); + List<HwNode> done = new ArrayList<>(); + List<HwNode> path = new ArrayList<>(); + Map<HwNode, List<HwNode>> pathMap = new HashMap<>(); for (HwLink link : links) { if (link.hwnode == node1) { found.add(link.bus); - List<HwNode> tmp = new ArrayList<HwNode>(); + List<HwNode> tmp = new ArrayList<>(); tmp.add(link.bus); pathMap.put(link.bus, tmp); } } outerloop: - while (found.size() > 0) { + while (!found.isEmpty()) { HwNode curr = found.remove(0); for (HwLink link : links) { if (curr == link.bus) { @@ -190,14 +188,14 @@ public class TML2Avatar { } 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)); + List<HwNode> tmp = new ArrayList<>(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)) { found.add(link.bus); - List<HwNode> tmp = new ArrayList<HwNode>(pathMap.get(curr)); + List<HwNode> tmp = new ArrayList<>(pathMap.get(curr)); tmp.add(link.bus); pathMap.put(link.bus, tmp); } @@ -205,7 +203,7 @@ public class TML2Avatar { } done.add(curr); } - if (path.size() == 0) { + if (path.isEmpty()) { originDestMap.put(t1.getName() + "__" + t2.getName(), channelUnreachable); } else { int priv = 1; @@ -329,7 +327,7 @@ public class TML2Avatar { TraceManager.addDev(channelMap); }*/ - public List<AvatarStateMachineElement> translateState(TMLActivityElement ae, AvatarBlock block) { + private List<AvatarStateMachineElement> translateState(TMLActivityElement ae, AvatarBlock block) { // TMLActionState tmlaction; // TMLChoice tmlchoice; @@ -351,7 +349,7 @@ public class TML2Avatar { // TMLDelay tmldelay; AvatarTransition tran = new AvatarTransition(block, "", null); - List<AvatarStateMachineElement> elementList = new ArrayList<AvatarStateMachineElement>(); + List<AvatarStateMachineElement> elementList = new ArrayList<>(); if (ae == null) { return elementList; @@ -393,7 +391,7 @@ public class TML2Avatar { for (AvatarStateMachineElement e : seq) { if (e instanceof AvatarStopState) { //ignore - } else if (e.getNexts().size() == 0) { + } else if (e.getNexts().isEmpty()) { e.addNext(tmp.get(0)); elementList.add(e); } else if (e.getNext(0) instanceof AvatarStopState) { @@ -411,7 +409,7 @@ public class TML2Avatar { //Put stop states on the end of the last in sequence for (AvatarStateMachineElement e : seq) { - if (e.getNexts().size() == 0 && !(e instanceof AvatarStopState)) { + if (e.getNexts().isEmpty() && !(e instanceof AvatarStopState)) { AvatarStopState stop = new AvatarStopState("stop", null, block); e.addNext(stop); elementList.add(stop); @@ -531,7 +529,7 @@ public class TML2Avatar { for (AvatarStateMachineElement e : tmp) { if (e instanceof AvatarStopState) { //ignore - } else if (e.getNexts().size() == 0) { + } else if (e.getNexts().isEmpty()) { e.addNext(choiceStateEnd); tranChoiceStateEnd.addNext(choiceState); elementList.add(e); @@ -936,7 +934,7 @@ public class TML2Avatar { if (signalAuthOriginMap.containsKey(ae.getSecurityPattern().getName())) { signalAuthOriginMap.get(ae.getSecurityPattern().getName()).add(authOrigin); } else { - LinkedList<AvatarAttributeState> tmp = new LinkedList<AvatarAttributeState>(); + LinkedList<AvatarAttributeState> tmp = new LinkedList<>(); tmp.add(authOrigin); signalAuthOriginMap.put(ae.getSecurityPattern().getName(), tmp); } @@ -998,7 +996,7 @@ public class TML2Avatar { if (signalAuthDestMap.containsKey(ae.getSecurityPattern().getName())) { signalAuthDestMap.get(ae.getSecurityPattern().getName()).add(authDest); } else { - LinkedList<AvatarAttributeState> tmp = new LinkedList<AvatarAttributeState>(); + LinkedList<AvatarAttributeState> tmp = new LinkedList<>(); tmp.add(authDest); signalAuthDestMap.put(ae.getSecurityPattern().getName(), tmp); } @@ -1054,7 +1052,7 @@ public class TML2Avatar { if (signalAuthDestMap.containsKey(ae.getSecurityPattern().getName())) { signalAuthDestMap.get(ae.getSecurityPattern().getName()).add(authDest); } else { - LinkedList<AvatarAttributeState> tmp = new LinkedList<AvatarAttributeState>(); + LinkedList<AvatarAttributeState> tmp = new LinkedList<>(); tmp.add(authDest); signalAuthDestMap.put(ae.getSecurityPattern().getName(), tmp); } @@ -1118,7 +1116,7 @@ public class TML2Avatar { if (signalAuthDestMap.containsKey(ae.getSecurityPattern().getName())) { signalAuthDestMap.get(ae.getSecurityPattern().getName()).add(authDest); } else { - LinkedList<AvatarAttributeState> tmp = new LinkedList<AvatarAttributeState>(); + LinkedList<AvatarAttributeState> tmp = new LinkedList<>(); tmp.add(authDest); signalAuthDestMap.put(ae.getSecurityPattern().getName(), tmp); } @@ -1193,7 +1191,7 @@ public class TML2Avatar { } TraceManager.addDev("InMap sig= " + sig.getSignalName()); AvatarActionOnSignal as = new AvatarActionOnSignal(ae.getName(), sig, ae.getReferenceObject(), block); - AvatarAttribute channelData = null; + AvatarAttribute channelData; String action = ""; if (ae.getSecurityPattern() != null) { //If nonce @@ -1213,6 +1211,10 @@ public class TML2Avatar { block.addAttribute(encryptedKey); } action = secPatternDecAttribute.get(ae.getSecurityPattern()).getName() + " = " + channelData.getName(); + } else { + String attributeName = setNewAttributeName(getName(ch.getName()) + "_chData", block); + channelData = new AvatarAttribute(attributeName, AvatarType.INTEGER, block, null); + block.addAttribute(channelData); } } else { //Send the encrypted data @@ -1225,6 +1227,10 @@ public class TML2Avatar { block.addAttribute(encrypted); } action = secPatternDecAttribute.get(ae.getSecurityPattern()).getName() + " = " + channelData.getName(); + } else { + String attributeName = setNewAttributeName(getName(ch.getName()) + "_chData", block); + channelData = new AvatarAttribute(attributeName, AvatarType.INTEGER, block, null); + block.addAttribute(channelData); } } } else { @@ -1232,9 +1238,8 @@ public class TML2Avatar { channelData = new AvatarAttribute(attributeName, AvatarType.INTEGER, block, null); block.addAttribute(channelData); } - if (channelData != null) { - as.addValue(channelData.getName()); - } + as.addValue(channelData.getName()); + tran = new AvatarTransition(block, "__after_" + ae.getName(), ae.getReferenceObject()); if (!action.isEmpty()) { tran.addAction(action); @@ -1256,7 +1261,7 @@ public class TML2Avatar { elementList.add(afterSignalState); elementList.add(tran); boolean foundDecrytionOp = false; - List<TMLActivityElement> allNextForAe = new ArrayList<TMLActivityElement>(ae.getNexts()); + List<TMLActivityElement> allNextForAe = new ArrayList<>(ae.getNexts()); if (ae.getSecurityPattern() != null) { while (!allNextForAe.isEmpty()) { TMLActivityElement nextAe = allNextForAe.get(0); @@ -1264,9 +1269,9 @@ public class TML2Avatar { if (security && nextAe.getSecurityPattern() != null) { if (nextAe instanceof TMLExecC) { if (((TMLExecC) nextAe).isDecryptionProcess()) { - if (nextAe.getSecurityPattern().equalSpec(ae.getSecurityPattern())) { + if (nextAe.getSecurityPattern().equalsSpec(ae.getSecurityPattern())) { if (!channelsSecAttributes.containsKey(nextAe)) { - Set<String> tmp = new HashSet<String>(); + Set<String> tmp = new HashSet<>(); channelsSecAttributes.put(nextAe, tmp); } channelsSecAttributes.get(nextAe).add(channelData.getName()); @@ -1281,7 +1286,7 @@ public class TML2Avatar { } if (!foundDecrytionOp) { if (!channelsSecAttributes.containsKey(ae)) { - Set<String> tmp = new HashSet<String>(); + Set<String> tmp = new HashSet<>(); channelsSecAttributes.put(ae, tmp); } channelsSecAttributes.get(ae).add(channelData.getName()); @@ -1297,7 +1302,7 @@ public class TML2Avatar { if (signalAuthDestMap.containsKey(ch.getName())) { signalAuthDestMap.get(ch.getName()).add(authDest); } else { - LinkedList<AvatarAttributeState> tmp = new LinkedList<AvatarAttributeState>(); + LinkedList<AvatarAttributeState> tmp = new LinkedList<>(); tmp.add(authDest); signalAuthDestMap.put(ch.getName(), tmp); } @@ -1322,7 +1327,7 @@ public class TML2Avatar { } TraceManager.addDev("OutMap sig= " + sig.getSignalName()); - AvatarAttribute channelData = null; + AvatarAttribute channelData; AvatarActionOnSignal as = new AvatarActionOnSignal(ae.getName(), sig, ae.getReferenceObject(), block); if (ae.getSecurityPattern() != null) { @@ -1341,6 +1346,10 @@ public class TML2Avatar { AvatarAttribute encrypted = new AvatarAttribute(secPatternEncAttribute.get(ae.getSecurityPattern()).getName(), AvatarType.INTEGER, block, null); block.addAttribute(encrypted); } + } else { + String attributeName = setNewAttributeName(getName(ch.getName()) + "_chData", block); + channelData = new AvatarAttribute(attributeName, AvatarType.INTEGER, block, null); + block.addAttribute(channelData); } } } else { @@ -1350,12 +1359,10 @@ public class TML2Avatar { channelData = new AvatarAttribute(attributeName, AvatarType.INTEGER, block, null); block.addAttribute(channelData); } - if (channelData != null) { - as.addValue(channelData.getName()); - } + as.addValue(channelData.getName()); //Add the confidentiality pragma for this channel data if (ch.checkConf) { - if (ch.originalOriginTasks.size() != 0 && ch.getOriginPort().getName().contains("PORTORIGIN")) { + if (!ch.originalOriginTasks.isEmpty() && ch.getOriginPort().getName().contains("PORTORIGIN")) { // System.out.println("Channel " + ch.getOriginPort().getName() + " block " + block.getName()); for (TMLTask origTask : ch.originalOriginTasks) { AvatarBlock bl = avspec.getBlockWithName(origTask.getName().split("__")[origTask.getName().split("__").length - 1]); @@ -1366,11 +1373,11 @@ public class TML2Avatar { new AvatarPragmaSecret("#Confidentiality " + bl.getName() + "." + channelData.getName(), ch.getReferenceObject(), attr); if (!secChannelMap.containsKey(ch)) { - Set<AvatarPragma> tmp = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp = new HashSet<>(); secChannelMap.put(ch, tmp); } if (!confPragmaMap.containsKey((TMLWriteChannel) ae)) { - Set<AvatarPragma> tmp = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp = new HashSet<>(); confPragmaMap.put((TMLWriteChannel) ae, tmp); } boolean isAvSecretInSet = false; @@ -1395,11 +1402,11 @@ public class TML2Avatar { new AvatarPragmaSecret("#Confidentiality " + block.getName() + "." + channelData.getName(), ch.getReferenceObject(), attr); if (!secChannelMap.containsKey(ch)) { - Set<AvatarPragma> tmp = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp = new HashSet<>(); secChannelMap.put(ch, tmp); } if (!confPragmaMap.containsKey((TMLWriteChannel) ae)) { - Set<AvatarPragma> tmp = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp = new HashSet<>(); confPragmaMap.put((TMLWriteChannel) ae, tmp); } boolean isAvSecretInSet = false; @@ -1422,7 +1429,7 @@ public class TML2Avatar { // To be removed in case another authenticity pragma is used on the channel // Also, to be duplicated for each send / receive boolean foundEncrytionOp = false; - List<TMLActivityElement> allPrevOfAe = new ArrayList<TMLActivityElement>(); + List<TMLActivityElement> allPrevOfAe = new ArrayList<>(); TMLActivity actDiagram = ch.getOriginTask().getActivityDiagram(); if (actDiagram.getPrevious(ae) != null) { allPrevOfAe.add(actDiagram.getPrevious(ae)); @@ -1436,7 +1443,7 @@ public class TML2Avatar { if (security && prevAe.getSecurityPattern() != null) { if (prevAe instanceof TMLExecC) { if (!((TMLExecC) prevAe).isDecryptionProcess()) { - if (prevAe.getSecurityPattern().equalSpec(ae.getSecurityPattern())) { + if (prevAe.getSecurityPattern().equalsSpec(ae.getSecurityPattern())) { foundEncrytionOp = true; } } @@ -1445,7 +1452,7 @@ public class TML2Avatar { allPrevOfAe.remove(prevAe); } } - if (foundEncrytionOp && secPatternEncAttribute.containsKey(ae.getSecurityPattern())) { + if (secPatternEncAttribute.containsKey(ae.getSecurityPattern())) { signalTran.addAction(channelData.getName() + " = " + secPatternEncAttribute.get(ae.getSecurityPattern()).getName()); } if (ch.checkAuth) { @@ -1459,7 +1466,7 @@ public class TML2Avatar { if (signalAuthOriginMap.containsKey(ch.getName())) { signalAuthOriginMap.get(ch.getName()).add(authOrigin); } else { - LinkedList<AvatarAttributeState> tmp = new LinkedList<AvatarAttributeState>(); + LinkedList<AvatarAttributeState> tmp = new LinkedList<>(); tmp.add(authOrigin); signalAuthOriginMap.put(ch.getName(), tmp); } @@ -1506,7 +1513,7 @@ public class TML2Avatar { //Process elements in loop to remove stop states and empty transitions, and loop back to choice for (AvatarStateMachineElement e : elements) { if (e instanceof AvatarStopState) { - } else if (e.getNexts().size() == 0) { + } else if (e.getNexts().isEmpty()) { if (e instanceof AvatarTransition) { e.addNext(as); elementList.add(e); @@ -1558,7 +1565,7 @@ public class TML2Avatar { } tran.addAction(AvatarTerm.createActionFromString(block, loop.getIncrement())); tran.addAction(AvatarTerm.createActionFromString(block, "loop_index = loop_index + 1")); - if (elements.size() > 0) { + if (!elements.isEmpty()) { tran.addNext(elements.get(0)); as.addNext(tran); elementList.add(tran); @@ -1566,7 +1573,7 @@ public class TML2Avatar { //Process elements in loop to remove stop states and empty transitions, and loop back to choice for (AvatarStateMachineElement e : elements) { if (e instanceof AvatarStopState) { - } else if (e.getNexts().size() == 0) { + } else if (e.getNexts().isEmpty()) { e.addNext(as); elementList.add(e); } else if (e.getNext(0) instanceof AvatarStopState) { @@ -1583,7 +1590,7 @@ public class TML2Avatar { tran = new AvatarTransition(block, "end_loop__" + ae.getName(), ae.getReferenceObject()); tran.setGuard(new AvatarGuardElse()); as.addNext(tran); - if (afterloop.size() == 0) { + if (afterloop.isEmpty()) { afterloop.add(new AvatarStopState("stop", null, block)); } tran.addNext(afterloop.get(0)); @@ -1601,7 +1608,7 @@ public class TML2Avatar { //tran.setGuard(c.getGuard(i)); as.addNext(tran); List<AvatarStateMachineElement> nexts = translateState(ae.getNextElement(i), block); - if (nexts.size() > 0) { + if (!nexts.isEmpty()) { tran.addNext(nexts.get(0)); elementList.add(tran); elementList.addAll(nexts); @@ -1626,7 +1633,7 @@ public class TML2Avatar { TraceManager.addDev("undefined tml element " + ae); } List<AvatarStateMachineElement> nexts = translateState(ae.getNextElement(0), block); - if (nexts.size() == 0) { + if (nexts.isEmpty()) { //in an infinite loop i hope return elementList; } @@ -1635,9 +1642,10 @@ public class TML2Avatar { return elementList; } - public String processName(String name, int id) { + private String processName(String name, int id) { name = reworkStringName(name).replaceAll("-", "_"); if (allStates.contains(name)) { + allStates.add(name + id); return name + id; } else { @@ -1700,7 +1708,6 @@ public class TML2Avatar { this.avspec = new AvatarSpecification("spec", null); } } - attrsToCheck.clear(); tmlmodel.removeForksAndJoins(); // System.out.println("MODIFIED model " + tmlmodel); @@ -1731,7 +1738,7 @@ public class TML2Avatar { Pattern r = Pattern.compile(pattern); Matcher m = r.matcher(_loopLimit); if (m.find()) { - loopLimit = Integer.valueOf(_loopLimit); + loopLimit = Integer.parseInt(_loopLimit); } for (TMLChannel channel : tmlmodel.getChannels()) { TraceManager.addDev("Checking auth of channel " + channel.getName() + ": " + channel.isCheckAuthChannel()); @@ -1889,13 +1896,13 @@ public class TML2Avatar { //AvatarTransition last; AvatarStateMachine asm = block.getStateMachine(); //TODO: Create a fork with many requests. This looks terrible + allStates.clear(); if (tmlmodel.getRequestToMe(task) != null) { //Create iteration attribute AvatarAttribute req_loop_index = new AvatarAttribute("req_loop_index", AvatarType.INTEGER, block, null); block.addAttribute(req_loop_index); - List<String> reqParams = new ArrayList<String>(); - for (Object obj : tmlmodel.getRequestsToMe(task)) { - TMLRequest req = (TMLRequest) obj; + List<String> reqParams = new ArrayList<>(); + for (TMLRequest req : tmlmodel.getRequestsToMe(task)) { for (TMLActivityElement elements : task.getActivityDiagram().getElements()) { if (elements instanceof TMLActionState) { TMLActionState actionsState = (TMLActionState) elements; @@ -1959,9 +1966,7 @@ public class TML2Avatar { e.setName(processName(e.getName(), e.getID())); stateObjectMap.put(task.getName().split("__")[task.getName().split("__").length-1] + "__" + e.getName(), e.getReferenceObject()); - if (e instanceof AvatarStopState) { - //ignore it - } else { + if (!(e instanceof AvatarStopState)) { for (int i = 0; i < e.getNexts().size(); i++) { if (e.getNext(i) instanceof AvatarStopState) { e.removeNext(i); @@ -1981,8 +1986,7 @@ public class TML2Avatar { //Add Requests, direct transition to start of state machine - for (Object obj : tmlmodel.getRequestsToMe(task)) { - TMLRequest req = (TMLRequest) obj; + for (TMLRequest req : tmlmodel.getRequestsToMe(task)) { AvatarTransition incrTran = new AvatarTransition(block, "__after_loopstart__" + req.getName(), task.getActivityDiagram().get(0).getReferenceObject()); incrTran.addAction(AvatarTerm.createActionFromString(block, "req_loop_index = req_loop_index + 1")); incrTran.setGuard(AvatarGuard.createFromString(block, "req_loop_index != " + loopLimit)); @@ -2065,7 +2069,7 @@ public class TML2Avatar { if (wc.hasChannel(ch) && actElem.getSecurityPattern() != null && actElem.getSecurityPattern().getName().equals(secPattern.getName())) { if (!secChannelMap.containsKey(ch)) { - Set<AvatarPragma> tmp0 = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp0 = new HashSet<>(); secChannelMap.put(ch, tmp0); } boolean isAvSecretInSet = false; @@ -2080,7 +2084,7 @@ public class TML2Avatar { } if (!confPragmaMap.containsKey(wc)) { - Set<AvatarPragma> tmp = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp = new HashSet<>(); confPragmaMap.put(wc, tmp); } confPragmaMap.get(wc).add(secPatternPragmaMap.get(secPattern)); @@ -2103,7 +2107,7 @@ public class TML2Avatar { TMLChannel ch = tmlmodel.getChannelByShortName(s); if (ch != null && ch.checkAuth) { if (!secChannelMap.containsKey(ch)) { - Set<AvatarPragma> tmp0 = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp0 = new HashSet<>(); secChannelMap.put(ch, tmp0); } boolean isAvSecretInSet = false; @@ -2124,7 +2128,7 @@ public class TML2Avatar { if (rd.hasChannel(ch) && channelsSecAttributes.containsKey(actElem) && channelsSecAttributes.get(actElem).contains(attributeStateDest.getAttribute().getName())) { if (!authPragmaMap.containsKey(rd)) { - Set<AvatarPragma> tmp = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp = new HashSet<>(); authPragmaMap.put(rd, tmp); } authPragmaMap.get(rd).add(pragma); @@ -2141,19 +2145,19 @@ public class TML2Avatar { if (actElem.getSecurityPattern() != null && channelsSecAttributes.containsKey(actElem) && channelsSecAttributes.get(actElem).contains(sec.getName())) { if (!authPragmaMap.containsKey(actElem)) { - Set<AvatarPragma> tmp = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp = new HashSet<>(); authPragmaMap.put(actElem, tmp); } authPragmaMap.get(actElem).add(pragma); } if (actElem.getSecurityPattern() != null && actElem instanceof TMLActivityElementChannel && - actElem.getSecurityPattern().equalSpec(sec)) { + actElem.getSecurityPattern().equalsSpec(sec)) { TMLActivityElementChannel actCh = (TMLActivityElementChannel) actElem; for (int i = 0; i < actCh.getNbOfChannels(); i++) { TMLChannel chSec = actCh.getChannel(i); if (chSec.checkAuth) { if (!secChannelMap.containsKey(chSec)) { - Set<AvatarPragma> tmp0 = new HashSet<AvatarPragma>(); + Set<AvatarPragma> tmp0 = new HashSet<>(); secChannelMap.put(chSec, tmp0); } boolean isAvSecretInSet = false; @@ -2177,7 +2181,7 @@ public class TML2Avatar { } } } - List<AvatarPragma> avPragmas = new ArrayList<AvatarPragma>(); + List<AvatarPragma> avPragmas = new ArrayList<>(); for (TMLChannel ch : secChannelMap.keySet()) { for (AvatarPragma avPragma : secChannelMap.get(ch)) { boolean isAvSecretInSet = false; @@ -2193,9 +2197,8 @@ public class TML2Avatar { } } // Put AvatarPragmaAuthenticity pragmas at the end of the list. - List<AvatarPragma> avPragmasToMove = new ArrayList<AvatarPragma>(); - for (int indexAvPragmas=0; indexAvPragmas < avPragmas.size(); indexAvPragmas++){ - AvatarPragma avPragma = avPragmas.get(indexAvPragmas); + List<AvatarPragma> avPragmasToMove = new ArrayList<>(); + for (AvatarPragma avPragma : avPragmas) { if (avPragma instanceof AvatarPragmaAuthenticity) { avPragmasToMove.add(avPragma); } @@ -2332,7 +2335,7 @@ public class TML2Avatar { taskBlockMap.get(channel.getDestinationTask()), channel.getReferenceObject()); LinkedList<HwCommunicationNode> path = tmlmap.findNodesForElement(channel); //TraceManager.addDev("CHAN checking basic channel " + channel.getName() + " path size: " + path.size()); - if (path.size() != 0) { + if (!path.isEmpty()) { ar.setPrivate(true); for (HwCommunicationNode node : path) { //TraceManager.addDev("CHAN\t Element of path: " + node.getName()); @@ -2345,7 +2348,7 @@ public class TML2Avatar { } } } else { - if (channel.originalOriginTasks.size() == 0) { + if (channel.originalOriginTasks.isEmpty()) { ar.setPrivate(originDestMap.get(channel.getOriginTask().getName() + "__" + channel.getDestinationTask().getName()) == 1); } else { //System.out.println("complex channel " + channel.getName()); @@ -2381,64 +2384,27 @@ public class TML2Avatar { } //Find in signal - List<AvatarSignal> sig1 = new ArrayList<AvatarSignal>(); + List<AvatarSignal> sig1 = new ArrayList<>(); //Sig1 contains IN Signals, Sig2 contains OUT signals sig1.add(signalInMap.get(channel.getName())); - List<AvatarSignal> sig2 = new ArrayList<AvatarSignal>(); + List<AvatarSignal> sig2 = new ArrayList<>(); sig2.add(signalOutMap.get(channel.getName())); - for (AvatarSignal sig : signals) { - if (sig.getInOut() == AvatarSignal.IN) { - String name = sig.getName(); - if (name.equals(getName(channel.getName()))) { - // sig1.add(sig); - } - } - } //Find out signal - for (AvatarSignal sig : signals) { - if (sig.getInOut() == AvatarSignal.OUT) { - String name = sig.getName(); - if (name.equals(channel.getOriginPort().getName())) { - // sig2.add(sig); - } - } - } - //System.out.println("size " + sig1.size() + " " + sig2.size()); - if (sig1.size() == 0) { - sig1.add(new AvatarSignal(getName(channel.getName()), AvatarSignal.IN, null)); - } - if (sig2.size() == 0) { - sig2.add(new AvatarSignal(getName(channel.getName()), AvatarSignal.OUT, null)); - } - if (sig1.size() == 1 && sig2.size() == 1) { - if (channel.getType() == TMLChannel.NBRNBW && mc) { - AvatarSignal read = fifo.getSignalByName("readSignal"); - - ar.block2 = fifo; - //Set IN signal with read - ar.addSignals(sig1.get(0), read); - AvatarRelation ar2 = new AvatarRelation(channel.getName() + "2", fifo, taskBlockMap.get(channel.getDestinationTask()), channel.getReferenceObject()); - AvatarSignal write = fifo.getSignalByName("writeSignal"); - //set OUT signal with write - ar2.addSignals(write, sig2.get(0)); - // System.out.println("Set " + sig2.get(0) + " and write"); - ar2.setAsynchronous(false); - avspec.addRelation(ar2); - } else { - ar.addSignals(sig2.get(0), sig1.get(0)); - } + if (channel.getType() == TMLChannel.NBRNBW && mc) { + AvatarSignal read = fifo.getSignalByName("readSignal"); + + ar.block2 = fifo; + //Set IN signal with read + ar.addSignals(sig1.get(0), read); + AvatarRelation ar2 = new AvatarRelation(channel.getName() + "2", fifo, taskBlockMap.get(channel.getDestinationTask()), channel.getReferenceObject()); + AvatarSignal write = fifo.getSignalByName("writeSignal"); + //set OUT signal with write + ar2.addSignals(write, sig2.get(0)); + // System.out.println("Set " + sig2.get(0) + " and write"); + ar2.setAsynchronous(false); + avspec.addRelation(ar2); } else { - //Create relation if it does not exist - if (top.getSignalByName(getName(channel.getName()) + "in") == null) { - AvatarRelation relation = new AvatarRelation(channel.getName(), top, top, channel.getReferenceObject()); - AvatarSignal s1 = new AvatarSignal(getName(channel.getName()) + "in", AvatarSignal.IN, null); - AvatarSignal s2 = new AvatarSignal(getName(channel.getName()) + "out", AvatarSignal.OUT, null); - top.addSignal(s1); - top.addSignal(s2); - relation.addSignals(s2, s1); - avspec.addRelation(relation); - // System.out.println("Failure to match signals for TMLChannel "+ channel.getName()); - } + ar.addSignals(sig2.get(0), sig1.get(0)); } avspec.addRelation(ar); } else { @@ -2456,8 +2422,8 @@ public class TML2Avatar { AvatarRelation ar = new AvatarRelation(channel.getName(), taskBlockMap.get(t1), taskBlockMap.get(t2), channel.getReferenceObject()); ar.setPrivate(originDestMap.get(t1.getName() + "__" + t2.getName()) == 1); //Find in signal - List<AvatarSignal> sig1 = new ArrayList<AvatarSignal>(); - List<AvatarSignal> sig2 = new ArrayList<AvatarSignal>(); + List<AvatarSignal> sig1 = new ArrayList<>(); + List<AvatarSignal> sig2 = new ArrayList<>(); for (AvatarSignal sig : signals) { if (sig.getInOut() == AvatarSignal.IN) { String name = sig.getName(); @@ -2475,16 +2441,16 @@ public class TML2Avatar { } } } - if (sig1.size() == 0) { + if (sig1.isEmpty()) { sig1.add(new AvatarSignal(getName(channel.getName()), AvatarSignal.IN, null)); } - if (sig2.size() == 0) { + if (sig2.isEmpty()) { sig2.add(new AvatarSignal(getName(channel.getName()), AvatarSignal.OUT, null)); } if (sig1.size() == 1 && sig2.size() == 1) { ar.addSignals(sig2.get(0), sig1.get(0)); } else { - System.out.println("Failure to match signals for TMLChannel " + channel.getName() + " between " + t1.getName() + " and " + t2.getName()); + TraceManager.addDev("Failure to match signals for TMLChannel " + channel.getName() + " between " + t1.getName() + " and " + t2.getName()); } avspec.addRelation(ar); } @@ -2495,8 +2461,8 @@ public class TML2Avatar { for (TMLTask t1 : request.getOriginTasks()) { AvatarRelation ar = new AvatarRelation(request.getName(), taskBlockMap.get(t1), taskBlockMap.get(request.getDestinationTask()), request.getReferenceObject()); ar.setPrivate(originDestMap.get(t1.getName() + "__" + request.getDestinationTask().getName()) == 1); - List<AvatarSignal> sig1 = new ArrayList<AvatarSignal>(); - List<AvatarSignal> sig2 = new ArrayList<AvatarSignal>(); + List<AvatarSignal> sig1 = new ArrayList<>(); + List<AvatarSignal> sig2 = new ArrayList<>(); for (AvatarSignal sig : signals) { if (sig.getInOut() == AvatarSignal.IN) { String name = sig.getName(); @@ -2516,17 +2482,17 @@ public class TML2Avatar { } } } - if (sig1.size() == 0) { + if (sig1.isEmpty()) { sig1.add(new AvatarSignal(getName(request.getName()), AvatarSignal.IN, null)); } - if (sig2.size() == 0) { + if (sig2.isEmpty()) { sig2.add(new AvatarSignal(getName(request.getName()), AvatarSignal.OUT, null)); } if (sig1.size() == 1 && sig2.size() == 1) { ar.addSignals(sig2.get(0), sig1.get(0)); } else { //Throw error - System.out.println("Could not match for " + request.getName()); + TraceManager.addDev("Could not match for " + request.getName()); } ar.setAsynchronous(false); @@ -2565,7 +2531,7 @@ public class TML2Avatar { //check that all signals are put in relations AvatarRelation ar = avspec.getAvatarRelationWithSignal(sig); if (ar == null) { - System.out.println("missing relation for " + sig.getName()); + TraceManager.addDev("missing relation for " + sig.getName()); } } //Check if we matched up all signals @@ -2585,7 +2551,7 @@ public class TML2Avatar { AvatarBlock b = taskBlockMap.get(taskPattern); AvatarAttribute attrib = b.getAvatarAttributeWithName("key_" + sp.getName()); if (attrib != null) { - LinkedList<AvatarAttribute> arguments = new LinkedList<AvatarAttribute>(); + LinkedList<AvatarAttribute> arguments = new LinkedList<>(); arguments.add(attrib); avspec.addPragma(new AvatarPragmaPublic("#Public " + b.getName() + "." + attrib.getName(), null, arguments)); } @@ -2593,9 +2559,9 @@ public class TML2Avatar { } } for (SecurityPattern sp : pubKeys.keySet()) { - if (pubKeys.get(sp).size() != 0) { + if (!pubKeys.get(sp).isEmpty()) { String keys = ""; - List<String> pubKeyNames = new ArrayList<String>(); + List<String> pubKeyNames = new ArrayList<>(); for (AvatarAttribute key : pubKeys.get(sp)) { if (!pubKeyNames.contains(key.getBlock().getName() + "." + key.getName())) { keys = keys + " " + key.getBlock().getName() + "." + key.getName(); @@ -2639,7 +2605,7 @@ public class TML2Avatar { } } - public void distributeKeys() { + private void distributeKeys() { List<TMLTask> tasks = tmlmap.getTMLModeling().getTasks(); for (TMLTask t : accessKeys.keySet()) { AvatarBlock b = taskBlockMap.get(t); @@ -2649,7 +2615,7 @@ public class TML2Avatar { if (symKeys.containsKey(sp)) { symKeys.get(sp).add(key); } else { - LinkedList<AvatarAttribute> tmp = new LinkedList<AvatarAttribute>(); + LinkedList<AvatarAttribute> tmp = new LinkedList<>(); tmp.add(key); symKeys.put(sp, tmp); } @@ -2665,7 +2631,7 @@ public class TML2Avatar { if (pubKeys.containsKey(sp)) { pubKeys.get(sp).add(pubkey); } else { - LinkedList<AvatarAttribute> tmp = new LinkedList<AvatarAttribute>(); + LinkedList<AvatarAttribute> tmp = new LinkedList<>(); tmp.add(pubkey); pubKeys.put(sp, tmp); } @@ -2684,7 +2650,7 @@ public class TML2Avatar { } - public AvatarBlock createFifo(String name) { + private AvatarBlock createFifo(String name) { AvatarBlock fifo = new AvatarBlock("FIFO__FIFO" + name, avspec, null); AvatarState root = new AvatarState("root", null, fifo, false, false); AvatarSignal read = new AvatarSignal("readSignal", AvatarSignal.IN, null); @@ -2731,12 +2697,7 @@ public class TML2Avatar { return fifo; } - - public AvatarSpecification convertToSecurityType(AvatarSpecification spec) { - return spec; - } - - public AvatarType getAvatarType(TMLType p) { + private AvatarType getAvatarType(TMLType p) { switch (p.getType()) { case TMLType.NATURAL: return AvatarType.INTEGER; @@ -2746,7 +2707,7 @@ public class TML2Avatar { return AvatarType.UNDEFINED; } - public String getNameReworked(String name, int index) { + private String getNameReworked(String name, int index) { String[] split = name.split("__"); if (split.length > index) { return split[index]; @@ -2798,7 +2759,7 @@ public class TML2Avatar { //Create concat2 method AvatarAttribute msg1 = new AvatarAttribute("msg1", AvatarType.INTEGER, block, null); AvatarAttribute msg2 = new AvatarAttribute("msg2", AvatarType.INTEGER, block, null); - AvatarAttribute ConcatedMsg = new AvatarAttribute("ConcatedMsg", AvatarType.INTEGER, block, null); + AvatarAttribute ConcatedMsg = new AvatarAttribute("ConcatenatedMsg", AvatarType.INTEGER, block, null); AvatarMethod concat2 = new AvatarMethod("concat2", ae); concat2.addParameter(msg1); concat2.addParameter(msg2); diff --git a/src/main/java/ui/AvatarDesignPanelTranslator.java b/src/main/java/ui/AvatarDesignPanelTranslator.java index 7fce6e230811dd8a8e24f46fcfb59430815c18cb..81e568686c0655b0125891a238e539a99dc90bf5 100644 --- a/src/main/java/ui/AvatarDesignPanelTranslator.java +++ b/src/main/java/ui/AvatarDesignPanelTranslator.java @@ -187,6 +187,7 @@ public class AvatarDesignPanelTranslator { } } + as.makeAllTags(); adp.abdp.repaint(); return as; } diff --git a/src/main/java/ui/AvatarPanelDrawer.java b/src/main/java/ui/AvatarPanelDrawer.java index 0cc9e7ad51647420d0de1c0ba4a8dc3c6c78bc26..40278f99ee30d3e934c2bf53a59179475fddd49c 100644 --- a/src/main/java/ui/AvatarPanelDrawer.java +++ b/src/main/java/ui/AvatarPanelDrawer.java @@ -923,7 +923,10 @@ public class AvatarPanelDrawer { TraceManager.addDev("Setting name of block: " + bl.getBlockName()); if (useOriginalValues) { + TraceManager.addDev("** Attributes: Using original attributes"); for (AvatarAttribute attr : ab.getOriginalAttributes()) { + TraceManager.addDev("Handling original attributes"); + TraceManager.addDev("\tHandling attribute: " + attr); if (attr.isDataType()) { bl.addAttribute(new TAttribute(0, attr.getName(), attr.getInitialValue(), attr.getDataType().getName())); } else { @@ -950,7 +953,9 @@ public class AvatarPanelDrawer { } } } else { + TraceManager.addDev("** Handling regular attributes"); for (AvatarAttribute attr : ab.getAttributes()) { + TraceManager.addDev("\tHandling attribute: " + attr); int type = TAttribute.OTHER; if (attr.getType() == AvatarType.BOOLEAN) { type = TAttribute.BOOLEAN; diff --git a/src/main/java/ui/DrawerTMAPModeling.java b/src/main/java/ui/DrawerTMAPModeling.java index 93d5dec7c0eb54873f75f417d218264dfa258bdb..f4b084612e00670bf07ab59608c3b97b85a44d68 100644 --- a/src/main/java/ui/DrawerTMAPModeling.java +++ b/src/main/java/ui/DrawerTMAPModeling.java @@ -101,7 +101,7 @@ public class DrawerTMAPModeling { return; } - tmap.NullifyAutomata(); + tmap.resetMinimalMapping(); TMLSyntaxChecking syntax = new TMLSyntaxChecking(tmap); syntax.checkSyntax(); if (syntax.hasErrors() > 0) { diff --git a/src/main/java/ui/GTURTLEModeling.java b/src/main/java/ui/GTURTLEModeling.java index 8eaefff1825c998b203e0c9ed4d60b158aac8441..8e3f4dde700c85ff954d1bef6bc0294b45c34c3a 100644 --- a/src/main/java/ui/GTURTLEModeling.java +++ b/src/main/java/ui/GTURTLEModeling.java @@ -52,6 +52,7 @@ import avatartranslator.toturtle.AVATAR2TURTLE; import avatartranslator.touppaal.AVATAR2UPPAAL; import common.ConfigurationTTool; import common.SpecConfigTTool; +import common.Tag; import ddtranslator.DDSyntaxException; import ddtranslator.DDTranslator; import graph.RG; @@ -1787,7 +1788,8 @@ public class GTURTLEModeling { } @SuppressWarnings("unchecked") - public void autoSecure(MainGUI gui, String encComp, String overhead, String decComp, Vector<String> channelsToAddSec, Map<String, List<String>> selectedCpuTasks) { + public void autoSecure(MainGUI gui, String encComp, String overhead, String decComp, Vector<String> channelsToAddSec, + List<String> selectedCpuTasks, boolean isLinkedHsm) { if (tmap == null) { return; } @@ -1800,18 +1802,18 @@ public class GTURTLEModeling { String[] sec = secToAdd.split(" \\+ "); for (String s : sec) { if (s.equals(JDialogProverifVerification.ADD_CONFIDENTIALITY)) { - ch.setEnsureConf(true); + ch.setSecurityGoalConf(true); ch.checkConf = true; checkAddSec = true; } if (s.equals(JDialogProverifVerification.ADD_WEAK_AUTHENTICITY)) { - ch.setEnsureWeakAuth(true); + ch.setSecurityGoalWeakAuth(true); ch.checkAuth = true; checkAddSec = true; } if (s.equals(JDialogProverifVerification.ADD_STRONG_AUTHENTICITY)) { - ch.setEnsureWeakAuth(true); - ch.setEnsureStrongAuth(true); + ch.setSecurityGoalWeakAuth(true); + ch.setSecurityGoalStrongAuth(true); ch.checkAuth = true; checkAddSec = true; } @@ -1820,7 +1822,7 @@ public class GTURTLEModeling { } if (checkAddSec) { String appTabName = ((TGComponent) tmap.getTMLModeling().getReference()).getTDiagramPanel().tp.getNameOfTab(); - SecurityGenerationForTMAP secgen = new SecurityGenerationForTMAP(appTabName, tmap, encComp, overhead, decComp, selectedCpuTasks); + SecurityGenerationForTMAP secgen = new SecurityGenerationForTMAP(appTabName, tmap, encComp, overhead, decComp, selectedCpuTasks, isLinkedHsm); tmap = (TMLMapping<TGComponent>) secgen.startThread(); if (tmap != null) TraceManager.addDev("Map keys Auto"); @@ -7958,6 +7960,7 @@ public class GTURTLEModeling { boolean masterMutex = false; boolean enable = true; boolean isNewSet = false; + String tags = null; for (i = 0; i < nl.getLength(); i++) { @@ -8036,6 +8039,9 @@ public class GTURTLEModeling { } else if (elt.getTagName().equals("color")) { color = Integer.decode(elt.getAttribute("value")); colorFound = true; + } else if (elt.getTagName().equals("tags")) { + tags = elt.getAttribute("value"); + //TraceManager.addDev("Loaded tags:" + tags); } } } @@ -8137,6 +8143,14 @@ public class GTURTLEModeling { tgc.setCurrentColor(color); } + if ((tags != null) && (tags.trim().length() > 0)){ + TraceManager.addDev("-----------------------------------> Found tags: " + tags); + for(String s: tags.split(" ")) { + tgc.addTag(new Tag(s)); + } + } + //TraceManager.addDev("tags loaded"); + tgc.setAsNew(isNewSet); if (referenceId != -1) { diff --git a/src/main/java/ui/MainGUI.java b/src/main/java/ui/MainGUI.java index 983fe20948bb2e2303a385f6f24a5770a39a5f0e..3dd7b7a6c46937ac0f431979ce0152ba2965027d 100644 --- a/src/main/java/ui/MainGUI.java +++ b/src/main/java/ui/MainGUI.java @@ -4133,6 +4133,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per if (b) { ret = true; setMode(MainGUI.AVATAR_SYNTAXCHECKING_OK); + cli.Interpreter.clearAvatarSpecification(); // setMode(MainGUI.GEN_DESIGN_OK); /* * if (!automatic) { JOptionPane.showMessageDialog(frame, "0 error, " + diff --git a/src/main/java/ui/ModelParameters.java b/src/main/java/ui/ModelParameters.java index 70203378148f9f6f8cedcf7392a0ec35dbb74e92..4a12b3fdeef3b25e095ef20e430e376d19dd43e6 100644 --- a/src/main/java/ui/ModelParameters.java +++ b/src/main/java/ui/ModelParameters.java @@ -63,9 +63,10 @@ public class ModelParameters { "ANIMATE_WITH_INFO_DIPLO_SIM", // Diplo simulator "OPEN_DIAG_DIPLO_SIM", // Diplo simulator "LAST_SELECTED_MAIN_TAB", - "LAST_SELECTED_SUB_TAB" + "LAST_SELECTED_SUB_TAB", + "TAGS", "SHOW_TAGS" }; - private static String[] values = {"true", "true", "true", "true", "false", "0", "0"}; + private static String[] values = {"true", "true", "true", "true", "false", "0", "0", "deactivated root", "true"}; public static boolean getBooleanValueFromID(String value) { for(int i=0; i<ids.length; i++) { @@ -85,6 +86,15 @@ public class ModelParameters { return 0; } + public static String getStringValueFromID(String value) { + for(int i=0; i<ids.length; i++) { + if (ids[i].compareTo(value) == 0) { + return values[i]; + } + } + return null; + } + public static String toXML() { String ret = ""; for(int i=0; i<ids.length; i++) { diff --git a/src/main/java/ui/TDiagramPanel.java b/src/main/java/ui/TDiagramPanel.java index f51b1f621b1422c54e00dea17b0c75df189ae683..c7f56396e35b8ce39118e3843980a46ca5c2eb79 100644 --- a/src/main/java/ui/TDiagramPanel.java +++ b/src/main/java/ui/TDiagramPanel.java @@ -39,13 +39,12 @@ package ui; import avatartranslator.ElementWithNew; +import common.Tag; import myutil.GenericTree; import myutil.GraphicLib; import myutil.TraceManager; import myutilsvg.SVGGeneration; import myutilsvg.SVGGraphics; -import tmltranslator.TMLActivityElement; -import tmltranslator.TMLTask; import ui.atd.ATDAttack; import ui.atd.ATDBlock; import ui.avatarad.AvatarADActivity; @@ -146,7 +145,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { protected TGComponent componentHovered; // popupmenus - protected ActionListener menuAL; + protected ActionListener menuAL, menuAddTag, menuRemoveTag; protected JPopupMenu diagramMenu; protected JPopupMenu componentMenu; protected JPopupMenu selectedMenu; @@ -154,11 +153,12 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { protected JMenuItem remove, edit, clone, bringFront, bringBack, makeSquare, setJavaCode, removeJavaCode, setInternalComment, removeInternalComment, attach, detach, hide, unhide, search, enableDisable, setAsCryptoBlock, setAsRegularBlock, setMainColor, setDefaultColor, tosysmlv2, toText, setAsNew, showStats; + protected JMenu addTagMenu, removeTagMenu; protected JMenuItem checkAccessibility, checkInvariant, checkMasterMutex, checkLatency; protected JMenuItem gotoReference; protected JMenuItem showProVerifTrace; protected JMenuItem breakpoint; - protected JMenuItem paste, insertLibrary, upX, upY, downX, downY, fitToContent, backToMainDiagram; + protected JMenuItem paste, insertLibrary, upX, upY, downX, downY, fitToContent, backToMainDiagram, showTagsMenuItem; protected JMenuItem cut, copy, saveAsLibrary, captureSelected; //author:huytruong //search dialog @@ -188,6 +188,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { private double fontModifier = 1.0; private boolean draw; + private boolean showTags; // Issue #14 point 10: Always use the current graphics //private Graphics lastGraphics; @@ -485,6 +486,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } public void basicPaintMyComponents(Graphics g) { + + showTags = ModelParameters.getBooleanValueFromID("SHOW_TAGS"); + TraceManager.addDev("Showing tags? " + showTags); + TGComponent tgc; for (int i = componentList.size() - 1; i >= 0; i--) { tgc = this.componentList.get(i); @@ -497,6 +502,10 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } } + public boolean showTags() { + return showTags; + } + private Font fontToUse = null; public void paintMyComponents(Graphics g, boolean b, double w, double h) { @@ -506,6 +515,9 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { return; } + showTags = ModelParameters.getBooleanValueFromID("SHOW_TAGS"); + //TraceManager.addDev("Showing tags? " + showTags); + if (this.fontToUse == null) this.fontToUse = g.getFont(); else @@ -1602,6 +1614,32 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { componentMenu.add(checkInvariant); componentMenu.add(checkLatency); componentMenu.add(gotoReference); + addTagMenu = new JMenu("addTag"); + String fullTags = ModelParameters.getStringValueFromID("TAGS"); + if (fullTags != null) { + String tags[] = fullTags.split(" "); + for(int i=0; i<tags.length; i++) { + if (!tgc.hasTag(tags[i])) { + JMenuItem jmi = new JMenuItem(tags[i]); + jmi.addActionListener(menuAddTag); + addTagMenu.add(jmi); + } + } + } + componentMenu.add(addTagMenu); + removeTagMenu = new JMenu("removeTag"); + if (tgc.getTags() != null) { + for(Tag t: tgc.getAllTags()) { + JMenuItem jmi = new JMenuItem(t.toString()); + jmi.addActionListener(menuRemoveTag); + removeTagMenu.add(jmi); + } + + } + componentMenu.add(removeTagMenu); + + + componentMenu.add(removeTagMenu); componentMenu.add(showProVerifTrace); componentMenu.add(checkMasterMutex); componentMenu.add(breakpoint); @@ -1629,6 +1667,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { diagramMenu.add(downY); diagramMenu.add(fitToContent); diagramMenu.add(backToMainDiagram); + diagramMenu.add(showTagsMenuItem); diagramMenu.add(tosysmlv2); diagramMenu.add(toText); diagramMenu.add(showStats); @@ -1655,6 +1694,20 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } }; + menuAddTag = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popupAddTag(e); + } + }; + + menuRemoveTag = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popupRemoveTag(e); + } + }; + remove = new JMenuItem("Remove"); remove.addActionListener(menuAL); @@ -1732,6 +1785,9 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { gotoReference = new JMenuItem("Go to reference"); gotoReference.addActionListener(menuAL); + + + showProVerifTrace = new JMenuItem("Show attack trace"); showProVerifTrace.addActionListener(menuAL); @@ -1780,6 +1836,17 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } }); + showTagsMenuItem = new JMenuItem("show / unshow tags"); + showTagsMenuItem.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + boolean b = ModelParameters.getBooleanValueFromID("SHOW_TAGS"); + ModelParameters.setValueForID("SHOW_TAGS", "" + !b); + repaint(); + } + }); + tosysmlv2 = new JMenuItem("to SysML V2"); tosysmlv2.addActionListener(new ActionListener() { @@ -1875,6 +1942,18 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { } } + private void popupAddTag(ActionEvent e) { + String s = e.getActionCommand(); + componentPopup.addTag(new Tag(s)); + repaint(); + } + + private void popupRemoveTag(ActionEvent e) { + String s = e.getActionCommand(); + componentPopup.removeTag(s); + repaint(); + } + private void popupAction(ActionEvent e) { if (e.getSource() == remove) { removeComponent(componentPopup); diff --git a/src/main/java/ui/TGComponent.java b/src/main/java/ui/TGComponent.java index 321a78b3ac8b1fb48bd5264c5177fa6a995461c3..8ec863ea5ae16373fd07e0a31fad3a3c2f4f28de 100644 --- a/src/main/java/ui/TGComponent.java +++ b/src/main/java/ui/TGComponent.java @@ -41,6 +41,9 @@ package ui; import avatartranslator.ElementWithUUID; +import common.CanBeTagged; +import common.Tag; +import common.Tags; import myutil.*; import org.w3c.dom.NodeList; import tmltranslator.simulation.SimulationTransaction; @@ -73,7 +76,8 @@ import java.util.*; * @version 1.0 21/12/2003 */ -public abstract class TGComponent extends AbstractCDElement implements /*CDElement,*/ GenericTree, ElementWithUUID, NameChecker.NamedElement { +public abstract class TGComponent extends AbstractCDElement implements /*CDElement,*/ GenericTree, ElementWithUUID, NameChecker.NamedElement, + CanBeTagged { protected final static String XML_HEAD = "<COMPONENT type=\""; protected final static String XML_ID = "\" id=\""; @@ -162,6 +166,9 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme protected boolean userResizable; protected boolean hidden; + // Tags + public Tags tags; + //Associated transactions public String transaction = ""; public List<SimulationTransaction> transactions = new ArrayList<SimulationTransaction>(); @@ -212,7 +219,7 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme protected boolean mutualExclusionWithMasterMutex; protected String nameOfMasterStateMutex; - protected HashSet<String> tags; + protected HashSet<String> annotations; protected boolean breakpoint; @@ -243,6 +250,7 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme setState(TGState.NORMAL); canBeCloned = true; + tags = new Tags(); id = ID; @@ -1047,15 +1055,15 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme } - public void addTag(String tag) { - if (tags == null) { - tags = new HashSet<>(); + public void addAnnotation(String tag) { + if (annotations == null) { + annotations = new HashSet<>(); } - tags.add(tag); + annotations.add(tag); } - public void clearTag() { - tags = null; + public void clearAnnotations() { + annotations = null; } /** @@ -1183,19 +1191,35 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme g.setFont(f); } - if ((tags != null) && (tags.size() > 0)) { + if ((annotations != null) && (annotations.size() > 0)) { g.setColor(ColorManager.ATD_ROOT_ATTACK); Font f = g.getFont(); g.setFont(f.deriveFont(Font.BOLD)); String tag = ""; - for(String s: tags) { + for(String s: annotations) { tag += "\"" + s + "\" "; } g.drawString(tag.trim(), x + width + 2, y + height/2); g.setFont(f); } + if (tdp.showTags()) { + if ((tags != null) && (tags.getAllTags().size() > 0)) { + g.setColor(ColorManager.ATD_ROOT_ATTACK); + Font f = g.getFont(); + g.setFont(f.deriveFont(Font.BOLD)); + + String tag = ""; + for (Tag t : tags.getAllTags()) { + tag += "\"" + t + "\" "; + } + g.drawString(tag.trim(), x + width + 2, y + height / 3); + g.setFont(f); + } + } + + if (TDiagramPanel.DIPLO_ANIMATE_ON) { if (!((this instanceof TGConnector) || (this instanceof TGCNote) || (this instanceof TMLArchiFirewallNode))) { @@ -3356,6 +3380,7 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme sb.append(translateMasterMutex()); sb.append(translateBreakpoint()); sb.append(translateColor()); + sb.append(translateTags()); sb.append(translateExtraParam()); if (b) { @@ -3525,6 +3550,15 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme return "<color value=\"" + currentMainColor.getRGB() + "\" />\n"; } + protected String translateTags() { + if (tags == null) { + //TraceManager.addDev("Current color: null"); + return ""; + } + + return "<tags value=\"" + tagsToString() + "\" />\n"; + } + protected String translateExtraParam() { return ""; } @@ -3615,7 +3649,7 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme reachability = ACCESSIBILITY_UNKNOWN; liveness = ACCESSIBILITY_UNKNOWN; mutex = MUTEX_NOT_YET_STUDIED; - tags = null; + clearAnnotations(); } @Override @@ -3864,5 +3898,35 @@ public abstract class TGComponent extends AbstractCDElement implements /*CDEleme return Math.sqrt(Math.pow(tgc2.getX() - getX(), 2) + Math.pow(tgc2.getY() - getY(), 2)); } + // Tags + + public Tags getTags() { + return tags; + } + + public void addTag(Tag tag) { + tags.addTag(tag); + } + public void removeAllTags() { + tags.removeAllTags(); + } + + public void removeTag(String tag) { + tags.removeTag(tag); + } + + public List<Tag> getAllTags() { + return tags.getAllTags(); + } + + + public boolean hasTag(String tag) { + return tags.hasTag(tag); + } + + public String tagsToString() { + return tags.tagsToString(); + } + } diff --git a/src/main/java/ui/tmldd/TMLArchiArtifact.java b/src/main/java/ui/tmldd/TMLArchiArtifact.java index b1333ce06cb074a079e827145289e8c468b1229c..42808f9ca6b609613cd32407d2e03fb23d0f9389 100755 --- a/src/main/java/ui/tmldd/TMLArchiArtifact.java +++ b/src/main/java/ui/tmldd/TMLArchiArtifact.java @@ -42,6 +42,7 @@ import myutil.GraphicLib; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import tmltranslator.TMLTask; import tmltranslator.modelcompiler.*; import ui.*; import ui.util.IconManager; @@ -78,7 +79,7 @@ public class TMLArchiArtifact extends TGCWithoutInternalComponent implements Swa protected String oldValue = ""; protected String referenceTaskName = "referenceToTask"; protected String taskName = "name"; - protected int priority = 0; // Between 0 and 10 + protected int priority = TMLTask.DEFAULT_PRIORITY; // Between 0 and 10 //protected String operation = ""; protected String operationMEC = "VOID"; private ArchUnitMEC fatherArchUnitMECType = new CpuMEC(); diff --git a/src/main/java/ui/tmldd/TMLArchiCommunicationArtifact.java b/src/main/java/ui/tmldd/TMLArchiCommunicationArtifact.java index e913f9f1c536fa6c36edbfd57dd5e94d220319e1..11ab005c5fbee573790272f2121b74f3332d9f37 100755 --- a/src/main/java/ui/tmldd/TMLArchiCommunicationArtifact.java +++ b/src/main/java/ui/tmldd/TMLArchiCommunicationArtifact.java @@ -43,6 +43,7 @@ import myutil.TraceManager; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import tmltranslator.TMLChannel; import ui.*; import ui.util.IconManager; import ui.window.JDialogCommunicationArtifact; @@ -73,7 +74,7 @@ public class TMLArchiCommunicationArtifact extends TGCWithoutInternalComponent i protected String referenceCommunicationName = "TMLCommunication"; protected String communicationName = "name"; protected String typeName = "channel"; - protected int priority = 5; // Between 0 and 10 + protected int priority = TMLChannel.DEFAULT_PRIORITY; // Between 0 and 10 protected ArrayList<String> mappedElements = new ArrayList<>(); public TMLArchiCommunicationArtifact(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, diff --git a/src/main/java/ui/tmldd/TMLArchiEventArtifact.java b/src/main/java/ui/tmldd/TMLArchiEventArtifact.java index 4ca1529387d58a4c5b0e81e6986b13a294f13f54..0b4063956674688e741f6479ff707c10a2b7eabb 100755 --- a/src/main/java/ui/tmldd/TMLArchiEventArtifact.java +++ b/src/main/java/ui/tmldd/TMLArchiEventArtifact.java @@ -43,6 +43,7 @@ import myutil.GraphicLib; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import tmltranslator.TMLChannel; import ui.*; import ui.util.IconManager; import ui.window.JDialogEventArtifact; diff --git a/src/main/java/ui/tmldd/TMLArchiPortArtifact.java b/src/main/java/ui/tmldd/TMLArchiPortArtifact.java index ecc0ba86a43063bd2bcae768223819fea1e9560c..43bd1bca032e06ec2fd3472c4cd995e3534a07bf 100644 --- a/src/main/java/ui/tmldd/TMLArchiPortArtifact.java +++ b/src/main/java/ui/tmldd/TMLArchiPortArtifact.java @@ -54,6 +54,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import myutil.GraphicLib; +import tmltranslator.TMLChannel; import tmltranslator.modelcompiler.AdaifBuffer; import tmltranslator.modelcompiler.Buffer; import tmltranslator.modelcompiler.FepBuffer; diff --git a/src/main/java/ui/util/DefaultText.java b/src/main/java/ui/util/DefaultText.java index c34c34cd7f11314942992fa36c166c6dba1d0785..467f3fd6052b30aa872cf7033687967585a2abb1 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 = "14829"; - public static String DATE = "2024/07/05 03:21:57 CET"; + public static String BUILD = "14842"; + public static String DATE = "2024/10/02 21:18:55 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 113f8a823f5f1748a123a62bdd80f858d2b2f77f..cfa15a691f65276aac3fd3c008704649e47dd720 100644 --- a/src/main/java/ui/window/JDialogAvatarModelChecker.java +++ b/src/main/java/ui/window/JDialogAvatarModelChecker.java @@ -1273,7 +1273,7 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act if (ase.getReferenceObject() != null) { if (ase.getReferenceObject() instanceof TGComponent) { TGComponent tgc = (TGComponent) (ase.getReferenceObject()); - tgc.addTag("Deadlock (in at least one execution path)"); + tgc.addAnnotation("Deadlock (in at least one execution path)"); } } } diff --git a/src/main/java/ui/window/JDialogProverifVerification.java b/src/main/java/ui/window/JDialogProverifVerification.java index e1f1c44dc3d68d0f0e63d0bf90b202fb590f0d38..0f0ef39a081618b1b91b23aeac123e5a5e84f354 100644 --- a/src/main/java/ui/window/JDialogProverifVerification.java +++ b/src/main/java/ui/window/JDialogProverifVerification.java @@ -57,7 +57,6 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PipedInputStream; import java.io.PipedOutputStream; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -87,7 +86,6 @@ import proverifspec.ProVerifOutputListener; import proverifspec.ProVerifQueryAuthResult; import proverifspec.ProVerifQueryResult; import proverifspec.ProVerifResultTraceStep; -import tmltranslator.TMLMapping; import ui.*; import ui.interactivesimulation.JFrameSimulationSDPanel; import ui.util.IconManager; @@ -125,8 +123,6 @@ public class JDialogProverifVerification extends JDialog implements ActionListen private static boolean DRAW_AVATAR = false; - private JLabel labelError; - protected MainGUI mgui; private AvatarDesignPanel adp; @@ -210,7 +206,7 @@ public class JDialogProverifVerification extends JDialog implements ActionListen // Security generation buttons ButtonGroup secGroup; - protected JCheckBox drawAvatarDesign, autoConf, autoWeakAuth, autoStrongAuth, custom, addHSM; + protected JCheckBox drawAvatarDesign, autoConf, autoWeakAuth, autoStrongAuth, custom, addHSM, linkHSMs; protected JRadioButton autoSec, autoMapKeys; protected JTextField encTime, decTime, secOverhead; protected JComboBox<String> addtoCPU; @@ -908,7 +904,12 @@ public class JDialogProverifVerification extends JDialog implements ActionListen c01.gridheight = 10; jp02.add(listPanel, c01); c02.gridheight = 1; - + + linkHSMs = new JCheckBox("Allow direct communication between HSMs"); + linkHSMs.setEnabled(false); + jp02.add(linkHSMs, c01); + linkHSMs.addActionListener(this); + custom = new JCheckBox("Custom performance attributes"); jp02.add(custom, c01); custom.addActionListener(this); @@ -1372,7 +1373,11 @@ public class JDialogProverifVerification extends JDialog implements ActionListen allIgnored.setEnabled(addHSM.isSelected()); autoWeakAuth.setEnabled(autoSec.isSelected()); autoStrongAuth.setEnabled(autoWeakAuth.isSelected()); - + + if (!addHSM.isSelected()) { + allIgnored(); + } + if (!autoSec.isSelected()) { autoConf.setSelected(false); autoWeakAuth.setSelected(false); @@ -1382,14 +1387,35 @@ public class JDialogProverifVerification extends JDialog implements ActionListen autoConf.setEnabled(false); autoWeakAuth.setEnabled(false); autoStrongAuth.setEnabled(false); + + addOneValidated.setEnabled(false); + allValidated.setEnabled(false); + addOneIgnored.setEnabled(false); + allIgnored.setEnabled(false); + allIgnored(); removeAllChannelsToAddSec(); } + if (selectedTasks.isEmpty()) { + linkHSMs.setEnabled(false); + linkHSMs.setSelected(false); + } else { + linkHSMs.setEnabled(true); + } + if (!autoWeakAuth.isSelected()) { autoStrongAuth.setSelected(false); } } + if (evt.getSource() == addOneValidated || evt.getSource() == allValidated || evt.getSource() == addOneIgnored|| evt.getSource() == allIgnored) { + if (selectedTasks.isEmpty()) { + linkHSMs.setEnabled(false); + linkHSMs.setSelected(false); + } else { + linkHSMs.setEnabled(true); + } + } if (evt.getSource() == autoSec || evt.getSource() == autoConf || evt.getSource() == autoWeakAuth) { if (autoSec.isSelected() && (autoWeakAuth.isSelected() || autoConf.isSelected())) { addAllChannelsToAddSec.setEnabled(true); @@ -1544,7 +1570,6 @@ public class JDialogProverifVerification extends JDialog implements ActionListen public void run() { TraceManager.addDev("Thread started"); File testFile; - Map<String, List<String>> selectedCpuTasks = new HashMap<String, java.util.List<String>>(); int currentPosY = 0; int stepY = 10; if (jp1.getSelectedIndex() == 2) { @@ -1670,31 +1695,8 @@ public class JDialogProverifVerification extends JDialog implements ActionListen encCC = encTime.getText(); decCC = decTime.getText(); secOv = secOverhead.getText(); - TMLMapping map; - if (addHSM.isSelected() && selectedTasks.size()>0) { - - - for (String task : selectedTasks) { - String cpu = taskCpuMap.get(task); - if (selectedCpuTasks.containsKey(cpu)) { - selectedCpuTasks.get(cpu).add(task); - } else { - ArrayList<String> tasks = new ArrayList<String>(); - tasks.add(task); - selectedCpuTasks.put(cpu, tasks); - } - } - //mgui.gtm.addHSM(mgui, selectedCpuTasks); - } if (autoConf.isSelected() || autoWeakAuth.isSelected() || autoStrongAuth.isSelected()) { - /*if (custom.isSelected()) { - map = mgui.gtm.autoSecure(mgui, encCC, secOv, decCC, autoConf.isSelected(), autoWeakAuth.isSelected(), - autoStrongAuth.isSelected(), selectedCpuTasks); - } else { - map = mgui.gtm.autoSecure(mgui, "100", "0", "100", autoConf.isSelected(), - autoWeakAuth.isSelected(), autoStrongAuth.isSelected(), selectedCpuTasks); - }*/ - mgui.gtm.autoSecure(mgui, encCC, secOv, decCC, selectedChannelsToAddSec, selectedCpuTasks); + mgui.gtm.autoSecure(mgui, encCC, secOv, decCC, selectedChannelsToAddSec, selectedTasks, linkHSMs.isSelected()); } } else if (autoMapKeys.isSelected()) { diff --git a/src/main/java/ui/window/JFrameAI.java b/src/main/java/ui/window/JFrameAI.java index c827e54a01de85bf2808d36fef64b2906b395174..3c8fc64c33ba6eea3547065f1fa84eccb5dd5de7 100644 --- a/src/main/java/ui/window/JFrameAI.java +++ b/src/main/java/ui/window/JFrameAI.java @@ -85,7 +85,7 @@ public class JFrameAI extends JFrame implements ActionListener { "Identify system blocks - Provide a system specification", "DEPRECATED - Identify software blocks - Provide a system specification", "DEPRECATED - Identify state machines - Select a block diagram. you may provide a system specification", - "Identify state machines and attributes - Select a block diagram. You may provide a system specification", + "Identify state machines and attributes - Select a block diagram. You may also provide a system specification", "Model mutation - A(I)MULET - Select a block diagram first", "Diagram coherency", "Diagram coherency with formal rules", @@ -96,6 +96,27 @@ public class JFrameAI extends JFrame implements ActionListener { "Mitigations generator - Generates a list of mitigations for each provided attack step." }; + + private static String[] CHAT_CONTENT = { + "My question: ", + "System specification:\n", + "", + "System specification:\n", + "System specification:\n", + "", + "", + "System specification:\n", + "", + "", + "System specification:\n", + "", + "System specification:\n\nDiagram 1: (type of diagram):\n\nDiagram 2: (type of diagram):\n\n", + "System specification:\n\nDiagram 1: (type of diagram):\n\nDiagram 2: (type of diagram):\n\n", + "System specification:\n", + "System specification::\n\nAttack patterns from the CAPEC tracer:\n\n", + "Mitigations generator - Generates a list of mitigations for each provided attack step." + }; + private static String[] AIInteractClass = { "AIChat", "AIReqIdent", "AIReqClassification", "AIUseCaseDiagram", "AIDesignPropertyIdentification", "AIBlock", @@ -141,6 +162,7 @@ public class JFrameAI extends JFrame implements ActionListener { private MainGUI mgui; private JTextPane question, console; private JTabbedPane answerPane; + private JButton appendDiagram; private ArrayList<ChatData> chats; private int currentChatIndex = -1; @@ -230,6 +252,13 @@ public class JFrameAI extends JFrame implements ActionListener { } modelSelectionPanel.add(listOfPossibleModels); + appendDiagram = new JButton("Append current diagram text"); + modelSelectionPanel.add(appendDiagram); + appendDiagram.addActionListener(this); + + + + /*JPanel numAtsSelectPanel = new JPanel(); numAtsSelectPanel.add(new JLabel("Number of attack trees to be created: ")); numAtsModel = new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1); @@ -375,6 +404,14 @@ public class JFrameAI extends JFrame implements ActionListener { String selectedAction = (String) listOfPossibleActions.getSelectedItem(); assert selectedAction != null; + if (question != null) { + String content = CHAT_CONTENT[listOfPossibleActions.getSelectedIndex()]; + if (content != null) { + question.setText(content); + } + } + + if (selectedAction.equals(POSSIBLE_ACTIONS[14])) { modelSelectionPanel.setVisible(false); labelAtsSpinner.setVisible(false); @@ -440,6 +477,8 @@ public class JFrameAI extends JFrame implements ActionListener { } else if (evt.getSource() == listOfPossibleActions) { enableDisableActions(); printInfos(); + } else if (evt.getSource() == appendDiagram) { + appendCurrentDiagram(); } } @@ -990,6 +1029,20 @@ public class JFrameAI extends JFrame implements ActionListener { answerPane.setSelectedIndex(dst); } + public void appendCurrentDiagram() { + if (question != null) { + TDiagramPanel tdp = mgui.getCurrentTDiagramPanel(); + TraceManager.addDev("Current diagram identified"); + if (tdp != null) { + String text = mgui.gtm.toText(tdp); + TraceManager.addDev("Diagram text computed: " + text); + if (text != null) { + question.setText((question.getText() + text)); + } + } + } + } + private class ChatData implements AIFeedback, Runnable { public JTextPane answer = new JTextPane(); diff --git a/src/main/resources/help/ai.html b/src/main/resources/help/ai.html index fc46902342c925c5a7940443cd2c4fd900af4438..ed297cc597151d4cfea3f4c02c865331e9dc5b67 100644 --- a/src/main/resources/help/ai.html +++ b/src/main/resources/help/ai.html @@ -97,7 +97,7 @@ diagrams.</p> information to the configuration file (e.g., config.xml) of TTool:</p> <div class="sourceCode" id="cb1"><pre class="sourceCode xml"><code class="sourceCode xml"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><<span class="kw">OPENAIKey</span><span class="ot"> data=</span><span class="st">"</span><span class="er"><</span><span class="st">put your secret key there>"</span>/></span> -<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><<span class="kw">OPENAIModel</span><span class="ot"> data=</span><span class="st">"gpt-3.5-turbo"</span>/></span></code></pre></div> +<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><<span class="kw">OPENAIModel</span><span class="ot"> data=</span><span class="st">"gpt-3.5-turbo gpt-4-turbo gpt-4o gpt-4o-mini"</span>/></span></code></pre></div> <p>This is required to have a valid openai account and available tokens.</p> <h2 id="how-to-use-ai">How to use AI?</h2> diff --git a/src/main/resources/help/ai.md b/src/main/resources/help/ai.md index 2ccbb4ca4c259a3c2967c7a3091211a8c8a154a5..e1248215fab1309c8798d9d3787d8400bf2d09ab 100644 --- a/src/main/resources/help/ai.md +++ b/src/main/resources/help/ai.md @@ -5,7 +5,7 @@ AI intelligence in TTool intends to help designers to make better diagrams. TTool must first be configured before using AI. Add the following information to the configuration file (e.g., config.xml) of TTool: ```xml <OPENAIKey data="<put your secret key there>"/> -<OPENAIModel data="gpt-3.5-turbo"/> +<OPENAIModel data="gpt-3.5-turbo gpt-4-turbo gpt-4o gpt-4o-mini"/> ``` This is required to have a valid openai account and available tokens. diff --git a/ttool/src/test/java/cli/CLIPatternHandlingTest.java b/ttool/src/test/java/cli/CLIDiplodocusPatternHandlingTest.java similarity index 90% rename from ttool/src/test/java/cli/CLIPatternHandlingTest.java rename to ttool/src/test/java/cli/CLIDiplodocusPatternHandlingTest.java index 3226e0238906a3e14bcdcd05cf4101d32151d0ed..4b48dd9368514e199b630592b04a3f9dbf7142ce 100644 --- a/ttool/src/test/java/cli/CLIPatternHandlingTest.java +++ b/ttool/src/test/java/cli/CLIDiplodocusPatternHandlingTest.java @@ -48,31 +48,21 @@ package cli; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; -import java.io.IOException; import java.util.ArrayList; import java.util.List; -import common.ConfigurationTTool; -import common.SpecConfigTTool; -import graph.AUTGraph; -import graph.AUTTransition; -import myutil.Conversion; +import myutil.FileUtils; import myutil.TraceManager; import org.junit.Test; import test.AbstractTest; -import tmltranslator.compareTMLTest.CompareTML; -import tmltranslator.compareTMLTest.CompareTMAP; import tmltranslator.TMLMapping; import tmltranslator.TMLMappingTextSpecification; import tmltranslator.TMLSyntaxChecking; import tmltranslator.TMLError; -import cli.PatternHandling; -public class CLIPatternHandlingTest extends AbstractTest implements InterpreterOutputInterface { +public class CLIDiplodocusPatternHandlingTest extends AbstractTest implements InterpreterOutputInterface { private final static String PATH_TO_TEST_FILE = "cli/testPatternHandling/"; private static final String PATH_PATTERNS [] = {PATH_TO_TEST_FILE + "tmr/"}; @@ -94,7 +84,7 @@ public class CLIPatternHandlingTest extends AbstractTest implements InterpreterO private StringBuilder outputResult; private List<String> errorOutputs = new ArrayList<String>(); - public CLIPatternHandlingTest() { + public CLIDiplodocusPatternHandlingTest() { // } @@ -195,8 +185,7 @@ public class CLIPatternHandlingTest extends AbstractTest implements InterpreterO String expectedOutputTmap = myutil.FileUtils.loadFileData(fExpectedTmap); //TraceManager.addDev("\nExpected:>" + expectedOutputTmap + "<"); //TraceManager.addDev("\nObtained:>" + obtainedOutputTmap + "<"); - CompareTMAP ctmap = new CompareTMAP(); - assertTrue("comparing between 2 TMAP files", ctmap.CompareTMAPFiles(fObtainedTmap, fExpectedTmap)); + assertTrue("comparing between 2 TMAP files", FileUtils.CompareTMAPFiles(fObtainedTmap, fExpectedTmap)); String filePathObtainedTarchi = OBTAINED_MODELS_PATH + OBTAINED_MODELS_AFTER_INTEGRATING_TMR_TARCHI[i]; @@ -207,8 +196,7 @@ public class CLIPatternHandlingTest extends AbstractTest implements InterpreterO File fExpectedTarchi = new File(filePathExpectedTarchi); assertTrue(myutil.FileUtils.checkFileForOpen(fExpectedTarchi)); String expectedOutputTarchi = myutil.FileUtils.loadFileData(fExpectedTarchi); - CompareTMAP ctarchi = new CompareTMAP(); - assertTrue("comparing between 2 Tarchi files", ctarchi.CompareTMAPFiles(fObtainedTarchi, fExpectedTarchi)); + assertTrue("comparing between 2 Tarchi files", FileUtils.CompareTMAPFiles(fObtainedTarchi, fExpectedTarchi)); //TraceManager.addDev("\nExpected Tarchi:>" + expectedOutputTarchi + "<"); //TraceManager.addDev("\nObtained Tarchi:>" + obtainedOutputTarchi + "<"); @@ -220,8 +208,7 @@ public class CLIPatternHandlingTest extends AbstractTest implements InterpreterO File fExpectedTML = new File(filePathExpectedTML); assertTrue(myutil.FileUtils.checkFileForOpen(fExpectedTML)); String expectedOutputTML = myutil.FileUtils.loadFileData(fExpectedTML); - CompareTML ctml = new CompareTML(); - assertTrue("comparing between 2 TML files", ctml.compareTML(fObtainedTML, fExpectedTML)); + assertTrue("comparing between 2 TML files", FileUtils.compareTMLFiles(fObtainedTML, fExpectedTML)); //TraceManager.addDev("\nExpected TML:>" + expectedOutputTML + "<"); //TraceManager.addDev("\nObtained TML:>" + obtainedOutputTML + "<"); } @@ -236,7 +223,7 @@ public class CLIPatternHandlingTest extends AbstractTest implements InterpreterO assertTrue(scriptConfig.length() > 0); Interpreter interpretConfigModel = new Interpreter(scriptConfig, (InterpreterOutputInterface)this, false); String interp = interpretConfigModel.interpretUntilError(); - assertTrue("expected error: ", interp.equals(PatternHandling.PATTERN_NOT_CONNECTED)); + assertTrue("expected error: ", interp.equals(DiplodocusPatternHandling.PATTERN_NOT_CONNECTED)); //TraceManager.addDev("\noutputResult:>" + outputResult); //assertTrue("comparing between 2 TML files", outputResult.equals(PatternHandling.PATTERN_NOT_CONNECTED)); diff --git a/ttool/src/test/java/test/AbstractTest.java b/ttool/src/test/java/test/AbstractTest.java index 8e9f030485abec527520927fb8c5c4de3b14ecea..3594afc9d3552ce5f8035f028012a65cff08cc66 100644 --- a/ttool/src/test/java/test/AbstractTest.java +++ b/ttool/src/test/java/test/AbstractTest.java @@ -17,6 +17,7 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.concurrent.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Stream; @@ -225,41 +226,52 @@ public abstract class AbstractTest { alreadyMapComm.clear(); } String cmd = "proverif -in pitype " + pvspecPath; - Process process; - BufferedReader cmdOutput; - try { - process = Runtime.getRuntime().exec(cmd); - cmdOutput = new BufferedReader(new InputStreamReader(process.getInputStream())); - String outputLine; - int checked = 0; - - while ((outputLine = cmdOutput.readLine()) != null) { - if (outputLine.startsWith(PROVERIF_RESULT_PREFIX)) { - if (!idIssue) { - TraceManager.addDev("ProVerif Output : " + outputLine); - if (golden.contains(outputLine)) { - checked += 1; + final Process[] process = new Process[1]; + final BufferedReader[] cmdOutput = new BufferedReader[1]; + int timeOutInSeconds = 600; + final ExecutorService executor = Executors.newSingleThreadExecutor(); + final Future<?> future = executor.submit(() -> { + try { + process[0] = Runtime.getRuntime().exec(cmd); + cmdOutput[0] = new BufferedReader(new InputStreamReader(process[0].getInputStream())); + String outputLine; + int checked = 0; + while ((outputLine = cmdOutput[0].readLine()) != null) { + if (outputLine.startsWith(PROVERIF_RESULT_PREFIX)) { + if (!idIssue) { + TraceManager.addDev("ProVerif Output : " + outputLine); + if (golden.contains(outputLine)) { + checked += 1; + } else { + return false; + } } else { - return false; + TraceManager.addDev("ProVerif Output : " + outputLine); + assertTrue(golden.size() > checked); + assertTrue(equalsWithIdIssues(golden.get(checked), outputLine)); + checked++; } - } else { - TraceManager.addDev("ProVerif Output : " + outputLine); - assertTrue(golden.size() > checked); - assertTrue(equalsWithIdIssues(golden.get(checked), outputLine)); - checked++; } } - } - if (golden.size() != 1 || !golden.get(0).isEmpty()) { - return golden.size() == checked; + if (golden.size() != 1 || !golden.get(0).isEmpty()) { + return golden.size() == checked; + } + return false; + } catch (Exception e) { + TraceManager.addDev("FAILED: executing: " + cmd + ": " + e.getMessage()); + throw new RuntimeException(e); } - return false; - - } catch (Exception e) { - TraceManager.addDev("FAILED: executing: " + cmd + ": " + e.getMessage()); + }); + try { + future.get(timeOutInSeconds, TimeUnit.SECONDS); + } catch (TimeoutException | InterruptedException | ExecutionException e) { + future.cancel(true); throw new RuntimeException(e); + } finally { + executor.shutdown(); } + return true; } public static List<String> generateGoldenList(String goldenPath) throws IOException { diff --git a/ttool/src/test/java/tmltranslator/AutoSecurityGenerationDiplodocusTest.java b/ttool/src/test/java/tmltranslator/AutoSecurityGenerationDiplodocusTest.java new file mode 100644 index 0000000000000000000000000000000000000000..53b0107f569541c0dd3bf55e948c6abfaa91e65d --- /dev/null +++ b/ttool/src/test/java/tmltranslator/AutoSecurityGenerationDiplodocusTest.java @@ -0,0 +1,277 @@ +package tmltranslator; + +import common.ConfigurationTTool; +import myutil.FileUtils; +import myutil.TraceManager; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import test.AbstractTest; +import tmltranslator.patternhandling.SecurityGenerationForTMAP; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; +import org.json.*; + +import static org.junit.Assert.*; + +public class AutoSecurityGenerationDiplodocusTest extends AbstractTest { + private final static String DIR_GEN = "tmltranslator/AutoSecGenDiplodocusTest/GeneratedFiles/"; + private final static String DIR_MODELS = "tmltranslator/AutoSecGenDiplodocusTest/Models/"; + private final static String JSON_FILE_NAME = "features.json"; + private final static String PATH_MODEL = "pathModel"; + private final static String CHANNELS_LIST = "channels"; + private final static String HSM_LIST = "HSM"; + private final static String PATH_GOLDEN = "pathGolden"; + private final static String IS_DIRECT_CONNECT_HSM = "DirectConnectHSMs"; + private final static int ENCRYPTION_COMPUTATION = 100; + private final static int DECRYPTION_COMPUTATION = 100; + private final static int OVERHEAD = 100; + + static String PROVERIF_DIR; + static String MODELS_DIR; + + @BeforeClass + public static void setUpBeforeClass() throws Exception { + String baseResourcesDir = getBaseResourcesDir(); + + PROVERIF_DIR = baseResourcesDir + DIR_GEN; + MODELS_DIR = baseResourcesDir + DIR_MODELS; + RESOURCES_DIR = baseResourcesDir + DIR_MODELS; + + } + + public AutoSecurityGenerationDiplodocusTest() { + super(); + } + + @Before + public void setUp() throws Exception { + TraceManager.devPolicy = TraceManager.TO_CONSOLE; + ConfigurationTTool.ProVerifVerifierPath = "proverif"; + TraceManager.addDev("Starting test for Security Generation"); + Path path = Paths.get(PROVERIF_DIR); + if (!Files.exists(path)) { + Files.createDirectory(path); + } + } + + @Test + public void testSecurityModels() throws Exception { + // Test if proverif is installed in the path + TraceManager.addDev("Testing if \"proverif\" is in the PATH"); + assertTrue(canExecute("proverif")); + + TraceManager.addDev("Starting function testSecurityModels"); + File dir = new File(MODELS_DIR); + Collection<File> allFiles = FileUtils.listFiles(dir, null, true); + List<File> jsonFiles = new ArrayList<>(); + for (Iterator iterator = allFiles.iterator(); iterator.hasNext();) { + File file = (File) iterator.next(); + if (file.getName().equals(JSON_FILE_NAME)) { + jsonFiles.add(file); + } + } + + for (File jsonFile : jsonFiles) { + String fileName = jsonFile.getAbsolutePath(); + String tab = fileName.split("/")[fileName.split("/").length - 2]; + TraceManager.addDev("\n\n********** Generating security for " + tab + " ********\n"); + String jsonString = new String(Files.readAllBytes(Paths.get(fileName))); + JSONObject jo = new JSONObject(jsonString); + String pathModel = getBaseResourcesDir() + jo.getString(PATH_MODEL); + String pathDirJsonFile = fileName.substring(0, fileName.lastIndexOf("/") + 1); + + TMLMappingTextSpecification tmts = new TMLMappingTextSpecification(tab); + File f = new File(pathModel); + TraceManager.addDev("Loading file: " + f.getAbsolutePath()); + String spec = null; + try { + spec = FileUtils.loadFileData(f); + } catch (Exception e) { + TraceManager.addDev("Exception executing: loading " + tab); + fail(); + } + String pathDirModel = pathModel.substring(0, pathModel.lastIndexOf("/") + 1); + TraceManager.addDev("Testing spec " + tab); + assertNotNull(spec); + TraceManager.addDev("Going to parse " + tab); + boolean parsed = tmts.makeTMLMapping(spec, pathDirModel); + assertTrue(parsed); + + TraceManager.addDev("Checking syntax " + tab); + // Checking syntax + TMLMapping tmap = tmts.getTMLMapping(); + + TMLSyntaxChecking syntax = new TMLSyntaxChecking(tmap); + syntax.checkSyntax(); + + if (syntax.hasErrors() > 0) { + for (TMLError error: syntax.getErrors()) { + TraceManager.addDev("Error: " + error.toString()); + } + } + + assertEquals(0, syntax.hasErrors()); + TMLModeling<?> tml = tmap.getTMLModeling(); + String tabName = tml.getTasks().get(0).getName().substring(0, tml.getTasks().get(0).getName().indexOf("__")); + JSONArray selectedChannels = jo.getJSONArray(CHANNELS_LIST); + for (int i = 0; i < selectedChannels.length(); i++) { + for (String channelName : selectedChannels.getJSONObject(i).keySet()) { + JSONArray channelSecGoals = selectedChannels.getJSONObject(i).getJSONArray(channelName); + boolean confGoal = channelSecGoals.getBoolean(0); + boolean weakAuthGoal = channelSecGoals.getBoolean(1); + boolean strongAuthGoal = channelSecGoals.getBoolean(2); + TMLChannel ch = tmap.getChannelByName(tabName + "__" + channelName); + if (ch != null) { + ch.setSecurityGoalConf(confGoal); + ch.checkConf = confGoal; + ch.setSecurityGoalWeakAuth(weakAuthGoal); + if (strongAuthGoal) { + ch.setSecurityGoalWeakAuth(true); + ch.setSecurityGoalStrongAuth(true); + } + + if (weakAuthGoal || strongAuthGoal) { + ch.checkAuth = true; + } + } + } + } + + JSONArray selectedTasksHSMJA = jo.getJSONArray(HSM_LIST); + List<String> selectedTasksHSM = new ArrayList<>(); + + boolean isDirectConnectHSM = jo.getBoolean(IS_DIRECT_CONNECT_HSM); + for (int i = 0; i < selectedTasksHSMJA.length(); i++) { + selectedTasksHSM.add(selectedTasksHSMJA.getString(i)); + } + ConfigurationTTool.ProVerifCodeDirectory = pathDirJsonFile; + + SecurityGenerationForTMAP secgen = new SecurityGenerationForTMAP(tabName, tmap, Integer.toString(ENCRYPTION_COMPUTATION), + Integer.toString(OVERHEAD), Integer.toString(DECRYPTION_COMPUTATION), selectedTasksHSM, isDirectConnectHSM, 600); + tmap = secgen.startThread(); + + if (tmap != null) { + tmap = secgen.autoMapKeys(); + } + + tmap.resetMinimalMapping(); + TraceManager.addDev("Checking syntax of generated model " + tab); + // Checking syntax + TMLSyntaxChecking syntaxGenerated = new TMLSyntaxChecking(tmap); + syntaxGenerated.checkSyntax(); + + if (syntaxGenerated.hasErrors() > 0) { + for (TMLError error: syntaxGenerated.getErrors()) { + TraceManager.addDev("Error: " + error.toString()); + } + } + assertEquals(0, syntaxGenerated.hasErrors()); + + TMLMappingTextSpecification<Class<?>> specNew = new TMLMappingTextSpecification<Class<?>>(tab); + specNew.toTextFormat((TMLMapping<Class<?>>) tmap); + + specNew.saveFile(pathDirJsonFile, "spec"); + + TraceManager.addDev("End creating model with Security generation for " + tab); + + // Generate golden model spec + TraceManager.addDev("Generating golden model spec for " + tab); + String pathGolden = getBaseResourcesDir() + jo.getString(PATH_GOLDEN); + TMLMappingTextSpecification tmtsGolden = new TMLMappingTextSpecification(tab); + + File fGolden = new File(pathGolden); + TraceManager.addDev("Loading file: " + fGolden.getAbsolutePath()); + String specGolden = null; + try { + specGolden = FileUtils.loadFileData(fGolden); + } catch (Exception e) { + TraceManager.addDev("Exception executing: loading " + tab); + fail(); + } + TraceManager.addDev("Testing spec " + tab); + assertNotNull(specGolden); + TraceManager.addDev("Going to parse golden Model" + tab); + String pathDirGolden = pathGolden.substring(0, pathGolden.lastIndexOf("/") + 1); + boolean parsedGoden = tmtsGolden.makeTMLMapping(specGolden, pathDirGolden); + assertTrue(parsedGoden); + + TraceManager.addDev("Checking syntax of golden model " + tab); + // Checking syntax + TMLMapping tmapGolden = tmtsGolden.getTMLMapping(); + + TMLSyntaxChecking syntaxGolden = new TMLSyntaxChecking(tmapGolden); + syntaxGolden.checkSyntax(); + + if (syntaxGolden.hasErrors() > 0) { + for (TMLError error: syntaxGolden.getErrors()) { + TraceManager.addDev("Error: " + error.toString()); + } + } + + assertEquals(0, syntaxGolden.hasErrors()); + TraceManager.addDev("Comparing golden model with generated model " + tab); + + for (Object obj : tmap.getTMLModeling().getTasks()) { + TMLTask task = (TMLTask) obj; + String[] taskNameSplit = task.getName().split("__"); + task.setName(taskNameSplit[taskNameSplit.length - 1]); + } + for (Object obj : tmap.getTMLModeling().getChannels()) { + TMLChannel ch = (TMLChannel) obj; + String[] channelNameSplit = ch.getName().split("__"); + ch.setName(channelNameSplit[channelNameSplit.length - 1]); + } + for (Object obj : tmap.getTMLModeling().getEvents()) { + TMLEvent evt = (TMLEvent) obj; + String[] eventNameSplit = evt.getName().split("__"); + evt.setName(eventNameSplit[eventNameSplit.length - 1]); + } + for (Object obj : tmap.getTMLModeling().getRequests()) { + TMLRequest req = (TMLRequest) obj; + String[] requestNameSplit = req.getName().split("__"); + req.setName(requestNameSplit[requestNameSplit.length - 1]); + } + + for (Object obj : tmapGolden.getTMLModeling().getTasks()) { + TMLTask task = (TMLTask) obj; + String[] taskNameSplit = task.getName().split("__"); + task.setName(taskNameSplit[taskNameSplit.length - 1]); + } + for (Object obj : tmapGolden.getTMLModeling().getChannels()) { + TMLChannel ch = (TMLChannel) obj; + String[] channelNameSplit = ch.getName().split("__"); + ch.setName(channelNameSplit[channelNameSplit.length - 1]); + } + for (Object obj : tmapGolden.getTMLModeling().getEvents()) { + TMLEvent evt = (TMLEvent) obj; + String[] eventNameSplit = evt.getName().split("__"); + evt.setName(eventNameSplit[eventNameSplit.length - 1]); + } + for (Object obj : tmapGolden.getTMLModeling().getRequests()) { + TMLRequest req = (TMLRequest) obj; + String[] requestNameSplit = req.getName().split("__"); + req.setName(requestNameSplit[requestNameSplit.length - 1]); + } + + for (Object obj : tmapGolden.getTMLModeling().getChannels()) { + TMLChannel ch = (TMLChannel) obj; + if (tmap.getChannelByName(ch.getName()) != null) { + ch.setSecurityGoalConf(tmap.getChannelByName(ch.getName()).isSecurityGoalConf()); + ch.setSecurityGoalWeakAuth(tmap.getChannelByName(ch.getName()).isSecurityGoalWeakAuth()); + ch.setSecurityGoalStrongAuth(tmap.getChannelByName(ch.getName()).isSecurityGoalStrongAuth()); + ch.checkConf = tmap.getChannelByName(ch.getName()).isCheckConfChannel(); + ch.checkAuth = tmap.getChannelByName(ch.getName()).isCheckAuthChannel(); + } + } + assertTrue(tmapGolden.equalsSpec(tmap)); + TraceManager.addDev("Verifying Tmap equality ended " + tab); + + TraceManager.addDev("Test for " + tab + " tab is ended"); + } + } +} diff --git a/ttool/src/test/java/tmltranslator/CompareTMLTests.java b/ttool/src/test/java/tmltranslator/CompareTMLTests.java index 79520bf4e63bf723f887ae0ff96faa293e4d40fb..8cea3bbd19479ce7640b7579f8771e38fdc5a1e7 100644 --- a/ttool/src/test/java/tmltranslator/CompareTMLTests.java +++ b/ttool/src/test/java/tmltranslator/CompareTMLTests.java @@ -1,13 +1,10 @@ package tmltranslator; +import myutil.FileUtils; import test.AbstractTest; -import tmltranslator.compareTMLTest.CompareTML; -import org.junit.Before; import org.junit.Test; import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; import static org.junit.Assert.*; @@ -27,55 +24,51 @@ public class CompareTMLTests extends AbstractTest { // Test true cases @Test public void onlyCommentAndEmptyTest () throws Exception { - CompareTML ctml = new CompareTML(); /* file 1 and file 2 * file 1 includes only empty lines * file 2 includes only comments */ - assertTrue("comparing between empty file and another file including only comment",ctml.compareTML(new File(EMPTY_FILE), + assertTrue("comparing between empty file and another file including only comment", FileUtils.compareTMLFiles(new File(EMPTY_FILE), new File(ONLY_COMMENT_1))); } @Test public void onlyCommentAndOnlyComment () throws Exception { - CompareTML ctml = new CompareTML(); /* file 2 and file 3 * file 2 and file 3 include only comments and empty lines */ - assertTrue("comparing between 2 files including only comment",ctml.compareTML(new File(ONLY_COMMENT_1), + assertTrue("comparing between 2 files including only comment", FileUtils.compareTMLFiles(new File(ONLY_COMMENT_1), new File(ONLY_COMMENT_2))); } @Test public void sameContextDifferentComment () throws Exception { - CompareTML ctml = new CompareTML(); /* file 4 and file 5 * two files includes many comments, empty lines and white spaces before and after strings (comments or context) * adding white spaces between two words */ - assertTrue("comparing between 2 files including the same context but different comment",ctml.compareTML(new File(COMMENT_AND_CONTEXT_1), + assertTrue("comparing between 2 files including the same context but different comment", FileUtils.compareTMLFiles(new File(COMMENT_AND_CONTEXT_1), new File(COMMENT_AND_CONTEXT_2))); } // Test false cases @Test public void DifferentContextSameComment () throws Exception { - CompareTML ctml = new CompareTML(); /* file 5 and file 6 * file 5 has one different line in comparison with file 6 */ - assertFalse("comparing between 2 files including the same context but different comment",ctml.compareTML(new File(COMMENT_AND_CONTEXT_2), + assertFalse("comparing between 2 files including the same context but different comment", + FileUtils.compareTMLFiles(new File(COMMENT_AND_CONTEXT_2), new File(COMMENT_AND_CONTEXT_3))); } @Test public void DifferentContextSameComment_2 () throws Exception { - CompareTML ctml = new CompareTML(); /* file 6 and file 7 * adding context in file 7 in comparison with file 6 */ assertFalse("comparing between 2 files including the same comment but different context", - ctml.compareTML(new File(COMMENT_AND_CONTEXT_3), + FileUtils.compareTMLFiles(new File(COMMENT_AND_CONTEXT_3), new File(COMMENT_AND_CONTEXT_4))); } } diff --git a/ttool/src/test/java/tmltranslator/DiplodocusSecurityTest.java b/ttool/src/test/java/tmltranslator/DiplodocusSecurityTest.java index 0e86e40178fd50b8dcb12ad529ce7746eefc78d1..bdc902064fe08c2271408e38222cf4c4941f27f4 100644 --- a/ttool/src/test/java/tmltranslator/DiplodocusSecurityTest.java +++ b/ttool/src/test/java/tmltranslator/DiplodocusSecurityTest.java @@ -59,7 +59,7 @@ public class DiplodocusSecurityTest extends AbstractTest { {"AliceAndBobHW", new ArrayList<>(Arrays.asList("SymmetricExchange", "Nonce", "KeyExchange", "Mac", "SampleAutoSec"))}, {"ITA01_v6", new ArrayList<>(Arrays.asList("mapAtt", "mapNoProtection"))}, {"Rovers_SPARTA_DIPLO", new ArrayList<>(Arrays.asList("NoCountermeasureMapping", "MACMapping", "SymmetricEncryptionNonceMapping"))}, - {"ITSDemo", new ArrayList<>(Arrays.asList("Architecture", "Architecture_hsm", "Architecture_enc_or"))} + {"ITSDemo", new ArrayList<>(Arrays.asList("Architecture", "Architecture_enc_or"))} }); } @@ -86,9 +86,7 @@ public class DiplodocusSecurityTest extends AbstractTest { // Test if proverif is installed in the path TraceManager.addDev("Testing if \"proverif\" is in the PATH"); - if (!(canExecute("proverif"))) { - return; - } + assertTrue(canExecute("proverif")); for (String tab : currentTabs) { TraceManager.addDev("\n\n********** Checking the security of " + tab + " ********\n"); diff --git a/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java b/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java index a50719ba50cad8e34f3c23a867296a3eb7c422c4..b789a2dabe0dcde01655c477dfa312af15d9ab8e 100644 --- a/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java +++ b/ttool/src/test/java/tmltranslator/DiplodocusSimulatorTest.java @@ -30,6 +30,8 @@ public class DiplodocusSimulatorTest extends AbstractTest { final int [] NB_Of_TRANSTIONS = {118, 1053}; final int [] MIN_CYCLES = {192, 2510}; final int [] MAX_CYCLES = {279, 2510}; + + //model for daemon task final String [] MODELS_DAEMON = {"daemontest1", "daemontest2"}; final int [] NB_Of_DAEMON_STATES = {8, 114}; diff --git a/ttool/src/test/java/tmltranslator/TMLComparingMethodTest.java b/ttool/src/test/java/tmltranslator/TMLComparingMethodTest.java index a6ca771f4a2015b2c5d9a11647343400f6d65533..38f1053a71a4416dd175c7b6e62938914c1d7cb4 100644 --- a/ttool/src/test/java/tmltranslator/TMLComparingMethodTest.java +++ b/ttool/src/test/java/tmltranslator/TMLComparingMethodTest.java @@ -42,7 +42,6 @@ package tmltranslator; import org.junit.Before; import org.junit.Test; import test.AbstractTest; -import ui.AbstractUITest; import java.util.*; @@ -51,15 +50,13 @@ import static org.junit.Assert.*; /** * class TMLComparingMethodTest - * This class consists of the methods for testing equalSpec() and comparing lists of Hardware nodes, activity elements, etc + * This class consists of the methods for testing equalsSpec() and TMLComparingMethod lists of Hardware nodes, activity elements, etc * @version 1.0 27/09/2019 * @author Minh Hiep PHAM */ public class TMLComparingMethodTest extends AbstractTest { - private TMLComparingMethod comparing; - private HwLink hwLink1, hwLink2, hwLink3; private HwCPU hwCPU, cpu1, cpu2, cpu3, cpu4, cpu5, cpu6, cpu7, cpu8, cpu9, cpu10, cpu11, cpu12, cpu13, cpu14; @@ -136,7 +133,6 @@ public class TMLComparingMethodTest extends AbstractTest { public TMLComparingMethodTest() { super(); - comparing = new TMLComparingMethod(); } @@ -354,51 +350,51 @@ public class TMLComparingMethodTest extends AbstractTest { } private void createSecurityPatternForTestingConfigs() { - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt1 = new SecurityPattern("securityPattern1","Advanced","5","128", "100", "100", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt2 = new SecurityPattern("securityPattern1","Symmetric Encryption","10","128", "100", "100", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt3 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","256", "100", "100", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt4 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "200", "100", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt5 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "100", "300", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt6 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "100", "100", "Yes", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt7 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "100", "100", "None", "formula2", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt8 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "100", "100", "None", "formula1", "Key2"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt9 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "100", "100", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt10 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "100", "100", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt11 = new SecurityPattern("DifferenceName","Symmetric Encryption","5","128", "100", "100", "None", "formula1", "Key1"); - // For testing method equalSpec() in class SecurityPattern + // For testing method equalsSpec() in class SecurityPattern secuPt12 = new SecurityPattern("securityPattern1","Symmetric Encryption","5","128", "100", "100", "None", "formula1", "Key1"); @@ -518,85 +514,85 @@ public class TMLComparingMethodTest extends AbstractTest { @Test public void Test_ComparingTwoSecurityPattern() { - assertFalse(securityPattern1.equalSpec(secuPt1)); - assertFalse(securityPattern1.equalSpec(secuPt2)); - assertFalse(securityPattern1.equalSpec(secuPt3)); - assertFalse(securityPattern1.equalSpec(secuPt4)); - assertFalse(securityPattern1.equalSpec(secuPt5)); - assertFalse(securityPattern1.equalSpec(secuPt6)); - assertFalse(securityPattern1.equalSpec(secuPt7)); - assertFalse(securityPattern1.equalSpec(secuPt8)); - //assertFalse(securityPattern1.equalSpec(secuPt9)); - assertFalse(securityPattern1.equalSpec(secuPt10)); - assertFalse(securityPattern1.equalSpec(secuPt11)); - assertTrue(securityPattern1.equalSpec(secuPt12)); + assertFalse(securityPattern1.equalsSpec(secuPt1)); + assertFalse(securityPattern1.equalsSpec(secuPt2)); + assertFalse(securityPattern1.equalsSpec(secuPt3)); + assertFalse(securityPattern1.equalsSpec(secuPt4)); + assertFalse(securityPattern1.equalsSpec(secuPt5)); + assertFalse(securityPattern1.equalsSpec(secuPt6)); + assertFalse(securityPattern1.equalsSpec(secuPt7)); + assertFalse(securityPattern1.equalsSpec(secuPt8)); + //assertFalse(securityPattern1.equalsSpec(secuPt9)); + assertFalse(securityPattern1.equalsSpec(secuPt10)); + assertFalse(securityPattern1.equalsSpec(secuPt11)); + assertTrue(securityPattern1.equalsSpec(secuPt12)); } @Test public void Test_ComparingTwosTMLTasks() { - assertFalse(tmlTask.equalSpec(tmlTask1)); - assertFalse(tmlTask.equalSpec(tmlTask2)); - assertFalse(tmlTask.equalSpec(tmlTask3)); - assertFalse(tmlTask.equalSpec(tmlTask4)); - assertFalse(tmlTask.equalSpec(tmlTask5)); - assertFalse(tmlTask.equalSpec(tmlTask6)); - assertFalse(tmlTask.equalSpec(tmlTask7)); - assertFalse(tmlTask.equalSpec(tmlTask8)); - assertFalse(tmlTask.equalSpec(tmlTask9)); - assertTrue(tmlTask.equalSpec(tmlTask10)); + assertFalse(tmlTask.equalsSpec(tmlTask1)); + assertFalse(tmlTask.equalsSpec(tmlTask2)); + assertFalse(tmlTask.equalsSpec(tmlTask3)); + assertFalse(tmlTask.equalsSpec(tmlTask4)); + assertFalse(tmlTask.equalsSpec(tmlTask5)); + assertFalse(tmlTask.equalsSpec(tmlTask6)); + assertFalse(tmlTask.equalsSpec(tmlTask7)); + assertFalse(tmlTask.equalsSpec(tmlTask8)); + assertFalse(tmlTask.equalsSpec(tmlTask9)); + assertTrue(tmlTask.equalsSpec(tmlTask10)); } @Test public void Test_ComparingTwoTMLPorts() { - assertFalse(tmlPort.equalSpec(tmlP1)); - assertFalse(tmlPort.equalSpec(tmlP2)); - assertFalse(tmlPort.equalSpec(tmlP3)); - assertFalse(tmlPort.equalSpec(tmlP4)); - assertFalse(tmlPort.equalSpec(tmlP5)); - assertTrue(tmlPort.equalSpec(tmlP6)); + assertFalse(tmlPort.equalsSpec(tmlP1)); + assertFalse(tmlPort.equalsSpec(tmlP2)); + assertFalse(tmlPort.equalsSpec(tmlP3)); + assertFalse(tmlPort.equalsSpec(tmlP4)); + assertFalse(tmlPort.equalsSpec(tmlP5)); + assertTrue(tmlPort.equalsSpec(tmlP6)); } @Test public void Test_ComparingTwoTMLRequests() { - assertFalse(tmlRequest.equalSpec(request1)); - assertFalse(tmlRequest.equalSpec(request2)); - assertFalse(tmlRequest.equalSpec(request3)); - assertFalse(tmlRequest.equalSpec(request4)); - assertFalse(tmlRequest.equalSpec(request5)); - assertFalse(tmlRequest.equalSpec(request6)); - assertFalse(tmlRequest.equalSpec(request7)); - assertTrue(tmlRequest.equalSpec(request8)); + assertFalse(tmlRequest.equalsSpec(request1)); + assertFalse(tmlRequest.equalsSpec(request2)); + assertFalse(tmlRequest.equalsSpec(request3)); + assertFalse(tmlRequest.equalsSpec(request4)); + assertFalse(tmlRequest.equalsSpec(request5)); + assertFalse(tmlRequest.equalsSpec(request6)); + assertFalse(tmlRequest.equalsSpec(request7)); + assertTrue(tmlRequest.equalsSpec(request8)); } @Test public void Test_ComparingTwoTMLEvents() { - assertFalse(tmlEvent.equalSpec(evt1)); - assertFalse(tmlEvent.equalSpec(evt2)); - assertFalse(tmlEvent.equalSpec(evt3)); - assertFalse(tmlEvent.equalSpec(evt4)); - assertFalse(tmlEvent.equalSpec(evt5)); - assertFalse(tmlEvent.equalSpec(evt6)); - assertFalse(tmlEvent.equalSpec(evt7)); - assertFalse(tmlEvent.equalSpec(evt8)); - assertTrue(tmlEvent.equalSpec(evt9)); + assertFalse(tmlEvent.equalsSpec(evt1)); + assertFalse(tmlEvent.equalsSpec(evt2)); + assertFalse(tmlEvent.equalsSpec(evt3)); + assertFalse(tmlEvent.equalsSpec(evt4)); + assertFalse(tmlEvent.equalsSpec(evt5)); + assertFalse(tmlEvent.equalsSpec(evt6)); + assertFalse(tmlEvent.equalsSpec(evt7)); + assertFalse(tmlEvent.equalsSpec(evt8)); + assertTrue(tmlEvent.equalsSpec(evt9)); } @Test public void Test_ComparingTwoTMLChannels() { - assertFalse(tmlChannel.equalSpec(chl1)); - assertFalse(tmlChannel.equalSpec(chl2)); - assertFalse(tmlChannel.equalSpec(chl3)); - assertFalse(tmlChannel.equalSpec(chl4)); - assertFalse(tmlChannel.equalSpec(chl5)); - assertFalse(tmlChannel.equalSpec(chl6)); - assertFalse(tmlChannel.equalSpec(chl7)); - assertFalse(tmlChannel.equalSpec(chl8)); - assertFalse(tmlChannel.equalSpec(chl9)); - assertFalse(tmlChannel.equalSpec(chl10)); - assertFalse(tmlChannel.equalSpec(chl11)); - assertFalse(tmlChannel.equalSpec(chl13)); - assertTrue(tmlChannel.equalSpec(chl12)); + assertFalse(tmlChannel.equalsSpec(chl1)); + assertFalse(tmlChannel.equalsSpec(chl2)); + assertFalse(tmlChannel.equalsSpec(chl3)); + assertFalse(tmlChannel.equalsSpec(chl4)); + assertFalse(tmlChannel.equalsSpec(chl5)); + assertFalse(tmlChannel.equalsSpec(chl6)); + assertFalse(tmlChannel.equalsSpec(chl7)); + assertFalse(tmlChannel.equalsSpec(chl8)); + assertFalse(tmlChannel.equalsSpec(chl9)); + assertFalse(tmlChannel.equalsSpec(chl10)); + assertFalse(tmlChannel.equalsSpec(chl11)); + assertFalse(tmlChannel.equalsSpec(chl13)); + assertTrue(tmlChannel.equalsSpec(chl12)); } @@ -745,96 +741,96 @@ public class TMLComparingMethodTest extends AbstractTest { @Test public void Test_ComparingTwoHwNoCs() { - assertFalse(hwNoC.equalSpec(noc1)); - assertFalse(hwNoC.equalSpec(noc2)); - assertFalse(hwNoC.equalSpec(noc3)); - assertFalse(hwNoC.equalSpec(noc4)); - assertFalse(hwNoC.equalSpec(noc5)); - assertTrue(hwNoC.equalSpec(noc6)); + assertFalse(hwNoC.equalsSpec(noc1)); + assertFalse(hwNoC.equalsSpec(noc2)); + assertFalse(hwNoC.equalsSpec(noc3)); + assertFalse(hwNoC.equalsSpec(noc4)); + assertFalse(hwNoC.equalsSpec(noc5)); + assertTrue(hwNoC.equalsSpec(noc6)); } @Test public void Test_ComparingTwoHwMemorys() { - assertFalse(hwMemory.equalSpec(memory1)); - assertFalse(hwMemory.equalSpec(memory2)); - assertFalse(hwMemory.equalSpec(memory3)); - assertFalse(hwMemory.equalSpec(memory4)); - assertFalse(hwMemory.equalSpec(memory5)); - assertTrue(hwMemory.equalSpec(memory6)); + assertFalse(hwMemory.equalsSpec(memory1)); + assertFalse(hwMemory.equalsSpec(memory2)); + assertFalse(hwMemory.equalsSpec(memory3)); + assertFalse(hwMemory.equalsSpec(memory4)); + assertFalse(hwMemory.equalsSpec(memory5)); + assertTrue(hwMemory.equalsSpec(memory6)); } @Test public void Test_ComparingTwoHwDMAs() { - assertFalse(hwDMA.equalSpec(dma1)); - assertFalse(hwDMA.equalSpec(dma2)); - assertFalse(hwDMA.equalSpec(dma3)); - assertFalse(hwDMA.equalSpec(dma4)); - assertTrue(hwDMA.equalSpec(dma5)); + assertFalse(hwDMA.equalsSpec(dma1)); + assertFalse(hwDMA.equalsSpec(dma2)); + assertFalse(hwDMA.equalsSpec(dma3)); + assertFalse(hwDMA.equalsSpec(dma4)); + assertTrue(hwDMA.equalsSpec(dma5)); } @Test public void Test_ComparingTwoHwBridge() { - assertFalse(hwBridge.equalSpec(bridge1)); - assertFalse(hwBridge.equalSpec(bridge2)); - assertFalse(hwBridge.equalSpec(bridge3)); - assertTrue(hwBridge.equalSpec(bridge4)); + assertFalse(hwBridge.equalsSpec(bridge1)); + assertFalse(hwBridge.equalsSpec(bridge2)); + assertFalse(hwBridge.equalsSpec(bridge3)); + assertTrue(hwBridge.equalsSpec(bridge4)); } @Test public void Test_ComparingTwoHwBus() { - assertFalse(hwBus.equalSpec(bus1)); - assertFalse(hwBus.equalSpec(bus2)); - assertFalse(hwBus.equalSpec(bus3)); - assertFalse(hwBus.equalSpec(bus4)); - assertFalse(hwBus.equalSpec(bus5)); - assertFalse(hwBus.equalSpec(bus6)); - assertFalse(hwBus.equalSpec(bus7)); - assertTrue(hwBus.equalSpec(bus8)); + assertFalse(hwBus.equalsSpec(bus1)); + assertFalse(hwBus.equalsSpec(bus2)); + assertFalse(hwBus.equalsSpec(bus3)); + assertFalse(hwBus.equalsSpec(bus4)); + assertFalse(hwBus.equalsSpec(bus5)); + assertFalse(hwBus.equalsSpec(bus6)); + assertFalse(hwBus.equalsSpec(bus7)); + assertTrue(hwBus.equalsSpec(bus8)); } @Test public void Test_ComparingTwoHwFPGA() { - assertFalse(hwFPGA.equalSpec(fpga1)); - assertFalse(hwFPGA.equalSpec(fpga2)); - assertFalse(hwFPGA.equalSpec(fpga3)); - assertFalse(hwFPGA.equalSpec(fpga4)); - assertFalse(hwFPGA.equalSpec(fpga5)); - assertFalse(hwFPGA.equalSpec(fpga6)); - assertFalse(hwFPGA.equalSpec(fpga7)); - assertFalse(hwFPGA.equalSpec(fpga8)); - assertFalse(hwFPGA.equalSpec(fpga9)); - assertFalse(hwFPGA.equalSpec(fpga10)); - assertFalse(hwFPGA.equalSpec(fpga11)); - assertFalse(hwFPGA.equalSpec(fpga12)); - assertTrue(hwFPGA.equalSpec(fpga13)); + assertFalse(hwFPGA.equalsSpec(fpga1)); + assertFalse(hwFPGA.equalsSpec(fpga2)); + assertFalse(hwFPGA.equalsSpec(fpga3)); + assertFalse(hwFPGA.equalsSpec(fpga4)); + assertFalse(hwFPGA.equalsSpec(fpga5)); + assertFalse(hwFPGA.equalsSpec(fpga6)); + assertFalse(hwFPGA.equalsSpec(fpga7)); + assertFalse(hwFPGA.equalsSpec(fpga8)); + assertFalse(hwFPGA.equalsSpec(fpga9)); + assertFalse(hwFPGA.equalsSpec(fpga10)); + assertFalse(hwFPGA.equalsSpec(fpga11)); + assertFalse(hwFPGA.equalsSpec(fpga12)); + assertTrue(hwFPGA.equalsSpec(fpga13)); } @Test public void Test_ComparingTwoHwAs() { - assertFalse(hwa.equalSpec(hwa1)); - assertFalse(hwa.equalSpec(hwa2)); - assertFalse(hwa.equalSpec(hwa3)); - assertFalse(hwa.equalSpec(hwa4)); - assertTrue(hwa.equalSpec(hwa5)); - assertFalse(hwa.equalSpec(hwa6)); + assertFalse(hwa.equalsSpec(hwa1)); + assertFalse(hwa.equalsSpec(hwa2)); + assertFalse(hwa.equalsSpec(hwa3)); + assertFalse(hwa.equalsSpec(hwa4)); + assertTrue(hwa.equalsSpec(hwa5)); + assertFalse(hwa.equalsSpec(hwa6)); } @Test public void Test_ComparingTwosHwCPUs() { - assertFalse(hwCPU.equalSpec(cpu1)); - assertFalse(hwCPU.equalSpec(cpu2)); - assertFalse(hwCPU.equalSpec(cpu3)); - assertFalse(hwCPU.equalSpec(cpu4)); - assertFalse(hwCPU.equalSpec(cpu5)); - assertFalse(hwCPU.equalSpec(cpu6)); - assertFalse(hwCPU.equalSpec(cpu7)); - assertFalse(hwCPU.equalSpec(cpu8)); - assertFalse(hwCPU.equalSpec(cpu9)); - assertFalse(hwCPU.equalSpec(cpu10)); - assertFalse(hwCPU.equalSpec(cpu11)); - assertFalse(hwCPU.equalSpec(cpu13)); - assertFalse(hwCPU.equalSpec(cpu14)); - assertTrue(hwCPU.equalSpec(cpu12)); + assertFalse(hwCPU.equalsSpec(cpu1)); + assertFalse(hwCPU.equalsSpec(cpu2)); + assertFalse(hwCPU.equalsSpec(cpu3)); + assertFalse(hwCPU.equalsSpec(cpu4)); + assertFalse(hwCPU.equalsSpec(cpu5)); + assertFalse(hwCPU.equalsSpec(cpu6)); + assertFalse(hwCPU.equalsSpec(cpu7)); + assertFalse(hwCPU.equalsSpec(cpu8)); + assertFalse(hwCPU.equalsSpec(cpu9)); + assertFalse(hwCPU.equalsSpec(cpu10)); + assertFalse(hwCPU.equalsSpec(cpu11)); + assertFalse(hwCPU.equalsSpec(cpu13)); + assertFalse(hwCPU.equalsSpec(cpu14)); + assertTrue(hwCPU.equalsSpec(cpu12)); } @@ -867,17 +863,17 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isOncommondesListEquals() { + public void areOncommondesListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isOncommondesListEquals(hwCommunicationNodeList1,hwCommunicationNodeList2)); + "",TMLComparingMethod.areOncommondesListsEqual(hwCommunicationNodeList1,hwCommunicationNodeList2)); assertFalse("two lists have same size but difference context" + - "",comparing.isOncommondesListEquals(hwCommunicationNodeList1,hwCommunicationNodeList3)); + "",TMLComparingMethod.areOncommondesListsEqual(hwCommunicationNodeList1,hwCommunicationNodeList3)); - assertTrue("two empty lists", comparing.isOncommondesListEquals(hwCommunicationNodeList4,hwCommunicationNodeList5)); + assertTrue("two empty lists", TMLComparingMethod.areOncommondesListsEqual(hwCommunicationNodeList4,hwCommunicationNodeList5)); - assertFalse("two lists have difference size",comparing.isOncommondesListEquals(hwCommunicationNodeList1,hwCommunicationNodeList6)); + assertFalse("two lists have difference size",TMLComparingMethod.areOncommondesListsEqual(hwCommunicationNodeList1,hwCommunicationNodeList6)); @@ -908,16 +904,16 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isMappedcommeltsListEquals() { + public void areMappedcommeltsListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isMappedcommeltsListEquals(tmlElementList1,tmlElementList2)); + "",TMLComparingMethod.areMappedcommeltsListsEqual(tmlElementList1,tmlElementList2)); assertFalse("two lists have same context but difference context" + - "",comparing.isMappedcommeltsListEquals(tmlElementList1,tmlElementList3)); + "",TMLComparingMethod.areMappedcommeltsListsEqual(tmlElementList1,tmlElementList3)); - assertTrue("two empty lists", comparing.isMappedcommeltsListEquals(tmlElementList4,tmlElementList5)); + assertTrue("two empty lists", TMLComparingMethod.areMappedcommeltsListsEqual(tmlElementList4,tmlElementList5)); - assertFalse("two lists have difference size",comparing.isMappedcommeltsListEquals(tmlElementList1,tmlElementList6)); + assertFalse("two lists have difference size",TMLComparingMethod.areMappedcommeltsListsEqual(tmlElementList1,tmlElementList6)); } private void createdTaskLists() { @@ -941,16 +937,16 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isTasksListEquals() { + public void areTaskListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isTasksListEquals(taskList1,taskList2)); + "",TMLComparingMethod.areTaskListsEqual(taskList1,taskList2)); assertFalse("two lists have same context but difference context" + - "",comparing.isTasksListEquals(taskList1,taskList3)); + "",TMLComparingMethod.areTaskListsEqual(taskList1,taskList3)); - assertTrue("two empty lists", comparing.isTasksListEquals(taskList4,taskList5)); + assertTrue("two empty lists", TMLComparingMethod.areTaskListsEqual(taskList4,taskList5)); - assertFalse("two lists have difference size",comparing.isTasksListEquals(taskList1,taskList6)); + assertFalse("two lists have difference size",TMLComparingMethod.areTaskListsEqual(taskList1,taskList6)); } @@ -976,17 +972,17 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isOnExecutionNodeListEquals() { + public void areOnExecutionNodeListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isOnExecutionNodeListEquals(hwExecutionNodeList1,hwExecutionNodeList2)); + "",TMLComparingMethod.areOnExecutionNodeListsEqual(hwExecutionNodeList1,hwExecutionNodeList2)); assertFalse("two lists have difference context" + - "",comparing.isOnExecutionNodeListEquals(hwExecutionNodeList1,hwExecutionNodeList3)); + "",TMLComparingMethod.areOnExecutionNodeListsEqual(hwExecutionNodeList1,hwExecutionNodeList3)); - assertTrue("two empty lists", comparing.isOnExecutionNodeListEquals(hwExecutionNodeList4,hwExecutionNodeList5)); + assertTrue("two empty lists", TMLComparingMethod.areOnExecutionNodeListsEqual(hwExecutionNodeList4,hwExecutionNodeList5)); - assertFalse("two lists have difference size",comparing.isOnExecutionNodeListEquals(hwExecutionNodeList1,hwExecutionNodeList6)); + assertFalse("two lists have difference size",TMLComparingMethod.areOnExecutionNodeListsEqual(hwExecutionNodeList1,hwExecutionNodeList6)); } private void createListOfStringArray() { @@ -1024,17 +1020,17 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isListOfStringArrayEquals() { + public void areListsOfStringArrayEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isListOfStringArrayEquals(listOfStrArray1,listOfStrArray2)); + "",TMLComparingMethod.areListsOfStringArrayEqual(listOfStrArray1,listOfStrArray2)); assertFalse("two lists have difference context" + - "",comparing.isListOfStringArrayEquals(listOfStrArray1,listOfStrArray3)); + "",TMLComparingMethod.areListsOfStringArrayEqual(listOfStrArray1,listOfStrArray3)); - assertTrue("two empty lists", comparing.isListOfStringArrayEquals(listOfStrArray4, listOfStrArray5)); + assertTrue("two empty lists", TMLComparingMethod.areListsOfStringArrayEqual(listOfStrArray4, listOfStrArray5)); - assertFalse("two lists have difference size",comparing.isListOfStringArrayEquals(listOfStrArray1,listOfStrArray6)); + assertFalse("two lists have difference size",TMLComparingMethod.areListsOfStringArrayEqual(listOfStrArray1,listOfStrArray6)); } private void createSecurityMap() { @@ -1068,15 +1064,13 @@ public class TMLComparingMethodTest extends AbstractTest { @Test public void isSecurityPatternMapEquals() { - assertTrue("two lists have same context but difference element order" + - "",comparing.isSecurityPatternMapEquals(securityMap1,securityMap2)); + assertFalse("two lists have same context but difference element order", TMLComparingMethod.areKeysMappingEqual(securityMap1,securityMap2)); - assertFalse("two lists have same size but difference context" + - "",comparing.isSecurityPatternMapEquals(securityMap1,securityMap3)); + assertFalse("two lists have same size but difference context", TMLComparingMethod.areKeysMappingEqual(securityMap1,securityMap3)); - assertTrue("two empty lists", comparing.isSecurityPatternMapEquals(securityMap4,securityMap5)); + assertTrue("two empty lists", TMLComparingMethod.areKeysMappingEqual(securityMap4,securityMap5)); - assertFalse("two lists have difference size",comparing.isSecurityPatternMapEquals(securityMap1,securityMap6)); + assertFalse("two lists have difference size",TMLComparingMethod.areKeysMappingEqual(securityMap1,securityMap6)); } @@ -1100,18 +1094,18 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isHwMemoryListEquals() { + public void isHwMemoryListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isHwMemoryListEquals(memoryList1,memoryList2)); + "",TMLComparingMethod.areHwMemoryListsEqual(memoryList1,memoryList2)); assertFalse("two lists have difference context" + - "",comparing.isHwMemoryListEquals(memoryList1,memoryList3)); + "",TMLComparingMethod.areHwMemoryListsEqual(memoryList1,memoryList3)); - assertTrue("two empty lists", comparing.isHwMemoryListEquals(memoryList4, memoryList5)); + assertTrue("two empty lists", TMLComparingMethod.areHwMemoryListsEqual(memoryList4, memoryList5)); - assertFalse("two lists have difference size",comparing.isHwMemoryListEquals(memoryList1,memoryList6)); + assertFalse("two lists have difference size",TMLComparingMethod.areHwMemoryListsEqual(memoryList1,memoryList6)); } private void createTMLActivityElementList() { @@ -1209,16 +1203,15 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isTMLActivityEltListEquals() { - assertTrue("two lists have same context but difference element order" + - "",comparing.isTMLActivityEltListEquals(tmlActEltList1,tmlActEltList2)); + public void isTMLActivityEltListsEqual() { + assertFalse("two lists have same context but difference element order",TMLComparingMethod.areTMLActivityEltListsEqual(tmlActEltList1, + tmlActEltList2)); - assertFalse("two lists have difference context" + - "",comparing.isTMLActivityEltListEquals(tmlActEltList1,tmlActEltList3)); + assertFalse("two lists have difference context",TMLComparingMethod.areTMLActivityEltListsEqual(tmlActEltList1, tmlActEltList3)); - assertTrue("two empty lists", comparing.isTMLActivityEltListEquals(tmlActEltList4, tmlActEltList5)); + assertTrue("two empty lists", TMLComparingMethod.areTMLActivityEltListsEqual(tmlActEltList4, tmlActEltList5)); - assertFalse("two lists have difference size",comparing.isTMLActivityEltListEquals(tmlActEltList1,tmlActEltList6)); + assertFalse("two lists have difference size",TMLComparingMethod.areTMLActivityEltListsEqual(tmlActEltList1,tmlActEltList6)); } private void createHwNodeList() { @@ -1261,17 +1254,17 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isHwNodeListEquals() { + public void areHwNodeListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isHwNodeListEquals(hwNodeList1,hwNodeList2)); + "",TMLComparingMethod.areHwNodeListsEqual(hwNodeList1,hwNodeList2)); assertFalse("two lists have difference context" + - "",comparing.isHwNodeListEquals(hwNodeList1,hwNodeList3)); + "",TMLComparingMethod.areHwNodeListsEqual(hwNodeList1,hwNodeList3)); - assertTrue("two empty lists", comparing.isHwNodeListEquals(hwNodeList4,hwNodeList5)); + assertTrue("two empty lists", TMLComparingMethod.areHwNodeListsEqual(hwNodeList4,hwNodeList5)); - assertFalse("two lists have difference size",comparing.isHwNodeListEquals(hwNodeList1,hwNodeList6)); + assertFalse("two lists have difference size",TMLComparingMethod.areHwNodeListsEqual(hwNodeList1,hwNodeList6)); } @@ -1305,17 +1298,17 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isHwlinkListEquals() { + public void areHwlinkListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isHwlinkListEquals(hwLinkList1,hwLinkList2)); + "",TMLComparingMethod.areHwlinkListsEqual(hwLinkList1,hwLinkList2)); assertFalse("two lists have difference context" + - "",comparing.isHwlinkListEquals(hwLinkList1,hwLinkList3)); + "",TMLComparingMethod.areHwlinkListsEqual(hwLinkList1,hwLinkList3)); - assertTrue("two empty lists", comparing.isHwlinkListEquals(hwLinkList4, hwLinkList5)); + assertTrue("two empty lists", TMLComparingMethod.areHwlinkListsEqual(hwLinkList4, hwLinkList5)); - assertFalse("two lists have difference size", comparing.isHwlinkListEquals(hwLinkList1, hwLinkList6)); + assertFalse("two lists have difference size", TMLComparingMethod.areHwlinkListsEqual(hwLinkList1, hwLinkList6)); } private void createdPortLists() { @@ -1338,16 +1331,16 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isPortListEquals() { + public void arePortListsEqual() { assertTrue("two lists have same context but difference element order" + - "",comparing.isPortListEquals(portList1,portList2)); + "",TMLComparingMethod.arePortListsEqual(portList1,portList2)); assertFalse("two lists have difference context" + - "",comparing.isPortListEquals(portList1,portList3)); + "",TMLComparingMethod.arePortListsEqual(portList1,portList3)); - assertTrue("two empty lists", comparing.isPortListEquals(portList4, portList5)); + assertTrue("two empty lists", TMLComparingMethod.arePortListsEqual(portList4, portList5)); - assertFalse("two lists have difference size", comparing.isPortListEquals(portList1, portList6)); + assertFalse("two lists have difference size", TMLComparingMethod.arePortListsEqual(portList1, portList6)); } @@ -1371,16 +1364,16 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isTMLChannelSetEquals() { + public void areTMLChannelSetsEqual() { assertTrue("two sets have same context but difference element order" + - "",comparing.isTMLChannelSetEquals(channelSet1,channelSet2)); + "",TMLComparingMethod.areTMLChannelSetsEqual(channelSet1,channelSet2)); assertFalse("two sets have difference context" + - "",comparing.isTMLChannelSetEquals(channelSet1,channelSet3)); + "",TMLComparingMethod.areTMLChannelSetsEqual(channelSet1,channelSet3)); - assertTrue("two empty sets", comparing.isTMLChannelSetEquals(channelSet4, channelSet5)); + assertTrue("two empty sets", TMLComparingMethod.areTMLChannelSetsEqual(channelSet4, channelSet5)); - assertFalse("two sets have difference size", comparing.isTMLChannelSetEquals(channelSet1, channelSet6)); + assertFalse("two sets have difference size", TMLComparingMethod.areTMLChannelSetsEqual(channelSet1, channelSet6)); } private void createEventSets() { @@ -1403,15 +1396,15 @@ public class TMLComparingMethodTest extends AbstractTest { } @Test - public void isTMLEventSetEquals() { + public void areTMLEventSetsEqual() { assertTrue("two sets have same context but difference element order" + - "",comparing.isTMLEventSetEquals(eventSet1,eventSet2)); + "", TMLComparingMethod.areTMLEventSetsEqual(eventSet1,eventSet2)); assertFalse("two sets have difference context" + - "",comparing.isTMLEventSetEquals(eventSet1,eventSet3)); + "", TMLComparingMethod.areTMLEventSetsEqual(eventSet1,eventSet3)); - assertTrue("two empty sets", comparing.isTMLEventSetEquals(eventSet4, eventSet5)); + assertTrue("two empty sets", TMLComparingMethod.areTMLEventSetsEqual(eventSet4, eventSet5)); - assertFalse("two sets have difference size", comparing.isTMLEventSetEquals(eventSet1, eventSet6)); + assertFalse("two sets have difference size", TMLComparingMethod.areTMLEventSetsEqual(eventSet1, eventSet6)); } } \ No newline at end of file diff --git a/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java b/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java index 11a8b9475a0458fe05df03395dfc844dc152426e..b1a8ecc7d1d1199c4d6f8c8abb2680e47020b63c 100644 --- a/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java +++ b/ttool/src/test/java/tmltranslator/TMLDeepCloneTests.java @@ -3,13 +3,9 @@ package tmltranslator; import myutil.FileUtils; import myutil.TraceManager; import test.AbstractTest; -import tmltranslator.compareTMLTest.CompareTML; -import org.junit.Before; import org.junit.Test; import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; import static org.junit.Assert.*; @@ -80,7 +76,7 @@ public class TMLDeepCloneTests extends AbstractTest { assertTrue(syntax.hasErrors() == 0); // Comparing the two TML Modeling - boolean equal = cloned.equalSpec(tmlts.getTMLModeling()); + boolean equal = cloned.equalsSpec(tmlts.getTMLModeling()); assertTrue(equal); @@ -131,7 +127,7 @@ public class TMLDeepCloneTests extends AbstractTest { assertTrue(syntax.hasErrors() == 0); // Comparing the two TML Modeling - boolean equal = cloned.equalSpec(tmlts.getTMLMapping()); + boolean equal = cloned.equalsSpec(tmlts.getTMLMapping()); assertTrue(equal); diff --git a/ttool/src/test/java/ui/DiplodocusDelayPenaltyDisableTests.java b/ttool/src/test/java/ui/DiplodocusDelayPenaltyDisableTests.java index 95f44e4290af7c065ec160cf493005f0d7551cf3..bdb26af2baa089c2882d2ee484374019aac3eb07 100644 --- a/ttool/src/test/java/ui/DiplodocusDelayPenaltyDisableTests.java +++ b/ttool/src/test/java/ui/DiplodocusDelayPenaltyDisableTests.java @@ -9,18 +9,12 @@ import org.junit.BeforeClass; import org.junit.Test; import req.ebrdd.EBRDD; import tepe.TEPE; -import test.AbstractTest; import tmltranslator.TMLMapping; import tmltranslator.TMLMappingTextSpecification; import tmltranslator.TMLSyntaxChecking; -import tmltranslator.compareTMLTest.CompareTML; import tmltranslator.tomappingsystemc2.DiploSimulatorFactory; import tmltranslator.tomappingsystemc2.IDiploSimulatorCodeGenerator; import tmltranslator.tomappingsystemc2.Penalties; -import ui.AbstractUITest; -import ui.TDiagramPanel; -import ui.TMLArchiPanel; -import ui.TURTLEPanel; import ui.tmldd.TMLArchiDiagramPanel; import java.io.BufferedReader; @@ -231,7 +225,6 @@ public class DiplodocusDelayPenaltyDisableTests extends AbstractUITest { @Test public void testGenerateTML() throws Exception { - CompareTML compTML = new CompareTML(); mainGUI.openProjectFromFile(new File(RESOURCES_DIR + "delay-readwrite.xml")); for(TURTLEPanel _tab : mainGUI.getTabs()) { if(_tab instanceof TMLArchiPanel) { @@ -253,12 +246,11 @@ public class DiplodocusDelayPenaltyDisableTests extends AbstractUITest { System.out.println("\n\n\n*** Compared files: " + f1.getAbsolutePath() + " vs " + f2.getAbsolutePath() + "\n\n" + "\n"); - assertTrue(compTML.compareTML(f1,f2)); + assertTrue(FileUtils.compareTMLFiles(f1,f2)); } @Test public void testTwoConsecutiveDelay1() throws Exception { - CompareTML compTML = new CompareTML(); mainGUI.openProjectFromFile(new File(RESOURCES_DIR + "consecutive_delay1.xml")); for(TURTLEPanel _tab : mainGUI.getTabs()) { if(_tab instanceof TMLArchiPanel) { @@ -275,12 +267,11 @@ public class DiplodocusDelayPenaltyDisableTests extends AbstractUITest { mainGUI.generateTMLTxt(); File f1 = new File(EXPECTED_FILE2); File f2 = new File("spec.tml"); // Generated file after executing "TML generation" - assertTrue(compTML.compareTML(f1,f2)); + assertTrue(FileUtils.compareTMLFiles(f1,f2)); } @Test public void testTwoConsecutiveDelay2() throws Exception { - CompareTML compTML = new CompareTML(); mainGUI.openProjectFromFile(new File(RESOURCES_DIR + "consecutive_delay2.xml")); for(TURTLEPanel _tab : mainGUI.getTabs()) { if(_tab instanceof TMLArchiPanel) { @@ -297,7 +288,7 @@ public class DiplodocusDelayPenaltyDisableTests extends AbstractUITest { mainGUI.generateTMLTxt(); File f1 = new File(EXPECTED_FILE3); File f2 = new File("spec.tml"); // Generated file after executing "TML generation" - assertTrue(compTML.compareTML(f1,f2)); + assertTrue(FileUtils.compareTMLFiles(f1,f2)); } @Test diff --git a/ttool/src/test/java/ui/TDiagramPanelCloneArchitectureTest.java b/ttool/src/test/java/ui/TDiagramPanelCloneArchitectureTest.java index af79c9d97392bec02cff6f88f8168829ace3627f..6e3354c364e5c3609d0613f2a0694340d6b6d82d 100644 --- a/ttool/src/test/java/ui/TDiagramPanelCloneArchitectureTest.java +++ b/ttool/src/test/java/ui/TDiagramPanelCloneArchitectureTest.java @@ -40,7 +40,6 @@ package ui; import myutil.TraceManager; -import org.apache.batik.anim.timing.Trace; import org.junit.*; import tmltranslator.*; import translator.CheckingError; @@ -253,7 +252,7 @@ public class TDiagramPanelCloneArchitectureTest extends AbstractUITest { TraceManager.addDev("*** Comparing spec"); //assertNotNull(tmlMapping_clone); //assertNotNull(tmlMapping_exp); - assertTrue(tmlMapping_clone.equalSpec(tmlMapping_exp)); + assertTrue(tmlMapping_clone.equalsSpec(tmlMapping_exp)); } catch (Exception e) { TraceManager.addDev("Exception: " + e.getClass() + " / " + e.getMessage()); diff --git a/ttool/src/test/java/ui/TDiagramPanelCloneTest.java b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java index d5565ec7868426ad4cd0d9cb46407ed1ad4ba118..376ca692aa432dc804e85c3e13e684e04da3f894 100644 --- a/ttool/src/test/java/ui/TDiagramPanelCloneTest.java +++ b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java @@ -1,7 +1,7 @@ package ui; +import myutil.FileUtils; import org.junit.*; -import tmltranslator.compareTMLTest.CompareTML; import ui.tmlcompd.TMLComponentTaskDiagramPanel; @@ -70,14 +70,13 @@ public class TDiagramPanelCloneTest extends AbstractUITest { System.out.println("Not null testCloneCompositeComponentWithNullFather "); for (int i = 0; i < EXPECTED_FILES.length; i++) { System.out.println("Testing with " + components[i].getValue()); - CompareTML compTML = new CompareTML(); diagramPanel.cloneComponent(components[i]); mainGUI.checkModelingSyntax(true); mainGUI.generateTMLTxt(); File f1 = new File(FILE_DIR + EXPECTED_FILES[i]); File f2 = new File("spec.tml"); // Generated file after executing "TML generation" System.out.println("Comparing " + f1.getAbsolutePath() + " with " + f2.getAbsolutePath()); - assertTrue(compTML.compareTML(f1, f2)); + assertTrue(FileUtils.compareTMLFiles(f1, f2)); } } System.out.println("End test testCloneCompositeComponentWithNullFather "); diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/features.json new file mode 100644 index 0000000000000000000000000000000000000000..83f959b5547238e081b6480f5921f39e1775c4c3 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : [], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..4471d3b9809fa2cbb674c2f10e1ed1969dc66fe4 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tarchi @@ -0,0 +1,116 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..62f3307939cd96c41cdd0a1343b52fef3180011f --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tmap @@ -0,0 +1,80 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAPSEC MemoryAlice se_comm1 + MAPSEC MemoryBob se_comm1 + MAPSEC MemoryAlice mac_comm3 + MAPSEC MemoryBob mac_comm3 + MAPSEC MemoryAlice se_comm2 + MAPSEC MemoryBob se_comm2 + MAPSEC MemoryAlice mac_comm4 + MAPSEC MemoryBob mac_comm4 + MAPSEC MemoryAlice se_comm + MAPSEC MemoryBob se_comm +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..ab2d913f876479a056dcb9f1213e9ad3d4f64e81 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CaseWithoutHSM/golden/spec.tml @@ -0,0 +1,76 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-No-HSM-test.xml +// Generated: Tue Jun 25 15:20:14 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 + +// Events + +// Requests + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__comm 1 se_comm + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__comm2 1 se_comm2 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/features.json new file mode 100644 index 0000000000000000000000000000000000000000..6f125c60c47270b6fe083e803aae064c7b7b95f5 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice"], + + "DirectConnectHSMs": true, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..793add51e607319a0c50b673b260496f329e2703 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..abe2b748730600fac3c3be45ccbb276f3b724e8f --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap @@ -0,0 +1,134 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP MemoryBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP MemoryBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAPSEC MemoryBob se_comm2 + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC MemoryBob se_comm1 + MAPSEC Memory_HSM_Alice se_comm1 + MAPSEC MemoryBob mac_comm4 + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC MemoryBob mac_comm3 + MAPSEC Memory_HSM_Alice mac_comm3 + MAPSEC MemoryBob se_comm + MAPSEC Memory_HSM_Alice se_comm +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..11e578feb9d2d6260484a74999ee16af7c3c6ca6 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tml @@ -0,0 +1,141 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-HSMAlice-DirectConnec-test.xml +// Generated: Tue Jun 25 15:39:06 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm +AUTHCHANNEL autoSec__retDataCh_Bob_comm +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm1 +AUTHCHANNEL autoSec__retDataCh_Bob_comm1 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm2 +AUTHCHANNEL autoSec__retDataCh_Bob_comm2 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm3 +AUTHCHANNEL autoSec__retDataCh_Bob_comm3 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm4 +AUTHCHANNEL autoSec__retDataCh_Bob_comm4 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__retDataCh_Bob_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__retDataCh_Bob_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__retDataCh_Bob_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__retDataCh_Bob_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__retDataCh_Bob_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Bob_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Bob_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__retDataCh_Bob_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Bob_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__retDataCh_Bob_comm4 1 mac_comm4 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..29b72ca9f103be49001eb08f9e3f5852b1ebaef3 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice", "Bob"], + + "DirectConnectHSMs": true, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..478ad6e605628ba29f89c295f06d9f6aaf9413a3 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tarchi @@ -0,0 +1,274 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..c3f11dd6d1b410a310734531ee417a41e783f0e6 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap @@ -0,0 +1,188 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAPSEC Memory_HSM_Alice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 + MAPSEC Memory_HSM_Alice se_comm + MAPSEC Memory_HSM_Bob se_comm + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 + MAPSEC Memory_HSM_Alice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..6e620d7765650e4a435fda6fe9b2253f0fc6e80b --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tml @@ -0,0 +1,206 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-HSMAliceBob-DirectConnec-test.xml +// Generated: Tue Jun 25 20:04:52 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + READ autoSec__retDataCh_Bob_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_HSM_Alice_Encrypt_comm_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..95abf314dbe48d46da6548ebb6d09d9339142d6e --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Bob"], + + "DirectConnectHSMs": true, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..78633dd51fed4dfbd149f196c5615b2a97f9150d --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..bc520d5cbd69c9f460fa8cf85a468e2026f01b34 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap @@ -0,0 +1,134 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusBob autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAPSEC MemoryAlice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 + MAPSEC MemoryAlice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 + MAPSEC MemoryAlice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 + MAPSEC MemoryAlice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC MemoryAlice se_comm + MAPSEC Memory_HSM_Bob se_comm +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..031229b9dac98e3309c67f682cd05fe32eae8297 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tml @@ -0,0 +1,141 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-HSMBob-DirectConnec-test.xml +// Generated: Tue Jun 25 20:01:02 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CONFCHANNEL autoSec__dataCh_Alice_comm +AUTHCHANNEL autoSec__dataCh_Alice_comm +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CONFCHANNEL autoSec__dataCh_Alice_comm1 +AUTHCHANNEL autoSec__dataCh_Alice_comm1 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CONFCHANNEL autoSec__dataCh_Alice_comm2 +AUTHCHANNEL autoSec__dataCh_Alice_comm2 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CONFCHANNEL autoSec__dataCh_Alice_comm3 +AUTHCHANNEL autoSec__dataCh_Alice_comm3 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CONFCHANNEL autoSec__dataCh_Alice_comm4 +AUTHCHANNEL autoSec__dataCh_Alice_comm4 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__dataCh_Alice_comm 1 se_comm + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__dataCh_Alice_comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__dataCh_Alice_comm2 1 se_comm2 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__dataCh_Alice_comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__dataCh_Alice_comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + READ autoSec__retDataCh_Bob_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/features.json new file mode 100644 index 0000000000000000000000000000000000000000..b1c775c956f1ecdd0eeb0efde9c7f92735554442 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice"], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..79b91d519abf8819589fa8b0ee0df52b2c5a8f78 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..278a66018c987648b0e6f8438f28607bde38d802 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap @@ -0,0 +1,162 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAPSEC MemoryBob se_comm1 + MAPSEC Memory_HSM_Alice se_comm1 + MAPSEC MemoryBob mac_comm4 + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC MemoryBob se_comm + MAPSEC Memory_HSM_Alice se_comm + MAPSEC MemoryBob se_comm2 + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC MemoryBob mac_comm3 + MAPSEC Memory_HSM_Alice mac_comm3 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..f8a6c1d6a0f7261f6ee755aebb49c0e7ec583016 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tml @@ -0,0 +1,169 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-HSMAlice-test.xml +// Generated: Tue Jun 25 15:32:17 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__dataNonceChAlice_Bob BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataNonceChAlice_Bob 0 +CHANNEL autoSec__dataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataNonceChAlice_Bob0 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Alice_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm 0 +CHANNEL autoSec__retDataCh_Alice_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm1 0 +CHANNEL autoSec__retDataCh_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm2 0 +CHANNEL autoSec__retDataCh_Alice_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm3 0 +CHANNEL autoSec__retDataCh_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm4 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + READ autoSec__retDataCh_Alice_comm 1 se_comm + WRITE autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + READ autoSec__retDataCh_Alice_comm1 1 se_comm1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + READ autoSec__retDataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__comm2 1 se_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + READ autoSec__retDataCh_Alice_comm3 1 mac_comm3 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + READ autoSec__retDataCh_Alice_comm4 1 mac_comm4 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__retDataCh_Alice_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__retDataCh_Alice_comm4 1 mac_comm4 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..be97226862dbd77e478fd5ea900b878ba828079e --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice", "Bob"], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..1e9d8011d8fc066814b4d95455a1dd799dc9727c --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tarchi @@ -0,0 +1,274 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..8f1c0678d4794ff291931f84ad42ce19fc389019 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap @@ -0,0 +1,244 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP BusBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 + MAPSEC Memory_HSM_Alice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 + MAPSEC Memory_HSM_Alice se_comm + MAPSEC Memory_HSM_Bob se_comm + MAPSEC Memory_HSM_Alice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..54ecc79dec7a32a4df9fe40aa31ac23e697b6ef9 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tml @@ -0,0 +1,262 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-HSMAliceBob-test.xml +// Generated: Tue Jun 25 15:37:17 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__dataCh_Bob_comm BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_Bob_comm 0 +CHANNEL autoSec__dataCh_Bob_comm1 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_Bob_comm1 0 +CHANNEL autoSec__dataCh_Bob_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_Bob_comm2 0 +CHANNEL autoSec__dataCh_Bob_comm3 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_Bob_comm3 0 +CHANNEL autoSec__dataCh_Bob_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_Bob_comm4 0 +CHANNEL autoSec__dataNonceChAlice_Bob BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataNonceChAlice_Bob 0 +CHANNEL autoSec__dataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataNonceChAlice_Bob0 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Alice_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm 0 +CHANNEL autoSec__retDataCh_Alice_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm1 0 +CHANNEL autoSec__retDataCh_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm2 0 +CHANNEL autoSec__retDataCh_Alice_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm3 0 +CHANNEL autoSec__retDataCh_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 +CHANNEL autoSec__retDataNonceChAlice_Bob BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob 0 +CHANNEL autoSec__retDataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob0 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + READ autoSec__retDataCh_Alice_comm 1 se_comm + WRITE autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + READ autoSec__retDataCh_Alice_comm1 1 se_comm1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + READ autoSec__retDataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__comm2 1 se_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + READ autoSec__retDataCh_Alice_comm3 1 mac_comm3 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + READ autoSec__retDataCh_Alice_comm4 1 mac_comm4 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + WRITE autoSec__dataCh_Bob_comm 1 se_comm + READ autoSec__retDataCh_Bob_comm 1 + READ autoSec__comm1 1 se_comm1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + WRITE autoSec__dataCh_Bob_comm1 1 se_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + WRITE autoSec__dataCh_Bob_comm2 1 se_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + READ autoSec__comm3 1 mac_comm3 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + WRITE autoSec__dataCh_Bob_comm3 1 mac_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + WRITE autoSec__dataCh_Bob_comm4 1 mac_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__retDataCh_Alice_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__retDataCh_Alice_comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Bob_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Bob_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..b1527a03d2fac4fc7edb09059a62dca5e857022a --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Bob"], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..0db9b2e5aba8c37c843a7916b4f2378c2514812a --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..c273a708cd94b1ed99d755549b018b848b88061a --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap @@ -0,0 +1,162 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP BusBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAPSEC MemoryAlice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC MemoryAlice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 + MAPSEC MemoryAlice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 + MAPSEC MemoryAlice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 + MAPSEC MemoryAlice se_comm + MAPSEC Memory_HSM_Bob se_comm +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..090b8bf8143d9a8c66e0e870c0c20385c4a275ac --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tml @@ -0,0 +1,169 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-HSMBob-test.xml +// Generated: Tue Jun 25 15:35:35 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__dataCh_Bob_comm BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_Bob_comm 0 +CHANNEL autoSec__dataCh_Bob_comm1 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_Bob_comm1 0 +CHANNEL autoSec__dataCh_Bob_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_Bob_comm2 0 +CHANNEL autoSec__dataCh_Bob_comm3 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_Bob_comm3 0 +CHANNEL autoSec__dataCh_Bob_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_Bob_comm4 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 +CHANNEL autoSec__retDataNonceChAlice_Bob BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob 0 +CHANNEL autoSec__retDataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob0 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__comm 1 se_comm + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__comm2 1 se_comm2 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + WRITE autoSec__dataCh_Bob_comm 1 se_comm + READ autoSec__retDataCh_Bob_comm 1 + READ autoSec__comm1 1 se_comm1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + WRITE autoSec__dataCh_Bob_comm1 1 se_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + WRITE autoSec__dataCh_Bob_comm2 1 se_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + READ autoSec__comm3 1 mac_comm3 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + WRITE autoSec__dataCh_Bob_comm3 1 mac_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + WRITE autoSec__dataCh_Bob_comm4 1 mac_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Bob_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Bob_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..5b05969400ac106266d529423c04f585bedb9659 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tarchi @@ -0,0 +1,116 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..ce2b70767504cbe8ab67dcf0d531a2c3a1da3ecd --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tmap @@ -0,0 +1,54 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..8617a6706e803e6047de7b091b700e0f04587ce9 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannels/spec.tml @@ -0,0 +1,56 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/bug-avatar-draw.xml +// Generated: Wed Jun 19 15:58:25 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 + +// Events + +// Requests + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + WRITE autoSec__comm 1 + WRITE autoSec__comm1 1 + WRITE autoSec__comm2 1 + WRITE autoSec__comm3 1 + WRITE autoSec__comm4 1 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 + READ autoSec__comm1 1 + READ autoSec__comm2 1 + READ autoSec__comm3 1 + READ autoSec__comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/features.json new file mode 100644 index 0000000000000000000000000000000000000000..405dac9de61d214382ec845dce2c71ae49eff703 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : [], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..4471d3b9809fa2cbb674c2f10e1ed1969dc66fe4 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tarchi @@ -0,0 +1,116 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..8ef72389237904714099664380972f25b7f4f9b4 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tmap @@ -0,0 +1,80 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAPSEC MemoryAlice se_comm1 + MAPSEC MemoryBob se_comm1 + MAPSEC MemoryAlice mac_comm3 + MAPSEC MemoryBob mac_comm3 + MAPSEC MemoryAlice mac_comm4 + MAPSEC MemoryBob mac_comm4 + MAPSEC MemoryAlice se_comm + MAPSEC MemoryBob se_comm + MAPSEC MemoryAlice se_comm2 + MAPSEC MemoryBob se_comm2 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..b3e87cfe3b01bd40f743145c4f74aa1ddedc3763 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CaseWithoutHSM/golden/spec.tml @@ -0,0 +1,99 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep-No-HSM-test.xml +// Generated: Wed Jun 26 17:14:40 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 + +// Events + +// Requests + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__comm 1 se_comm + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + WRITE autoSec__comm2 1 se_comm2 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + WRITE autoSec__comm4 1 mac_comm4 + WRITE autoSec__comm 1 se_comm + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + WRITE autoSec__comm2 1 se_comm2 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + READ autoSec__comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/features.json new file mode 100644 index 0000000000000000000000000000000000000000..90a52f9ef1161aa4c00c5f435be26b17e2de5130 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice"], + + "DirectConnectHSMs": true, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..5e2303dc3e3653bd7590d6a162fc7cf4402dee14 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..3be7544e9a4f69ad993e28ed4760b84166e2bdbe --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tmap @@ -0,0 +1,134 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP MemoryBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP MemoryBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusAlice autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP ExternalBus autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAPSEC MemoryBob mac_comm3 + MAPSEC Memory_HSM_Alice mac_comm3 + MAPSEC MemoryBob se_comm + MAPSEC Memory_HSM_Alice se_comm + MAPSEC MemoryBob se_comm2 + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC MemoryBob mac_comm4 + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC MemoryBob se_comm1 + MAPSEC Memory_HSM_Alice se_comm1 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..96144495bd217cba1e1a2b9393aff2e971e75a0f --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAlice/golden/spec.tml @@ -0,0 +1,163 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep-HSMAlice-DirectConnec-test.xml +// Generated: Wed Jun 26 18:27:01 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm +AUTHCHANNEL autoSec__retDataCh_Bob_comm +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm1 +AUTHCHANNEL autoSec__retDataCh_Bob_comm1 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm2 +AUTHCHANNEL autoSec__retDataCh_Bob_comm2 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm3 +AUTHCHANNEL autoSec__retDataCh_Bob_comm3 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 +CONFCHANNEL autoSec__retDataCh_Bob_comm4 +AUTHCHANNEL autoSec__retDataCh_Bob_comm4 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + READ autoSec__retDataCh_Bob_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__retDataCh_Bob_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__retDataCh_Bob_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__retDataCh_Bob_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__retDataCh_Bob_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + READ autoSec__retDataCh_Bob_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__retDataCh_Bob_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__retDataCh_Bob_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__retDataCh_Bob_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__retDataCh_Bob_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Bob_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Bob_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__retDataCh_Bob_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Bob_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__retDataCh_Bob_comm4 1 mac_comm4 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..8bbf516c497908c66eab188e5ca4b857e928912f --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice", "Bob"], + + "DirectConnectHSMs": true, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..2318efe44c696f3d3972fd6a978b1c596c3a00ef --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tarchi @@ -0,0 +1,274 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..c600be0f180c78d28deea1d0abece4cbe0ab4c57 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tmap @@ -0,0 +1,188 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm_comm + SET autoSec__dataCh_HSM_Alice_Encrypt_comm_comm priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP BusAlice autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP BusBob autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP ExternalBus autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 + SET autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAPSEC Memory_HSM_Alice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 + MAPSEC Memory_HSM_Alice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 + MAPSEC Memory_HSM_Alice se_comm + MAPSEC Memory_HSM_Bob se_comm +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..824c45c73271123613a6ad11529e2dd2184b53ac --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMAliceBob/golden/spec.tml @@ -0,0 +1,226 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep-HSMAliceBob-DirectConnec-test.xml +// Generated: Wed Jun 26 18:30:47 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 +CHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm 0 +CONFCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm +AUTHCHANNEL autoSec__dataCh_HSM_Alice_Encrypt_comm_comm +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + READ autoSec__retDataCh_Bob_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataCh_Bob_comm4 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + READ autoSec__retDataCh_Bob_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_HSM_Alice_Encrypt_comm_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_HSM_Alice_Encrypt_comm1_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_HSM_Alice_Encrypt_comm2_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_HSM_Alice_Encrypt_comm3_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_HSM_Alice_Encrypt_comm4_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..16ceb325f67373aec02030db3bc1ccaa60b3fd75 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Bob"], + + "DirectConnectHSMs": true, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..48e0f3b3308da7d90eaec1844fa576d08291f5f6 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..e60102bcec33d45b1ec9ef67ee855918e81ba6f1 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tmap @@ -0,0 +1,134 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusBob autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusBob autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP ExternalBus autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAPSEC MemoryAlice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC MemoryAlice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 + MAPSEC MemoryAlice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 + MAPSEC MemoryAlice se_comm + MAPSEC Memory_HSM_Bob se_comm + MAPSEC MemoryAlice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..dd6873b5f1635ed414674102f979080cafea9401 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithDirectConnectHSMs/CaseWithHSMBob/golden/spec.tml @@ -0,0 +1,160 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep-HSMBob-DirectConnec-test.xml +// Generated: Wed Jun 26 18:29:06 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CONFCHANNEL autoSec__dataCh_Alice_comm +AUTHCHANNEL autoSec__dataCh_Alice_comm +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CONFCHANNEL autoSec__dataCh_Alice_comm1 +AUTHCHANNEL autoSec__dataCh_Alice_comm1 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CONFCHANNEL autoSec__dataCh_Alice_comm2 +AUTHCHANNEL autoSec__dataCh_Alice_comm2 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CONFCHANNEL autoSec__dataCh_Alice_comm3 +AUTHCHANNEL autoSec__dataCh_Alice_comm3 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CONFCHANNEL autoSec__dataCh_Alice_comm4 +AUTHCHANNEL autoSec__dataCh_Alice_comm4 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__dataCh_Alice_comm 1 se_comm + WRITE autoSec__dataCh_Alice_comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__dataCh_Alice_comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 mac_comm4 + WRITE autoSec__dataCh_Alice_comm 1 se_comm + WRITE autoSec__dataCh_Alice_comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__dataCh_Alice_comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + READ autoSec__retDataCh_Bob_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataCh_Bob_comm4 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + READ autoSec__retDataCh_Bob_comm 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/features.json new file mode 100644 index 0000000000000000000000000000000000000000..4acf91c40040dd3fe28ab932f9fa6ad9e46db2ee --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice"], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..9982b0e1467e0b6d5454137a4cbac3e38d9272ad --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..9b937e04b051dc876832513cece17b52f49df44f --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tmap @@ -0,0 +1,162 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAPSEC MemoryBob se_comm + MAPSEC Memory_HSM_Alice se_comm + MAPSEC MemoryBob se_comm2 + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC MemoryBob mac_comm4 + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC MemoryBob se_comm1 + MAPSEC Memory_HSM_Alice se_comm1 + MAPSEC MemoryBob mac_comm3 + MAPSEC Memory_HSM_Alice mac_comm3 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..9762e25184562aee4258b11c76ccb8dbbdaeaedf --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAlice/golden/spec.tml @@ -0,0 +1,205 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep-HSMAlice-test.xml +// Generated: Tue Jun 25 20:12:29 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__dataNonceChAlice_Bob BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataNonceChAlice_Bob 0 +CHANNEL autoSec__dataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataNonceChAlice_Bob0 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Alice_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm 0 +CHANNEL autoSec__retDataCh_Alice_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm1 0 +CHANNEL autoSec__retDataCh_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm2 0 +CHANNEL autoSec__retDataCh_Alice_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm3 0 +CHANNEL autoSec__retDataCh_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm4 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + READ autoSec__retDataCh_Alice_comm 1 se_comm + WRITE autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + READ autoSec__retDataCh_Alice_comm1 1 se_comm1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + READ autoSec__retDataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__comm2 1 se_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + READ autoSec__retDataCh_Alice_comm3 1 mac_comm3 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + READ autoSec__retDataCh_Alice_comm4 1 mac_comm4 + WRITE autoSec__comm4 1 mac_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + READ autoSec__retDataCh_Alice_comm 1 se_comm + WRITE autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + READ autoSec__retDataCh_Alice_comm1 1 se_comm1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + READ autoSec__retDataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__comm2 1 se_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + READ autoSec__retDataCh_Alice_comm3 1 mac_comm3 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + READ autoSec__retDataCh_Alice_comm4 1 mac_comm4 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + READ autoSec__comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + READ autoSec__comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + READ autoSec__comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + READ autoSec__comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__retDataCh_Alice_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__retDataCh_Alice_comm4 1 mac_comm4 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..85b38961b66e39bf86f182e45637578946ef2e4e --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Alice", "Bob"], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..ce0765293c87fd4b947a414babe0addcc0209a42 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tarchi @@ -0,0 +1,274 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Alice +SET Bus_HSM_Alice byteDataSize 4 +SET Bus_HSM_Alice pipelineSize 1 +SET Bus_HSM_Alice arbitration 0 +SET Bus_HSM_Alice sliceTime 10000 +SET Bus_HSM_Alice burstSize 100 +SET Bus_HSM_Alice privacy private +SET Bus_HSM_Alice clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Alice +SET Bridge_HSM_Alice bufferByteSize 4 +SET Bridge_HSM_Alice clockDivider 1 + +NODE MEMORY Memory_HSM_Alice +SET Memory_HSM_Alice byteDataSize 4 +SET Memory_HSM_Alice clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm4 +SET HwA_HSM_Alice_Encrypt_comm4 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm4 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm3 +SET HwA_HSM_Alice_Encrypt_comm3 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm3 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm2 +SET HwA_HSM_Alice_Encrypt_comm2 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm2 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm +SET HwA_HSM_Alice_Encrypt_comm byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Alice_Encrypt_comm1 +SET HwA_HSM_Alice_Encrypt_comm1 byteDataSize 4 +SET HwA_HSM_Alice_Encrypt_comm1 execiTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 execcTime 1 +SET HwA_HSM_Alice_Encrypt_comm1 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Alice_to_Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Bridge_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Alice_to_BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice node Bridge_HSM_Alice +SET link_Bridge_HSM_Alice_to_BusAlice bus BusAlice +SET link_Bridge_HSM_Alice_to_BusAlice priority 0 +NODE LINK link_Memory_HSM_Alice_to_Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice node Memory_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_Memory_HSM_Alice_to_Bus_HSM_Alice priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm4 +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm4_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm3 +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm3_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm2 +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm2_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice node HwA_HSM_Alice_Encrypt_comm1 +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice bus Bus_HSM_Alice +SET link_HwA_HSM_Alice_Encrypt_comm1_to_Bus_HSM_Alice priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..969d93f20471f0bbb399a48044df098373aff645 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tmap @@ -0,0 +1,244 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm4 autoSec__HSM_Alice_Encrypt_comm4 + SET autoSec__HSM_Alice_Encrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm3 autoSec__HSM_Alice_Encrypt_comm3 + SET autoSec__HSM_Alice_Encrypt_comm3 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm2 autoSec__HSM_Alice_Encrypt_comm2 + SET autoSec__HSM_Alice_Encrypt_comm2 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm autoSec__HSM_Alice_Encrypt_comm + SET autoSec__HSM_Alice_Encrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP HwA_HSM_Alice_Encrypt_comm1 autoSec__HSM_Alice_Encrypt_comm1 + SET autoSec__HSM_Alice_Encrypt_comm1 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm3 + SET autoSec__dataCh_Alice_comm3 priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob0 + SET autoSec__dataNonceChAlice_Bob0 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm4 + SET autoSec__dataCh_Alice_comm4 priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm + SET autoSec__dataCh_Alice_comm priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm1 + SET autoSec__dataCh_Alice_comm1 priority 5 + MAP MemoryAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Alice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP BusAlice autoSec__dataNonceChAlice_Bob + SET autoSec__dataNonceChAlice_Bob priority 5 + MAP MemoryAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__dataCh_Alice_comm2 + SET autoSec__dataCh_Alice_comm2 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP BusBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm3 + SET autoSec__retDataCh_Alice_comm3 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm4 + SET autoSec__retDataCh_Alice_comm4 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm + SET autoSec__retDataCh_Alice_comm priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm1 + SET autoSec__retDataCh_Alice_comm1 priority 5 + MAP Memory_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP Bus_HSM_Alice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP BusAlice autoSec__retDataCh_Alice_comm2 + SET autoSec__retDataCh_Alice_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAPSEC Memory_HSM_Alice se_comm + MAPSEC Memory_HSM_Bob se_comm + MAPSEC Memory_HSM_Alice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 + MAPSEC Memory_HSM_Alice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC Memory_HSM_Alice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 + MAPSEC Memory_HSM_Alice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..9ca33c989b4093f7820973d464aa0ff690ec4cfc --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMAliceBob/golden/spec.tml @@ -0,0 +1,310 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep-HSMAliceBob-test.xml +// Generated: Wed Jun 26 18:18:21 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__dataCh_Alice_comm BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm +VCCHANNEL autoSec__dataCh_Alice_comm 0 +CHANNEL autoSec__dataCh_Alice_comm1 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm1 +VCCHANNEL autoSec__dataCh_Alice_comm1 0 +CHANNEL autoSec__dataCh_Alice_comm2 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataCh_Alice_comm2 0 +CHANNEL autoSec__dataCh_Alice_comm3 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm3 +VCCHANNEL autoSec__dataCh_Alice_comm3 0 +CHANNEL autoSec__dataCh_Alice_comm4 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataCh_Alice_comm4 0 +CHANNEL autoSec__dataCh_Bob_comm BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_Bob_comm 0 +CHANNEL autoSec__dataCh_Bob_comm1 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_Bob_comm1 0 +CHANNEL autoSec__dataCh_Bob_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_Bob_comm2 0 +CHANNEL autoSec__dataCh_Bob_comm3 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_Bob_comm3 0 +CHANNEL autoSec__dataCh_Bob_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_Bob_comm4 0 +CHANNEL autoSec__dataNonceChAlice_Bob BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm2 +VCCHANNEL autoSec__dataNonceChAlice_Bob 0 +CHANNEL autoSec__dataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__Alice IN autoSec__HSM_Alice_Encrypt_comm4 +VCCHANNEL autoSec__dataNonceChAlice_Bob0 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Alice_comm BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm 0 +CHANNEL autoSec__retDataCh_Alice_comm1 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm1 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm1 0 +CHANNEL autoSec__retDataCh_Alice_comm2 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm2 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm2 0 +CHANNEL autoSec__retDataCh_Alice_comm3 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm3 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm3 0 +CHANNEL autoSec__retDataCh_Alice_comm4 BRBW 0 0 OUT autoSec__HSM_Alice_Encrypt_comm4 IN autoSec__Alice +VCCHANNEL autoSec__retDataCh_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 +CHANNEL autoSec__retDataNonceChAlice_Bob BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob 0 +CHANNEL autoSec__retDataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob0 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Alice_Encrypt_comm() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm +REQUEST autoSec__req_HSM_Alice_Encrypt_comm1() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm1 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm2() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm2 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm3() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm3 +REQUEST autoSec__req_HSM_Alice_Encrypt_comm4() autoSec__Alice autoSec__HSM_Alice_Encrypt_comm4 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + READ autoSec__retDataCh_Alice_comm 1 se_comm + WRITE autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + READ autoSec__retDataCh_Alice_comm1 1 se_comm1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + READ autoSec__retDataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__comm2 1 se_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + READ autoSec__retDataCh_Alice_comm3 1 mac_comm3 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + READ autoSec__retDataCh_Alice_comm4 1 mac_comm4 + WRITE autoSec__comm4 1 mac_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm + WRITE autoSec__dataCh_Alice_comm 1 + READ autoSec__retDataCh_Alice_comm 1 se_comm + WRITE autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm1 + WRITE autoSec__dataCh_Alice_comm1 1 + READ autoSec__retDataCh_Alice_comm1 1 se_comm1 + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm2 + WRITE autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__dataCh_Alice_comm2 1 + READ autoSec__retDataCh_Alice_comm2 1 se_comm2 + WRITE autoSec__comm2 1 se_comm2 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm3 + WRITE autoSec__dataCh_Alice_comm3 1 + READ autoSec__retDataCh_Alice_comm3 1 mac_comm3 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + NOTIFYREQUEST autoSec__req_HSM_Alice_Encrypt_comm4 + WRITE autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__dataCh_Alice_comm4 1 + READ autoSec__retDataCh_Alice_comm4 1 mac_comm4 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + WRITE autoSec__dataCh_Bob_comm 1 se_comm + READ autoSec__retDataCh_Bob_comm 1 + READ autoSec__comm1 1 se_comm1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + WRITE autoSec__dataCh_Bob_comm1 1 se_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + WRITE autoSec__dataCh_Bob_comm2 1 se_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + READ autoSec__comm3 1 mac_comm3 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + WRITE autoSec__dataCh_Bob_comm3 1 mac_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + WRITE autoSec__dataCh_Bob_comm4 1 mac_comm4 + READ autoSec__retDataCh_Bob_comm4 1 + READ autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + WRITE autoSec__dataCh_Bob_comm 1 se_comm + READ autoSec__retDataCh_Bob_comm 1 + READ autoSec__comm1 1 se_comm1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + WRITE autoSec__dataCh_Bob_comm1 1 se_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + WRITE autoSec__dataCh_Bob_comm2 1 se_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + READ autoSec__comm3 1 mac_comm3 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + WRITE autoSec__dataCh_Bob_comm3 1 mac_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + WRITE autoSec__dataCh_Bob_comm4 1 mac_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm 1 se_comm +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm1 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm1 1 se_comm1 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm2 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Alice_comm2 1 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__retDataCh_Alice_comm2 1 se_comm2 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Alice_comm3 1 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + WRITE autoSec__retDataCh_Alice_comm3 1 mac_comm3 +ENDTASK + +TASK autoSec__HSM_Alice_Encrypt_comm4 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Alice_comm4 1 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + WRITE autoSec__retDataCh_Alice_comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Bob_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Bob_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/features.json b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/features.json new file mode 100644 index 0000000000000000000000000000000000000000..0977dca0d69d58f019315c396948cc1a37a34e42 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/features.json @@ -0,0 +1,19 @@ +{ + "pathModel" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap", + + "channels" : [ + { + "comm" : [true, false, false], + "comm1" : [true, true, false], + "comm2" : [true, true, true], + "comm3" : [false, true, false], + "comm4" : [false, true, true] + }, + ] , + + "HSM" : ["Bob"], + + "DirectConnectHSMs": false, + + "pathGolden" : "tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap" +} diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..85d996b534e7016a91ca3b760a1d091683e08f07 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tarchi @@ -0,0 +1,195 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE BUS Bus_HSM_Bob +SET Bus_HSM_Bob byteDataSize 4 +SET Bus_HSM_Bob pipelineSize 1 +SET Bus_HSM_Bob arbitration 0 +SET Bus_HSM_Bob sliceTime 10000 +SET Bus_HSM_Bob burstSize 100 +SET Bus_HSM_Bob privacy private +SET Bus_HSM_Bob clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE BRIDGE Bridge_HSM_Bob +SET Bridge_HSM_Bob bufferByteSize 4 +SET Bridge_HSM_Bob clockDivider 1 + +NODE MEMORY Memory_HSM_Bob +SET Memory_HSM_Bob byteDataSize 4 +SET Memory_HSM_Bob clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm3 +SET HwA_HSM_Bob_Decrypt_comm3 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm3 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm3 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm2 +SET HwA_HSM_Bob_Decrypt_comm2 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm2 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm2 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm +SET HwA_HSM_Bob_Decrypt_comm byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm4 +SET HwA_HSM_Bob_Decrypt_comm4 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm4 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm4 clockDivider 1 + +NODE HWA HwA_HSM_Bob_Decrypt_comm1 +SET HwA_HSM_Bob_Decrypt_comm1 byteDataSize 4 +SET HwA_HSM_Bob_Decrypt_comm1 execiTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 execcTime 1 +SET HwA_HSM_Bob_Decrypt_comm1 clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Bridge_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_Bridge_HSM_Bob_to_BusBob +SET link_Bridge_HSM_Bob_to_BusBob node Bridge_HSM_Bob +SET link_Bridge_HSM_Bob_to_BusBob bus BusBob +SET link_Bridge_HSM_Bob_to_BusBob priority 0 +NODE LINK link_Memory_HSM_Bob_to_Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob node Memory_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_Memory_HSM_Bob_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm3 +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm3_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm2 +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm2_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm4 +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm4_to_Bus_HSM_Bob priority 0 +NODE LINK link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob node HwA_HSM_Bob_Decrypt_comm1 +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob bus Bus_HSM_Bob +SET link_HwA_HSM_Bob_Decrypt_comm1_to_Bus_HSM_Bob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..e016388e89b7eae9ef55a51e6f6735cb69227413 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tmap @@ -0,0 +1,162 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP HwA_HSM_Bob_Decrypt_comm3 autoSec__HSM_Bob_Decrypt_comm3 + SET autoSec__HSM_Bob_Decrypt_comm3 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm2 autoSec__HSM_Bob_Decrypt_comm2 + SET autoSec__HSM_Bob_Decrypt_comm2 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm autoSec__HSM_Bob_Decrypt_comm + SET autoSec__HSM_Bob_Decrypt_comm priority 5 + MAP HwA_HSM_Bob_Decrypt_comm4 autoSec__HSM_Bob_Decrypt_comm4 + SET autoSec__HSM_Bob_Decrypt_comm4 priority 5 + MAP HwA_HSM_Bob_Decrypt_comm1 autoSec__HSM_Bob_Decrypt_comm1 + SET autoSec__HSM_Bob_Decrypt_comm1 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm4 + SET autoSec__nonceChBob_Alice_comm4 priority 5 + MAP ExternalMemory autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalBus autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusBob autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP BusAlice autoSec__nonceChBob_Alice_comm2 + SET autoSec__nonceChBob_Alice_comm2 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm3 + SET autoSec__dataCh_Bob_comm3 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm4 + SET autoSec__dataCh_Bob_comm4 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP BusBob autoSec__dataCh_Bob_comm + SET autoSec__dataCh_Bob_comm priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm1 + SET autoSec__dataCh_Bob_comm1 priority 5 + MAP MemoryBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__dataCh_Bob_comm2 + SET autoSec__dataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm3 + SET autoSec__retDataCh_Bob_comm3 priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob0 + SET autoSec__retDataNonceChAlice_Bob0 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm4 + SET autoSec__retDataCh_Bob_comm4 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm + SET autoSec__retDataCh_Bob_comm priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm1 + SET autoSec__retDataCh_Bob_comm1 priority 5 + MAP Memory_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Bus_HSM_Bob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP BusBob autoSec__retDataCh_Bob_comm2 + SET autoSec__retDataCh_Bob_comm2 priority 5 + MAP Memory_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP Bus_HSM_Bob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAP BusBob autoSec__retDataNonceChAlice_Bob + SET autoSec__retDataNonceChAlice_Bob priority 5 + MAPSEC MemoryAlice se_comm1 + MAPSEC Memory_HSM_Bob se_comm1 + MAPSEC MemoryAlice se_comm + MAPSEC Memory_HSM_Bob se_comm + MAPSEC MemoryAlice se_comm2 + MAPSEC Memory_HSM_Bob se_comm2 + MAPSEC MemoryAlice mac_comm3 + MAPSEC Memory_HSM_Bob mac_comm3 + MAPSEC MemoryAlice mac_comm4 + MAPSEC Memory_HSM_Bob mac_comm4 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..279366f57a08713cfe18e3b0c2faccbace867cc5 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/CasesWithPrivateHSMs/CaseWithHSMBob/golden/spec.tml @@ -0,0 +1,202 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep-HSMBob-test.xml +// Generated: Tue Jun 25 20:13:57 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 +CHANNEL autoSec__dataCh_Bob_comm BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm +VCCHANNEL autoSec__dataCh_Bob_comm 0 +CHANNEL autoSec__dataCh_Bob_comm1 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm1 +VCCHANNEL autoSec__dataCh_Bob_comm1 0 +CHANNEL autoSec__dataCh_Bob_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm2 +VCCHANNEL autoSec__dataCh_Bob_comm2 0 +CHANNEL autoSec__dataCh_Bob_comm3 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm3 +VCCHANNEL autoSec__dataCh_Bob_comm3 0 +CHANNEL autoSec__dataCh_Bob_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__HSM_Bob_Decrypt_comm4 +VCCHANNEL autoSec__dataCh_Bob_comm4 0 +CHANNEL autoSec__nonceChBob_Alice_comm2 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm2 0 +CHANNEL autoSec__nonceChBob_Alice_comm4 BRBW 0 0 OUT autoSec__Bob IN autoSec__Alice +VCCHANNEL autoSec__nonceChBob_Alice_comm4 0 +CHANNEL autoSec__retDataCh_Bob_comm BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm 0 +CHANNEL autoSec__retDataCh_Bob_comm1 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm1 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm1 0 +CHANNEL autoSec__retDataCh_Bob_comm2 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm2 0 +CHANNEL autoSec__retDataCh_Bob_comm3 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm3 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm3 0 +CHANNEL autoSec__retDataCh_Bob_comm4 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataCh_Bob_comm4 0 +CHANNEL autoSec__retDataNonceChAlice_Bob BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm2 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob 0 +CHANNEL autoSec__retDataNonceChAlice_Bob0 BRBW 0 0 OUT autoSec__HSM_Bob_Decrypt_comm4 IN autoSec__Bob +VCCHANNEL autoSec__retDataNonceChAlice_Bob0 0 + +// Events + +// Requests +REQUEST autoSec__req_HSM_Bob_Decrypt_comm() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm +REQUEST autoSec__req_HSM_Bob_Decrypt_comm1() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm1 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm2() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm2 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm3() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm3 +REQUEST autoSec__req_HSM_Bob_Decrypt_comm4() autoSec__Bob autoSec__HSM_Bob_Decrypt_comm4 + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 1 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 1 + EXECC 100 se_comm SE 100 100 100 0 - - 1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 1 + WRITE autoSec__comm 1 se_comm + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + WRITE autoSec__comm2 1 se_comm2 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + WRITE autoSec__comm4 1 mac_comm4 + WRITE autoSec__comm 1 se_comm + WRITE autoSec__comm1 1 se_comm1 + READ autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + WRITE autoSec__comm2 1 se_comm2 + WRITE autoSec__comm3 1 mac_comm3 + READ autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + WRITE autoSec__comm4 1 mac_comm4 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + WRITE autoSec__dataCh_Bob_comm 1 se_comm + READ autoSec__retDataCh_Bob_comm 1 + READ autoSec__comm1 1 se_comm1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + WRITE autoSec__dataCh_Bob_comm1 1 se_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + WRITE autoSec__dataCh_Bob_comm2 1 se_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + READ autoSec__comm3 1 mac_comm3 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + WRITE autoSec__dataCh_Bob_comm3 1 mac_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + WRITE autoSec__dataCh_Bob_comm4 1 mac_comm4 + READ autoSec__retDataCh_Bob_comm4 1 + READ autoSec__comm 1 se_comm + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm + WRITE autoSec__dataCh_Bob_comm 1 se_comm + READ autoSec__retDataCh_Bob_comm 1 + READ autoSec__comm1 1 se_comm1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm1 + WRITE autoSec__dataCh_Bob_comm1 1 se_comm1 + READ autoSec__retDataCh_Bob_comm1 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm2 + READ autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + WRITE autoSec__nonceChBob_Alice_comm2 1 nonce_Bob_Alice_comm2 + READ autoSec__comm2 1 se_comm2 + WRITE autoSec__dataCh_Bob_comm2 1 se_comm2 + READ autoSec__retDataCh_Bob_comm2 1 + READ autoSec__comm3 1 mac_comm3 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm3 + WRITE autoSec__dataCh_Bob_comm3 1 mac_comm3 + READ autoSec__retDataCh_Bob_comm3 1 + NOTIFYREQUEST autoSec__req_HSM_Bob_Decrypt_comm4 + READ autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + WRITE autoSec__nonceChBob_Alice_comm4 1 nonce_Bob_Alice_comm4 + READ autoSec__comm4 1 mac_comm4 + WRITE autoSec__dataCh_Bob_comm4 1 mac_comm4 + READ autoSec__retDataCh_Bob_comm4 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm 1 se_comm + EXECC 100 se_comm SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm1 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm1 1 se_comm1 + EXECC 100 se_comm1 SE 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm1 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm2 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm2 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob 1 nonce_Bob_Alice_comm2 + READ autoSec__dataCh_Bob_comm2 1 se_comm2 + EXECC 100 se_comm2 SE 100 100 100 0 nonce_Bob_Alice_comm2 - 2 + WRITE autoSec__retDataCh_Bob_comm2 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm3 + TASKOP + //Local variables + + //Behavior + READ autoSec__dataCh_Bob_comm3 1 mac_comm3 + EXECC 100 mac_comm3 MAC 100 100 100 0 - - 2 + WRITE autoSec__retDataCh_Bob_comm3 1 +ENDTASK + +TASK autoSec__HSM_Bob_Decrypt_comm4 + TASKOP + //Local variables + + //Behavior + EXECC 100 nonce_Bob_Alice_comm4 NONCE 100 100 100 0 - - 1 + WRITE autoSec__retDataNonceChAlice_Bob0 1 nonce_Bob_Alice_comm4 + READ autoSec__dataCh_Bob_comm4 1 mac_comm4 + EXECC 100 mac_comm4 MAC 100 100 100 0 nonce_Bob_Alice_comm4 - 2 + WRITE autoSec__retDataCh_Bob_comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tarchi b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tarchi new file mode 100644 index 0000000000000000000000000000000000000000..5b05969400ac106266d529423c04f585bedb9659 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tarchi @@ -0,0 +1,116 @@ +// Master clock frequency - in MHz +MASTERCLOCKFREQUENCY 200 + +NODE BRIDGE BridgeAlice +SET BridgeAlice bufferByteSize 4 +SET BridgeAlice clockDivider 1 + +NODE BRIDGE BridgeBob +SET BridgeBob bufferByteSize 4 +SET BridgeBob clockDivider 1 + +NODE MEMORY ExternalMemory +SET ExternalMemory byteDataSize 4 +SET ExternalMemory clockDivider 1 + +NODE MEMORY MemoryAlice +SET MemoryAlice byteDataSize 4 +SET MemoryAlice clockDivider 1 + +NODE MEMORY MemoryBob +SET MemoryBob byteDataSize 4 +SET MemoryBob clockDivider 1 + +NODE BUS BusBob +SET BusBob byteDataSize 4 +SET BusBob pipelineSize 1 +SET BusBob arbitration 0 +SET BusBob sliceTime 10000 +SET BusBob burstSize 100 +SET BusBob privacy private +SET BusBob clockDivider 1 + +NODE BUS BusAlice +SET BusAlice byteDataSize 4 +SET BusAlice pipelineSize 1 +SET BusAlice arbitration 0 +SET BusAlice sliceTime 10000 +SET BusAlice burstSize 100 +SET BusAlice privacy private +SET BusAlice clockDivider 1 + +NODE BUS ExternalBus +SET ExternalBus byteDataSize 4 +SET ExternalBus pipelineSize 1 +SET ExternalBus arbitration 0 +SET ExternalBus sliceTime 10000 +SET ExternalBus burstSize 100 +SET ExternalBus privacy public +SET ExternalBus clockDivider 1 + +NODE CPU CPUAlice +SET CPUAlice nbOfCores 1 +SET CPUAlice byteDataSize 4 +SET CPUAlice pipelineSize 5 +SET CPUAlice goIdleTime 10 +SET CPUAlice maxConsecutiveIdleCycles 10 +SET CPUAlice taskSwitchingTime 20 +SET CPUAlice branchingPredictionPenalty 2 +SET CPUAlice cacheMiss 5 +SET CPUAlice schedulingPolicy 0 +SET CPUAlice sliceTime 10000 +SET CPUAlice execiTime 1 +SET CPUAlice execcTime 1 +SET CPUAlice clockDivider 1 + +NODE CPU CPUBob +SET CPUBob nbOfCores 1 +SET CPUBob byteDataSize 4 +SET CPUBob pipelineSize 5 +SET CPUBob goIdleTime 10 +SET CPUBob maxConsecutiveIdleCycles 10 +SET CPUBob taskSwitchingTime 20 +SET CPUBob branchingPredictionPenalty 2 +SET CPUBob cacheMiss 5 +SET CPUBob schedulingPolicy 0 +SET CPUBob sliceTime 10000 +SET CPUBob execiTime 1 +SET CPUBob execcTime 1 +SET CPUBob clockDivider 1 + +NODE LINK link_BridgeBob_to_BusBob +SET link_BridgeBob_to_BusBob node BridgeBob +SET link_BridgeBob_to_BusBob bus BusBob +SET link_BridgeBob_to_BusBob priority 0 +NODE LINK link_BridgeBob_to_ExternalBus +SET link_BridgeBob_to_ExternalBus node BridgeBob +SET link_BridgeBob_to_ExternalBus bus ExternalBus +SET link_BridgeBob_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_ExternalBus +SET link_BridgeAlice_to_ExternalBus node BridgeAlice +SET link_BridgeAlice_to_ExternalBus bus ExternalBus +SET link_BridgeAlice_to_ExternalBus priority 0 +NODE LINK link_BridgeAlice_to_BusAlice +SET link_BridgeAlice_to_BusAlice node BridgeAlice +SET link_BridgeAlice_to_BusAlice bus BusAlice +SET link_BridgeAlice_to_BusAlice priority 0 +NODE LINK link_ExternalMemory_to_ExternalBus +SET link_ExternalMemory_to_ExternalBus node ExternalMemory +SET link_ExternalMemory_to_ExternalBus bus ExternalBus +SET link_ExternalMemory_to_ExternalBus priority 0 +NODE LINK link_CPUAlice_to_BusAlice +SET link_CPUAlice_to_BusAlice node CPUAlice +SET link_CPUAlice_to_BusAlice bus BusAlice +SET link_CPUAlice_to_BusAlice priority 0 +NODE LINK link_MemoryAlice_to_BusAlice +SET link_MemoryAlice_to_BusAlice node MemoryAlice +SET link_MemoryAlice_to_BusAlice bus BusAlice +SET link_MemoryAlice_to_BusAlice priority 0 +NODE LINK link_MemoryBob_to_BusBob +SET link_MemoryBob_to_BusBob node MemoryBob +SET link_MemoryBob_to_BusBob bus BusBob +SET link_MemoryBob_to_BusBob priority 0 +NODE LINK link_CPUBob_to_BusBob +SET link_CPUBob_to_BusBob node CPUBob +SET link_CPUBob_to_BusBob bus BusBob +SET link_CPUBob_to_BusBob priority 0 diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap new file mode 100644 index 0000000000000000000000000000000000000000..8bf8bfca71c8b1ed28991d99c4af72d03ffc3d34 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tmap @@ -0,0 +1,54 @@ +TMLSPEC + #include "spec.tml" +ENDTMLSPEC + +TMLARCHI + #include "spec.tarchi" +ENDTMLARCHI + +TMLMAPPING + MAP CPUAlice autoSec__Alice + SET autoSec__Alice priority 5 + MAP CPUBob autoSec__Bob + SET autoSec__Bob priority 5 + MAP ExternalMemory autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusBob autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP BusAlice autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalBus autoSec__comm1 + SET autoSec__comm1 priority 5 + MAP ExternalMemory autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalBus autoSec__comm + SET autoSec__comm priority 5 + MAP BusAlice autoSec__comm + SET autoSec__comm priority 5 + MAP BusBob autoSec__comm + SET autoSec__comm priority 5 + MAP ExternalMemory autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalBus autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusBob autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP BusAlice autoSec__comm2 + SET autoSec__comm2 priority 5 + MAP ExternalMemory autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusBob autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP BusAlice autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalBus autoSec__comm3 + SET autoSec__comm3 priority 5 + MAP ExternalMemory autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusBob autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP BusAlice autoSec__comm4 + SET autoSec__comm4 priority 5 + MAP ExternalBus autoSec__comm4 + SET autoSec__comm4 priority 5 +ENDTMLMAPPING diff --git a/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tml b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tml new file mode 100644 index 0000000000000000000000000000000000000000..31ade44f3762a36f3a638fe2559a19c9c10b0037 --- /dev/null +++ b/ttool/src/test/resources/tmltranslator/AutoSecGenDiplodocusTest/Models/modelWithMultiChannelsAndMultiUse/spec.tml @@ -0,0 +1,66 @@ +// TML Application - FORMAT 0.2 +// Application: /home/jawher/Jawher/TTool/TTool-orig/TTool/modeling/auto-sec-test-multi-rep.xml +// Generated: Wed Jun 19 16:08:07 CEST 2024 + +// PRAGMAS + +// Channels +CHANNEL autoSec__comm NBRNBW 4 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm 0 +CONFCHANNEL autoSec__comm +AUTHCHANNEL autoSec__comm +CHANNEL autoSec__comm1 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm1 0 +CONFCHANNEL autoSec__comm1 +AUTHCHANNEL autoSec__comm1 +CHANNEL autoSec__comm2 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm2 0 +CONFCHANNEL autoSec__comm2 +AUTHCHANNEL autoSec__comm2 +CHANNEL autoSec__comm3 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm3 0 +CONFCHANNEL autoSec__comm3 +AUTHCHANNEL autoSec__comm3 +CHANNEL autoSec__comm4 BRBW 4 8 OUT autoSec__Alice IN autoSec__Bob +VCCHANNEL autoSec__comm4 0 +CONFCHANNEL autoSec__comm4 +AUTHCHANNEL autoSec__comm4 + +// Events + +// Requests + +TASK autoSec__Alice + TASKOP + //Local variables + + //Behavior + WRITE autoSec__comm 1 + WRITE autoSec__comm1 1 + WRITE autoSec__comm2 1 + WRITE autoSec__comm3 1 + WRITE autoSec__comm4 1 + WRITE autoSec__comm 1 + WRITE autoSec__comm1 1 + WRITE autoSec__comm2 1 + WRITE autoSec__comm3 1 + WRITE autoSec__comm4 1 +ENDTASK + +TASK autoSec__Bob + TASKOP + //Local variables + + //Behavior + READ autoSec__comm 1 + READ autoSec__comm1 1 + READ autoSec__comm2 1 + READ autoSec__comm3 1 + READ autoSec__comm4 1 + READ autoSec__comm 1 + READ autoSec__comm1 1 + READ autoSec__comm2 1 + READ autoSec__comm3 1 + READ autoSec__comm4 1 +ENDTASK + diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/KeyExchange/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/KeyExchange/golden index 53b182021d69604a62e5b83ed4d819495d0fc091..9f56e4cf71f8f057e6f6d70afcddd909e3506814 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/KeyExchange/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/KeyExchange/golden @@ -1,5 +1,5 @@ RESULT not attacker(Alice___encryptedKey_symKey0[!1 = v]) is true. RESULT not attacker(Alice___symKey_encrypted0[!1 = v]) is true. RESULT not attacker(Alice___symKey[!1 = v]) is true. -RESULT inj-event(authenticity___Bob___symKey___decrypt_symKey_dummy(dummyM)) ==> inj-event(authenticity___Alice___symKey____encrypt_symKey(dummyM)) is false. -RESULT (even event(authenticity___Bob___symKey___decrypt_symKey_dummy(dummyM)) ==> event(authenticity___Alice___symKey____encrypt_symKey(dummyM)) is false.) +RESULT inj-event(authenticity___Bob___symKey___symKey_dummy(dummyM)) ==> inj-event(authenticity___Alice___symKey____symKey(dummyM)) is false. +RESULT (even event(authenticity___Bob___symKey___symKey_dummy(dummyM)) ==> event(authenticity___Alice___symKey____symKey(dummyM)) is false.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Mac/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Mac/golden index 31f48beb63a359405ae50962a4421fb9cd404c27..cd1256e2d8d8156f82fb8e5bd31bf04fa78fccd5 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Mac/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Mac/golden @@ -1,4 +1,4 @@ RESULT not attacker(Alice___mac[!1 = v]) is false. RESULT not attacker(Alice___mac_encrypted0[!1 = v]) is true. -RESULT inj-event(authenticity___Bob___mac___decrypt_mac_dummy(dummyM)) ==> inj-event(authenticity___Alice___mac____encrypt_mac(dummyM)) is false. -RESULT (but event(authenticity___Bob___mac___decrypt_mac_dummy(dummyM)) ==> event(authenticity___Alice___mac____encrypt_mac(dummyM)) is true.) +RESULT inj-event(authenticity___Bob___mac___mac_dummy(dummyM)) ==> inj-event(authenticity___Alice___mac____mac(dummyM)) is false. +RESULT (but event(authenticity___Bob___mac___mac_dummy(dummyM)) ==> event(authenticity___Alice___mac____mac(dummyM)) is true.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Nonce/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Nonce/golden index 920b9d782b0c5af446290475849883f178fa7edc..629b5f9a641abcc252c5f6c5bb379e112b4b5ac1 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Nonce/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/Nonce/golden @@ -1,3 +1,3 @@ RESULT not attacker(Alice___symN[!1 = v]) is true. RESULT not attacker(Alice___symN_encrypted0[!1 = v]) is true. -RESULT inj-event(authenticity___Bob___symN___decrypt_symN_dummy(dummyM)) ==> inj-event(authenticity___Alice___symN____encrypt_symN(dummyM)) is true. +RESULT inj-event(authenticity___Bob___symN___symN_dummy(dummyM)) ==> inj-event(authenticity___Alice___symN____symN(dummyM)) is true. diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/SymmetricExchange/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/SymmetricExchange/golden index 18dbf797352da865779b0c76dbeb1fe01661c26b..972a5ea44c99849686050b6f0add237820e16518 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/SymmetricExchange/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/AliceAndBobHW/SymmetricExchange/golden @@ -1,4 +1,4 @@ RESULT not attacker(Alice___sym_encrypted0[!1 = v]) is true. RESULT not attacker(Alice___sym[!1 = v]) is true. -RESULT inj-event(authenticity___Bob___sym___decrypt_sym_dummy(dummyM)) ==> inj-event(authenticity___Alice___sym____encrypt_sym(dummyM)) is false. -RESULT (but event(authenticity___Bob___sym___decrypt_sym_dummy(dummyM)) ==> event(authenticity___Alice___sym____encrypt_sym(dummyM)) is true.) +RESULT inj-event(authenticity___Bob___sym___sym_dummy(dummyM)) ==> inj-event(authenticity___Alice___sym____sym(dummyM)) is false. +RESULT (but event(authenticity___Bob___sym___sym_dummy(dummyM)) ==> event(authenticity___Alice___sym____sym(dummyM)) is true.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapAtt/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapAtt/golden index c3dbb650434eb7c8b41859f1595fa10b97b36070..f7d41308df00552c7e20c8b9520a0857aea36104 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapAtt/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapAtt/golden @@ -3,7 +3,7 @@ RESULT not attacker(SmartphoneAppController___AES_Emergency_encrypted0[!1 = v]) RESULT not attacker(BatterySensor___battery_chData0[!1 = v]) is true. RESULT not attacker(PumpController___AES_CTRL_encrypted0[!1 = v]) is true. RESULT not attacker(PumpController___AES_CTRL[!1 = v]) is true. -RESULT inj-event(authenticity___MedicalInformationSystem___AES_Emergency___decrypt_AES_Emergency_dummy(dummyM)) ==> inj-event(authenticity___SmartphoneAppController___AES_Emergency____encrypt_AES_Emergency(dummyM)) is false. -RESULT (but event(authenticity___MedicalInformationSystem___AES_Emergency___decrypt_AES_Emergency_dummy(dummyM)) ==> event(authenticity___SmartphoneAppController___AES_Emergency____encrypt_AES_Emergency(dummyM)) is true.) -RESULT inj-event(authenticity___SmartphoneAppController___AES_CTRL___decrypt_AES_CTRL_dummy(dummyM)) ==> inj-event(authenticity___PumpController___AES_CTRL____encrypt_AES_CTRL(dummyM)) is false. -RESULT (but event(authenticity___SmartphoneAppController___AES_CTRL___decrypt_AES_CTRL_dummy(dummyM)) ==> event(authenticity___PumpController___AES_CTRL____encrypt_AES_CTRL(dummyM)) is true.) +RESULT inj-event(authenticity___MedicalInformationSystem___AES_Emergency___AES_Emergency_dummy(dummyM)) ==> inj-event(authenticity___SmartphoneAppController___AES_Emergency____AES_Emergency(dummyM)) is false. +RESULT (but event(authenticity___MedicalInformationSystem___AES_Emergency___AES_Emergency_dummy(dummyM)) ==> event(authenticity___SmartphoneAppController___AES_Emergency____AES_Emergency(dummyM)) is true.) +RESULT inj-event(authenticity___SmartphoneAppController___AES_CTRL___AES_CTRL_dummy(dummyM)) ==> inj-event(authenticity___PumpController___AES_CTRL____AES_CTRL(dummyM)) is false. +RESULT (but event(authenticity___SmartphoneAppController___AES_CTRL___AES_CTRL_dummy(dummyM)) ==> event(authenticity___PumpController___AES_CTRL____AES_CTRL(dummyM)) is true.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapNoProtection/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapNoProtection/golden index 07e2bafe38ea32b7bf65d2d51c316332c22bcf0f..01dc1daea69a0ed29a8721e5ead863d2ec76827a 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapNoProtection/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITA01_v6/mapNoProtection/golden @@ -3,7 +3,7 @@ RESULT not attacker(PumpController___AES_CTRL[!1 = v]) is false. RESULT not attacker(SmartphoneAppController___AES_Emergency_encrypted0[!1 = v]) is true. RESULT not attacker(SmartphoneAppController___AES_Emergency[!1 = v]) is false. RESULT not attacker(BatterySensor___battery_chData0[!1 = v]) is false. -RESULT inj-event(authenticity___SmartphoneAppController___AES_CTRL___decrypt_AES_CTRL_dummy(dummyM)) ==> inj-event(authenticity___PumpController___AES_CTRL____encrypt_AES_CTRL(dummyM)) is false. -RESULT (even event(authenticity___SmartphoneAppController___AES_CTRL___decrypt_AES_CTRL_dummy(dummyM)) ==> event(authenticity___PumpController___AES_CTRL____encrypt_AES_CTRL(dummyM)) is false.) -RESULT inj-event(authenticity___MedicalInformationSystem___AES_Emergency___decrypt_AES_Emergency_dummy(dummyM)) ==> inj-event(authenticity___SmartphoneAppController___AES_Emergency____encrypt_AES_Emergency(dummyM)) is false. -RESULT (even event(authenticity___MedicalInformationSystem___AES_Emergency___decrypt_AES_Emergency_dummy(dummyM)) ==> event(authenticity___SmartphoneAppController___AES_Emergency____encrypt_AES_Emergency(dummyM)) is false.) +RESULT inj-event(authenticity___SmartphoneAppController___AES_CTRL___AES_CTRL_dummy(dummyM)) ==> inj-event(authenticity___PumpController___AES_CTRL____AES_CTRL(dummyM)) is false. +RESULT (even event(authenticity___SmartphoneAppController___AES_CTRL___AES_CTRL_dummy(dummyM)) ==> event(authenticity___PumpController___AES_CTRL____AES_CTRL(dummyM)) is false.) +RESULT inj-event(authenticity___MedicalInformationSystem___AES_Emergency___AES_Emergency_dummy(dummyM)) ==> inj-event(authenticity___SmartphoneAppController___AES_Emergency____AES_Emergency(dummyM)) is false. +RESULT (even event(authenticity___MedicalInformationSystem___AES_Emergency___AES_Emergency_dummy(dummyM)) ==> event(authenticity___SmartphoneAppController___AES_Emergency____AES_Emergency(dummyM)) is false.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture/golden index 279f135f2087620efbd9057d6f357db496d7d97f..f993c8d3804bfaec3adb6e6a3aa1299c43e9ee57 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture/golden @@ -3,5 +3,5 @@ RESULT inj-event(authenticity___vehicleControlGateway___vehData_chData0___afters RESULT (even event(authenticity___vehicleControlGateway___vehData_chData0___aftersignalstate_App_vehData_App_vehData(dummyM)) ==> event(authenticity___NavigationControl___vehData_chData0___signalstate_App_vehData_App_vehData(dummyM)) is false.) RESULT inj-event(authenticity___NavigationControl___GPSdata_chData0___aftersignalstate_App_GPSdata_App_GPSdata(dummyM)) ==> inj-event(authenticity___GPSGateway___GPSdata_chData0___signalstate_App_GPSdata_App_GPSdata(dummyM)) is false. RESULT (even event(authenticity___NavigationControl___GPSdata_chData0___aftersignalstate_App_GPSdata_App_GPSdata(dummyM)) ==> event(authenticity___GPSGateway___GPSdata_chData0___signalstate_App_GPSdata_App_GPSdata(dummyM)) is false.) -RESULT inj-event(authenticity___NavigationControl___sensorData_chData0___aftersignalstate_App_sensorData_App_sensorData(dummyM)) ==> inj-event(authenticity___SensorUnit___sensorData_chData0___signalstate_App_sensorData_App_sensorData316(dummyM)) is false. -RESULT (even event(authenticity___NavigationControl___sensorData_chData0___aftersignalstate_App_sensorData_App_sensorData(dummyM)) ==> event(authenticity___SensorUnit___sensorData_chData0___signalstate_App_sensorData_App_sensorData316(dummyM)) is false.) +RESULT inj-event(authenticity___NavigationControl___sensorData_chData0___aftersignalstate_App_sensorData_App_sensorData(dummyM)) ==> inj-event(authenticity___SensorUnit___sensorData_chData0___signalstate_App_sensorData_App_sensorData(dummyM)) is false. +RESULT (even event(authenticity___NavigationControl___sensorData_chData0___aftersignalstate_App_sensorData_App_sensorData(dummyM)) ==> event(authenticity___SensorUnit___sensorData_chData0___signalstate_App_sensorData_App_sensorData(dummyM)) is false.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_enc_or/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_enc_or/golden index f8bc28605a46484bd3dec5e3cee93db02136f64c..833cc3343249bbb471cd878c86597e727bd73012 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_enc_or/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_enc_or/golden @@ -4,6 +4,6 @@ RESULT not attacker(SensorUnit___autoEncrypt_sensorData[!1 = v]) is false. RESULT not attacker(SensorUnit___autoEncrypt_sensorData_encrypted0[!1 = v]) is true. RESULT not attacker(GPSGateway___autoEncrypt_GPSdata_encrypted0[!1 = v]) is true. RESULT not attacker(GPSGateway___autoEncrypt_GPSdata[!1 = v]) is true. -RESULT inj-event(authenticity___vehicleControlGateway___autoEncrypt_vehData___decrypt_autoEncrypt_vehData_dummy(dummyM)) ==> inj-event(authenticity___NavigationControl___autoEncrypt_vehData____encrypt_autoEncrypt_vehData(dummyM)) is true. -RESULT inj-event(authenticity___NavigationControl___autoEncrypt_sensorData___decrypt_autoEncrypt_sensorData_dummy(dummyM)) ==> inj-event(authenticity___SensorUnit___autoEncrypt_sensorData____encrypt_autoEncrypt_sensorData(dummyM)) is true. -RESULT inj-event(authenticity___NavigationControl___autoEncrypt_GPSdata___decrypt_autoEncrypt_GPSdata_dummy(dummyM)) ==> inj-event(authenticity___GPSGateway___autoEncrypt_GPSdata____encrypt_autoEncrypt_GPSdata(dummyM)) is true. +RESULT inj-event(authenticity___vehicleControlGateway___autoEncrypt_vehData___autoEncrypt_vehData_dummy(dummyM)) ==> inj-event(authenticity___NavigationControl___autoEncrypt_vehData____autoEncrypt_vehData(dummyM)) is true. +RESULT inj-event(authenticity___NavigationControl___autoEncrypt_sensorData___autoEncrypt_sensorData_dummy(dummyM)) ==> inj-event(authenticity___SensorUnit___autoEncrypt_sensorData____autoEncrypt_sensorData(dummyM)) is true. +RESULT inj-event(authenticity___NavigationControl___autoEncrypt_GPSdata___autoEncrypt_GPSdata_dummy(dummyM)) ==> inj-event(authenticity___GPSGateway___autoEncrypt_GPSdata____autoEncrypt_GPSdata(dummyM)) is true. diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_hsm/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_hsm/golden index 289a324f9b404aea74f7e0e492fcc96ef2ae5f09..7afd5edbdcba7573606ba6c0a34967392cf2d940 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_hsm/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/ITSDemo/Architecture_hsm/golden @@ -1,5 +1,5 @@ RESULT not attacker(GPSGateway___hsmSec_GPSdata_encrypted0[!1 = v]) is true. RESULT not attacker(GPSGateway___hsmSec_GPSdata[!1 = v]) is true. -RESULT inj-event(authenticity___HSM_CPU_Navigation___hsmSec_sensorData___decrypt_hsmSec_sensorData_dummy(dummyM)) ==> inj-event(authenticity___SensorUnit___hsmSec_sensorData____encrypt_hsmSec_sensorData(dummyM)) is true. -RESULT inj-event(authenticity___HSM_CPU_Navigation___hsmSec_GPSdata___decrypt_hsmSec_GPSdata_dummy(dummyM)) ==> inj-event(authenticity___GPSGateway___hsmSec_GPSdata____encrypt_hsmSec_GPSdata(dummyM)) is true. -RESULT inj-event(authenticity___vehicleControlGateway___hsmSec_vehData___decrypt_hsmSec_vehData_dummy(dummyM)) ==> inj-event(authenticity___HSM_CPU_Navigation___hsmSec_vehData____encrypt_hsmSec_vehData(dummyM)) is true. +RESULT inj-event(authenticity___HSM_CPU_Navigation___hsmSec_sensorData___hsmSec_sensorData_dummy(dummyM)) ==> inj-event(authenticity___SensorUnit___hsmSec_sensorData____hsmSec_sensorData(dummyM)) is true. +RESULT inj-event(authenticity___HSM_CPU_Navigation___hsmSec_GPSdata___hsmSec_GPSdata_dummy(dummyM)) ==> inj-event(authenticity___GPSGateway___hsmSec_GPSdata____hsmSec_GPSdata(dummyM)) is true. +RESULT inj-event(authenticity___vehicleControlGateway___hsmSec_vehData___hsmSec_vehData_dummy(dummyM)) ==> inj-event(authenticity___HSM_CPU_Navigation___hsmSec_vehData____hsmSec_vehData(dummyM)) is true. diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/MACMapping/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/MACMapping/golden index bc0ac5afaed63a7fd43f2a89ef7a59da80e8627a..e295e8d3136c45fd9a5ca68da027b6cf45fe583c 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/MACMapping/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/MACMapping/golden @@ -1,4 +1,4 @@ RESULT not attacker(Leader_Socket___PlatoonMAC_encrypted0[!1 = v]) is true. RESULT not attacker(Leader_Socket___PlatoonMAC[!1 = v]) is false. -RESULT inj-event(authenticity___Socket___PlatoonMAC___decrypt_PlatoonMAC_dummy(dummyM)) ==> inj-event(authenticity___Leader_Socket___PlatoonMAC____encrypt_PlatoonMAC(dummyM)) is false. -RESULT (but event(authenticity___Socket___PlatoonMAC___decrypt_PlatoonMAC_dummy(dummyM)) ==> event(authenticity___Leader_Socket___PlatoonMAC____encrypt_PlatoonMAC(dummyM)) is true.) +RESULT inj-event(authenticity___Socket___PlatoonMAC___PlatoonMAC_dummy(dummyM)) ==> inj-event(authenticity___Leader_Socket___PlatoonMAC____PlatoonMAC(dummyM)) is false. +RESULT (but event(authenticity___Socket___PlatoonMAC___PlatoonMAC_dummy(dummyM)) ==> event(authenticity___Leader_Socket___PlatoonMAC____PlatoonMAC(dummyM)) is true.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/NoCountermeasureMapping/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/NoCountermeasureMapping/golden index 84a71fb96a809f1dec891074a443ec9ecd58b6b8..a92bd324e64d885c72b4605eb610818f7ddc189a 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/NoCountermeasureMapping/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/NoCountermeasureMapping/golden @@ -1,4 +1,4 @@ RESULT not attacker(Leader_Socket___fromLSocToSoc_chData0[!1 = v]) is false. -RESULT inj-event(authenticity___Socket___fromLSocToSoc_chData0___aftersignalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc(dummyM)) ==> inj-event(authenticity___Leader_Socket___fromLSocToSoc_chData0___signalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc718(dummyM)) is false. -RESULT (even event(authenticity___Socket___fromLSocToSoc_chData0___aftersignalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc(dummyM)) ==> event(authenticity___Leader_Socket___fromLSocToSoc_chData0___signalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc718(dummyM)) is false.) +RESULT inj-event(authenticity___Socket___fromLSocToSoc_chData0___aftersignalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc(dummyM)) ==> inj-event(authenticity___Leader_Socket___fromLSocToSoc_chData0___signalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc(dummyM)) is false. +RESULT (even event(authenticity___Socket___fromLSocToSoc_chData0___aftersignalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc(dummyM)) ==> event(authenticity___Leader_Socket___fromLSocToSoc_chData0___signalstate_NoCountermeasure_fromLSocToSoc_NoCountermeasure_fromLSocToSoc(dummyM)) is false.) diff --git a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/SymmetricEncryptionNonceMapping/golden b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/SymmetricEncryptionNonceMapping/golden index 0b313e80e6e674309ebae8e68cf6f8f7df0a9345..4be6877af7a4c0c7ba2e40cfa8b28c80fea3c4c9 100644 --- a/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/SymmetricEncryptionNonceMapping/golden +++ b/ttool/src/test/resources/tmltranslator/DiplodocusSecurityTest/Models/Rovers_SPARTA_DIPLO/SymmetricEncryptionNonceMapping/golden @@ -4,6 +4,6 @@ RESULT not attacker(Socket___encrR[!1 = v]) is true. RESULT not attacker(Leader_Socket___nonceL[!1 = v]) is false. RESULT not attacker(Leader_Socket___encrL[!1 = v]) is true. RESULT not attacker(Leader_Socket___encrL_encrypted0[!1 = v]) is true. -RESULT inj-event(authenticity___Leader_Socket___encrR___decrypt_encrR_dummy(dummyM)) ==> inj-event(authenticity___Socket___encrR____encrypt_encrR(dummyM)) is true. -RESULT inj-event(authenticity___Socket___encrL___decrypt_encrL_dummy(dummyM)) ==> inj-event(authenticity___Leader_Socket___encrL____encrypt_encrL(dummyM)) is true. +RESULT inj-event(authenticity___Leader_Socket___encrR___encrR_dummy(dummyM)) ==> inj-event(authenticity___Socket___encrR____encrR(dummyM)) is true. +RESULT inj-event(authenticity___Socket___encrL___encrL_dummy(dummyM)) ==> inj-event(authenticity___Leader_Socket___encrL____encrL(dummyM)) is true.