diff --git a/modeling/AVATAR/CoffeeMachine_Avatar.xml b/modeling/AVATAR/CoffeeMachine_Avatar.xml index 9dc6a280f25704237e6a8bf8ba406adb10be84d4..e25a4c385026aea902f9fe08fca92f319d5fb945 100644 --- a/modeling/AVATAR/CoffeeMachine_Avatar.xml +++ b/modeling/AVATAR/CoffeeMachine_Avatar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<TURTLEGMODELING version="3.0 beta" ANIMATE_INTERACTIVE_SIMULATION="false" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="1" LAST_SELECTED_SUB_TAB="0"> +<TURTLEGMODELING version="3.0 beta" ANIMATE_INTERACTIVE_SIMULATION="false" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="1" LAST_SELECTED_SUB_TAB="4"> <Modeling type="Avatar Requirement" nameTab="AVATAR Requirements" > <AvatarRDPanel name="AVATAR RD" minX="10" maxX="1900" minY="10" maxY="1400" zoom="1.0" > @@ -1459,7 +1459,7 @@ <MainCode value="}"/> <Optimized value="true" /> <considerTimingOperators value="true" /> -<Validated value="" /> +<Validated value="Wallet;CoffeeMachine;CoffeeButton;TeaButton;" /> <Ignored value="" /> <CONNECTOR type="5002" id="771" index="0" uid="f480e606-bbb6-4ab7-8f89-8abb37ff40bb" > @@ -1815,7 +1815,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <infoparam name="connector from start state to Send signal" value="null" /> <TGConnectingPoint num="0" id="962" /> <P1 x="340" y="233" id="1144" /> -<P2 x="353" y="252" id="1133" /> +<P2 x="363" y="255" id="1133" /> <AutomaticDrawing data="true" /> <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="961" index="8" uid="4b47f2ec-3073-4a06-b6e0-da7704454345" > @@ -1919,7 +1919,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Send signal to state0" value="null" /> <TGConnectingPoint num="0" id="983" /> -<P1 x="353" y="282" id="1134" /> +<P1 x="363" y="285" id="1134" /> <P2 x="399" y="352" id="986" /> <AutomaticDrawing data="true" /> <new d="false" /> @@ -2213,7 +2213,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 </COMPONENT> <SUBCOMPONENT type="5103" id="1143" index="12" uid="71f14636-3c96-4e4e-8d0e-c1cd11e52641" > <father id="1218" num="0" /> -<cdparam x="330" y="257" /> +<cdparam x="340" y="260" /> <sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> @@ -4166,7 +4166,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="2276" index="12" uid="c4a6003f-c191-4f16-812f-88460fc99537" > <father id="2278" num="0" /> -<cdparam x="419" y="170" /> +<cdparam x="440" y="147" /> <sizeparam width="50" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> @@ -4201,7 +4201,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <new d="false" /> </CONNECTOR><SUBCOMPONENT type="-1" id="2283" index="13" uid="a9ba3ee4-2310-452a-ac15-378273520860" > <father id="2285" num="0" /> -<cdparam x="148" y="230" /> +<cdparam x="96" y="232" /> <sizeparam width="225" height="62" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> @@ -4275,7 +4275,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 </CONNECTOR><SUBCOMPONENT type="-1" id="2297" index="15" uid="67af2caf-f2db-4b34-b537-438d7b0e3fcc" > <father id="2299" num="0" /> <cdparam x="387" y="89" /> -<sizeparam width="173" height="25" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="173" height="32" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -4296,6 +4296,7 @@ CoffeeMachine.CoffeeDelivered --> CoffeeMachine.nbOfCoins<2 <computeMax value="" enabled="true"/> <probability value="" enabled="true"/> <actions value="contentOfWallet(nbOfCoins)" enabled="true"/> +<actions value="nbOfCoins = 2" enabled="true"/> <userResized /> </extraparam> </SUBCOMPONENT> diff --git a/src/main/java/avatartranslator/AvatarAttribute.java b/src/main/java/avatartranslator/AvatarAttribute.java index 6a04b58bfa7f5ebd494e68e883105952162fcb01..81993dbdc7c8c632450878ac933148fd6d16d4d3 100644 --- a/src/main/java/avatartranslator/AvatarAttribute.java +++ b/src/main/java/avatartranslator/AvatarAttribute.java @@ -211,6 +211,9 @@ public class AvatarAttribute extends AvatarLeftHand implements NameChecker.NameS public AvatarAttribute advancedClone(AvatarStateMachineOwner _block) { AvatarAttribute aa = new AvatarAttribute(getName(), getType(), _block, getReferenceObject()); + if (hasInitialValue()) { + aa.setInitialValue(getInitialValue()); + } aa.setDataType(getDataType()); return aa; diff --git a/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java b/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java index 3610882fe2af2442c1acbc0de7c4994eca22f539..a06dfd34c8ab9a70f16b2f30dd4d6dc0154aca31 100644 --- a/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java +++ b/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java @@ -918,7 +918,7 @@ public class AvatarModelChecker implements Runnable, myutil.Graph { spec.removeEmptyTransitions(!(studyReachability || studyLiveness || studySafety)); } - TraceManager.addDev("\nPreparing Avatar specification :" + spec.toString() + "\n\n"); + //TraceManager.addDev("\nPreparing Avatar specification :" + spec.toString() + "\n\n"); prepareStates();