diff --git a/build.txt b/build.txt index adb468b6415a4feb173e6e187ae6c2182612db3c..4394f27e47f10dde3adf0530067ad52d2fbf6fd6 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -14746 \ No newline at end of file +14758 \ No newline at end of file diff --git a/modeling/AVATAR/CoffeeMachine_Avatar.xml b/modeling/AVATAR/CoffeeMachine_Avatar.xml index 46ef397277583aa7e6acc693682155d5dcdeb3ac..9dc6a280f25704237e6a8bf8ba406adb10be84d4 100644 --- a/modeling/AVATAR/CoffeeMachine_Avatar.xml +++ b/modeling/AVATAR/CoffeeMachine_Avatar.xml @@ -28,7 +28,6 @@ <TGConnectingPoint num="14" id="15" /> <TGConnectingPoint num="15" id="16" /> <extraparam> -<Line value="" /> </extraparam> </COMPONENT> @@ -786,7 +785,7 @@ <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="" /> <TGConnectingPoint num="0" id="449" /> -<P1 x="302" y="261" id="493" /> +<P1 x="302" y="261" id="480" /> <P2 x="361" y="261" id="468" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -806,7 +805,7 @@ <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="" /> <TGConnectingPoint num="0" id="453" /> -<P1 x="305" y="211" id="480" /> +<P1 x="305" y="211" id="493" /> <P2 x="361" y="211" id="467" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -898,13 +897,13 @@ <TGConnectingPoint num="22" id="526" /> <TGConnectingPoint num="23" id="527" /> </COMPONENT> -<SUBCOMPONENT type="5304" id="490" index="13" uid="2dbef5cf-57eb-4674-94d5-4b37c6777b4a" > +<SUBCOMPONENT type="5304" id="490" index="13" uid="e14fd5a7-c9ae-42ab-b99a-306f91c69127" > <father id="528" num="0" /> -<cdparam x="166" y="191" /> -<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="154" y="241" /> +<sizeparam width="148" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="29" minY="0" maxY="114" /> -<infoparam name="TGComponent" value="WaitingForFirstCoin_exit" /> +<cdrectangleparam minX="0" maxX="20" minY="0" maxY="114" /> +<infoparam name="TGComponent" value="WaitingForFirstCoin_enter" /> <new d="false" /> <TGConnectingPoint num="0" id="478" /> <TGConnectingPoint num="1" id="479" /> @@ -919,13 +918,13 @@ <TGConnectingPoint num="10" id="488" /> <TGConnectingPoint num="11" id="489" /> </SUBCOMPONENT> -<SUBCOMPONENT type="5304" id="503" index="14" uid="e14fd5a7-c9ae-42ab-b99a-306f91c69127" > +<SUBCOMPONENT type="5304" id="503" index="14" uid="2dbef5cf-57eb-4674-94d5-4b37c6777b4a" > <father id="528" num="1" /> -<cdparam x="154" y="241" /> -<sizeparam width="148" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="166" y="191" /> +<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="20" minY="0" maxY="114" /> -<infoparam name="TGComponent" value="WaitingForFirstCoin_enter" /> +<cdrectangleparam minX="0" maxX="29" minY="0" maxY="114" /> +<infoparam name="TGComponent" value="WaitingForFirstCoin_exit" /> <new d="false" /> <TGConnectingPoint num="0" id="491" /> <TGConnectingPoint num="1" id="492" /> @@ -1062,7 +1061,7 @@ <TGConnectingPoint num="0" id="587" /> <TGConnectingPoint num="1" id="588" /> <TGConnectingPoint num="2" id="589" /> -<P1 x="581" y="154" id="663" /> +<P1 x="581" y="154" id="676" /> <P2 x="546" y="305" id="733" /> <Point x="518" y="154" /> <Point x="518" y="305" /> @@ -1093,7 +1092,7 @@ <infoparam name="connector from TGComponent to TGComponent" value="" /> <TGConnectingPoint num="0" id="592" /> <TGConnectingPoint num="1" id="593" /> -<P1 x="631" y="164" id="658" /> +<P1 x="631" y="164" id="671" /> <P2 x="667" y="310" id="720" /> <Point x="631" y="310" /> <AutomaticDrawing data="true" /> @@ -1124,7 +1123,7 @@ <infoparam name="connector from TGComponent to TGComponent" value="" /> <TGConnectingPoint num="0" id="598" /> <TGConnectingPoint num="1" id="599" /> -<P1 x="721" y="158" id="669" /> +<P1 x="721" y="158" id="656" /> <P2 x="700" y="204" id="710" /> <Point x="700" y="158" /> <AutomaticDrawing data="true" /> @@ -1289,13 +1288,13 @@ <TGConnectingPoint num="22" id="703" /> <TGConnectingPoint num="23" id="704" /> </COMPONENT> -<SUBCOMPONENT type="5304" id="667" index="24" uid="5ba2c908-950a-4288-889b-0b4c00bd9d79" > +<SUBCOMPONENT type="5303" id="667" index="24" uid="bf44a33b-5344-46b2-9170-509d38670a83" > <father id="705" num="0" /> -<cdparam x="581" y="125" /> -<sizeparam width="100" height="39" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="721" y="133" /> +<sizeparam width="100" height="50" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="168" minY="0" maxY="76" /> -<infoparam name="TGComponent" value="Start" /> +<cdrectangleparam minX="0" maxX="168" minY="0" maxY="65" /> +<infoparam name="TGComponent" value="nbOfCoins" /> <new d="false" /> <TGConnectingPoint num="0" id="655" /> <TGConnectingPoint num="1" id="656" /> @@ -1309,14 +1308,17 @@ <TGConnectingPoint num="9" id="664" /> <TGConnectingPoint num="10" id="665" /> <TGConnectingPoint num="11" id="666" /> +<extraparam> +<Toggle value="" /> +</extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5303" id="680" index="25" uid="bf44a33b-5344-46b2-9170-509d38670a83" > +<SUBCOMPONENT type="5304" id="680" index="25" uid="5ba2c908-950a-4288-889b-0b4c00bd9d79" > <father id="705" num="1" /> -<cdparam x="721" y="133" /> -<sizeparam width="100" height="50" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="581" y="125" /> +<sizeparam width="100" height="39" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="168" minY="0" maxY="65" /> -<infoparam name="TGComponent" value="nbOfCoins" /> +<cdrectangleparam minX="0" maxX="168" minY="0" maxY="76" /> +<infoparam name="TGComponent" value="Start" /> <new d="false" /> <TGConnectingPoint num="0" id="668" /> <TGConnectingPoint num="1" id="669" /> @@ -1330,9 +1332,6 @@ <TGConnectingPoint num="9" id="677" /> <TGConnectingPoint num="10" id="678" /> <TGConnectingPoint num="11" id="679" /> -<extraparam> -<Toggle value="" /> -</extraparam> </SUBCOMPONENT> <COMPONENT type="5306" id="717" index="14" uid="7a1c9320-1617-4710-a22f-ae8365f354ef" > @@ -1468,7 +1467,7 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Block1 to Block0" value="" /> <TGConnectingPoint num="0" id="770" /> -<P1 x="556" y="346" id="881" /> +<P1 x="556" y="346" id="840" /> <P2 x="557" y="373" id="930" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -1500,7 +1499,7 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Block1 to Block0" value="" /> <TGConnectingPoint num="0" id="774" /> -<P1 x="787" y="345" id="840" /> +<P1 x="787" y="345" id="881" /> <P2 x="787" y="373" id="931" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -1695,13 +1694,13 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <Signal value="out ejectCoin(int nbOfCoins)" attached="true" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="5000" id="874" index="6" uid="a5114e80-03e3-4820-b57a-bfcefd90a9c8" > +<SUBCOMPONENT type="5000" id="874" index="6" uid="7a21d6ab-e515-4a9c-b908-bcb26c800cfb" > <father id="956" num="0" /> -<cdparam x="694" y="245" /> -<sizeparam width="186" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="462" y="246" /> +<sizeparam width="188" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="274" minY="0" maxY="256" /> -<infoparam name="Block1" value="TeaButton" /> +<cdrectangleparam minX="0" maxX="272" minY="0" maxY="256" /> +<infoparam name="Block1" value="CoffeeButton" /> <new d="false" /> <TGConnectingPoint num="0" id="834" /> <TGConnectingPoint num="1" id="835" /> @@ -1750,13 +1749,13 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <Signal value="out push()" attached="true" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5000" id="915" index="7" uid="7a21d6ab-e515-4a9c-b908-bcb26c800cfb" > +<SUBCOMPONENT type="5000" id="915" index="7" uid="a5114e80-03e3-4820-b57a-bfcefd90a9c8" > <father id="956" num="1" /> -<cdparam x="462" y="246" /> -<sizeparam width="188" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="694" y="245" /> +<sizeparam width="186" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="272" minY="0" maxY="256" /> -<infoparam name="Block1" value="CoffeeButton" /> +<cdrectangleparam minX="0" maxX="274" minY="0" maxY="256" /> +<infoparam name="Block1" value="TeaButton" /> <new d="false" /> <TGConnectingPoint num="0" id="875" /> <TGConnectingPoint num="1" id="876" /> @@ -1815,8 +1814,8 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from start state to Send signal" value="null" /> <TGConnectingPoint num="0" id="962" /> -<P1 x="340" y="233" id="1133" /> -<P2 x="353" y="252" id="1135" /> +<P1 x="340" y="233" id="1144" /> +<P2 x="353" y="252" id="1133" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="961" index="8" uid="4b47f2ec-3073-4a06-b6e0-da7704454345" > @@ -1920,7 +1919,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Send signal to state0" value="null" /> <TGConnectingPoint num="0" id="983" /> -<P1 x="353" y="282" id="1136" /> +<P1 x="353" y="282" id="1134" /> <P2 x="399" y="352" id="986" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -2212,18 +2211,8 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <extraparam> </extraparam> </COMPONENT> -<SUBCOMPONENT type="5100" id="1134" index="12" uid="4ea28494-de50-4f99-8981-3ef7a87d7d34" > +<SUBCOMPONENT type="5103" id="1143" index="12" uid="71f14636-3c96-4e4e-8d0e-c1cd11e52641" > <father id="1218" num="0" /> -<cdparam x="333" y="213" /> -<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" /> -<infoparam name="start state" value="null" /> -<new d="false" /> -<TGConnectingPoint num="0" id="1133" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="5103" id="1145" index="13" uid="71f14636-3c96-4e4e-8d0e-c1cd11e52641" > -<father id="1218" num="1" /> <cdparam x="330" y="257" /> <sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -2231,16 +2220,26 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <cdrectangleparam minX="0" maxX="138" minY="0" maxY="110" /> <infoparam name="Send signal" value="push()" /> <new d="false" /> -<TGConnectingPoint num="0" id="1135" /> -<TGConnectingPoint num="1" id="1136" /> -<TGConnectingPoint num="2" id="1137" /> -<TGConnectingPoint num="3" id="1138" /> -<TGConnectingPoint num="4" id="1139" /> -<TGConnectingPoint num="5" id="1140" /> -<TGConnectingPoint num="6" id="1141" /> -<TGConnectingPoint num="7" id="1142" /> -<TGConnectingPoint num="8" id="1143" /> -<TGConnectingPoint num="9" id="1144" /> +<TGConnectingPoint num="0" id="1133" /> +<TGConnectingPoint num="1" id="1134" /> +<TGConnectingPoint num="2" id="1135" /> +<TGConnectingPoint num="3" id="1136" /> +<TGConnectingPoint num="4" id="1137" /> +<TGConnectingPoint num="5" id="1138" /> +<TGConnectingPoint num="6" id="1139" /> +<TGConnectingPoint num="7" id="1140" /> +<TGConnectingPoint num="8" id="1141" /> +<TGConnectingPoint num="9" id="1142" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="5100" id="1145" index="13" uid="4ea28494-de50-4f99-8981-3ef7a87d7d34" > +<father id="1218" num="1" /> +<cdparam x="333" y="213" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="1144" /> </SUBCOMPONENT> @@ -2847,8 +2846,8 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from start state to state0" value="null" /> <TGConnectingPoint num="0" id="1460" /> -<P1 x="261" y="421" id="2106" /> -<P2 x="260" y="437" id="2109" /> +<P1 x="261" y="421" id="2095" /> +<P2 x="260" y="437" id="2023" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="1459" index="38" uid="a28ea541-81ef-4713-8ea6-c7f5ba166daa" > @@ -2882,8 +2881,8 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from state0 to Send signal" value="null" /> <TGConnectingPoint num="0" id="1467" /> -<P1 x="227" y="477" id="2122" /> -<P2 x="126" y="524" id="2095" /> +<P1 x="227" y="477" id="2036" /> +<P2 x="126" y="524" id="2097" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="1466" index="39" uid="2484893a-3443-40dc-8f74-e1443edc2bde" > @@ -2917,8 +2916,8 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Send signal to stop state" value="null" /> <TGConnectingPoint num="0" id="1474" /> -<P1 x="126" y="554" id="2096" /> -<P2 x="126" y="653" id="2012" /> +<P1 x="126" y="554" id="2098" /> +<P2 x="126" y="653" id="2120" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="1473" index="40" uid="6f6c6e3e-0702-4e99-b1e6-da999207526e" > @@ -2954,8 +2953,8 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from state0 to Send signal" value="null" /> <TGConnectingPoint num="0" id="1481" /> -<P1 x="293" y="477" id="2123" /> -<P2 x="298" y="524" id="2181" /> +<P1 x="293" y="477" id="2037" /> +<P2 x="298" y="524" id="2011" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="1480" index="41" uid="18f77c23-d770-43b2-a9ca-161802d8a987" > @@ -2989,7 +2988,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Send signal to stop state" value="null" /> <TGConnectingPoint num="0" id="1488" /> -<P1 x="298" y="554" id="2182" /> +<P1 x="298" y="554" id="2012" /> <P2 x="296" y="650" id="1939" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -3026,8 +3025,8 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from state0 to Send signal" value="null" /> <TGConnectingPoint num="0" id="1495" /> -<P1 x="326" y="457" id="2112" /> -<P2 x="442" y="497" id="2084" /> +<P1 x="326" y="457" id="2026" /> +<P2 x="442" y="497" id="2108" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="1494" index="43" uid="1286b08f-20a2-44ff-9ae2-d3d09cf02647" > @@ -3062,7 +3061,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <infoparam name="connector from Send signal to stop state" value="null" /> <TGConnectingPoint num="0" id="1503" /> <TGConnectingPoint num="1" id="1504" /> -<P1 x="442" y="527" id="2085" /> +<P1 x="442" y="527" id="2109" /> <P2 x="323" y="748" id="1801" /> <Point x="442" y="737" /> <AutomaticDrawing data="true" /> @@ -3153,7 +3152,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <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="1519" /> -<P1 x="126" y="702" id="2017" /> +<P1 x="126" y="702" id="2125" /> <P2 x="221" y="758" id="1802" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -3872,14 +3871,14 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <extraparam> </extraparam> </COMPONENT> -<SUBCOMPONENT type="5106" id="2083" index="48" uid="52044bb2-8b01-4108-a1ac-b5e7886ea624" > +<SUBCOMPONENT type="5104" id="2021" index="48" uid="8718a1dd-4942-43e5-b6ce-b5f78b82a355" > <father id="2264" num="0" /> -<cdparam x="53" y="653" /> -<sizeparam width="146" height="49" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="242" y="529" /> +<sizeparam width="112" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> -<cdrectangleparam minX="0" maxX="431" minY="0" maxY="305" /> -<infoparam name="state0" value="CoffeeDelivered" /> +<cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" /> +<infoparam name="Send signal" value="pushTeaButton()" /> <new d="false" /> <TGConnectingPoint num="0" id="2011" /> <TGConnectingPoint num="1" id="2012" /> @@ -3891,94 +3890,105 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <TGConnectingPoint num="7" id="2018" /> <TGConnectingPoint num="8" id="2019" /> <TGConnectingPoint num="9" id="2020" /> -<TGConnectingPoint num="10" id="2021" /> -<TGConnectingPoint num="11" id="2022" /> -<TGConnectingPoint num="12" id="2023" /> -<TGConnectingPoint num="13" id="2024" /> -<TGConnectingPoint num="14" id="2025" /> -<TGConnectingPoint num="15" id="2026" /> -<TGConnectingPoint num="16" id="2027" /> -<TGConnectingPoint num="17" id="2028" /> -<TGConnectingPoint num="18" id="2029" /> -<TGConnectingPoint num="19" id="2030" /> -<TGConnectingPoint num="20" id="2031" /> -<TGConnectingPoint num="21" id="2032" /> -<TGConnectingPoint num="22" id="2033" /> -<TGConnectingPoint num="23" id="2034" /> -<TGConnectingPoint num="24" id="2035" /> -<TGConnectingPoint num="25" id="2036" /> -<TGConnectingPoint num="26" id="2037" /> -<TGConnectingPoint num="27" id="2038" /> -<TGConnectingPoint num="28" id="2039" /> -<TGConnectingPoint num="29" id="2040" /> -<TGConnectingPoint num="30" id="2041" /> -<TGConnectingPoint num="31" id="2042" /> -<TGConnectingPoint num="32" id="2043" /> -<TGConnectingPoint num="33" id="2044" /> -<TGConnectingPoint num="34" id="2045" /> -<TGConnectingPoint num="35" id="2046" /> -<TGConnectingPoint num="36" id="2047" /> -<TGConnectingPoint num="37" id="2048" /> -<TGConnectingPoint num="38" id="2049" /> -<TGConnectingPoint num="39" id="2050" /> -<TGConnectingPoint num="40" id="2051" /> -<TGConnectingPoint num="41" id="2052" /> -<TGConnectingPoint num="42" id="2053" /> -<TGConnectingPoint num="43" id="2054" /> -<TGConnectingPoint num="44" id="2055" /> -<TGConnectingPoint num="45" id="2056" /> -<TGConnectingPoint num="46" id="2057" /> -<TGConnectingPoint num="47" id="2058" /> -<TGConnectingPoint num="48" id="2059" /> -<TGConnectingPoint num="49" id="2060" /> -<TGConnectingPoint num="50" id="2061" /> -<TGConnectingPoint num="51" id="2062" /> -<TGConnectingPoint num="52" id="2063" /> -<TGConnectingPoint num="53" id="2064" /> -<TGConnectingPoint num="54" id="2065" /> -<TGConnectingPoint num="55" id="2066" /> -<TGConnectingPoint num="56" id="2067" /> -<TGConnectingPoint num="57" id="2068" /> -<TGConnectingPoint num="58" id="2069" /> -<TGConnectingPoint num="59" id="2070" /> -<TGConnectingPoint num="60" id="2071" /> -<TGConnectingPoint num="61" id="2072" /> -<TGConnectingPoint num="62" id="2073" /> -<TGConnectingPoint num="63" id="2074" /> -<TGConnectingPoint num="64" id="2075" /> -<TGConnectingPoint num="65" id="2076" /> -<TGConnectingPoint num="66" id="2077" /> -<TGConnectingPoint num="67" id="2078" /> -<TGConnectingPoint num="68" id="2079" /> -<TGConnectingPoint num="69" id="2080" /> -<TGConnectingPoint num="70" id="2081" /> -<TGConnectingPoint num="71" id="2082" /> -<extraparam> -</extraparam> +<accessibility /> </SUBCOMPONENT> -<SUBCOMPONENT type="5103" id="2094" index="49" uid="9c813d39-192a-47ff-98b2-607e27617acf" > +<SUBCOMPONENT type="5106" id="2094" index="49" uid="542c0583-8080-46a1-9ae2-775c6446817c" > <father id="2264" num="1" /> -<cdparam x="377" y="502" /> -<sizeparam width="130" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="194" y="437" /> +<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> -<cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" /> -<infoparam name="Send signal" value="ejectCoin(nbOfCoins)" /> +<cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" /> +<infoparam name="state0" value="WaitingForSelection" /> <new d="false" /> -<TGConnectingPoint num="0" id="2084" /> -<TGConnectingPoint num="1" id="2085" /> -<TGConnectingPoint num="2" id="2086" /> -<TGConnectingPoint num="3" id="2087" /> -<TGConnectingPoint num="4" id="2088" /> -<TGConnectingPoint num="5" id="2089" /> -<TGConnectingPoint num="6" id="2090" /> -<TGConnectingPoint num="7" id="2091" /> -<TGConnectingPoint num="8" id="2092" /> -<TGConnectingPoint num="9" id="2093" /> -<accessibility /> +<TGConnectingPoint num="0" id="2022" /> +<TGConnectingPoint num="1" id="2023" /> +<TGConnectingPoint num="2" id="2024" /> +<TGConnectingPoint num="3" id="2025" /> +<TGConnectingPoint num="4" id="2026" /> +<TGConnectingPoint num="5" id="2027" /> +<TGConnectingPoint num="6" id="2028" /> +<TGConnectingPoint num="7" id="2029" /> +<TGConnectingPoint num="8" id="2030" /> +<TGConnectingPoint num="9" id="2031" /> +<TGConnectingPoint num="10" id="2032" /> +<TGConnectingPoint num="11" id="2033" /> +<TGConnectingPoint num="12" id="2034" /> +<TGConnectingPoint num="13" id="2035" /> +<TGConnectingPoint num="14" id="2036" /> +<TGConnectingPoint num="15" id="2037" /> +<TGConnectingPoint num="16" id="2038" /> +<TGConnectingPoint num="17" id="2039" /> +<TGConnectingPoint num="18" id="2040" /> +<TGConnectingPoint num="19" id="2041" /> +<TGConnectingPoint num="20" id="2042" /> +<TGConnectingPoint num="21" id="2043" /> +<TGConnectingPoint num="22" id="2044" /> +<TGConnectingPoint num="23" id="2045" /> +<TGConnectingPoint num="24" id="2046" /> +<TGConnectingPoint num="25" id="2047" /> +<TGConnectingPoint num="26" id="2048" /> +<TGConnectingPoint num="27" id="2049" /> +<TGConnectingPoint num="28" id="2050" /> +<TGConnectingPoint num="29" id="2051" /> +<TGConnectingPoint num="30" id="2052" /> +<TGConnectingPoint num="31" id="2053" /> +<TGConnectingPoint num="32" id="2054" /> +<TGConnectingPoint num="33" id="2055" /> +<TGConnectingPoint num="34" id="2056" /> +<TGConnectingPoint num="35" id="2057" /> +<TGConnectingPoint num="36" id="2058" /> +<TGConnectingPoint num="37" id="2059" /> +<TGConnectingPoint num="38" id="2060" /> +<TGConnectingPoint num="39" id="2061" /> +<TGConnectingPoint num="40" id="2062" /> +<TGConnectingPoint num="41" id="2063" /> +<TGConnectingPoint num="42" id="2064" /> +<TGConnectingPoint num="43" id="2065" /> +<TGConnectingPoint num="44" id="2066" /> +<TGConnectingPoint num="45" id="2067" /> +<TGConnectingPoint num="46" id="2068" /> +<TGConnectingPoint num="47" id="2069" /> +<TGConnectingPoint num="48" id="2070" /> +<TGConnectingPoint num="49" id="2071" /> +<TGConnectingPoint num="50" id="2072" /> +<TGConnectingPoint num="51" id="2073" /> +<TGConnectingPoint num="52" id="2074" /> +<TGConnectingPoint num="53" id="2075" /> +<TGConnectingPoint num="54" id="2076" /> +<TGConnectingPoint num="55" id="2077" /> +<TGConnectingPoint num="56" id="2078" /> +<TGConnectingPoint num="57" id="2079" /> +<TGConnectingPoint num="58" id="2080" /> +<TGConnectingPoint num="59" id="2081" /> +<TGConnectingPoint num="60" id="2082" /> +<TGConnectingPoint num="61" id="2083" /> +<TGConnectingPoint num="62" id="2084" /> +<TGConnectingPoint num="63" id="2085" /> +<TGConnectingPoint num="64" id="2086" /> +<TGConnectingPoint num="65" id="2087" /> +<TGConnectingPoint num="66" id="2088" /> +<TGConnectingPoint num="67" id="2089" /> +<TGConnectingPoint num="68" id="2090" /> +<TGConnectingPoint num="69" id="2091" /> +<TGConnectingPoint num="70" id="2092" /> +<TGConnectingPoint num="71" id="2093" /> +<latencyCheck /> +<extraparam> +</extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5104" id="2105" index="50" uid="f73b994e-357b-446d-a13d-97a66d7a4653" > +<SUBCOMPONENT type="5100" id="2096" index="50" uid="d60fd6d2-14be-4b25-b424-35a9ae5e3ba3" > <father id="2264" num="2" /> +<cdparam x="254" y="401" /> +<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="562" minY="0" maxY="339" /> +<infoparam name="start state" value="null" /> +<new d="false" /> +<TGConnectingPoint num="0" id="2095" /> +</SUBCOMPONENT> +<SUBCOMPONENT type="5104" id="2107" index="51" uid="f73b994e-357b-446d-a13d-97a66d7a4653" > +<father id="2264" num="3" /> <cdparam x="63" y="529" /> <sizeparam width="127" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> @@ -3986,36 +3996,26 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <cdrectangleparam minX="0" maxX="450" minY="0" maxY="334" /> <infoparam name="Send signal" value="pushCoffeeButton()" /> <new d="false" /> -<TGConnectingPoint num="0" id="2095" /> -<TGConnectingPoint num="1" id="2096" /> -<TGConnectingPoint num="2" id="2097" /> -<TGConnectingPoint num="3" id="2098" /> -<TGConnectingPoint num="4" id="2099" /> -<TGConnectingPoint num="5" id="2100" /> -<TGConnectingPoint num="6" id="2101" /> -<TGConnectingPoint num="7" id="2102" /> -<TGConnectingPoint num="8" id="2103" /> -<TGConnectingPoint num="9" id="2104" /> +<TGConnectingPoint num="0" id="2097" /> +<TGConnectingPoint num="1" id="2098" /> +<TGConnectingPoint num="2" id="2099" /> +<TGConnectingPoint num="3" id="2100" /> +<TGConnectingPoint num="4" id="2101" /> +<TGConnectingPoint num="5" id="2102" /> +<TGConnectingPoint num="6" id="2103" /> +<TGConnectingPoint num="7" id="2104" /> +<TGConnectingPoint num="8" id="2105" /> +<TGConnectingPoint num="9" id="2106" /> <accessibility /> </SUBCOMPONENT> -<SUBCOMPONENT type="5100" id="2107" index="51" uid="d60fd6d2-14be-4b25-b424-35a9ae5e3ba3" > -<father id="2264" num="3" /> -<cdparam x="254" y="401" /> -<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="0" maxX="562" minY="0" maxY="339" /> -<infoparam name="start state" value="null" /> -<new d="false" /> -<TGConnectingPoint num="0" id="2106" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="5106" id="2180" index="52" uid="542c0583-8080-46a1-9ae2-775c6446817c" > +<SUBCOMPONENT type="5103" id="2118" index="52" uid="9c813d39-192a-47ff-98b2-607e27617acf" > <father id="2264" num="4" /> -<cdparam x="194" y="437" /> -<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="377" y="502" /> +<sizeparam width="130" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> -<cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" /> -<infoparam name="state0" value="WaitingForSelection" /> +<cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" /> +<infoparam name="Send signal" value="ejectCoin(nbOfCoins)" /> <new d="false" /> <TGConnectingPoint num="0" id="2108" /> <TGConnectingPoint num="1" id="2109" /> @@ -4027,92 +4027,91 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <TGConnectingPoint num="7" id="2115" /> <TGConnectingPoint num="8" id="2116" /> <TGConnectingPoint num="9" id="2117" /> -<TGConnectingPoint num="10" id="2118" /> -<TGConnectingPoint num="11" id="2119" /> -<TGConnectingPoint num="12" id="2120" /> -<TGConnectingPoint num="13" id="2121" /> -<TGConnectingPoint num="14" id="2122" /> -<TGConnectingPoint num="15" id="2123" /> -<TGConnectingPoint num="16" id="2124" /> -<TGConnectingPoint num="17" id="2125" /> -<TGConnectingPoint num="18" id="2126" /> -<TGConnectingPoint num="19" id="2127" /> -<TGConnectingPoint num="20" id="2128" /> -<TGConnectingPoint num="21" id="2129" /> -<TGConnectingPoint num="22" id="2130" /> -<TGConnectingPoint num="23" id="2131" /> -<TGConnectingPoint num="24" id="2132" /> -<TGConnectingPoint num="25" id="2133" /> -<TGConnectingPoint num="26" id="2134" /> -<TGConnectingPoint num="27" id="2135" /> -<TGConnectingPoint num="28" id="2136" /> -<TGConnectingPoint num="29" id="2137" /> -<TGConnectingPoint num="30" id="2138" /> -<TGConnectingPoint num="31" id="2139" /> -<TGConnectingPoint num="32" id="2140" /> -<TGConnectingPoint num="33" id="2141" /> -<TGConnectingPoint num="34" id="2142" /> -<TGConnectingPoint num="35" id="2143" /> -<TGConnectingPoint num="36" id="2144" /> -<TGConnectingPoint num="37" id="2145" /> -<TGConnectingPoint num="38" id="2146" /> -<TGConnectingPoint num="39" id="2147" /> -<TGConnectingPoint num="40" id="2148" /> -<TGConnectingPoint num="41" id="2149" /> -<TGConnectingPoint num="42" id="2150" /> -<TGConnectingPoint num="43" id="2151" /> -<TGConnectingPoint num="44" id="2152" /> -<TGConnectingPoint num="45" id="2153" /> -<TGConnectingPoint num="46" id="2154" /> -<TGConnectingPoint num="47" id="2155" /> -<TGConnectingPoint num="48" id="2156" /> -<TGConnectingPoint num="49" id="2157" /> -<TGConnectingPoint num="50" id="2158" /> -<TGConnectingPoint num="51" id="2159" /> -<TGConnectingPoint num="52" id="2160" /> -<TGConnectingPoint num="53" id="2161" /> -<TGConnectingPoint num="54" id="2162" /> -<TGConnectingPoint num="55" id="2163" /> -<TGConnectingPoint num="56" id="2164" /> -<TGConnectingPoint num="57" id="2165" /> -<TGConnectingPoint num="58" id="2166" /> -<TGConnectingPoint num="59" id="2167" /> -<TGConnectingPoint num="60" id="2168" /> -<TGConnectingPoint num="61" id="2169" /> -<TGConnectingPoint num="62" id="2170" /> -<TGConnectingPoint num="63" id="2171" /> -<TGConnectingPoint num="64" id="2172" /> -<TGConnectingPoint num="65" id="2173" /> -<TGConnectingPoint num="66" id="2174" /> -<TGConnectingPoint num="67" id="2175" /> -<TGConnectingPoint num="68" id="2176" /> -<TGConnectingPoint num="69" id="2177" /> -<TGConnectingPoint num="70" id="2178" /> -<TGConnectingPoint num="71" id="2179" /> -<latencyCheck /> -<extraparam> -</extraparam> +<accessibility /> </SUBCOMPONENT> -<SUBCOMPONENT type="5104" id="2191" index="53" uid="8718a1dd-4942-43e5-b6ce-b5f78b82a355" > +<SUBCOMPONENT type="5106" id="2191" index="53" uid="52044bb2-8b01-4108-a1ac-b5e7886ea624" > <father id="2264" num="5" /> -<cdparam x="242" y="529" /> -<sizeparam width="112" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="53" y="653" /> +<sizeparam width="146" height="49" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> -<cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" /> -<infoparam name="Send signal" value="pushTeaButton()" /> +<cdrectangleparam minX="0" maxX="431" minY="0" maxY="305" /> +<infoparam name="state0" value="CoffeeDelivered" /> <new d="false" /> -<TGConnectingPoint num="0" id="2181" /> -<TGConnectingPoint num="1" id="2182" /> -<TGConnectingPoint num="2" id="2183" /> -<TGConnectingPoint num="3" id="2184" /> -<TGConnectingPoint num="4" id="2185" /> -<TGConnectingPoint num="5" id="2186" /> -<TGConnectingPoint num="6" id="2187" /> -<TGConnectingPoint num="7" id="2188" /> -<TGConnectingPoint num="8" id="2189" /> -<TGConnectingPoint num="9" id="2190" /> -<accessibility /> +<TGConnectingPoint num="0" id="2119" /> +<TGConnectingPoint num="1" id="2120" /> +<TGConnectingPoint num="2" id="2121" /> +<TGConnectingPoint num="3" id="2122" /> +<TGConnectingPoint num="4" id="2123" /> +<TGConnectingPoint num="5" id="2124" /> +<TGConnectingPoint num="6" id="2125" /> +<TGConnectingPoint num="7" id="2126" /> +<TGConnectingPoint num="8" id="2127" /> +<TGConnectingPoint num="9" id="2128" /> +<TGConnectingPoint num="10" id="2129" /> +<TGConnectingPoint num="11" id="2130" /> +<TGConnectingPoint num="12" id="2131" /> +<TGConnectingPoint num="13" id="2132" /> +<TGConnectingPoint num="14" id="2133" /> +<TGConnectingPoint num="15" id="2134" /> +<TGConnectingPoint num="16" id="2135" /> +<TGConnectingPoint num="17" id="2136" /> +<TGConnectingPoint num="18" id="2137" /> +<TGConnectingPoint num="19" id="2138" /> +<TGConnectingPoint num="20" id="2139" /> +<TGConnectingPoint num="21" id="2140" /> +<TGConnectingPoint num="22" id="2141" /> +<TGConnectingPoint num="23" id="2142" /> +<TGConnectingPoint num="24" id="2143" /> +<TGConnectingPoint num="25" id="2144" /> +<TGConnectingPoint num="26" id="2145" /> +<TGConnectingPoint num="27" id="2146" /> +<TGConnectingPoint num="28" id="2147" /> +<TGConnectingPoint num="29" id="2148" /> +<TGConnectingPoint num="30" id="2149" /> +<TGConnectingPoint num="31" id="2150" /> +<TGConnectingPoint num="32" id="2151" /> +<TGConnectingPoint num="33" id="2152" /> +<TGConnectingPoint num="34" id="2153" /> +<TGConnectingPoint num="35" id="2154" /> +<TGConnectingPoint num="36" id="2155" /> +<TGConnectingPoint num="37" id="2156" /> +<TGConnectingPoint num="38" id="2157" /> +<TGConnectingPoint num="39" id="2158" /> +<TGConnectingPoint num="40" id="2159" /> +<TGConnectingPoint num="41" id="2160" /> +<TGConnectingPoint num="42" id="2161" /> +<TGConnectingPoint num="43" id="2162" /> +<TGConnectingPoint num="44" id="2163" /> +<TGConnectingPoint num="45" id="2164" /> +<TGConnectingPoint num="46" id="2165" /> +<TGConnectingPoint num="47" id="2166" /> +<TGConnectingPoint num="48" id="2167" /> +<TGConnectingPoint num="49" id="2168" /> +<TGConnectingPoint num="50" id="2169" /> +<TGConnectingPoint num="51" id="2170" /> +<TGConnectingPoint num="52" id="2171" /> +<TGConnectingPoint num="53" id="2172" /> +<TGConnectingPoint num="54" id="2173" /> +<TGConnectingPoint num="55" id="2174" /> +<TGConnectingPoint num="56" id="2175" /> +<TGConnectingPoint num="57" id="2176" /> +<TGConnectingPoint num="58" id="2177" /> +<TGConnectingPoint num="59" id="2178" /> +<TGConnectingPoint num="60" id="2179" /> +<TGConnectingPoint num="61" id="2180" /> +<TGConnectingPoint num="62" id="2181" /> +<TGConnectingPoint num="63" id="2182" /> +<TGConnectingPoint num="64" id="2183" /> +<TGConnectingPoint num="65" id="2184" /> +<TGConnectingPoint num="66" id="2185" /> +<TGConnectingPoint num="67" id="2186" /> +<TGConnectingPoint num="68" id="2187" /> +<TGConnectingPoint num="69" id="2188" /> +<TGConnectingPoint num="70" id="2189" /> +<TGConnectingPoint num="71" id="2190" /> +<extraparam> +</extraparam> </SUBCOMPONENT> diff --git a/modeling/SysMLSec/AliceAndBob.xml b/modeling/SysMLSec/AliceAndBob.xml index 99445900f4ef0453dda21e9397315a41678d66da..b460e86ce751f3dcd123d8effe788198066c93ad 100644 --- a/modeling/SysMLSec/AliceAndBob.xml +++ b/modeling/SysMLSec/AliceAndBob.xml @@ -177,13 +177,13 @@ <Signal value="out chout(Message msg)" attached="true" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="5000" id="82" index="7" uid="32384080-e86a-41de-b441-4f6ae88f1cbe" > +<SUBCOMPONENT type="5000" id="82" index="7" uid="a1c44cc9-9334-4d03-8988-e402248c1447" > <father id="164" num="0" /> -<cdparam x="36" y="233" /> -<sizeparam width="215" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="263" y="233" /> +<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="223" minY="0" maxY="93" /> -<infoparam name="Block0" value="Alice" /> +<cdrectangleparam minX="0" maxX="299" minY="0" maxY="93" /> +<infoparam name="Block0" value="Bob" /> <new d="false" /> <TGConnectingPoint num="0" id="42" /> <TGConnectingPoint num="1" id="43" /> @@ -228,10 +228,10 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> -<Attribute access="0" var="0" id="secretData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="m1" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> <Attribute access="0" var="0" id="sk" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> <Method value="Message encrypt(Message msg, Key k)" /> <Method value="Message decrypt(Message msg, Key k)" /> <Method value="Message sencrypt(Message msg, Key k)" /> @@ -258,13 +258,13 @@ <Method value="Key getKey(Message msg)" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5000" id="123" index="8" uid="a1c44cc9-9334-4d03-8988-e402248c1447" > +<SUBCOMPONENT type="5000" id="123" index="8" uid="32384080-e86a-41de-b441-4f6ae88f1cbe" > <father id="164" num="1" /> -<cdparam x="263" y="233" /> -<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="36" y="233" /> +<sizeparam width="215" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="299" minY="0" maxY="93" /> -<infoparam name="Block0" value="Bob" /> +<cdrectangleparam minX="0" maxX="223" minY="0" maxY="93" /> +<infoparam name="Block0" value="Alice" /> <new d="false" /> <TGConnectingPoint num="0" id="83" /> <TGConnectingPoint num="1" id="84" /> @@ -309,10 +309,10 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> +<Attribute access="0" var="0" id="secretData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="m1" value="" type="5" typeOther="Message" /> <Attribute access="0" var="0" id="sk" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> <Method value="Message encrypt(Message msg, Key k)" /> <Method value="Message decrypt(Message msg, Key k)" /> <Method value="Message sencrypt(Message msg, Key k)" /> @@ -1559,13 +1559,13 @@ <Signal value="out chout(Message msg)" attached="true" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="5000" id="857" index="7" uid="cc150a1e-1348-4fa4-98a9-3a612b6184cc" > +<SUBCOMPONENT type="5000" id="857" index="7" uid="e802e723-57b4-4734-af20-cddadacc10e6" > <father id="939" num="0" /> -<cdparam x="263" y="233" /> -<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="36" y="233" /> +<sizeparam width="215" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="299" minY="0" maxY="93" /> -<infoparam name="Block0" value="Bob" /> +<cdrectangleparam minX="0" maxX="223" minY="0" maxY="93" /> +<infoparam name="Block0" value="Alice" /> <new d="false" /> <TGConnectingPoint num="0" id="817" /> <TGConnectingPoint num="1" id="818" /> @@ -1610,13 +1610,13 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> +<Attribute access="0" var="0" id="secretData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="m1" value="" type="5" typeOther="Message" /> <Attribute access="0" var="0" id="sk" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> -<Attribute access="0" var="0" id="privK" value="" type="5" typeOther="Key" /> <Attribute access="0" var="0" id="pubK" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="alicePubK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="privK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="bobPubK" value="" type="5" typeOther="Key" /> <Method value="Message encrypt(Message msg, Key k)" /> <Method value="Message decrypt(Message msg, Key k)" /> <Method value="Message sencrypt(Message msg, Key k)" /> @@ -1643,13 +1643,13 @@ <Method value="Key getKey(Message msg)" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5000" id="898" index="8" uid="e802e723-57b4-4734-af20-cddadacc10e6" > +<SUBCOMPONENT type="5000" id="898" index="8" uid="cc150a1e-1348-4fa4-98a9-3a612b6184cc" > <father id="939" num="1" /> -<cdparam x="36" y="233" /> -<sizeparam width="215" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="263" y="233" /> +<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="223" minY="0" maxY="93" /> -<infoparam name="Block0" value="Alice" /> +<cdrectangleparam minX="0" maxX="299" minY="0" maxY="93" /> +<infoparam name="Block0" value="Bob" /> <new d="false" /> <TGConnectingPoint num="0" id="858" /> <TGConnectingPoint num="1" id="859" /> @@ -1694,13 +1694,13 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> -<Attribute access="0" var="0" id="secretData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="m1" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> <Attribute access="0" var="0" id="sk" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="pubK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="privK" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="bobPubK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="pubK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="alicePubK" value="" type="5" typeOther="Key" /> <Method value="Message encrypt(Message msg, Key k)" /> <Method value="Message decrypt(Message msg, Key k)" /> <Method value="Message sencrypt(Message msg, Key k)" /> @@ -3661,13 +3661,13 @@ <Signal value="out chout(Message msg)" attached="true" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="5000" id="2024" index="7" uid="7a040a26-feb9-4e9a-a609-908679df2a0b" > +<SUBCOMPONENT type="5000" id="2024" index="7" uid="f24348ab-6d4a-40e6-a942-342d6222b23f" > <father id="2147" num="0" /> -<cdparam x="115" y="249" /> -<sizeparam width="261" height="83" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="263" y="108" /> +<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="177" minY="0" maxY="261" /> -<infoparam name="Block0" value="CA" /> +<cdrectangleparam minX="0" maxX="299" minY="0" maxY="218" /> +<infoparam name="Block0" value="Bob" /> <new d="false" /> <TGConnectingPoint num="0" id="1984" /> <TGConnectingPoint num="1" id="1985" /> @@ -3712,30 +3712,22 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> +<Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="sk" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="privK" value="" type="5" typeOther="Key" /> <Attribute access="0" var="0" id="pubK" value="" type="5" typeOther="Key" /> <Attribute access="0" var="0" id="alicePubK" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="bobPubK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="CAPubK" value="" type="5" typeOther="Key" /> <Attribute access="0" var="0" id="aliceID" value="" type="8" typeOther="" /> -<Attribute access="0" var="0" id="bobID" value="" type="8" typeOther="" /> -<Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="newK" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="newCert" value="" type="5" typeOther="Message" /> <Attribute access="0" var="0" id="m1" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="newID" value="" type="8" typeOther="" /> -<Method value="Message aencrypt(Message msg, Key k)" /> -<Method value="Message adecrypt(Message msg, Key k)" /> -<Method value="Key pk(Key k)" /> -<Method value="Message sign(Message msg, Key k)" /> -<Method value="bool verifySign(Message msg1, Message sig, Key k)" /> -<Method value="Message cert(Key k, Message msg)" /> -<Method value="bool verifyCert(Message cert, Key k)" /> -<Method value="Key getpk(Message cert)" /> +<Attribute access="0" var="0" id="sig" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="certOK" value="" type="4" typeOther="" /> +<Method value="Message encrypt(Message msg, Key k)" /> +<Method value="Message decrypt(Message msg, Key k)" /> <Method value="Message sencrypt(Message msg, Key k)" /> <Method value="Message sdecrypt(Message msg, Key k)" /> -<Method value="Key DH(Key pubK, Key privK)" /> -<Method value="Message hash(Message msg)" /> <Method value="Message MAC(Message msg, Key k)" /> <Method value="bool verifyMAC(Message msg, Key k, Message macmsg)" /> <Method value="Message concat2(Message msg1, Message msg2)" /> @@ -3744,6 +3736,16 @@ <Method value="get2(Message msg, Message msg1, Message msg2)" /> <Method value="get3(Message msg, Message msg1, Message msg2, Message msg3)" /> <Method value="get4(Message msg, Message msg1, Message msg2, Message msg3, Message msg4)" /> +<Method value="Message aencrypt(Message msg, Key k)" /> +<Method value="Message adecrypt(Message msg, Key k)" /> +<Method value="Key pk(Key k)" /> +<Method value="Message sign(Message msg, Key k)" /> +<Method value="bool verifySign(Message msg1, Message sig, Key k)" /> +<Method value="Message cert(Key k, Message msg)" /> +<Method value="bool verifyCert(Message cert, Key k)" /> +<Method value="Key getpk(Message cert)" /> +<Method value="Key DH(Key pubK, Key privK)" /> +<Method value="Message hash(Message msg)" /> <Method value="Message host(Key k)" /> <Method value="Key getKey(Message msg)" /> </extraparam> @@ -3837,13 +3839,13 @@ <Method value="Key getKey(Message msg)" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5000" id="2106" index="9" uid="f24348ab-6d4a-40e6-a942-342d6222b23f" > +<SUBCOMPONENT type="5000" id="2106" index="9" uid="7a040a26-feb9-4e9a-a609-908679df2a0b" > <father id="2147" num="2" /> -<cdparam x="263" y="108" /> -<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="115" y="249" /> +<sizeparam width="261" height="83" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="299" minY="0" maxY="218" /> -<infoparam name="Block0" value="Bob" /> +<cdrectangleparam minX="0" maxX="177" minY="0" maxY="261" /> +<infoparam name="Block0" value="CA" /> <new d="false" /> <TGConnectingPoint num="0" id="2066" /> <TGConnectingPoint num="1" id="2067" /> @@ -3888,30 +3890,18 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> -<Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="sk" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="privK" value="" type="5" typeOther="Key" /> <Attribute access="0" var="0" id="pubK" value="" type="5" typeOther="Key" /> <Attribute access="0" var="0" id="alicePubK" value="" type="5" typeOther="Key" /> -<Attribute access="0" var="0" id="CAPubK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="bobPubK" value="" type="5" typeOther="Key" /> <Attribute access="0" var="0" id="aliceID" value="" type="8" typeOther="" /> +<Attribute access="0" var="0" id="bobID" value="" type="8" typeOther="" /> +<Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="newK" value="" type="5" typeOther="Key" /> +<Attribute access="0" var="0" id="newCert" value="" type="5" typeOther="Message" /> <Attribute access="0" var="0" id="m1" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="sig" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="certOK" value="" type="4" typeOther="" /> -<Method value="Message encrypt(Message msg, Key k)" /> -<Method value="Message decrypt(Message msg, Key k)" /> -<Method value="Message sencrypt(Message msg, Key k)" /> -<Method value="Message sdecrypt(Message msg, Key k)" /> -<Method value="Message MAC(Message msg, Key k)" /> -<Method value="bool verifyMAC(Message msg, Key k, Message macmsg)" /> -<Method value="Message concat2(Message msg1, Message msg2)" /> -<Method value="Message concat3(Message msg1, Message msg2, Message msg3)" /> -<Method value="Message concat4(Message msg1, Message msg2, Message msg3, Message msg4)" /> -<Method value="get2(Message msg, Message msg1, Message msg2)" /> -<Method value="get3(Message msg, Message msg1, Message msg2, Message msg3)" /> -<Method value="get4(Message msg, Message msg1, Message msg2, Message msg3, Message msg4)" /> +<Attribute access="0" var="0" id="m2" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="newID" value="" type="8" typeOther="" /> <Method value="Message aencrypt(Message msg, Key k)" /> <Method value="Message adecrypt(Message msg, Key k)" /> <Method value="Key pk(Key k)" /> @@ -3920,8 +3910,18 @@ <Method value="Message cert(Key k, Message msg)" /> <Method value="bool verifyCert(Message cert, Key k)" /> <Method value="Key getpk(Message cert)" /> +<Method value="Message sencrypt(Message msg, Key k)" /> +<Method value="Message sdecrypt(Message msg, Key k)" /> <Method value="Key DH(Key pubK, Key privK)" /> <Method value="Message hash(Message msg)" /> +<Method value="Message MAC(Message msg, Key k)" /> +<Method value="bool verifyMAC(Message msg, Key k, Message macmsg)" /> +<Method value="Message concat2(Message msg1, Message msg2)" /> +<Method value="Message concat3(Message msg1, Message msg2, Message msg3)" /> +<Method value="Message concat4(Message msg1, Message msg2, Message msg3, Message msg4)" /> +<Method value="get2(Message msg, Message msg1, Message msg2)" /> +<Method value="get3(Message msg, Message msg1, Message msg2, Message msg3)" /> +<Method value="get4(Message msg, Message msg1, Message msg2, Message msg3, Message msg4)" /> <Method value="Message host(Key k)" /> <Method value="Key getKey(Message msg)" /> </extraparam> @@ -6736,13 +6736,13 @@ <Signal value="out chout(Message msg)" attached="true" /> </extraparam> </COMPONENT> -<SUBCOMPONENT type="5000" id="3642" index="7" uid="58e32c17-1811-4588-ab32-863569a17a48" > +<SUBCOMPONENT type="5000" id="3642" index="7" uid="7bb99390-2a74-452a-8601-e344bd028850" > <father id="3724" num="0" /> -<cdparam x="36" y="233" /> -<sizeparam width="215" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="263" y="233" /> +<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="223" minY="0" maxY="93" /> -<infoparam name="Block0" value="Alice" /> +<cdrectangleparam minX="0" maxX="299" minY="0" maxY="93" /> +<infoparam name="Block0" value="Bob" /> <new d="false" /> <TGConnectingPoint num="0" id="3602" /> <TGConnectingPoint num="1" id="3603" /> @@ -6787,8 +6787,8 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> -<Attribute access="0" var="0" id="secretData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> +<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> <Method value="Message encrypt(Message msg, Key k)" /> <Method value="Message decrypt(Message msg, Key k)" /> <Method value="Message sencrypt(Message msg, Key k)" /> @@ -6815,13 +6815,13 @@ <Method value="Key getKey(Message msg)" /> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5000" id="3683" index="8" uid="7bb99390-2a74-452a-8601-e344bd028850" > +<SUBCOMPONENT type="5000" id="3683" index="8" uid="58e32c17-1811-4588-ab32-863569a17a48" > <father id="3724" num="1" /> -<cdparam x="263" y="233" /> -<sizeparam width="139" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="36" y="233" /> +<sizeparam width="215" height="126" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="299" minY="0" maxY="93" /> -<infoparam name="Block0" value="Bob" /> +<cdrectangleparam minX="0" maxX="223" minY="0" maxY="93" /> +<infoparam name="Block0" value="Alice" /> <new d="false" /> <TGConnectingPoint num="0" id="3643" /> <TGConnectingPoint num="1" id="3644" /> @@ -6866,8 +6866,8 @@ <extraparam> <blockType data="cryptoblock" color="-4072719" /> <CryptoBlock value="true" /> +<Attribute access="0" var="0" id="secretData" value="" type="8" typeOther="" /> <Attribute access="0" var="0" id="m" value="" type="5" typeOther="Message" /> -<Attribute access="0" var="0" id="receivedData" value="" type="8" typeOther="" /> <Method value="Message encrypt(Message msg, Key k)" /> <Method value="Message decrypt(Message msg, Key k)" /> <Method value="Message sencrypt(Message msg, Key k)" /> diff --git a/src/main/java/avatartranslator/AvatarAttribute.java b/src/main/java/avatartranslator/AvatarAttribute.java index 97dd05b8094baf0aa91d7ba1d3574d6b75d1cf2e..8c1d689e87d92ed87bf2a4d2ffec9b313d9dfd11 100644 --- a/src/main/java/avatartranslator/AvatarAttribute.java +++ b/src/main/java/avatartranslator/AvatarAttribute.java @@ -89,10 +89,7 @@ public class AvatarAttribute extends AvatarLeftHand implements NameChecker.NameS public boolean isConstant() {return isConstant;} public boolean hasInitialValue() { - if (getInitialValue() == null) { - return false; - } - return (!(getInitialValue().trim().length() == 0)); + return (initialValue != null) && (initialValue.length() > 0); } public String getInitialValue() { diff --git a/src/main/java/avatartranslator/AvatarBlock.java b/src/main/java/avatartranslator/AvatarBlock.java index 92bed46d2d14315b30f5b9cea6de4ede94563d1b..4409415bd437265ebe2421cbad69106dd93fb54b 100644 --- a/src/main/java/avatartranslator/AvatarBlock.java +++ b/src/main/java/avatartranslator/AvatarBlock.java @@ -607,49 +607,63 @@ public class AvatarBlock extends AvatarElement implements AvatarStateMachineOwne // Add new timer signals + int nbOfTimers = 0; for (AvatarAttribute aa : attributes) { if (aa.getType() == AvatarType.TIMER) { - name = findUniqueSignalName("set_" + aa.getName()); - asSet = new AvatarSignal(name, AvatarSignal.OUT, aa.getReferenceObject()); - value = new AvatarAttribute("timerValue", AvatarType.INTEGER, this, aa.getReferenceObject()); - asSet.addParameter(value); - addSignal(asSet); - sets.put(aa.getName(), asSet); - name = findUniqueSignalName("reset_" + aa.getName()); - asReset = new AvatarSignal(name, AvatarSignal.OUT, aa.getReferenceObject()); - addSignal(asReset); - resets.put(aa.getName(), asReset); - name = findUniqueSignalName("expire_" + aa.getName()); - asExpire = new AvatarSignal(name, AvatarSignal.IN, aa.getReferenceObject()); - addSignal(asExpire); - expires.put(aa.getName(), asExpire); - - // Create a timer block, and connect signals - String blockName = "Timer_" + aa.getName() + "_" + getName(); - while (_spec.getBlockWithName(blockName) != null) { - blockName += "0"; + + // Check if timer is really used + boolean toBeRemoved = false; + if (asm != null) { + toBeRemoved = asm.hasTimeoperatorWithAttribute(aa); + } + + if (toBeRemoved) { + nbOfTimers ++; + + name = findUniqueSignalName("set_" + aa.getName()); + asSet = new AvatarSignal(name, AvatarSignal.OUT, aa.getReferenceObject()); + value = new AvatarAttribute("timerValue", AvatarType.INTEGER, this, aa.getReferenceObject()); + asSet.addParameter(value); + addSignal(asSet); + sets.put(aa.getName(), asSet); + name = findUniqueSignalName("reset_" + aa.getName()); + asReset = new AvatarSignal(name, AvatarSignal.OUT, aa.getReferenceObject()); + addSignal(asReset); + resets.put(aa.getName(), asReset); + name = findUniqueSignalName("expire_" + aa.getName()); + asExpire = new AvatarSignal(name, AvatarSignal.IN, aa.getReferenceObject()); + addSignal(asExpire); + expires.put(aa.getName(), asExpire); + + // Create a timer block, and connect signals + String blockName = "Timer_" + aa.getName() + "_" + getName(); + while (_spec.getBlockWithName(blockName) != null) { + blockName += "0"; + } + AvatarBlock ab = AvatarBlockTemplate.getTimerBlock(blockName, _spec, getReferenceObject(), null, null, null); + _addedBlocks.add(ab); + + AvatarRelation ar; + ar = new AvatarRelation("timerRelation", this, ab, getReferenceObject()); + ar.addSignals(getAvatarSignalWithName(asSet.getSignalName()), ab.getAvatarSignalWithName("set")); + ar.addSignals(getAvatarSignalWithName(asReset.getSignalName()), ab.getAvatarSignalWithName("reset")); + ar.addSignals(getAvatarSignalWithName(asExpire.getSignalName()), ab.getAvatarSignalWithName("expire")); + _spec.addRelation(ar); } - AvatarBlock ab = AvatarBlockTemplate.getTimerBlock(blockName, _spec, getReferenceObject(), null, null, null); - _addedBlocks.add(ab); - - AvatarRelation ar; - ar = new AvatarRelation("timerRelation", this, ab, getReferenceObject()); - ar.addSignals(getAvatarSignalWithName(asSet.getSignalName()), ab.getAvatarSignalWithName("set")); - ar.addSignals(getAvatarSignalWithName(asReset.getSignalName()), ab.getAvatarSignalWithName("reset")); - ar.addSignals(getAvatarSignalWithName(asExpire.getSignalName()), ab.getAvatarSignalWithName("expire")); - _spec.addRelation(ar); } } - name = findUniqueAttributeName("timerValue_"); - value = new AvatarAttribute(name, AvatarType.INTEGER, this, getReferenceObject()); - addAttribute(value); + if(nbOfTimers > 0) { + name = findUniqueAttributeName("timerValue_"); + value = new AvatarAttribute(name, AvatarType.INTEGER, this, getReferenceObject()); + addAttribute(value); - // Modify the state machine - if (asm.removeTimers(name, sets, resets, expires)) { - // Add an attribute for the timer value - //value = new AvatarAttribute("__timerValue", AvatarType.INTEGER, this, getReferenceObject()); - //addAttribute(value); + // Modify the state machine + if (asm.removeTimers(name, sets, resets, expires)) { + // Add an attribute for the timer value + //value = new AvatarAttribute("__timerValue", AvatarType.INTEGER, this, getReferenceObject()); + //addAttribute(value); + } } // Remove Timer attribute diff --git a/src/main/java/avatartranslator/AvatarError.java b/src/main/java/avatartranslator/AvatarError.java index 9ef6d0e2ff109e4fca95d0950f4d22b1694e3976..c4cc8d85a5457d5c36868d6333227da4e74b8853 100644 --- a/src/main/java/avatartranslator/AvatarError.java +++ b/src/main/java/avatartranslator/AvatarError.java @@ -54,15 +54,22 @@ public class AvatarError { "Signals are connected but there are not compatible because they are both OUT signals", "Signals are connected but there have non compatible parameters", "Missing block1 declaration in relation", - "Missing block2 declaration in relation", //5 + /*5*/"Missing block2 declaration in relation", //5 "No signal of that name in block", "State machine must terminate with a (stop) state", "ASM operator has not next operator", "Empty state machine", - "Unused elements in state machine", + /*10*/"Unused elements in state machine", "The name should start with an upper case letter", "The name should start with a lower case letter", - "Invalid \"else\" guard" + "Invalid \"else\" guard", + "Invalid Timer attribute in signal", + /*15*/"Invalid Timer attribute in method", + "Invalid number of parameters in action on signal", + "Invalid attribute in action on signal", + "Invalid type in signal definition", + "Invalid int expression in action on signal", + /*20*/"Invalid bool expression in action on signal" }; diff --git a/src/main/java/avatartranslator/AvatarSignal.java b/src/main/java/avatartranslator/AvatarSignal.java index 7232b7bb441c701ffd9ed2c16fe00007e9a50547..c212838295008499cd5d38f5c9e802c2561bcd9c 100644 --- a/src/main/java/avatartranslator/AvatarSignal.java +++ b/src/main/java/avatartranslator/AvatarSignal.java @@ -247,6 +247,10 @@ public class AvatarSignal extends AvatarMethod { tmp = Conversion.replaceAllString(tmp, ", ", ","); tmp = Conversion.replaceAllChar(tmp, ' ', ","); + if (tmp.compareTo("Timer") == 0) { + return null; + } + if (tmp.compareTo("int") == 0) { AvatarAttribute aa = new AvatarAttribute("value", AvatarType.INTEGER, _block, null); as.addParameter(aa); @@ -295,6 +299,9 @@ public class AvatarSignal extends AvatarMethod { two = tmp; } + if (one.compareTo("Timer") == 0) { + return null; + } if (!isAValidId(one, false, false, false, true)) { TraceManager.addDev("Invalid type: " + one); diff --git a/src/main/java/avatartranslator/AvatarSpecification.java b/src/main/java/avatartranslator/AvatarSpecification.java index 1edc4a6ca960045b773ab24edd61ac03bf3745c9..0f50fcade29a37ae6afd9e5b1cda59e6e6b6ef5a 100644 --- a/src/main/java/avatartranslator/AvatarSpecification.java +++ b/src/main/java/avatartranslator/AvatarSpecification.java @@ -59,6 +59,8 @@ import java.util.*; */ public class AvatarSpecification extends AvatarElement implements IBSParamSpec { + private static String keywords[] = {"BOOL", "INT", "TIMER", "SIGNAL", "METHOD", "STATE", "BLOCK", "CLASS"}; + public final static int UPPAAL_MAX_INT = 32767; public static String[] ops = {">", "<", "+", "-", "*", "/", "[", "]", "(", ")", ":", "=", "==", ",", "!", "?", "{", "}", "|", "&"}; @@ -1673,4 +1675,18 @@ public class AvatarSpecification extends AvatarElement implements IBSParamSpec { return ret; } + public static boolean checkKeywords(String _id) { + String id = _id.toUpperCase(); + for (int i = 0; i < keywords.length; i++) { + if (id.compareTo(keywords[i]) == 0) { + return false; + } + } + return true; + } + + public static boolean isAKeyword(String _id) { + return !checkKeywords(_id); + } + } diff --git a/src/main/java/avatartranslator/AvatarStateMachine.java b/src/main/java/avatartranslator/AvatarStateMachine.java index a486951fa31a3369d886848e19add540c0372971..3c809afbcddf41aa675780963e5f8a60779346c1 100644 --- a/src/main/java/avatartranslator/AvatarStateMachine.java +++ b/src/main/java/avatartranslator/AvatarStateMachine.java @@ -266,6 +266,17 @@ public class AvatarStateMachine extends AvatarElement { } } + public boolean hasTimeoperatorWithAttribute(AvatarAttribute aa) { + for(AvatarStateMachineElement asme: elements) { + if (asme instanceof AvatarTimerOperator) { + if ( ((AvatarTimerOperator)(asme)).getTimer() == aa) { + return true; + } + } + } + return false; + } + public int stateNb() { if (states == null) { makeStates(); diff --git a/src/main/java/avatartranslator/AvatarSyntaxChecker.java b/src/main/java/avatartranslator/AvatarSyntaxChecker.java index 12e906b310565069556fabf7c41a3b2db58aceb8..08840066197609d42c0c65b804c23c5376806b34 100644 --- a/src/main/java/avatartranslator/AvatarSyntaxChecker.java +++ b/src/main/java/avatartranslator/AvatarSyntaxChecker.java @@ -48,6 +48,7 @@ import myutil.Conversion; import myutil.IntExpressionEvaluator; import myutil.NameChecker; import myutil.TraceManager; +import myutil.intboolsolver.IBSExpressions; import java.io.StringReader; import java.util.ArrayList; @@ -78,10 +79,15 @@ public class AvatarSyntaxChecker { ArrayList<AvatarError> errors = new ArrayList<>(); errors.addAll(checkNextASMSpec(avspec)); + errors.addAll(checkMethodTypes(avspec)); + errors.addAll(checkSignalTypes(avspec)); errors.addAll(checkSignalRelations(avspec)); + errors.addAll(checkActionOnSignals(avspec)); + errors.addAll(checkActions(avspec)); errors.addAll(checkASMLibraryFunctions(avspec)); errors.addAll(checkElseInGuards(avspec)); + return errors; } @@ -258,6 +264,75 @@ public class AvatarSyntaxChecker { } + public static ArrayList<AvatarError> checkMethodTypes(AvatarSpecification avspec) { + ArrayList<AvatarError> errors = new ArrayList<>(); + + for (AvatarBlock block : avspec.getListOfBlocks()) { + + for(AvatarMethod am: block.getMethods()) { + AvatarError err = checkMethodTypes(avspec, block, am); + if (err != null) { + errors.add(err); + } + } + } + + return errors; + + } + + public static AvatarError checkMethodTypes(AvatarSpecification avspec, AvatarBlock ab, AvatarMethod am) { + for(AvatarAttribute aa: am.getListOfAttributes()) { + if (aa.getType() == AvatarType.TIMER) { + AvatarError err = new AvatarError(avspec); + err.error = 15; + err.block = ab; + err.firstAvatarElement = am; + return err; + } + } + return null; + } + + public static ArrayList<AvatarError> checkSignalTypes(AvatarSpecification avspec) { + ArrayList<AvatarError> errors = new ArrayList<>(); + + List<AvatarSignal> signals1, signals2; + + for (AvatarRelation relation : avspec.getRelations()) { + signals1 = relation.getSignals1(); + signals2 = relation.getSignals2(); + + List<AvatarSignal> list = new ArrayList<>(); + list.addAll(signals1); + list.addAll(signals2); + + for(AvatarSignal sig: list) { + AvatarError err = checkSignalTypes(avspec, sig); + if (err != null) { + errors.add(err); + } + } + } + + return errors; + + } + + public static AvatarError checkSignalTypes(AvatarSpecification avspec, AvatarSignal sig) { + for(AvatarAttribute aa: sig.getListOfAttributes()) { + if (aa.getType() == AvatarType.TIMER) { + AvatarError err = new AvatarError(avspec); + err.error = 14; + err.firstAvatarElement = sig; + return err; + } + } + return null; + } + + + public static ArrayList<AvatarError> checkSignalRelations(AvatarSpecification avspec) { ArrayList<AvatarError> errors = new ArrayList<>(); @@ -358,6 +433,110 @@ public class AvatarSyntaxChecker { return errors; } + public static ArrayList<AvatarError> checkActionOnSignals(AvatarSpecification avspec) { + ArrayList<AvatarError> errors = new ArrayList<>(); + + for (AvatarBlock block : avspec.getListOfBlocks()) { + AvatarStateMachine asm = block.getStateMachine(); + if (asm != null) { + for(AvatarStateMachineElement asme: asm.getListOfElements()) { + if (asme instanceof AvatarActionOnSignal) { + AvatarActionOnSignal aaos = (AvatarActionOnSignal)asme; + AvatarSignal sig = aaos.getSignal(); + if (aaos.getValues().size() != sig.getListOfAttributes().size()) { + AvatarError error = new AvatarError(avspec); + error.block = block; + error.firstAvatarElement = aaos; + error.error = 16; + errors.add(error); + } else { + for(int i=0; i<sig.getListOfAttributes().size(); i++) { + // Check that value correspond to the expected type + // If sig is in then only variables are expected + String value = aaos.getValues().get(i); + AvatarAttribute param = sig.getListOfAttributes().get(i); + + // We expect a variable only + if (param.getType() == AvatarType.TIMER) { + AvatarError error = new AvatarError(avspec); + error.block = block; + error.firstAvatarElement = aaos; + error.error = 14; + errors.add(error); + } else if (sig.isIn() || param.getType() == AvatarType.UNDEFINED) { + AvatarAttribute aa = block.getAvatarAttributeWithName(value); + if (aa == null) { + AvatarError error = new AvatarError(avspec); + error.block = block; + error.firstAvatarElement = aaos; + error.error = 17; + errors.add(error); + } else { + // We check the type of the two is equivalent + if (aa.getType() != param.getType()) { + AvatarError error = new AvatarError(avspec); + error.block = block; + error.firstAvatarElement = aaos; + error.error = 17; + errors.add(error); + } + } + } else { + // int or boot expr + if (param.getType() == AvatarType.INTEGER) { + AvatarIBSExpressions.IExpr e1 = AvatarIBSolver.parseInt(block,value); + if (e1 == null) { + AvatarError error = new AvatarError(avspec); + error.block = block; + error.firstAvatarElement = aaos; + error.error = 19; + errors.add(error); + } + } else if (param.getType() == AvatarType.BOOLEAN) { + IBSExpressions.BExpr e1 = AvatarIBSolver.parseBool(block,value); + if (e1 == null) { + AvatarError error = new AvatarError(avspec); + error.block = block; + error.firstAvatarElement = aaos; + error.error = 20; + errors.add(error); + } + } else { + AvatarError error = new AvatarError(avspec); + error.block = block; + error.firstAvatarElement = aaos; + error.error = 18; + errors.add(error); + } + } + + + } + } + } + } + } + + } + return errors; + } + + public static ArrayList<AvatarError> checkActions(AvatarSpecification avspec) { + ArrayList<AvatarError> errors = new ArrayList<>(); + + for (AvatarBlock block : avspec.getListOfBlocks()) { + AvatarStateMachine asm = block.getStateMachine(); + if (asm != null) { + for (AvatarStateMachineElement asme : asm.getListOfElements()) { + if (asme instanceof AvatarTransition) { + + } + } + } + } + return errors; + } + public static int isAValidGuard(AvatarSpecification _as, AvatarStateMachineOwner _ab, String _guard) { //TraceManager.addDev("Evaluating (non modified) guard:" + _guard); diff --git a/src/main/java/avatartranslator/toproverif/AVATAR2ProVerif.java b/src/main/java/avatartranslator/toproverif/AVATAR2ProVerif.java index 9ce51e4947c1d86bcaf9eead69497bd5705eb06b..bf910bbedafbfee390b75e7b0c8400817352a8b1 100755 --- a/src/main/java/avatartranslator/toproverif/AVATAR2ProVerif.java +++ b/src/main/java/avatartranslator/toproverif/AVATAR2ProVerif.java @@ -117,6 +117,9 @@ public class AVATAR2ProVerif implements AvatarTranslator { private LinkedList<CheckingError> warnings; public AVATAR2ProVerif(AvatarSpecification _avspec) { + + TraceManager.addDev("BEFORE Translating spec:\n" + _avspec.toString() + "\n\n"); + this.avspec = _avspec; this.spec = null; } @@ -135,9 +138,11 @@ public class AVATAR2ProVerif implements AvatarTranslator { } protected static String translateTerm(AvatarTerm term, LinkedHashMap<AvatarAttribute, Integer> attributeCmp) { + + if (term instanceof AvatarAttribute) { AvatarAttribute attr = (AvatarAttribute) term; - + //TraceManager.addDev("Attribute:" + attr.toString()); if (attributeCmp != null) { //TraceManager.addDev("Make Attr name 1"); return AVATAR2ProVerif.makeAttrName(attr.getBlock().getName(), attr.getName(), attributeCmp.get(attr).toString()); @@ -451,6 +456,8 @@ public class AVATAR2ProVerif implements AvatarTranslator { this.avspec.removeTimers(); + TraceManager.addDev("AFTER Translating spec:\n" + this.avspec.toString() + "\n\n"); + // Reset parser AvatarIBSolver.clearAttributes(); @@ -464,7 +471,9 @@ public class AVATAR2ProVerif implements AvatarTranslator { TraceManager.addDev("Make blocks"); this.makeBlocks(allKnowledge); - TraceManager.addDev("Spec generated"); + TraceManager.addDev("Proverif spec generated"); + + return this.spec; } diff --git a/src/main/java/ui/TAttribute.java b/src/main/java/ui/TAttribute.java index e141d62cf184aa2732338c315435697a8038a442..6c379b93cdc1cab57b95b2268673e57d3243083e 100644 --- a/src/main/java/ui/TAttribute.java +++ b/src/main/java/ui/TAttribute.java @@ -39,6 +39,7 @@ package ui; +import avatartranslator.AvatarSpecification; import myutil.NameChecker; import tmltranslator.TMLArchiTextSpecification; import tmltranslator.TMLMappingTextSpecification; @@ -260,7 +261,7 @@ public class TAttribute implements NameChecker.NamedElement, NameChecker.NameSta b1 = (id.substring(0, 1)).matches("[a-zA-Z]"); b2 = id.matches("\\w*"); if (checkKeyword) { - b3 = !RTLOTOSKeyword.isAKeyword(lowerid); + b3 = !RTLOTOSKeyword.isAKeyword(lowerid) && !AvatarSpecification.isAKeyword(lowerid); } else { b3 = true; } diff --git a/src/main/java/ui/TDiagramPanel.java b/src/main/java/ui/TDiagramPanel.java index 1630804faa2827a00df92aca2214ed2e1563a2f7..de1835932f86596a6d9097bacfed3e24bdd637fd 100644 --- a/src/main/java/ui/TDiagramPanel.java +++ b/src/main/java/ui/TDiagramPanel.java @@ -1724,7 +1724,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { gotoReference = new JMenuItem("Go to reference"); gotoReference.addActionListener(menuAL); - showProVerifTrace = new JMenuItem("Show ProVerif Trace"); + showProVerifTrace = new JMenuItem("Show attack trace"); showProVerifTrace.addActionListener(menuAL); search = new JMenuItem("External Search"); diff --git a/src/main/java/ui/util/DefaultText.java b/src/main/java/ui/util/DefaultText.java index 0e625d686ea7b08d325a534420e260e302158093..9d09051f8190aa7293b6b4b0eb91d994defcdd27 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 = "14745"; - public static String DATE = "2024/04/11 03:22:09 CET"; + public static String BUILD = "14757"; + public static String DATE = "2024/04/23 03:22:04 CET"; public static StringBuffer sbAbout = makeAbout();