From 9428cb1ba9c01e221e130afca52c8d93ee858fce Mon Sep 17 00:00:00 2001 From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr> Date: Tue, 25 Nov 2014 13:05:53 +0000 Subject: [PATCH] Update on ref to ads in tmlcp --- executablecode/Makefile.forsoclib | 4 +- executablecode/Makefile.src | 2 +- modeling/CoffeeMachine_Avatar.xml | 333 +++++++------- src/avatartranslator/AvatarElement.java | 190 ++++---- src/avatartranslator/AvatarStateMachine.java | 431 +++++++++++++++--- .../AvatarStateMachineElement.java | 10 +- src/avatartranslator/AvatarStopState.java | 4 +- .../AvatarSimulationBlock.java | 6 +- .../AvatarSimulationPendingTransaction.java | 376 +++++++-------- .../AvatarSimulationTransaction.java | 306 ++++++------- .../toexecutable/TaskFile.java | 2 +- .../AvatarSpecificationSimulationSDPanel.java | 8 + src/ui/tmlcp/TMLCPRefAD.java | 136 +++--- 13 files changed, 1069 insertions(+), 739 deletions(-) diff --git a/executablecode/Makefile.forsoclib b/executablecode/Makefile.forsoclib index 55b471658f..bef60e8437 100644 --- a/executablecode/Makefile.forsoclib +++ b/executablecode/Makefile.forsoclib @@ -39,11 +39,11 @@ updategeneratedcode_hw: cp ~/TTool/executableCode/Makefile.soclib ~/Prog/mutekh/examples/avatar/Makefile -compilesoclib: +compilesoclib_hw: cd ~/Prog/mutekh; make CONF=examples/avatar/config BUILD=soclib-$(MUTEKH_CPU):pf-tutorial #DG 31.10.2014 ici ajoute un make dans le repertoire de la plateforme materielle -runsoclib: +runsoclib_hw: echo "running soclib" cd ~/Prog/soclib/soclib/platform/topcells/caba-vgmn-mutekh_kernel_tutorial; make; SOCLIB_GDB=S ./system.x $(SOCLIB_CPU):$(SOCLIB_CPU_COUNT) ~/Prog/mutekh/avatar-soclib-$(MUTEKH_CPU).out allsoclib: updateruntime updategeneratedcode compilesoclib runsoclib diff --git a/executablecode/Makefile.src b/executablecode/Makefile.src index 39bb232faf..cdf12b5430 100755 --- a/executablecode/Makefile.src +++ b/executablecode/Makefile.src @@ -1 +1 @@ -SRCS = generated_src_soclib/main.c generated_src_soclib/MicroWaveOven.c generated_src_soclib/Door.c generated_src_soclib/Magnetron.c generated_src_soclib/Controller.c generated_src_soclib/ControlPanel.c generated_src_soclib/Bell.c \ No newline at end of file +SRCS = generated_src/main.c generated_src/TestBench.c generated_src/EmergencySimulator.c generated_src/CarPositionSimulator.c generated_src/GPSSensor.c generated_src/RadarSensor.c generated_src/SpeedSensor.c generated_src/Communication.c generated_src/CorrectnessChecking.c generated_src/NeighbourhoodTableManagement.c generated_src/DSRSC_Management.c generated_src/PTC.c generated_src/DrivingPowerReductionStrategy.c generated_src/BCU.c generated_src/BrakeManagement.c generated_src/DangerAvoidanceStrategy.c generated_src/CSCU.c generated_src/VehiculeDynamicsManagement.c generated_src/PlausibilityCheck.c generated_src/ObjectListManagement.c \ No newline at end of file diff --git a/modeling/CoffeeMachine_Avatar.xml b/modeling/CoffeeMachine_Avatar.xml index 6bfb3b82b0..531d0eb50c 100644 --- a/modeling/CoffeeMachine_Avatar.xml +++ b/modeling/CoffeeMachine_Avatar.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<TURTLEGMODELING version="0.93-beta3"> +<TURTLEGMODELING version="0.96-beta1"> <Modeling type="Avatar Requirement" nameTab="AVATAR Requirements" > <AvatarRDPanel name="AVATAR RD" minX="10" maxX="1900" minY="10" maxY="900" zoom="1.0" > <COMPONENT type="5200" id="32" > <cdparam x="661" y="17" /> -<sizeparam width="278" height="120" minWidth="1" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="59" minDesiredHeight="0" /> +<sizeparam width="278" height="120" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="59" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="Requirement" value="req00" /> @@ -58,7 +58,7 @@ <COMPONENT type="5200" id="64" > <cdparam x="47" y="457" /> -<sizeparam width="301" height="120" minWidth="1" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="113" minDesiredHeight="0" /> +<sizeparam width="301" height="120" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="113" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="Requirement" value="Req_Availability" /> @@ -110,7 +110,7 @@ <COMPONENT type="5200" id="96" > <cdparam x="10" y="182" /> -<sizeparam width="150" height="120" minWidth="1" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="136" minDesiredHeight="0" /> +<sizeparam width="150" height="120" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="136" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="Requirement" value="Req_CoffeeMachine" /> @@ -161,7 +161,7 @@ <COMPONENT type="5201" id="112" > <cdparam x="627" y="376" /> -<sizeparam width="171" height="30" minWidth="10" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="158" minDesiredHeight="0" /> +<sizeparam width="171" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="158" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="AvatarProperty" value="BeverageDeliverProperty" /> @@ -184,7 +184,7 @@ <COMPONENT type="5201" id="128" > <cdparam x="580" y="246" /> -<sizeparam width="150" height="30" minWidth="10" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="128" minDesiredHeight="0" /> +<sizeparam width="150" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="128" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="AvatarProperty" value="WalletCoinProperty" /> @@ -207,7 +207,7 @@ <COMPONENT type="5200" id="160" > <cdparam x="234" y="147" /> -<sizeparam width="271" height="104" minWidth="1" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="48" minDesiredHeight="0" /> +<sizeparam width="271" height="104" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="48" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="Requirement" value="req1" /> @@ -259,7 +259,7 @@ <COMPONENT type="5201" id="176" > <cdparam x="582" y="155" /> -<sizeparam width="150" height="30" minWidth="10" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="117" minDesiredHeight="0" /> +<sizeparam width="150" height="30" minWidth="10" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="117" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="AvatarProperty" value="OneCoinProperty" /> @@ -282,7 +282,7 @@ <COMPONENT type="5200" id="208" > <cdparam x="192" y="16" /> -<sizeparam width="304" height="110" minWidth="1" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="48" minDesiredHeight="0" /> +<sizeparam width="304" height="110" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="48" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="Requirement" value="req0" /> @@ -334,7 +334,7 @@ <COMPONENT type="5200" id="240" > <cdparam x="206" y="294" /> -<sizeparam width="357" height="135" minWidth="1" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="48" minDesiredHeight="0" /> +<sizeparam width="357" height="135" minWidth="1" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="48" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1900" minY="10" maxY="900" /> <infoparam name="Requirement" value="req2" /> @@ -487,7 +487,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="259" > <father id="264" num="0" /> <cdparam x="467" y="147" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="point " value="null" /> @@ -495,7 +495,7 @@ <SUBCOMPONENT type="-1" id="260" > <father id="264" num="1" /> <cdparam x="467" y="192" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="point " value="null" /> @@ -530,7 +530,7 @@ </CONNECTOR> <COMPONENT type="5308" id="275" > <cdparam x="446" y="334" /> -<sizeparam width="112" height="55" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="112" height="55" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="TGComponent" value="WalletCoinProperty" /> @@ -546,7 +546,7 @@ <COMPONENT type="5308" id="280" > <cdparam x="340" y="331" /> -<sizeparam width="100" height="55" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="55" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="TGComponent" value="oneCoinProperty" /> @@ -562,7 +562,7 @@ <COMPONENT type="5302" id="293" > <cdparam x="361" y="187" /> -<sizeparam width="59" height="99" minWidth="50" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="59" height="99" minWidth="50" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="TGComponent" value=">50" /> @@ -582,7 +582,7 @@ <COMPONENT type="5300" id="344" > <cdparam x="150" y="142" /> -<sizeparam width="168" height="154" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="168" height="154" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Block0" value="CoffeeMachine" /> @@ -614,7 +614,7 @@ <SUBCOMPONENT type="5304" id="306" > <father id="344" num="0" /> <cdparam x="165" y="241" /> -<sizeparam width="148" height="40" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="148" height="40" minWidth="100" minHeight="0" 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" /> @@ -634,7 +634,7 @@ <SUBCOMPONENT type="5304" id="319" > <father id="344" num="1" /> <cdparam x="170" y="191" /> -<sizeparam width="139" height="40" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="139" height="40" minWidth="100" minHeight="0" 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" /> @@ -654,7 +654,7 @@ <COMPONENT type="5300" id="382" > <cdparam x="459" y="61" /> -<sizeparam width="150" height="116" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="150" height="116" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Block0" value="Wallet" /> @@ -686,7 +686,7 @@ <SUBCOMPONENT type="5303" id="357" > <father id="382" num="0" /> <cdparam x="492" y="102" /> -<sizeparam width="100" height="49" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="49" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="50" minY="0" maxY="67" /> <infoparam name="TGComponent" value="nbOfCoins" /> @@ -709,7 +709,7 @@ <COMPONENT type="5306" id="394" > <cdparam x="467" y="209" /> -<sizeparam width="100" height="49" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="49" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="TGComponent" value="nbOfCoins >= 0" /> @@ -775,7 +775,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="401" > <father id="406" num="0" /> <cdparam x="518" y="154" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="point " value="null" /> @@ -783,7 +783,7 @@ <SUBCOMPONENT type="-1" id="402" > <father id="406" num="1" /> <cdparam x="518" y="305" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="point " value="null" /> @@ -802,7 +802,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="407" > <father id="410" num="0" /> <cdparam x="631" y="310" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="point " value="null" /> @@ -830,7 +830,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="413" > <father id="416" num="0" /> <cdparam x="700" y="158" /> -<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="point " value="null" /> @@ -865,7 +865,7 @@ </CONNECTOR> <COMPONENT type="5308" id="427" > <cdparam x="644" y="417" /> -<sizeparam width="100" height="55" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="55" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="TGComponent" value="prop01" /> @@ -881,7 +881,7 @@ <COMPONENT type="5308" id="432" > <cdparam x="562" y="562" /> -<sizeparam width="146" height="54" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="146" height="54" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="TGComponent" value="BeverageDeliverProperty" /> @@ -897,7 +897,7 @@ <COMPONENT type="5300" id="470" > <cdparam x="372" y="227" /> -<sizeparam width="132" height="153" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="132" height="153" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="Block0" value="CoffeeMachine" /> @@ -929,7 +929,7 @@ <SUBCOMPONENT type="5304" id="445" > <father id="470" num="0" /> <cdparam x="391" y="326" /> -<sizeparam width="100" height="39" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="39" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="32" minY="0" maxY="114" /> <infoparam name="TGComponent" value="beverageReady" /> @@ -949,7 +949,7 @@ <COMPONENT type="5300" id="521" > <cdparam x="563" y="78" /> -<sizeparam width="268" height="115" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="268" height="115" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="Block0" value="Wallet" /> @@ -981,7 +981,7 @@ <SUBCOMPONENT type="5303" id="483" > <father id="521" num="0" /> <cdparam x="721" y="133" /> -<sizeparam width="100" height="50" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="50" minWidth="100" minHeight="0" 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" /> @@ -1004,7 +1004,7 @@ <SUBCOMPONENT type="5304" id="496" > <father id="521" num="1" /> <cdparam x="581" y="125" /> -<sizeparam width="100" height="39" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="39" minWidth="100" minHeight="0" 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" /> @@ -1024,7 +1024,7 @@ <COMPONENT type="5306" id="533" > <cdparam x="675" y="204" /> -<sizeparam width="100" height="50" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="50" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="TGComponent" value="nbOfCoins > 1" /> @@ -1046,7 +1046,7 @@ <COMPONENT type="5302" id="546" > <cdparam x="667" y="285" /> -<sizeparam width="59" height="100" minWidth="50" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="59" height="100" minWidth="50" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="TGComponent" value="=0" /> @@ -1066,7 +1066,7 @@ <COMPONENT type="5301" id="567" > <cdparam x="546" y="285" /> -<sizeparam width="60" height="100" minWidth="50" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="60" height="100" minWidth="50" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="TGComponent" value="<<LS>>" /> @@ -1094,7 +1094,7 @@ <COMPONENT type="5309" id="580" > <cdparam x="594" y="495" /> -<sizeparam width="80" height="40" minWidth="75" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="80" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="TGComponent" value="<=>" /> @@ -1114,7 +1114,7 @@ <COMPONENT type="5308" id="585" > <cdparam x="527" y="416" /> -<sizeparam width="100" height="55" minWidth="100" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="55" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="TGComponent" value="prop02" /> @@ -1138,6 +1138,12 @@ <Modeling type="AVATAR Design" nameTab="AVATAR Design" > <AVATARBlockDiagramPanel name="AVATAR Block Diagram" minX="10" maxX="1400" minY="10" maxY="900" > +<MainCode value="void __user_init() {"/> +<MainCode value="}"/> +<Optimized value="true" /> +<Validated value="Wallet;CoffeeMachine;CoffeeButton;TeaButton;" /> +<Ignored value="" /> + <CONNECTOR type="5002" id="587" > <cdparam x="321" y="567" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> @@ -1184,7 +1190,7 @@ </CONNECTOR> <COMPONENT type="5000" id="616" > <cdparam x="106" y="55" /> -<sizeparam width="200" height="218" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="200" height="218" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Block0" value="Wallet" /> @@ -1213,6 +1219,7 @@ <TGConnectingPoint num="22" id="614" /> <TGConnectingPoint num="23" id="615" /> <extraparam> +<CryptoBlock value="false" /> <Attribute access="0" id="nbOfCoins" value="2" type="8" typeOther="" /> <Attribute access="0" id="x" value="1" type="8" typeOther="" /> <Attribute access="0" id="minUserDelay" value="50" type="8" typeOther="" /> @@ -1225,7 +1232,7 @@ <COMPONENT type="5000" id="691" > <cdparam x="445" y="19" /> -<sizeparam width="461" height="358" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="461" height="358" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Block0" value="CoffeeMachine" /> @@ -1254,6 +1261,7 @@ <TGConnectingPoint num="22" id="689" /> <TGConnectingPoint num="23" id="690" /> <extraparam> +<CryptoBlock value="false" /> <Attribute access="0" id="teaMinDelay" value="3" type="8" typeOther="" /> <Attribute access="0" id="teaMaxDelay" value="8" type="8" typeOther="" /> <Attribute access="0" id="coffeeMinDelay" value="5" type="8" typeOther="" /> @@ -1271,7 +1279,7 @@ <SUBCOMPONENT type="5000" id="641" > <father id="691" num="0" /> <cdparam x="464" y="228" /> -<sizeparam width="190" height="102" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="190" height="102" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="271" minY="0" maxY="256" /> <infoparam name="Block1" value="CoffeeButton" /> @@ -1300,15 +1308,15 @@ <TGConnectingPoint num="22" id="639" /> <TGConnectingPoint num="23" id="640" /> <extraparam> +<CryptoBlock value="false" /> <Attribute access="0" id="mechanicalDelay" value="10" type="8" typeOther="" /> <Signal value="out push()" /> -<Signal value="out push()" /> </extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="5000" id="666" > <father id="691" num="1" /> <cdparam x="695" y="224" /> -<sizeparam width="189" height="102" minWidth="5" minHeight="2" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="189" height="102" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="272" minY="0" maxY="256" /> <infoparam name="Block1" value="TeaButton" /> @@ -1337,6 +1345,7 @@ <TGConnectingPoint num="22" id="664" /> <TGConnectingPoint num="23" id="665" /> <extraparam> +<CryptoBlock value="false" /> <Attribute access="0" id="mechanicalDelay" value="10" type="8" typeOther="" /> <Signal value="out push()" /> </extraparam> @@ -1357,7 +1366,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="696" > <father id="698" num="0" /> <cdparam x="493" y="251" /> -<sizeparam width="161" height="30" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="161" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1373,8 +1382,6 @@ <computeMax value="" /> <actions value="nbOfCoins = nbOfCoins + x" /> <actions value="contentOfWallet(nbOfCoins)" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1389,7 +1396,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="703" > <father id="705" num="0" /> <cdparam x="382" y="205" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1403,8 +1410,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1419,7 +1424,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="710" > <father id="712" num="0" /> <cdparam x="175" y="246" /> -<sizeparam width="205" height="45" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="205" height="45" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1435,8 +1440,6 @@ <computeMax value="" /> <actions value="nbOfCoins = nbOfCoins - x" /> <actions value="contentOfWallet(nbOfCoins)" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1451,7 +1454,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="717" > <father id="719" num="0" /> <cdparam x="220" y="174" /> -<sizeparam width="93" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="93" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1465,8 +1468,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1481,7 +1482,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="724" > <father id="726" num="0" /> <cdparam x="376" y="105" /> -<sizeparam width="156" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="156" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1496,14 +1497,12 @@ <computeMin value="" /> <computeMax value="" /> <actions value="contentOfWallet(nbOfCoins)" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> <COMPONENT type="5103" id="737" > <cdparam x="217" y="206" /> -<sizeparam width="69" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="69" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Send signal" value="putCoin(x)" /> @@ -1521,7 +1520,7 @@ <COMPONENT type="5104" id="748" > <cdparam x="447" y="194" /> -<sizeparam width="76" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="76" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Receive signal" value="getCoin(x)" /> @@ -1539,7 +1538,7 @@ <COMPONENT type="5106" id="789" > <cdparam x="460" y="274" /> -<sizeparam width="50" height="40" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="50" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="main" /> @@ -1583,11 +1582,13 @@ <TGConnectingPoint num="37" id="786" /> <TGConnectingPoint num="38" id="787" /> <TGConnectingPoint num="39" id="788" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="830" > <cdparam x="227" y="300" /> -<sizeparam width="50" height="40" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="50" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="main" /> @@ -1631,11 +1632,13 @@ <TGConnectingPoint num="37" id="827" /> <TGConnectingPoint num="38" id="828" /> <TGConnectingPoint num="39" id="829" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="871" > <cdparam x="345" y="135" /> -<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="main" /> @@ -1679,11 +1682,13 @@ <TGConnectingPoint num="37" id="868" /> <TGConnectingPoint num="38" id="869" /> <TGConnectingPoint num="39" id="870" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5100" id="873" > <cdparam x="363" y="44" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="start state" value="null" /> @@ -1705,7 +1710,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="878" > <father id="880" num="0" /> <cdparam x="691" y="328" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1719,8 +1724,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1729,13 +1732,13 @@ <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="886" /> -<P1 x="435" y="514" id="1285" /> +<P1 x="437" y="525" id="1285" /> <P2 x="323" y="748" id="1146" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="885" > <father id="887" num="0" /> <cdparam x="420" y="552" /> -<sizeparam width="85" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="85" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1750,8 +1753,6 @@ <computeMin value="" /> <computeMax value="" /> <actions value="nbOfCoins = 0" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1760,13 +1761,13 @@ <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="893" /> -<P1 x="319" y="444" id="1234" /> -<P2 x="435" y="484" id="1284" /> +<P1 x="321" y="455" id="1234" /> +<P2 x="437" y="495" id="1284" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="892" > <father id="894" num="0" /> <cdparam x="395" y="448" /> -<sizeparam width="94" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="94" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1780,8 +1781,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1790,13 +1789,13 @@ <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="900" /> -<P1 x="291" y="541" id="1220" /> +<P1 x="293" y="552" id="1220" /> <P2 x="289" y="748" id="1138" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="899" > <father id="901" num="0" /> <cdparam x="284" y="594" /> -<sizeparam width="228" height="45" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="228" height="45" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1812,8 +1811,6 @@ <computeMax value="teaMaxDelay" /> <actions value="nbOfCoins = 0" /> <actions value="beverageReady()" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1822,13 +1819,13 @@ <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="907" /> -<P1 x="286" y="464" id="1245" /> -<P2 x="291" y="511" id="1219" /> +<P1 x="288" y="475" id="1245" /> +<P2 x="293" y="522" id="1219" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="906" > <father id="908" num="0" /> <cdparam x="295" y="505" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1842,8 +1839,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1852,13 +1847,13 @@ <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="914" /> -<P1 x="119" y="541" id="1274" /> +<P1 x="121" y="552" id="1274" /> <P2 x="255" y="748" id="1145" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="913" > <father id="915" num="0" /> <cdparam x="32" y="587" /> -<sizeparam width="262" height="45" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="262" height="45" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1874,8 +1869,6 @@ <computeMax value="coffeeMaxDelay" /> <actions value="nbOfCoins = 0" /> <actions value="beverageReady()" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1884,13 +1877,13 @@ <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="921" /> -<P1 x="220" y="464" id="1244" /> -<P2 x="119" y="511" id="1273" /> +<P1 x="222" y="475" id="1244" /> +<P2 x="121" y="522" id="1273" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="920" > <father id="922" num="0" /> <cdparam x="229" y="505" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1904,8 +1897,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1914,13 +1905,13 @@ <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="928" /> -<P1 x="254" y="408" id="1271" /> -<P2 x="253" y="424" id="1231" /> +<P1 x="256" y="419" id="1271" /> +<P2 x="255" y="435" id="1231" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="927" > <father id="929" num="0" /> <cdparam x="280" y="460" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1934,8 +1925,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1950,7 +1939,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="934" > <father id="936" num="0" /> <cdparam x="707" y="368" /> -<sizeparam width="85" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="85" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1965,8 +1954,6 @@ <computeMin value="" /> <computeMax value="" /> <actions value="nbOfCoins = 0" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -1981,7 +1968,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="941" > <father id="943" num="0" /> <cdparam x="411" y="206" /> -<sizeparam width="94" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="94" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1995,8 +1982,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2006,12 +1991,12 @@ <infoparam name="connector from Send signal to state0" value="null" /> <TGConnectingPoint num="0" id="949" /> <P1 x="277" y="305" id="1002" /> -<P2 x="304" y="359" id="1296" /> +<P2 x="306" y="370" id="1296" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="948" > <father id="950" num="0" /> <cdparam x="243" y="359" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2025,8 +2010,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2041,7 +2024,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="955" > <father id="957" num="0" /> <cdparam x="270" y="264" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2055,8 +2038,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2071,7 +2052,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="962" > <father id="964" num="0" /> <cdparam x="313" y="173" /> -<sizeparam width="161" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="161" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2086,8 +2067,6 @@ <computeMin value="" /> <computeMax value="" /> <actions value="nbOfCoins = nbOfCoins + x" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2102,7 +2081,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="969" > <father id="971" num="0" /> <cdparam x="303" y="143" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2116,8 +2095,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2132,7 +2109,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="976" > <father id="978" num="0" /> <cdparam x="303" y="80" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2146,14 +2123,12 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> <COMPONENT type="5104" id="989" > <cdparam x="242" y="141" /> -<sizeparam width="128" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="128" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="Receive signal" value="getCoin(nbOfCoins)" /> @@ -2171,7 +2146,7 @@ <COMPONENT type="5103" id="1000" > <cdparam x="634" y="321" /> -<sizeparam width="130" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="130" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="Send signal" value="ejectCoin(nbOfCoins)" /> @@ -2189,7 +2164,7 @@ <COMPONENT type="5104" id="1011" > <cdparam x="239" y="280" /> -<sizeparam width="76" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="76" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="Receive signal" value="getCoin(x)" /> @@ -2208,7 +2183,7 @@ <COMPONENT type="5106" id="1052" > <cdparam x="649" y="239" /> -<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="state0" value="ejectState" /> @@ -2252,12 +2227,13 @@ <TGConnectingPoint num="37" id="1049" /> <TGConnectingPoint num="38" id="1050" /> <TGConnectingPoint num="39" id="1051" /> -<invariant /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="1093" > <cdparam x="231" y="188" /> -<sizeparam width="157" height="40" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="157" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="state0" value="WaitingForSecondCoin" /> @@ -2301,11 +2277,13 @@ <TGConnectingPoint num="37" id="1090" /> <TGConnectingPoint num="38" id="1091" /> <TGConnectingPoint num="39" id="1092" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5100" id="1095" > <cdparam x="296" y="20" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="start state" value="null" /> @@ -2314,7 +2292,7 @@ <COMPONENT type="5106" id="1136" > <cdparam x="235" y="63" /> -<sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="state0" value="WaitingForFirstCoin" /> @@ -2358,11 +2336,13 @@ <TGConnectingPoint num="37" id="1133" /> <TGConnectingPoint num="38" id="1134" /> <TGConnectingPoint num="39" id="1135" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="1177" > <cdparam x="221" y="748" /> -<sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="state0" value="WaitingForFirstCoin" /> @@ -2406,11 +2386,13 @@ <TGConnectingPoint num="37" id="1174" /> <TGConnectingPoint num="38" id="1175" /> <TGConnectingPoint num="39" id="1176" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="1218" > <cdparam x="631" y="381" /> -<sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="state0" value="WaitingForFirstCoin" /> @@ -2454,11 +2436,13 @@ <TGConnectingPoint num="37" id="1215" /> <TGConnectingPoint num="38" id="1216" /> <TGConnectingPoint num="39" id="1217" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="1335" > -<cdparam x="16" y="359" /> -<sizeparam width="577" height="354" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="18" y="370" /> +<sizeparam width="577" height="354" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" /> <infoparam name="state0" value="Beverage" /> @@ -2502,12 +2486,13 @@ <TGConnectingPoint num="37" id="1332" /> <TGConnectingPoint num="38" id="1333" /> <TGConnectingPoint num="39" id="1334" /> -<invariant /> +<extraparam> +</extraparam> </COMPONENT> <SUBCOMPONENT type="5104" id="1229" > <father id="1335" num="0" /> -<cdparam x="235" y="516" /> -<sizeparam width="112" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="237" y="527" /> +<sizeparam width="112" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" /> <infoparam name="Send signal" value="pushTeaButton()" /> @@ -2525,8 +2510,8 @@ </SUBCOMPONENT> <SUBCOMPONENT type="5106" id="1270" > <father id="1335" num="1" /> -<cdparam x="187" y="424" /> -<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="189" y="435" /> +<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" /> <infoparam name="state0" value="WaitingForSelection" /> @@ -2570,11 +2555,13 @@ <TGConnectingPoint num="37" id="1267" /> <TGConnectingPoint num="38" id="1268" /> <TGConnectingPoint num="39" id="1269" /> +<extraparam> +</extraparam> </SUBCOMPONENT> <SUBCOMPONENT type="5100" id="1272" > <father id="1335" num="2" /> -<cdparam x="247" y="388" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="249" y="399" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" 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" /> @@ -2582,8 +2569,8 @@ </SUBCOMPONENT> <SUBCOMPONENT type="5104" id="1283" > <father id="1335" num="3" /> -<cdparam x="56" y="516" /> -<sizeparam width="127" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="58" y="527" /> +<sizeparam width="127" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="450" minY="0" maxY="334" /> <infoparam name="Send signal" value="pushCoffeeButton()" /> @@ -2601,8 +2588,8 @@ </SUBCOMPONENT> <SUBCOMPONENT type="5103" id="1294" > <father id="1335" num="4" /> -<cdparam x="370" y="489" /> -<sizeparam width="130" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="372" y="500" /> +<sizeparam width="130" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" /> <infoparam name="Send signal" value="ejectCoin(nbOfCoins)" /> @@ -2634,7 +2621,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="1340" > <father id="1342" num="0" /> <cdparam x="368" y="210" /> -<sizeparam width="135" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="135" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2648,8 +2635,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2664,7 +2649,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="1347" > <father id="1349" num="0" /> <cdparam x="363" y="190" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2678,8 +2663,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2693,8 +2676,8 @@ <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="1354" > <father id="1356" num="0" /> -<cdparam x="384" y="166" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="362" y="141" /> +<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2708,14 +2691,12 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> <COMPONENT type="5103" id="1367" > <cdparam x="340" y="179" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Send signal" value="push()" /> @@ -2733,7 +2714,7 @@ <COMPONENT type="5106" id="1408" > <cdparam x="337" y="257" /> -<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="main" /> @@ -2777,11 +2758,13 @@ <TGConnectingPoint num="37" id="1405" /> <TGConnectingPoint num="38" id="1406" /> <TGConnectingPoint num="39" id="1407" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="1449" > <cdparam x="338" y="120" /> -<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="main" /> @@ -2825,11 +2808,13 @@ <TGConnectingPoint num="37" id="1446" /> <TGConnectingPoint num="38" id="1447" /> <TGConnectingPoint num="39" id="1448" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5100" id="1451" > <cdparam x="355" y="81" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="start state" value="null" /> @@ -2851,7 +2836,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="1456" > <father id="1458" num="0" /> <cdparam x="177" y="239" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2865,8 +2850,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2881,7 +2864,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="1463" > <father id="1465" num="0" /> <cdparam x="322" y="109" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2895,8 +2878,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2911,7 +2892,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="1470" > <father id="1472" num="0" /> <cdparam x="377" y="184" /> -<sizeparam width="10" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2925,8 +2906,6 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> @@ -2941,7 +2920,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="1477" > <father id="1479" num="0" /> <cdparam x="349" y="148" /> -<sizeparam width="135" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="135" height="16" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2955,14 +2934,12 @@ <afterMax value="" /> <computeMin value="" /> <computeMax value="" /> -<filesToIncludeLine value="" /> -<codeToIncludeLine value="" /> </extraparam> </SUBCOMPONENT> <COMPONENT type="5106" id="1520" > <cdparam x="374" y="352" /> -<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="main" /> @@ -3006,11 +2983,13 @@ <TGConnectingPoint num="37" id="1517" /> <TGConnectingPoint num="38" id="1518" /> <TGConnectingPoint num="39" id="1519" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5106" id="1561" > <cdparam x="298" y="88" /> -<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="main" /> @@ -3054,11 +3033,13 @@ <TGConnectingPoint num="37" id="1558" /> <TGConnectingPoint num="38" id="1559" /> <TGConnectingPoint num="39" id="1560" /> +<extraparam> +</extraparam> </COMPONENT> <COMPONENT type="5100" id="1563" > <cdparam x="315" y="49" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="start state" value="null" /> @@ -3067,7 +3048,7 @@ <COMPONENT type="5106" id="1617" > <cdparam x="264" y="174" /> -<sizeparam width="184" height="130" minWidth="40" minHeight="30" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="184" height="130" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="state0" value="state0" /> @@ -3111,11 +3092,13 @@ <TGConnectingPoint num="37" id="1614" /> <TGConnectingPoint num="38" id="1615" /> <TGConnectingPoint num="39" id="1616" /> +<extraparam> +</extraparam> </COMPONENT> <SUBCOMPONENT type="5103" id="1574" > <father id="1617" num="0" /> <cdparam x="330" y="257" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="46" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="138" minY="0" maxY="110" /> <infoparam name="Send signal" value="push()" /> @@ -3133,7 +3116,7 @@ <SUBCOMPONENT type="5100" id="1576" > <father id="1617" num="1" /> <cdparam x="333" y="213" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" 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" /> diff --git a/src/avatartranslator/AvatarElement.java b/src/avatartranslator/AvatarElement.java index bf891280cc..c4ee96209a 100644 --- a/src/avatartranslator/AvatarElement.java +++ b/src/avatartranslator/AvatarElement.java @@ -1,47 +1,47 @@ /**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. - -/** - * Class AvatarElement - * Creation: 20/05/2010 - * @version 1.0 20/05/2010 - * @author Ludovic APVRILLE - * @see - */ + 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. + + /** + * Class AvatarElement + * Creation: 20/05/2010 + * @version 1.0 20/05/2010 + * @author Ludovic APVRILLE + * @see + */ package avatartranslator; @@ -50,61 +50,61 @@ import java.util.*; import myutil.*; public class AvatarElement { - - protected static int ID=0; - - protected String name; - protected Object referenceObject; - protected Vector<Object> otherReferenceObjects; + + protected static int ID=0; + + protected String name; + protected Object referenceObject; + protected Vector<Object> otherReferenceObjects; private int myID; - + public AvatarElement(String _name, Object _referenceObject) { - myID=++ID; - name = _name; - referenceObject = _referenceObject; + myID=++ID; + name = _name; + referenceObject = _referenceObject; + } + + public void addReferenceObject(Object _ref) { + if (otherReferenceObjects == null) { + otherReferenceObjects = new Vector<Object>(); + } + otherReferenceObjects.add(_ref); + } + + public boolean hasReferenceObject(Object _ref) { + if (referenceObject == _ref) { + return true; + } + + if (otherReferenceObjects != null) { + for(Object obj: otherReferenceObjects) { + if (obj == _ref) { + return true; + } + } + } + + return false; + } + + public void setName(String _name) { + name = _name; + } + + public String getName() { + return name; + } + + public Object getReferenceObject() { + return referenceObject; } - - public void addReferenceObject(Object _ref) { - if (otherReferenceObjects == null) { - otherReferenceObjects = new Vector<Object>(); - } - otherReferenceObjects.add(_ref); - } - - public boolean hasReferenceObject(Object _ref) { - if (referenceObject == _ref) { - return true; - } - - if (otherReferenceObjects != null) { - for(Object obj: otherReferenceObjects) { - if (obj == _ref) { - return true; - } - } - } - - return false; - } - - public void setName(String _name) { - name = _name; - } - - public String getName() { - return name; - } - - public Object getReferenceObject() { - return referenceObject; - } - + public int getID(){ - return myID; + return myID; + } + + public static void resetID() { + TraceManager.addDev("Reset AvatarID"); + ID = 0; } - - public static void resetID() { - TraceManager.addDev("Reset AvatarID"); - ID = 0; - } -} \ No newline at end of file +} diff --git a/src/avatartranslator/AvatarStateMachine.java b/src/avatartranslator/AvatarStateMachine.java index 11ab4a7602..b561b93488 100644 --- a/src/avatartranslator/AvatarStateMachine.java +++ b/src/avatartranslator/AvatarStateMachine.java @@ -94,32 +94,103 @@ public class AvatarStateMachine extends AvatarElement { return sb.toString(); } + // Assumes no after clause on composite relation public void removeCompositeStates(AvatarBlock _block) { TraceManager.addDev("\n-------------- Remove composite states ---------------\n"); + LinkedList <AvatarState> lists = removeAllInternalStartStates(); + + AvatarTransition at = getAvatarCompositeTransition(); + + if (at == null) { + return; + } + + // We modify all composite states with intermediate states + + for(int i=0; i<elements.size(); i++) { + AvatarStateMachineElement element = elements.get(i); + if (element instanceof AvatarState) { + modifyStateForCompositeSupport((AvatarState)element); + } + } + + // For each composite transition: Welink it to all the substates of the current state + AvatarState src; + while(((at = getAvatarCompositeTransition()) != null)) { + src = (AvatarState)(getPreviousElementOf(at)); + elements.remove(at); + + // Add a new state after the transition + /*String tmp = findUniqueStateName("forCompositeTransition_state"); + AvatarState as = new AvatarState(tmp, at.getReferenceObject()); + elements.add(as); + AvatarTransition ats = new AvatarTransition("forCompositeTransition_trans", at.getReferenceObject()); + elements.add(ats); + ats.addNext(at.getNext(0)); + at.removeAllNexts(); + at.addNext(as); + as.addNext(ats);*/ + + // Link a clone of the transition to all internal states + + for(int j=0; j<elements.size(); j++) { + AvatarStateMachineElement elt = elements.get(j); + if ((elt instanceof AvatarState) && (elt.hasInUpperState(src))) { + AvatarTransition att = cloneCompositeTransition(at); + elt.addNext(att); + } + } + + } + + } + + public void removeCompositeStatesOld(AvatarBlock _block) { + TraceManager.addDev("\n-------------- Remove composite states ---------------\n"); + // Contains in odd index: composite state // even index: new state replacing the start state LinkedList <AvatarState> lists = removeAllInternalStartStates(); - + ArrayList <AvatarTransition> ats; + ArrayList <AvatarStateMachineElement> toRemove = new ArrayList<AvatarStateMachineElement>(); + ArrayList <AvatarState> states = new ArrayList<AvatarState>(); AvatarTransition at; - at = getCompositeTransition(); - if (at != null) { - TraceManager.addDev("********************************** Found composite transition: " + at.toString()); - // Adding intermediate states in transitions : splitting transitions - } - - LinkedList<AvatarStateMachineElement> toRemove = new LinkedList<AvatarStateMachineElement>(); + //ats = getAllAvatarCompositeTransitions(); - while((at = getCompositeTransition()) != null) { + //at = getCompositeTransition(); + while(((at = getAvatarCompositeTransition()) != null) && (!(toRemove.contains(at)))){ TraceManager.addDev("*********************************** Found composite transition: " + at.toString()); //TraceManager.addDev(_block.toString()); if (!(toRemove.contains(getPreviousElementOf(at)))) { toRemove.add(getPreviousElementOf(at)); } - removeCompositeTransition(at, _block); + toRemove.add(at); + AvatarTransition at2 = removeAfter(at, _block); + AvatarState state = (AvatarState)(getPreviousElementOf(at2)); + + if (!states.contains(state)) { + TraceManager.addDev("Working on internal elements of " + state); + states.add(state); + addFullInternalStates(state, at2); + } + + + for(int i=0; i<elements.size(); i++) { + AvatarStateMachineElement element = elements.get(i); + if (element instanceof AvatarState) { + if (element.hasInUpperState(state) == true) { + AvatarTransition at3 = cloneCompositeTransition(at2); + //addElement(at); + element.addNext(at3); + } + } + } + + //removeCompositeTransition2(at, _block); } @@ -127,61 +198,162 @@ public class AvatarStateMachine extends AvatarElement { removeElement(asme); } + removeAllSuperStates(); + + /*if (at != null) { + TraceManager.addDev("********************************** Found composite transition: " + at.toString()); + // Adding intermediate states in transitions : splitting transitions + } + + LinkedList<AvatarStateMachineElement> toRemove = new LinkedList<AvatarStateMachineElement>(); + + while((at = getCompositeTransition()) != null) { + TraceManager.addDev("*********************************** Found composite transition: " + at.toString()); + //TraceManager.addDev(_block.toString()); + if (!(toRemove.contains(getPreviousElementOf(at)))) { + toRemove.add(getPreviousElementOf(at)); + } + removeCompositeTransition(at, _block); + + }*/ + + + + /*if (ats.size() > 0) { + LinkedList<AvatarStateMachineElement> toRemove = new LinkedList<AvatarStateMachineElement>(); + ArrayList <AvatarTransition> ats2 = new ArrayList <AvatarTransition>(); + ArrayList <AvatarState> states = new ArrayList <AvatarState>(); + for(AvatarTransition at: ats) { + if (!(toRemove.contains(getPreviousElementOf(at)))) { + toRemove.add(getPreviousElementOf(at)); + } + + AvatarState state = (AvatarState)(getPreviousElementOf(_at)); + AvatarTransition at = removeAfter(_at, _block); + // Put state after transition + modifyAvatarTransition(at); + ats2.add(at); + + + } + + + + + //removeStopStatesOf(state); + + // Remove "after" and replace them with timers + + + remove + + removeCompositeTransitions(ats, _block); + + + for(AvatarStateMachineElement asme: toRemove) { + removeElement(asme); + } + }*/ + //TraceManager.addDev(_block.toString()); - removeAllSuperStates(); + } + private void modifyStateForCompositeSupport(AvatarState _state) { + // Each time there is a transition with an after or more than one action, we must rework the transition + // We first gather all transitions internal to that state + Vector <AvatarStateMachineElement> v = new Vector<AvatarStateMachineElement>(); - private AvatarTransition getCompositeTransition() { for(AvatarStateMachineElement element: elements) { if (element instanceof AvatarTransition) { - if ((isACompositeTransition((AvatarTransition)element))) { - return (AvatarTransition)element; + AvatarTransition at = (AvatarTransition)element; + //TraceManager.addDev("at? element=" + element); + // Transition fully in the internal state? + if (element.getNext(0).hasInUpperState(_state) == true) { + AvatarStateMachineElement previous = getPreviousElementOf(element); + if (previous.hasInUpperState(_state) == true) { + if (!(at.isEmpty())) { + v.add(at); + } + } } } } - return null; + for(AvatarStateMachineElement element: v) { + TraceManager.addDev(">" + element + "<"); + splitAvatarTransition((AvatarTransition)element, _state); + } + } - // Checks whether the previous element is a state with an internal state machine - private boolean isACompositeTransition(AvatarTransition _at) { - AvatarStateMachineElement element = getPreviousElementOf(_at); - if (element == null) { - return false; - } - if (!(element instanceof AvatarState)) { - return false; - } - AvatarState state = (AvatarState)element; - return hasInternalComponents(state); + + private void splitAvatarTransition(AvatarTransition _at, AvatarState _currentState) { + if (_at.hasDelay()) { + AvatarStateMachineElement element = getPreviousElementOf(_at); + if (element.hasInUpperState(_currentState) == true) { + if (!(element instanceof AvatarState)) { + // Must add an intermediate state + String tmp = findUniqueStateName("splitstate_after__"); + AvatarState as = new AvatarState(tmp, _currentState.getReferenceObject()); + addElement(as); + as.setHidden(true); + as.setState(_currentState); + AvatarTransition atn = new AvatarTransition("splittransition_after", null); + addElement(atn); + element.removeNext(_at); + element.addNext(atn); + atn.addNext(as); + as.addNext(_at); + splitAvatarTransition(_at, _currentState); + } + } + } else { + + if (_at.getNbOfAction() > 1) { + TraceManager.addDev("New split state"); + String tmp = findUniqueStateName("splitstate_action__"); + AvatarState as = new AvatarState(tmp, null); + as.setHidden(true); + as.setState(_currentState); + AvatarTransition at = (AvatarTransition)(_at.basicCloneMe()); + _at.removeAllActionsButTheFirstOne(); + at.removeFirstAction(); + at.addNext(_at.getNext(0)); + _at.removeAllNexts(); + _at.addNext(as); + as.addNext(at); + addElement(as); + addElement(at); + + splitAvatarTransition(_at, _currentState); + } + } } - private boolean hasInternalComponents(AvatarState _state) { + + + private ArrayList<AvatarTransition> getAllAvatarCompositeTransitions() { + ArrayList <AvatarTransition> ats = new ArrayList<AvatarTransition>(); for(AvatarStateMachineElement element: elements) { - if (element.getState() == _state) { - return true; + if (element instanceof AvatarTransition) { + if ((isACompositeTransition((AvatarTransition)element))) { + ats.add((AvatarTransition)element); + } } } - return false; + return ats; } - private void removeCompositeTransition(AvatarTransition _at, AvatarBlock _block) { - AvatarState state = (AvatarState)(getPreviousElementOf(_at)); - - removeStopStatesOf(state); - // Remove "after" and replace them with timers - AvatarTransition at = removeAfter(_at, _block); - - // Put state after transition - modifyAvatarTransition(at); + private void addFullInternalStates(AvatarState state, AvatarTransition _at) { + // First:split internal transitions Vector <AvatarStateMachineElement> v = new Vector<AvatarStateMachineElement>(); for(AvatarStateMachineElement element: elements) { @@ -209,29 +381,163 @@ public class AvatarStateMachine extends AvatarElement { splitAvatarTransition((AvatarTransition)element, state); } } + } + + private AvatarTransition getAvatarCompositeTransition() { - //TraceManager.addDev("\nAdding new elements in state"); - v.clear(); for(AvatarStateMachineElement element: elements) { - //TraceManager.addDev("\nIs in composite state " + state + ": >" + element + "< ???"); - if (element.hasInUpperState(state) == true) { - // We found a candidate! - if ((element != _at) && (element != at)) { - v.add(element); + if (element instanceof AvatarTransition) { + if ((isACompositeTransition((AvatarTransition)element))) { + return (AvatarTransition)element; + } } } + return null; + } - for(AvatarStateMachineElement element: v) { - adaptCompositeTransition(at, element, 0); + // Checks whether the previous element is a state with an internal state machine + private boolean isACompositeTransition(AvatarTransition _at) { + AvatarStateMachineElement element = getPreviousElementOf(_at); + if (element == null) { + return false; + } + + if (!(element instanceof AvatarState)) { + return false; } - removeElement(at); + AvatarState state = (AvatarState)element; + return hasInternalComponents(state); + } + + private boolean hasInternalComponents(AvatarState _state) { + for(AvatarStateMachineElement element: elements) { + if (element.getState() == _state) { + return true; + } + } + return false; } - private void splitAvatarTransition(AvatarTransition _at, AvatarState _currentState) { + /*private void removeCompositeTransition(AvatarTransition _at, AvatarBlock _block) { + AvatarState state = (AvatarState)(getPreviousElementOf(_at)); + + removeStopStatesOf(state); + + // Remove "after" and replace them with timers + AvatarTransition at = removeAfter(_at, _block); + + // Put state after transition + modifyAvatarTransition(at); + + Vector <AvatarStateMachineElement> v = new Vector<AvatarStateMachineElement>(); + + for(AvatarStateMachineElement element: elements) { + //TraceManager.addDev("\nIs in composite state " + state + ": >" + element + "< ???"); + if (element instanceof AvatarTransition) { + //TraceManager.addDev("at? element=" + element); + if (element.getNext(0).hasInUpperState(state) == true) { + if (getPreviousElementOf(element).hasInUpperState(state) == true) { + v.add(element); + } + } + } else if (element.hasInUpperState(state) == true) { + // We found a candidate! + if (element != _at) { + v.add(element); + } + } + } + + //TraceManager.addDev("*** Analyzing components in state " + state); + // Split avatar transitions + for(AvatarStateMachineElement element: v) { + TraceManager.addDev(">" + element + "<"); + if (element instanceof AvatarTransition) { + splitAvatarTransition((AvatarTransition)element, state); + } + } + + //TraceManager.addDev("\nAdding new elements in state"); + v.clear(); + for(AvatarStateMachineElement element: elements) { + //TraceManager.addDev("\nIs in composite state " + state + ": >" + element + "< ???"); + if (element.hasInUpperState(state) == true) { + // We found a candidate! + if ((element != _at) && (element != at)) { + v.add(element); + } + } + } + + + for(AvatarStateMachineElement element: v) { + adaptCompositeTransition(at, element, 0); + } + + removeElement(at); + + }*/ + + + /*private void removeCompositeTransitions(ArrayList<AvatarTransition> _ats, AvatarBlock _block) { + + + // Put state after transition + modifyAvatarTransition(at); + + Vector <AvatarStateMachineElement> v = new Vector<AvatarStateMachineElement>(); + + for(AvatarStateMachineElement element: elements) { + //TraceManager.addDev("\nIs in composite state " + state + ": >" + element + "< ???"); + if (element instanceof AvatarTransition) { + //TraceManager.addDev("at? element=" + element); + if (element.getNext(0).hasInUpperState(state) == true) { + if (getPreviousElementOf(element).hasInUpperState(state) == true) { + v.add(element); + } + } + } else if (element.hasInUpperState(state) == true) { + // We found a candidate! + if (element != _at) { + v.add(element); + } + } + } + + //TraceManager.addDev("*** Analyzing components in state " + state); + // Split avatar transitions + for(AvatarStateMachineElement element: v) { + TraceManager.addDev(">" + element + "<"); + if (element instanceof AvatarTransition) { + splitAvatarTransition((AvatarTransition)element, state); + } + } + + //TraceManager.addDev("\nAdding new elements in state"); + v.clear(); + for(AvatarStateMachineElement element: elements) { + //TraceManager.addDev("\nIs in composite state " + state + ": >" + element + "< ???"); + if (element.hasInUpperState(state) == true) { + // We found a candidate! + if ((element != _at) && (element != at)) { + v.add(element); + } + } + } + + for(AvatarStateMachineElement element: v) { + adaptCompositeTransition(at, element, 0); + } + + removeElement(at); + + }*/ + + private void splitAvatarTransitionOld(AvatarTransition _at, AvatarState _currentState) { /*if (_at.hasCompute()) { AvatarState as0 = new AvatarState("splitstate0", null); AvatarState as1 = new AvatarState("splitstate1", null); @@ -264,8 +570,29 @@ public class AvatarStateMachine extends AvatarElement { addElement(as); addElement(at); - splitAvatarTransition(at, _currentState); - } + splitAvatarTransition(_at, _currentState); + } + + if (_at.hasDelay()) { + AvatarStateMachineElement element = getPreviousElementOf(_at); + if (element.hasInUpperState(_currentState) == true) { + if (!(element instanceof AvatarState)) { + // Must add an intermediate state + String tmp = findUniqueStateName("internalstate__"); + AvatarState as = new AvatarState(tmp, _currentState.getReferenceObject()); + addElement(as); + as.setHidden(true); + as.setState(_currentState); + AvatarTransition atn = new AvatarTransition("internaltransition", null); + addElement(atn); + element.removeNext(_at); + element.addNext(atn); + atn.addNext(as); + as.addNext(_at); + splitAvatarTransition(_at, _currentState); + } + } + } } private void adaptCompositeTransition(AvatarTransition _at, AvatarStateMachineElement _element, int _transitionID) { diff --git a/src/avatartranslator/AvatarStateMachineElement.java b/src/avatartranslator/AvatarStateMachineElement.java index 243e78c102..c85ac80acd 100644 --- a/src/avatartranslator/AvatarStateMachineElement.java +++ b/src/avatartranslator/AvatarStateMachineElement.java @@ -78,7 +78,9 @@ public abstract class AvatarStateMachineElement extends AvatarElement { } public void addNext(AvatarStateMachineElement _element) { - nexts.add(_element); + if (_element != null) { + nexts.add(_element); + } } public AvatarStateMachineElement getNext(int _index) { @@ -147,8 +149,10 @@ public abstract class AvatarStateMachineElement extends AvatarElement { ret += "nexts= "; int cpt=0; for(AvatarStateMachineElement element: nexts) { - ret += cpt + ":" + element.getName() + "/ ID=" + element.getID() + " "; - cpt ++; + if (element != null) { + ret += cpt + ":" + element.getName() + "/ ID=" + element.getID() + " "; + cpt ++; + } } ret += specificToString(); diff --git a/src/avatartranslator/AvatarStopState.java b/src/avatartranslator/AvatarStopState.java index e2f23055f5..c05e03f72c 100644 --- a/src/avatartranslator/AvatarStopState.java +++ b/src/avatartranslator/AvatarStopState.java @@ -56,11 +56,11 @@ public class AvatarStopState extends AvatarStateMachineElement { } public AvatarStateMachineElement basicCloneMe() { - return new AvatarStartState(getName(), getReferenceObject()); + return new AvatarStopState(getName(), getReferenceObject()); } public String getNiceName() { return "Stop state"; } -} \ No newline at end of file +} diff --git a/src/avatartranslator/directsimulation/AvatarSimulationBlock.java b/src/avatartranslator/directsimulation/AvatarSimulationBlock.java index e1970e4b80..7260d21121 100644 --- a/src/avatartranslator/directsimulation/AvatarSimulationBlock.java +++ b/src/avatartranslator/directsimulation/AvatarSimulationBlock.java @@ -164,6 +164,10 @@ public class AvatarSimulationBlock { boolean guardOk; for(int i=0; i<lastTransaction.executedElement.nbOfNexts(); i++) { asme = lastTransaction.executedElement.getNext(i); + + if (asme == null) { + TraceManager.addDev("Null element after: " + lastTransaction.executedElement.toString()); + } guardOk = true; // Guard on transition ? -> must evaluate the guard! if (asme instanceof AvatarTransition) { @@ -686,4 +690,4 @@ public class AvatarSimulationBlock { //TraceManager.addDev("Result of " + _expr + " = " + result); return result; } -} \ No newline at end of file +} diff --git a/src/avatartranslator/directsimulation/AvatarSimulationPendingTransaction.java b/src/avatartranslator/directsimulation/AvatarSimulationPendingTransaction.java index 7b499f01e6..50e856228a 100644 --- a/src/avatartranslator/directsimulation/AvatarSimulationPendingTransaction.java +++ b/src/avatartranslator/directsimulation/AvatarSimulationPendingTransaction.java @@ -1,48 +1,48 @@ /**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. - -/** - * Class AvatarSimulationPendingTransaction - * Avatar: notion of pending transaction in simulation - * Creation: 11/01/2011 - * @version 1.0 11/01/2011 - * @author Ludovic APVRILLE - * @see - */ + 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. + + /** + * Class AvatarSimulationPendingTransaction + * Avatar: notion of pending transaction in simulation + * Creation: 11/01/2011 + * @version 1.0 11/01/2011 + * @author Ludovic APVRILLE + * @see + */ package avatartranslator.directsimulation; @@ -55,142 +55,146 @@ import myutil.*; public class AvatarSimulationPendingTransaction { - - public AvatarSimulationBlock asb; + + public AvatarSimulationBlock asb; public AvatarStateMachineElement previouslyExecutedElement; - public AvatarStateMachineElement elementToExecute; - public AvatarStateMachineElement involvedElement; //(transition) - public AvatarSimulationPendingTransaction linkedTransaction; - public Vector<AvatarSimulationPendingTransaction> linkedTransactions; // Used for broadcast - public AvatarSimulationAsynchronousTransaction linkedAsynchronousMessage; - public long clockValue; - public boolean isSynchronous; - public boolean isSending; - public Vector<String> parameters; - - // To store a delay prior to execution - public int myMinDelay; - public int myMaxDelay; - public boolean hasDelay; - // For time already elapsed for that transition - public boolean hasElapsedTime; - public int elapsedTime; - - // To store a computed delay - public int myMinDuration; // computed min delay by simulator - public int myMaxDuration; // computed max delay by simulator - public int selectedDuration; // duration selected by simulator - public long maxDuration; // max duration selected by simulator - public boolean hasClock; // Selected by simulator to indicate a delay on that transaction - public boolean durationSelected; - public long clockValueAtEnd; - - // if linked duration - public boolean durationOnCurrent; - public boolean durationOnOther; - - // silent - public boolean isSilent; - - // broadcast - public boolean isBroadcast; - - // Lost - public boolean isLost; - - - + public AvatarStateMachineElement elementToExecute; + public AvatarStateMachineElement involvedElement; //(transition) + public AvatarSimulationPendingTransaction linkedTransaction; + public Vector<AvatarSimulationPendingTransaction> linkedTransactions; // Used for broadcast + public AvatarSimulationAsynchronousTransaction linkedAsynchronousMessage; + public long clockValue; + public boolean isSynchronous; + public boolean isSending; + public Vector<String> parameters; + + // To store a delay prior to execution + public int myMinDelay; + public int myMaxDelay; + public boolean hasDelay; + // For time already elapsed for that transition + public boolean hasElapsedTime; + public int elapsedTime; + + // To store a computed delay + public int myMinDuration; // computed min delay by simulator + public int myMaxDuration; // computed max delay by simulator + public int selectedDuration; // duration selected by simulator + public long maxDuration; // max duration selected by simulator + public boolean hasClock; // Selected by simulator to indicate a delay on that transaction + public boolean durationSelected; + public long clockValueAtEnd; + + // if linked duration + public boolean durationOnCurrent; + public boolean durationOnOther; + + // silent + public boolean isSilent; + + // broadcast + public boolean isBroadcast; + + // Lost + public boolean isLost; + + + public AvatarSimulationPendingTransaction() { - hasClock = false; - hasElapsedTime = false; - hasDelay = false; - isBroadcast = false; + hasClock = false; + hasElapsedTime = false; + hasDelay = false; + isBroadcast = false; + } + + public AvatarSimulationPendingTransaction cloneMe() { + + AvatarSimulationPendingTransaction aspt = new AvatarSimulationPendingTransaction(); + aspt.asb = this.asb; + aspt.elementToExecute = this.elementToExecute; + aspt.previouslyExecutedElement = this.previouslyExecutedElement; + aspt.involvedElement = this.involvedElement; + aspt.linkedTransaction = this.linkedTransaction; + aspt.linkedAsynchronousMessage = this.linkedAsynchronousMessage; + aspt.clockValue = this.clockValue; + + aspt.myMinDelay = this.myMinDelay; + aspt.myMaxDelay = this.myMaxDelay; + aspt.hasDelay = this.hasDelay; + aspt.hasElapsedTime = this.hasElapsedTime; + aspt.elapsedTime = this.elapsedTime; + aspt.myMinDuration = this.myMinDuration; + aspt.myMaxDuration = this.myMaxDuration; + aspt.selectedDuration = this.selectedDuration; + aspt.maxDuration = this.maxDuration; + aspt.hasClock = this.hasClock; + aspt.isBroadcast = this.isBroadcast; + + return aspt; } - - public AvatarSimulationPendingTransaction cloneMe() { - - AvatarSimulationPendingTransaction aspt = new AvatarSimulationPendingTransaction(); - aspt.asb = this.asb; - aspt.elementToExecute = this.elementToExecute; - aspt.previouslyExecutedElement = this.previouslyExecutedElement; - aspt.involvedElement = this.involvedElement; - aspt.linkedTransaction = this.linkedTransaction; - aspt.linkedAsynchronousMessage = this.linkedAsynchronousMessage; - aspt.clockValue = this.clockValue; - - aspt.myMinDelay = this.myMinDelay; - aspt.myMaxDelay = this.myMaxDelay; - aspt.hasDelay = this.hasDelay; - aspt.hasElapsedTime = this.hasElapsedTime; - aspt.elapsedTime = this.elapsedTime; - aspt.myMinDuration = this.myMinDuration; - aspt.myMaxDuration = this.myMaxDuration; - aspt.selectedDuration = this.selectedDuration; - aspt.maxDuration = this.maxDuration; - aspt.hasClock = this.hasClock; - aspt.isBroadcast = this.isBroadcast; - - return aspt; - } - - public AvatarSimulationPendingTransaction fullCloneMe() { - - AvatarSimulationPendingTransaction aspt = cloneMe(); - if (linkedTransactions != null) { - aspt.linkedTransactions = new Vector<AvatarSimulationPendingTransaction>(); - for(AvatarSimulationPendingTransaction aspt0: linkedTransactions) { - aspt.linkedTransactions.add(aspt0); - } - } - - return aspt; - } - - public boolean hasConfiguredDurationMoreThan0() { - if (linkedTransaction == null) { - if (!hasDelay) { - return false; - } - if (myMinDuration>0) { - return true; - } - return false; - } - - if ((!durationOnCurrent) && (!durationOnOther)) { - return false; - } - - if (myMinDuration >0) { - return true; - } - - return false; - - } - - - - public String toString() { - String res = "in Block " + asb.getName() + ": "; - if (linkedTransactions != null) { - res = res + "broadcast "; - } - if (linkedTransaction == null) { - res = res + elementToExecute.getNiceName() + "/ID=" + elementToExecute.getID(); - if (hasClock) { - if (myMinDuration == maxDuration) { - res += " [Delay: " +myMinDuration + "]"; - } else { - res += " [Delay: between " +myMinDuration + " and " + maxDuration + "]"; - } - } - - } else { - res += "[SYNCHRO]" + elementToExecute.getNiceName() + "/ID=" + elementToExecute.getID(); - res += " | " + linkedTransaction.toString(); - } - + + public AvatarSimulationPendingTransaction fullCloneMe() { + + AvatarSimulationPendingTransaction aspt = cloneMe(); + if (linkedTransactions != null) { + aspt.linkedTransactions = new Vector<AvatarSimulationPendingTransaction>(); + for(AvatarSimulationPendingTransaction aspt0: linkedTransactions) { + aspt.linkedTransactions.add(aspt0); + } + } + + return aspt; + } + + public boolean hasConfiguredDurationMoreThan0() { + if (linkedTransaction == null) { + if (!hasDelay) { + return false; + } + if (myMinDuration>0) { + return true; + } + return false; + } + + if ((!durationOnCurrent) && (!durationOnOther)) { + return false; + } + + if (myMinDuration >0) { + return true; + } + + return false; + + } + + + + public String toString() { + String res = "in Block " + asb.getName() + ": "; + if (linkedTransactions != null) { + res = res + "broadcast "; + } + if (linkedTransaction == null) { + if (elementToExecute == null) { + TraceManager.addDev("Null element to execute"); + } + + res = res + elementToExecute.getNiceName() + "/ID=" + elementToExecute.getID(); + if (hasClock) { + if (myMinDuration == maxDuration) { + res += " [Delay: " +myMinDuration + "]"; + } else { + res += " [Delay: between " +myMinDuration + " and " + maxDuration + "]"; + } + } + + } else { + res += "[SYNCHRO]" + elementToExecute.getNiceName() + "/ID=" + elementToExecute.getID(); + res += " | " + linkedTransaction.toString(); + } + if (linkedTransactions != null) { res += " --to--> ["; int cpt = 0; @@ -204,26 +208,26 @@ public class AvatarSimulationPendingTransaction { } res += "]"; } - - return res; - } - + + return res; + } + public Point hasDuplicatedBlockTransaction() { Vector<AvatarSimulationBlock> blocks = new Vector<AvatarSimulationBlock>(); - + if (linkedTransactions == null) { return null; } - + for(AvatarSimulationPendingTransaction aspt: linkedTransactions) { if (blocks.contains(aspt.asb)) { return new Point(blocks.indexOf(aspt.asb), blocks.size()); } blocks.add(aspt.asb); - + } return null; } - - -} \ No newline at end of file + + +} diff --git a/src/avatartranslator/directsimulation/AvatarSimulationTransaction.java b/src/avatartranslator/directsimulation/AvatarSimulationTransaction.java index 14bf136079..ea3e64b836 100644 --- a/src/avatartranslator/directsimulation/AvatarSimulationTransaction.java +++ b/src/avatartranslator/directsimulation/AvatarSimulationTransaction.java @@ -1,48 +1,48 @@ /**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. - -/** - * Class AvatarSimulationTransaction - * Avatar: notion of transaction in simulation - * Creation: 14/12/2010 - * @version 1.0 14/12/2010 - * @author Ludovic APVRILLE - * @see - */ + 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. + + /** + * Class AvatarSimulationTransaction + * Avatar: notion of transaction in simulation + * Creation: 14/12/2010 + * @version 1.0 14/12/2010 + * @author Ludovic APVRILLE + * @see + */ package avatartranslator.directsimulation; @@ -53,116 +53,116 @@ import avatartranslator.*; import myutil.*; public class AvatarSimulationTransaction { - - public static long ID; - public static Hashtable<AvatarStateMachineElement, Integer> hashOfAllElements; - public static LinkedList<AvatarStateMachineElement> allExecutedElements; - + + public static long ID; + public static Hashtable<AvatarStateMachineElement, Integer> hashOfAllElements; + public static LinkedList<AvatarStateMachineElement> allExecutedElements; + public AvatarBlock block; - public AvatarSimulationBlock asb; - public AvatarStateMachineElement executedElement; - public AvatarStateMachineElement concernedElement; // Used for communication - public AvatarSimulationTransaction linkedTransaction; - public long initialClockValue; - public long duration; - public long clockValueWhenFinished; - public long id; - public long bunchid; - - // Indicates whether the transaction is a silent transaction, or not - // Silent means that the transaction was automatically selecteed by the simulator -> - // not assumed to be part of RG or state comparison computation - public boolean silent; - - - public Vector<String> attributeValues; - public Vector<String> actions; - - public int x,y; // for graphical representation only - public long stamp; - - public AvatarSimulationAsynchronousTransaction sentMessage; - public AvatarSimulationAsynchronousTransaction receivedMessage; - - public boolean isBroadcast; - public boolean isSolo; // Used in broadcast transactions to know whether the signal was forwarded to other elements, or not - public boolean isLost; // Used in lossy channel to know whether the message was lost or not - + public AvatarSimulationBlock asb; + public AvatarStateMachineElement executedElement; + public AvatarStateMachineElement concernedElement; // Used for communication + public AvatarSimulationTransaction linkedTransaction; + public long initialClockValue; + public long duration; + public long clockValueWhenFinished; + public long id; + public long bunchid; + + // Indicates whether the transaction is a silent transaction, or not + // Silent means that the transaction was automatically selecteed by the simulator -> + // not assumed to be part of RG or state comparison computation + public boolean silent; + + + public Vector<String> attributeValues; + public Vector<String> actions; + + public int x,y; // for graphical representation only + public long stamp; + + public AvatarSimulationAsynchronousTransaction sentMessage; + public AvatarSimulationAsynchronousTransaction receivedMessage; + + public boolean isBroadcast; + public boolean isSolo; // Used in broadcast transactions to know whether the signal was forwarded to other elements, or not + public boolean isLost; // Used in lossy channel to know whether the message was lost or not + public AvatarSimulationTransaction(AvatarStateMachineElement _executeElement) { - executedElement = _executeElement; - addExecutedElement(executedElement); - duration = 0; + executedElement = _executeElement; + addExecutedElement(executedElement); + duration = 0; + } + + public static void reinit() { + ID = 0; + allExecutedElements = new LinkedList<AvatarStateMachineElement>(); + hashOfAllElements = new Hashtable<AvatarStateMachineElement, Integer>(); + } + + public static void addExecutedElement(AvatarStateMachineElement _asme) { + if (!allExecutedElements.contains(_asme)) { + allExecutedElements.add(_asme); + } + + Integer val = hashOfAllElements.get(_asme); + if (val == null) { + hashOfAllElements.put(_asme, new Integer(1)); + } else { + hashOfAllElements.put(_asme, new Integer(1+val.intValue())); + } + + } + + public static void removeExecutedElement(AvatarStateMachineElement _asme) { + if (!allExecutedElements.contains(_asme)) { + return ; + } + + Integer val = hashOfAllElements.get(_asme); + if (val == null) { + return ; + } + + hashOfAllElements.put(_asme, new Integer(val.intValue()-1)); + + + } + + public static synchronized long setID() { + long tmp = ID; + ID++; + return tmp; + } + + public static synchronized void setID(long _id) { + ID = _id; + } + + public String toString() { + String res = "" + id + " bunchid:" + bunchid + " @" + clockValueWhenFinished + "/ " + duration + ": " +executedElement + " in block " + block.getName(); + if (silent) { + res += " (silent)"; + } + if (isBroadcast) { + if (isSolo) { + res += " (solo broadcast)"; + } else { + res += " (broadcast)"; + } + } + res += "\nattributes="; + for(String s: attributeValues) { + res += s + " "; + } + if (actions != null) { + int cpt = 0; + res+= "\n"; + for(String action: actions) { + res += "action#" + cpt + ": " + action + " "; + cpt ++; + } + } + return res; } - - public static void reinit() { - ID = 0; - allExecutedElements = new LinkedList<AvatarStateMachineElement>(); - hashOfAllElements = new Hashtable<AvatarStateMachineElement, Integer>(); - } - - public static void addExecutedElement(AvatarStateMachineElement _asme) { - if (!allExecutedElements.contains(_asme)) { - allExecutedElements.add(_asme); - } - - Integer val = hashOfAllElements.get(_asme); - if (val == null) { - hashOfAllElements.put(_asme, new Integer(1)); - } else { - hashOfAllElements.put(_asme, new Integer(1+val.intValue())); - } - - } - - public static void removeExecutedElement(AvatarStateMachineElement _asme) { - if (!allExecutedElements.contains(_asme)) { - return ; - } - - Integer val = hashOfAllElements.get(_asme); - if (val == null) { - return ; - } - - hashOfAllElements.put(_asme, new Integer(val.intValue()-1)); - - - } - - public static synchronized long setID() { - long tmp = ID; - ID++; - return tmp; - } - - public static synchronized void setID(long _id) { - ID = _id; - } - - public String toString() { - String res = "" + id + " bunchid:" + bunchid + " @" + clockValueWhenFinished + "/ " + duration + ": " +executedElement + " in block " + block.getName(); - if (silent) { - res += " (silent)"; - } - if (isBroadcast) { - if (isSolo) { - res += " (solo broadcast)"; - } else { - res += " (broadcast)"; - } - } - res += "\nattributes="; - for(String s: attributeValues) { - res += s + " "; - } - if (actions != null) { - int cpt = 0; - res+= "\n"; - for(String action: actions) { - res += "action#" + cpt + ": " + action + " "; - cpt ++; - } - } - return res; - } -} \ No newline at end of file +} diff --git a/src/avatartranslator/toexecutable/TaskFile.java b/src/avatartranslator/toexecutable/TaskFile.java index 4caba734b6..bff388ea1d 100755 --- a/src/avatartranslator/toexecutable/TaskFile.java +++ b/src/avatartranslator/toexecutable/TaskFile.java @@ -59,7 +59,7 @@ public class TaskFile { private final static String LOCAL_INCLUDE_HEADER = "#include \"request.h\"\n#include \"syncchannel.h\"\n#include \"request_manager.h\"\n#include \"debug.h\"\n#include \"defs.h\"\n#include \"mytimelib.h\"\n#include \"random.h\"\n#include \"tracemanager.h\"\n#include \"main.h\""; private final static String INCLUDE_HEADER_SOCLIB = "#include <stdio.h>\n#include <unistd.h>\n#include <stdlib.h>\n"; - private final static String LOCAL_INCLUDE_HEADER_SOCLIB = "#include \"request.h\"\n#include \"syncchannel.h\"\n#include \"request_manager.h\"\n#include \"debug.h\"\n#include \"defs.h\"\n#include \"mytimelib.h\"\n#include \"random.h\"\n#include \"tracemanager.h\"\n#include \"main.h\"\n#include \"srl.h\"\n#include \"mwmr.h\"\n "; + private final static String LOCAL_INCLUDE_HEADER_SOCLIB = "#include \"request.h\"\n#include \"syncchannel.h\"\n#include \"request_manager.h\"\n#include \"debug.h\"\n#include \"defs.h\"\n#include \"mytimelib.h\"\n#include \"random.h\"\n#include \"tracemanager.h\"\n#include \"main.h\"\n#include \"/Users/ludovicapvrille/Prog/mutekh/libmwmr/include/mwmr/mwmr.h\"\n "; private final static String CR = "\n"; diff --git a/src/ui/avatarinteractivesimulation/AvatarSpecificationSimulationSDPanel.java b/src/ui/avatarinteractivesimulation/AvatarSpecificationSimulationSDPanel.java index c7edef9246..f78ec51442 100644 --- a/src/ui/avatarinteractivesimulation/AvatarSpecificationSimulationSDPanel.java +++ b/src/ui/avatarinteractivesimulation/AvatarSpecificationSimulationSDPanel.java @@ -708,6 +708,9 @@ public class AvatarSpecificationSimulationSDPanel extends JPanel implements Mous g.drawString(timeValue, 10, yMouse+g.getFontMetrics().getHeight()/2); g.drawString(timeValue, maxX-spaceAtEnd + 1, yMouse+g.getFontMetrics().getHeight()/2); + + TraceManager.addDev("yMouse=" + yMouse); + /*if (minIdValueMouse == maxIdValueMouse) { g.drawString("ID: " + minIdValueMouse, 10, yMouse+(g.getFontMetrics().getHeight()/2)+12); } else { @@ -723,6 +726,11 @@ public class AvatarSpecificationSimulationSDPanel extends JPanel implements Mous name = block.getBlock().getName(); w = g.getFontMetrics().stringWidth(name); g.drawString(name, x + ((spaceBetweenLifeLines-w)/2), yMouse - spaceVerticalText); + + + // Write the name of the current state + + // Add the space between lifelines x += spaceBetweenLifeLines; } g.setColor(c); diff --git a/src/ui/tmlcp/TMLCPRefAD.java b/src/ui/tmlcp/TMLCPRefAD.java index 06221f3de0..d2256aa033 100755 --- a/src/ui/tmlcp/TMLCPRefAD.java +++ b/src/ui/tmlcp/TMLCPRefAD.java @@ -60,31 +60,31 @@ public class TMLCPRefAD extends TGCOneLineText { protected int textX = 5; protected int textY = 15; protected int arc = 5; - + public TMLCPRefAD(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); - + width = 30; height = 35; minWidth = 70; - + nbConnectingPoint = 2; connectingPoint = new TGConnectingPoint[2]; connectingPoint[0] = new TGConnectingPointTMLCP(this, 0, -lineLength, true, false, 0.5, 0.0); connectingPoint[1] = new TGConnectingPointTMLCP(this, 0, lineLength, false, true, 0.5, 1.0); - + addTGConnectingPointsComment(); - + moveable = true; editable = true; removable = true; - + value = "Reference to a CP"; name = "ActivityDiagram"; - + myImageIcon = IconManager.imgic400; } - + public void internalDrawing(Graphics g) { //int w2 = g.getFontMetrics().stringWidth("ref"); int w = g.getFontMetrics().stringWidth(value) /*+ w2*/; @@ -94,94 +94,94 @@ public class TMLCPRefAD extends TGCOneLineText { width = w1; //updateConnectingPoints(); } - - Color c = g.getColor(); - g.setColor(ColorManager.IOD_REFERENCE); - g.drawRect(x+1, y+1, width, height); - g.setColor(c); - + + Color c = g.getColor(); + g.setColor(ColorManager.IOD_REFERENCE); + g.drawRect(x+1, y+1, width, height); + g.setColor(c); + g.drawRect(x, y, width, height); - - + + g.drawLine(x+(width/2), y, x+(width/2), y - lineLength); g.drawLine(x+(width/2), y+height, x+(width/2), y + lineLength + height); - + g.drawString(name, x + (width - w) / 2, y + textY + 15); - g.drawString("iod", x+3, y+12); + g.drawString("ad", x+3, y+12); g.drawLine(x, y+15, x+15, y+15); g.drawLine(x+25, y, x+25, y+8); g.drawLine(x+15, y+15, x+25, y+8); - + } - + public TGComponent isOnMe(int _x, int _y) { if (GraphicLib.isInRectangle(_x, _y, x, y, width, height)) { return this; } - - if ((int)(Line2D.ptSegDistSq(x+(width/2), y - lineLength, x+(width/2), y + lineLength + height, _x, _y)) < distanceSelected) { - return this; - } - + + if ((int)(Line2D.ptSegDistSq(x+(width/2), y - lineLength, x+(width/2), y + lineLength + height, _x, _y)) < distanceSelected) { + return this; + } + return null; } - + public String getAction() { return value; } - - + + public int getType() { return TGComponentManager.TMLCP_REF_CP; } - + public void addActionToPopupMenu( JPopupMenu componentMenu, ActionListener menuAL, int x, int y ) { - componentMenu.addSeparator(); - boolean b = ( (TMLCPPanel)tdp ).isTMLCPCreated( name ); - JMenuItem isCPCreated; - - if( b ) { - isCPCreated = new JMenuItem("Open diagram"); - } - else { - isCPCreated = new JMenuItem("Create communication pattern"); - } - - isCPCreated.addActionListener( menuAL ); - componentMenu.add( isCPCreated ); + componentMenu.addSeparator(); + boolean b = ( (TMLCPPanel)tdp ).isTMLCPCreated( name ); + JMenuItem isCPCreated; + + if( b ) { + isCPCreated = new JMenuItem("Open diagram"); + } + else { + isCPCreated = new JMenuItem("Create communication pattern"); + } + + isCPCreated.addActionListener( menuAL ); + componentMenu.add( isCPCreated ); } - + public boolean eventOnPopup( ActionEvent e ) { - boolean b = ( (TMLCPPanel)tdp ).isTMLCPCreated( name ); - if (b) { - ( (TMLCPPanel)tdp ).openTMLCPDiagram( name ); - } - else { - ( (TMLCPPanel)tdp ).createTMLCPDiagram( name ); - } - return true; - } - - public int getDefaultConnector() { - return TGComponentManager.CONNECTOR_TMLCP; + boolean b = ( (TMLCPPanel)tdp ).isTMLCPCreated( name ); + if (b) { + ( (TMLCPPanel)tdp ).openTMLCPDiagram( name ); + } + else { + ( (TMLCPPanel)tdp ).createTMLCPDiagram( name ); + } + return true; } - @Override public boolean editOndoubleClick( JFrame frame ) { - - //System.out.println("Double click"); - String text = "Reference to AD: "; - if( hasFather() ) { - text = getTopLevelName() + " / " + text; + public int getDefaultConnector() { + return TGComponentManager.CONNECTOR_TMLCP; } - String s = (String) JOptionPane.showInputDialog(frame, text, - "Setting Name", JOptionPane.PLAIN_MESSAGE, IconManager.imgic100, null, getName() ); - if( (s != null) && (s.length() > 0) ) { - setName(s); - return true; - } - return false; + + @Override public boolean editOndoubleClick( JFrame frame ) { + + //System.out.println("Double click"); + String text = "Reference to AD: "; + if( hasFather() ) { + text = getTopLevelName() + " / " + text; + } + String s = (String) JOptionPane.showInputDialog(frame, text, + "Setting Name", JOptionPane.PLAIN_MESSAGE, IconManager.imgic100, null, getName() ); + if( (s != null) && (s.length() > 0) ) { + setName(s); + return true; + } + return false; } } -- GitLab