Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath7
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.project28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF17
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/about.html28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/build.properties8
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.pdoc4
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml33
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/resources/fUML_Library.uml914
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java64
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardLibraryRegistry.java131
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardServicesRegistry.java64
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/And.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Implies.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Not.java46
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Or.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToString.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Xor.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Abs.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Add.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Greater.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/GreaterOrEqual.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Lower.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/LowerOrEqual.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Max.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Min.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Minus.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Mod.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Neg.java46
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Times.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToString.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToUnlimitedNatural.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java93
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java121
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListConcat.java44
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListGet.java46
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListSize.java46
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Concat.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Size.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Substring.java54
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Greater.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/GreaterOrEqual.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Lower.java49
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/LowerOrEqual.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Max.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Min.java55
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToString.java50
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java59
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/.classpath8
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/.project28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF36
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/about.html28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/build.properties12
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/ActionActivation.java376
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallActionActivation.java107
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallBehaviorActionActivation.java43
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallOperationActionActivation.java36
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InputPinActivation.java39
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InvocationActionActivation.java17
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/OutputPinActivation.java91
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/PinActivation.java78
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/SendSignalActionActivation.java50
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionActivation.java150
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionEventAccepter.java38
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadExtentActionActivation.java45
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadIsClassifiedObjectActionActivation.java72
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReclassifyObjectActionActivation.java95
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReduceActionActivation.java97
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java41
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartObjectBehaviorActionActivation.java75
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/AddStructuralFeatureValueActionActivation.java123
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearAssociationActionActivation.java41
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearStructuralFeatureActionActivation.java57
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateLinkActionActivation.java85
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateObjectActionActivation.java32
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyLinkActionActivation.java97
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyObjectActionActivation.java101
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/LinkActionActivation.java70
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadLinkActionActivation.java81
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadSelfActionActivation.java35
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadStructuralFeatureActionActivation.java56
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java119
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/StructuralFeatureActionActivation.java78
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java34
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ValueSpecificationActionActivation.java29
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteLinkActionActivation.java17
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteStructuralFeatureActionActivation.java37
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ClauseActivation.java129
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ConditionalNodeActivation.java176
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/LoopNodeActivation.java256
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/StructuredActivityNodeActivation.java211
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/Values.java24
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionActivationGroup.java122
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionNodeActivation.java60
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionRegionActivation.java326
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/TokenSet.java27
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java202
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityExecution.java89
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityFinalNodeActivation.java44
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivation.java353
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivationGroup.java313
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityParameterNodeActivation.java74
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlNodeActivation.java36
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlToken.java40
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java313
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/FlowFinalNodeActivation.java37
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkNodeActivation.java60
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkedToken.java72
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/InitialNodeActivation.java36
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/JoinNodeActivation.java28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/MergeNodeActivation.java17
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectNodeActivation.java130
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectToken.java48
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Offer.java84
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Token.java58
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/BooleanValue.java65
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/CompoundValue.java150
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DataValue.java49
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DispatchStrategy.java36
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/EnumerationValue.java80
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Evaluation.java33
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/ExtensionalValue.java43
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/FeatureValue.java105
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/InstanceValueEvaluation.java110
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/IntegerValue.java98
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Link.java141
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralBooleanEvaluation.java28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralEvaluation.java29
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralIntegerEvaluation.java28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralNullEvaluation.java23
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralRealEvaluation.java28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralStringEvaluation.java28
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralUnlimitedNaturalEvaluation.java29
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Object_.java130
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/PrimitiveValue.java39
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RealValue.java93
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RedefinitionBasedDispatchStrategy.java66
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Reference.java99
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StringValue.java58
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StructuredValue.java95
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/UnlimitedNaturalValue.java69
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Value.java92
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/Execution.java114
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/OpaqueBehaviorExecution.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/ParameterValue.java44
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ArrivalSignal.java17
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ClassifierBehaviorExecution.java86
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/EventAccepter.java21
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/FIFOGetNextEventStrategy.java25
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/GetNextEventStrategy.java26
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ObjectActivation.java187
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/SignalInstance.java47
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ChoiceStrategy.java24
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactory.java179
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactoryL1.java55
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Executor.java74
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/FirstChoiceStrategy.java22
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Locus.java153
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticStrategy.java19
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticVisitor.java27
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL2/ExecutionFactoryL2.java139
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL3/ExecutionFactoryL3.java85
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Semantics.uml12543
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Syntax.uml2916
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.pdoc4
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.xml13
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.library.exsd102
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.services.exsd102
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/Activator.java68
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/FUMLExecutionEngine.java420
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java105
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/Debug.java23
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FumlThread.java45
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/StackFrameManager.java69
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/FUMLPresentationUtils.java53
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityEdgeInstance.java38
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityNodeActivation.java35
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_UMLModelElement.java80
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_for_fUML.java46
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_FeatureValue.java90
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_Value.java64
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_for_fUML.java26
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_ContextObject.java37
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_FeatureValue.java42
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_Value.java36
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractOpaqueBehaviorExecutionRegistry.java74
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractSystemServicesRegistry.java117
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/DefaultSemanticStrategyRegistry.java33
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/IOpaqueBehaviorExecutionRegistry.java23
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISemanticStrategyRegistry.java23
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISystemServicesRegistry.java46
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/SystemServicesRegistryUtils.java47
198 files changed, 29926 insertions, 0 deletions
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.project b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.project
new file mode 100644
index 00000000000..edb97634bb9
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.moka.fuml.standardlibrary</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.settings/org.eclipse.jdt.core.prefs b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..5dd94f03808
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.moka.fuml.standardlibrary;singleton:=true
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.moka.fuml.standardlibrary.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.moka.fuml;bundle-version="0.10.0",
+ org.eclipse.emf.common;bundle-version="2.9.0",
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="0.10.0",
+ org.eclipse.emf;bundle-version="2.6.0",
+ org.eclipse.papyrus.moka;bundle-version="0.10.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/OSGI-INF/l10n/bundle.properties b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..e1eecea3d8a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.moka.fuml.standardlibrary
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Opaque Behavior Executions for fUML Library (Incubation) \ No newline at end of file
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/about.html b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/build.properties b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/build.properties
new file mode 100644
index 00000000000..76fb515e7d5
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ OSGI-INF/l10n/bundle.properties,\
+ OSGI-INF/,\
+ resources/
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.pdoc b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.pdoc
new file mode 100644
index 00000000000..93ce4eeb1f4
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="OpaqueBehaviorExecutions for the standard fUML library">
+ <referent firstName="Arnaud" lastName="Cuccuru" eMail="arnaud.cuccuru@cea.fr" currentCompany="CEA LIST"/>
+</doc:Documentation>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml
new file mode 100644
index 00000000000..2e87f7a08a9
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/plugin.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.moka.fuml.library">
+ <library
+ class="org.eclipse.papyrus.moka.fuml.standardlibrary.StandardLibraryRegistry">
+ </library>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.uml.extensionpoints.UMLLibrary">
+ <library
+ description="Standard fUML Library"
+ name="FoundationalModelLibrary"
+ path="pathmap://PAPYRUS_fUML_LIBRARY/fUML_Library.uml"
+ provider="CEA LIST">
+ </library>
+ </extension>
+ <extension
+ point="org.eclipse.emf.ecore.uri_mapping">
+ <mapping
+ source="pathmap://PAPYRUS_fUML_LIBRARY/"
+ target="platform:/plugin/org.eclipse.papyrus.moka.fuml.standardlibrary/resources/">
+ </mapping>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.moka.fuml.services">
+ <services
+ class="org.eclipse.papyrus.moka.fuml.standardlibrary.StandardServicesRegistry">
+ </services>
+ </extension>
+
+</plugin>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/resources/fUML_Library.uml b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/resources/fUML_Library.uml
new file mode 100644
index 00000000000..752947c97b8
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/resources/fUML_Library.uml
@@ -0,0 +1,914 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_0" name="FoundationalModelLibrary">
+ <packagedElement xmi:type="uml:Package" xmi:id="PrimitiveBehaviors" name="PrimitiveBehaviors">
+ <packageImport xmi:id="PrimitiveBehaviors-_packageImport.0">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="PrimitiveBehaviors-IntegerFunctions" name="IntegerFunctions">
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-ToInteger" name="ToInteger" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ToInteger-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ToInteger-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-IntegerFunctions-ToInteger-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-lt" name="&lt;" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-lt-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-lt-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-lt-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-plus" name="+" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-plus-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-plus-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-plus-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-minus" name="-" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-minus-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-minus-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-minus-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-times" name="*" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-times-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-times-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-times-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-Div" name="Div" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Div-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Div-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Div-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-IntegerFunctions-Div-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-Neg" name="Neg" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Neg-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Neg-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-Mod" name="Mod" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Mod-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Mod-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Mod-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-Max" name="Max" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Max-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Max-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Max-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-Min" name="Min" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Min-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Min-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Min-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-Abs" name="Abs" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Abs-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-Abs-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-gt" name=">" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-gt-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-gt-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-gt-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-le" name="&lt;=" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-le-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-le-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-le-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-ge" name=">=" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ge-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ge-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ge-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-ToString" name="ToString" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ToString-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ToString-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-ToUnlimitedNatural" name="ToUnlimitedNatural" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ToUnlimitedNatural-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-IntegerFunctions-ToUnlimitedNatural-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-IntegerFunctions-ToUnlimitedNatural-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-IntegerFunctions-divide" name="/" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="rimitiveBehaviors-IntegerFunctions-divide-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="rimitiveBehaviors-IntegerFunctions-divide-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="rimitiveBehaviors-IntegerFunctions-divide-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-IntegerFunctions-divide-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="PrimitiveBehaviors-RealFunctions" name="RealFunctions">
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-ToInteger" name="ToInteger" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ToInteger-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ToInteger-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-lt" name="&lt;" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-lt-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-lt-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-lt-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-plus" name="+" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-plus-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-plus-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-plus-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-minus" name="-" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-minus-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-minus-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-minus-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-times" name="*" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-times-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-times-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-times-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-divide" name="/" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-divide-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-divide-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-divide-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-RealFunctions-divide-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-Neg" name="Neg" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Neg-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Neg-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-Max" name="Max" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Max-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Max-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Max-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-Min" name="Min" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Min-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Min-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Min-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-Abs" name="Abs" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Abs-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Abs-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-gt" name=">" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-gt-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-gt-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-gt-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-le" name="&lt;=" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-le-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-le-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-le-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-ge" name=">=" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ge-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ge-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ge-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-ToString" name="ToString" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ToString-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ToString-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-Floor" name="Floor" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Floor-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="_PrimitiveBehaviors-RealFunctions-Floor-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-Floor-Round" name="Round" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Round-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Round-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-Inv" name="Inv" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Inv-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-Inv-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-RealFunctions-ToReal" name="ToReal" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ToReal-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-RealFunctions-ToReal-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-RealFunctions-ToReal-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions" name="UnlimitedNaturalFunctions">
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToUnlimitedNatural" name="ToUnlimitedNatural" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToUnlimitedNatural-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToUnlimitedNatural-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToUnlimitedNatural-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-lt" name="&lt;" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-lt-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-lt-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-lt-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Max" name="Max" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Max-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Max-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Max-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Min" name="Min" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Min-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Min-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-Min-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-gt" name=">" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-gt-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-gt-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-gt-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-le" name="&lt;=" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-le-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-le-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-le-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ge" name=">=" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ge-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ge-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ge-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToString" name="ToString" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToString-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToString-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToInteger" name="ToInteger" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToInteger-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToInteger-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-UnlimitedNaturalFunctions-ToInteger-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="PrimitiveBehaviors-BooleanFunctions" name="BooleanFunctions">
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-BooleanFunctions-ToBoolean" name="ToBoolean" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-ToBoolean-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-ToBoolean-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-BooleanFunctions-ToBoolean-result-_lowerValue"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-BooleanFunctions-ToString" name="ToString" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-ToString-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-ToString-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-BooleanFunctions-Or" name="Or" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Or-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Or-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Or-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-BooleanFunctions-Xor" name="Xor" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Xor-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Xor-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Xor-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-BooleanFunctions-And" name="And" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-And-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-And-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-And-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-BooleanFunctions-Implies" name="Implies" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Implies-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Implies-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Implies-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-BooleanFunctions-Not" name="Not" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Not-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-BooleanFunctions-Not-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="PrimitiveBehaviors-StringFunctions" name="StringFunctions">
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-StringFunctions-Size" name="Size" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Size-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Size-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-StringFunctions-Concat" name="Concat" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Concat-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Concat-y" name="y">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Concat-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-StringFunctions-Substring" name="Substring" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Substring-x" name="x">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Substring-lower" name="lower">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Substring-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-StringFunctions-Substring-result-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-StringFunctions-Substring-upper" name="upper">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="PrimitiveBehaviors-ListFunctions" name="ListFunctions">
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-ListFunctions-ListSize" name="ListSize" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListSize-list" name="list">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-ListFunctions-ListSize-list-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="PrimitiveBehaviors-ListFunctions-ListSize-list-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListSize-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-ListFunctions-ListGet" name="ListGet" isAbstract="true" isReentrant="false">
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListGet-list" name="list">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-ListFunctions-ListGet-list-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="PrimitiveBehaviors-ListFunctions-ListGet-list-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListGet-result" name="result" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-ListFunctions-ListGet-result-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListGet-index" name="index">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </packagedElement>
+ <packagedElement xmi:type="uml:FunctionBehavior" xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat" name="ListConcat" isAbstract="true">
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-list1" name="list1">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-list1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-list1-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-list2" name="list2">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-list2-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-list2-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-result" name="result" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-result-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="PrimitiveBehaviors-ListFunctions-ListConcat-result-_upperValue" value="*"/>
+ </ownedParameter>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="BasicInputOutput" name="BasicInputOutput">
+ <packageImport xmi:id="BasicInputOutput-_packageImport.0" importedPackage="Common"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-Channel" name="Channel" isAbstract="true">
+ <ownedOperation xmi:id="BasicInputOutput-Channel-getName" name="getName" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-Channel-getName-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-Channel-open" name="open" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-Channel-open-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-Channel-open-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-Channel-close" name="close" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-Channel-close-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-Channel-close-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-Channel-isOpen" name="isOpen" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-Channel-isOpen-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-Channel-getStatus" name="getStatus" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-Channel-getStatus-ReturnResult" name="ReturnResult" type="Common-Status" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-InputChannel" name="InputChannel" isAbstract="true">
+ <generalization xmi:id="BasicInputOutput-InputChannel-_generalization.0" general="BasicInputOutput-Channel"/>
+ <ownedOperation xmi:id="BasicInputOutput-InputChannel-hasMore" name="hasMore" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-InputChannel-hasMore-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-InputChannel-read" name="read" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-InputChannel-read-value" name="value" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-InputChannel-read-value-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-InputChannel-read-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-InputChannel-read-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-InputChannel-peek" name="peek" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-InputChannel-peek-value" name="value" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-InputChannel-peek-value-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-InputChannel-peek-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-InputChannel-peek-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-OutputChannel" name="OutputChannel" isAbstract="true">
+ <generalization xmi:id="BasicInputOutput-OutputChannel-_generalization.0" general="BasicInputOutput-Channel"/>
+ <ownedOperation xmi:id="BasicInputOutput-OutputChannel-write" name="write" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-OutputChannel-write-value" name="value"/>
+ <ownedParameter xmi:id="BasicInputOutput-OutputChannel-write-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-OutputChannel-write-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-OutputChannel-isFull" name="isFull" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-OutputChannel-isFull-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-TextInputChannel" name="TextInputChannel" isAbstract="true">
+ <generalization xmi:id="BasicInputOutput-TextInputChannel-_generalization.0" general="BasicInputOutput-InputChannel"/>
+ <ownedOperation xmi:id="BasicInputOutput-TextInputChannel-readCharacter" name="readCharacter">
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readCharacter-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readCharacter-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readCharacter-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readCharacter-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextInputChannel-peekCharacter" name="peekCharacter">
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-peekCharacter-OwnedParameter" name="OwnedParameter" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-peekCharacter-OwnedParameter-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-peekCharacter-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-peekCharacter-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextInputChannel-readLine" name="readLine">
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readLine-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readLine-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readLine-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextInputChannel-readInteger" name="readInteger">
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readInteger-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readInteger-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readInteger-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readInteger-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextInputChannel-readBoolean" name="readBoolean">
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readBoolean-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readBoolean-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readBoolean-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readBoolean-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextInputChannel-readUnlimitedNatural" name="readUnlimitedNatural">
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readUnlimitedNatural-ReturnResult" name="ReturnResult" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readUnlimitedNatural-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextInputChannel-readUnlimitedNatural-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextInputChannel-readUnlimitedNatural-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-TextOutputChannel" name="TextOutputChannel" isAbstract="true">
+ <generalization xmi:id="BasicInputOutput-TextOutputChannel-_generalization.0" general="BasicInputOutput-OutputChannel"/>
+ <ownedOperation xmi:id="BasicInputOutput-TextOutputChannel-writeString" name="writeString">
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeString-value" name="value">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeString-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextOutputChannel-writeString-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextOutputChannel-writeNewLine" name="writeNewLine" isAbstract="true">
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeNewLine-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextOutputChannel-writeNewLine-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextOutputChannel-writeLine" name="writeLine">
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeLine-value" name="value">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeLine-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextOutputChannel-writeLine-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextOutputChannel-writeInteger" name="writeInteger">
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeInteger-value" name="value">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeInteger-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextOutputChannel-writeInteger-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextOutputChannel-writeBoolean" name="writeBoolean">
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeBoolean-value" name="value">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeBoolean-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextOutputChannel-writeBoolean-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-TextOutputChannel-writeUnlimitedNatural" name="writeUnlimitedNatural">
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeUnlimitedNatural-value" name="value">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-TextOutputChannel-writeUnlimitedNatural-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-TextOutputChannel-writeUnlimitedNatural-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-StandardInputChannel" name="StandardInputChannel" isAbstract="true">
+ <generalization xmi:id="BasicInputOutput-StandardInputChannel-_generalization.0" general="BasicInputOutput-TextInputChannel"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-StandardOutputChannel" name="StandardOutputChannel" isAbstract="true">
+ <generalization xmi:id="BasicInputOutput-StandardOutputChannel-_generalization.0" general="BasicInputOutput-TextOutputChannel"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Activity" xmi:id="BasicInputOutput-WriteLine" name="WriteLine" isReentrant="false" node="BasicInputOutput-WriteLine-StandardOutputChannel BasicInputOutput-WriteLine-writeLine BasicInputOutput-WriteLine-value.1 BasicInputOutput-WriteLine-errorStatus.1">
+ <ownedParameter xmi:id="BasicInputOutput-WriteLine-value" name="value">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-WriteLine-errorStatus" name="errorStatus" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="BasicInputOutput-WriteLine-_edge.0" source="BasicInputOutput-WriteLine-StandardOutputChannel-_result" target="BasicInputOutput-WriteLine-writeLine-_target">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="BasicInputOutput-WriteLine-_edge.0-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-_edge.0-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="BasicInputOutput-WriteLine-_edge.1" source="BasicInputOutput-WriteLine-value.1" target="BasicInputOutput-WriteLine-writeLine-value">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="BasicInputOutput-WriteLine-_edge.1-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-_edge.1-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="BasicInputOutput-WriteLine-_edge.2" source="BasicInputOutput-WriteLine-writeLine-errorStatus" target="BasicInputOutput-WriteLine-errorStatus.1">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="BasicInputOutput-WriteLine-_edge.2-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-_edge.2-_weight" value="1"/>
+ </edge>
+ <node xmi:type="uml:ReadExtentAction" xmi:id="BasicInputOutput-WriteLine-StandardOutputChannel" name="StandardOutputChannel" classifier="BasicInputOutput-StandardOutputChannel">
+ <result xmi:id="BasicInputOutput-WriteLine-StandardOutputChannel-_result" outgoing="BasicInputOutput-WriteLine-_edge.0" type="BasicInputOutput-StandardOutputChannel">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-StandardOutputChannel-_result-_upperBound" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-StandardOutputChannel-_result-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="BasicInputOutput-WriteLine-StandardOutputChannel-_result-_upperValue" value="*"/>
+ </result>
+ </node>
+ <node xmi:type="uml:CallOperationAction" xmi:id="BasicInputOutput-WriteLine-writeLine" name="writeLine" operation="BasicInputOutput-TextOutputChannel-writeLine">
+ <argument xmi:id="BasicInputOutput-WriteLine-writeLine-value" name="value" incoming="BasicInputOutput-WriteLine-_edge.1">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-writeLine-value-_upperBound" value="1"/>
+ </argument>
+ <result xmi:id="BasicInputOutput-WriteLine-writeLine-errorStatus" name="errorStatus" outgoing="BasicInputOutput-WriteLine-_edge.2" type="Common-Status">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-writeLine-errorStatus-_upperBound" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-writeLine-errorStatus-_lowerValue"/>
+ </result>
+ <target xmi:id="BasicInputOutput-WriteLine-writeLine-_target" incoming="BasicInputOutput-WriteLine-_edge.0" type="BasicInputOutput-TextOutputChannel">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-writeLine-_target-_upperBound" value="1"/>
+ </target>
+ </node>
+ <node xmi:type="uml:ActivityParameterNode" xmi:id="BasicInputOutput-WriteLine-value.1" name="value" outgoing="BasicInputOutput-WriteLine-_edge.1" parameter="BasicInputOutput-WriteLine-value">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-value.1-_upperBound" value="1"/>
+ </node>
+ <node xmi:type="uml:ActivityParameterNode" xmi:id="BasicInputOutput-WriteLine-errorStatus.1" name="errorStatus" incoming="BasicInputOutput-WriteLine-_edge.2" type="Common-Status" parameter="BasicInputOutput-WriteLine-errorStatus">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-WriteLine-errorStatus.1-_upperBound" value="1"/>
+ </node>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="BasicInputOutput-ActiveChannel" name="ActiveChannel" isAbstract="true" isActive="true">
+ <generalization xmi:id="BasicInputOutput-ActiveChannel-_generalization.0" general="BasicInputOutput-Channel"/>
+ <ownedOperation xmi:id="BasicInputOutput-ActiveChannel-register" name="register">
+ <ownedParameter xmi:id="BasicInputOutput-ActiveChannel-register-listener" name="listener" type="Common-Listener"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="BasicInputOutput-ActiveChannel-unregister" name="unregister">
+ <ownedParameter xmi:id="BasicInputOutput-ActiveChannel-unregister-listener" name="listener" type="Common-Listener"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Activity" xmi:id="BasicInputOutput-ReadLine" name="ReadLine" isReentrant="false" node="BasicInputOutput-ReadLine-StandardInputChannel BasicInputOutput-ReadLine-readLine BasicInputOutput-ReadLine-errorStatus.1 BasicInputOutput-ReadLine-result.1">
+ <ownedParameter xmi:id="BasicInputOutput-ReadLine-errorStatus" name="errorStatus" type="Common-Status" direction="out">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-errorStatus-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="BasicInputOutput-ReadLine-result" name="result" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="BasicInputOutput-ReadLine-_edge.0" source="BasicInputOutput-ReadLine-StandardInputChannel-_result" target="BasicInputOutput-ReadLine-readLine-_target">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="BasicInputOutput-ReadLine-_edge.0-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-_edge.0-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="BasicInputOutput-ReadLine-_edge.1" source="BasicInputOutput-ReadLine-readLine-errorStatus" target="BasicInputOutput-ReadLine-errorStatus.1">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="BasicInputOutput-ReadLine-_edge.1-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-_edge.1-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="BasicInputOutput-ReadLine-_edge.2" source="BasicInputOutput-ReadLine-readLine-_result.0" target="BasicInputOutput-ReadLine-result.1">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="BasicInputOutput-ReadLine-_edge.2-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-_edge.2-_weight" value="1"/>
+ </edge>
+ <node xmi:type="uml:ReadExtentAction" xmi:id="BasicInputOutput-ReadLine-StandardInputChannel" name="StandardInputChannel" classifier="BasicInputOutput-StandardInputChannel">
+ <result xmi:id="BasicInputOutput-ReadLine-StandardInputChannel-_result" outgoing="BasicInputOutput-ReadLine-_edge.0" type="BasicInputOutput-StandardInputChannel">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-StandardInputChannel-_result-_upperBound" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-StandardInputChannel-_result-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="BasicInputOutput-ReadLine-StandardInputChannel-_result-_upperValue" value="*"/>
+ </result>
+ </node>
+ <node xmi:type="uml:CallOperationAction" xmi:id="BasicInputOutput-ReadLine-readLine" name="readLine" operation="BasicInputOutput-TextInputChannel-readLine">
+ <result xmi:id="BasicInputOutput-ReadLine-readLine-_result.0" outgoing="BasicInputOutput-ReadLine-_edge.2">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-readLine-_result.0-_upperBound" value="1"/>
+ </result>
+ <result xmi:id="BasicInputOutput-ReadLine-readLine-errorStatus" name="errorStatus" outgoing="BasicInputOutput-ReadLine-_edge.1" type="Common-Status">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-readLine-errorStatus-_upperBound" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-readLine-errorStatus-_lowerValue"/>
+ </result>
+ <target xmi:id="BasicInputOutput-ReadLine-readLine-_target" incoming="BasicInputOutput-ReadLine-_edge.0" type="BasicInputOutput-TextInputChannel">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-readLine-_target-_upperBound" value="1"/>
+ </target>
+ </node>
+ <node xmi:type="uml:ActivityParameterNode" xmi:id="BasicInputOutput-ReadLine-errorStatus.1" name="errorStatus" incoming="BasicInputOutput-ReadLine-_edge.1" type="Common-Status" parameter="BasicInputOutput-ReadLine-errorStatus">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-errorStatus.1-_upperBound" value="1"/>
+ </node>
+ <node xmi:type="uml:ActivityParameterNode" xmi:id="BasicInputOutput-ReadLine-result.1" name="result" incoming="BasicInputOutput-ReadLine-_edge.2" parameter="BasicInputOutput-ReadLine-result">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="BasicInputOutput-ReadLine-result.1-_upperBound" value="1"/>
+ </node>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Common" name="Common">
+ <packagedElement xmi:type="uml:Signal" xmi:id="Common-Notification" name="Notification">
+ <ownedAttribute xmi:id="Common-Notification-content" name="content" visibility="public">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Common-Notification-content-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Common-Listener" name="Listener" isAbstract="true" isActive="true">
+ <ownedReception xmi:id="Common-Listener-_ownedReception.0" name="Notification" signal="Common-Notification"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="Common-Status" name="Status">
+ <ownedAttribute xmi:id="Common-Status-context" name="context" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Common-Status-code" name="code">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Common-Status-description" name="description">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedAttribute>
+ </packagedElement>
+ </packagedElement>
+</uml:Model>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java
new file mode 100644
index 00000000000..a325c8dbd69
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.moka.fuml.standardlibrary"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardLibraryRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardLibraryRegistry.java
new file mode 100644
index 00000000000..1e33e2d378f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardLibraryRegistry.java
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.registry.AbstractOpaqueBehaviorExecutionRegistry;
+
+
+public class StandardLibraryRegistry extends AbstractOpaqueBehaviorExecutionRegistry {
+
+ protected final static String FUML_LIBRARY_NAME = "FoundationalModelLibrary";
+
+ @Override
+ public void registerOpaqueBehaviorExecutions(Locus locus) {
+ this.locus = locus;
+ this.buildOpaqueBehaviorsMap(FUML_LIBRARY_NAME);
+ // TODO PrimitiveBehaviors package is implemented.
+ // BasicInputOutput is partially implemented
+ // Common needs to be implemented.
+ try {
+ // ////////////////////
+ // Integer functions
+ // Neg
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Neg(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::Neg");
+ // +
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Add(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::+");
+ // -
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Minus(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::-");
+ // *
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Times(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::*");
+ // Abs
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Abs(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::Abs");
+ // Div
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Div(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::Div");
+ // Mod
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Mod(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::Mod");
+ // Max
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Max(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::Max");
+ // Min
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Min(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::Min");
+ // <
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Lower(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::<");
+ // >
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Greater(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::>");
+ // <=
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.LowerOrEqual(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::<=");
+ // >=
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.GreaterOrEqual(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::>=");
+ // ToString
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.ToString(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::ToString");
+ // ToUnlimitedNatural
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.ToUnlimitedNatural(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::ToUnlimitedNatural");
+ // ToInteger
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.ToInteger(), "FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::ToInteger");
+ // '/' is missing TODO
+
+ // ////////////////////
+ // Unlimited natural functions
+ // >
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.Greater(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::>");
+ // >=
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.GreaterOrEqual(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::>=");
+ // <
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.Lower(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::<");
+ // <=
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.LowerOrEqual(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::<=");
+ // Max
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.Max(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::Max");
+ // Min
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.Min(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::Min");
+ // ToInteger
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.ToInteger(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::ToInteger");
+ // ToString
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.ToString(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::ToString");
+ // ToUnlimitedNatural
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural.ToUnlimitedNatural(), "FoundationalModelLibrary::PrimitiveBehaviors::UnlimitedNaturalFunctions::ToUnlimitedNatural");
+
+ // ////////////////////
+ // Boolean functions
+ // Or
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_.Or(), "FoundationalModelLibrary::PrimitiveBehaviors::BooleanFunctions::Or");
+ // Xor
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_.Xor(), "FoundationalModelLibrary::PrimitiveBehaviors::BooleanFunctions::Xor");
+ // And
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_.And(), "FoundationalModelLibrary::PrimitiveBehaviors::BooleanFunctions::And");
+ // Not
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_.Not(), "FoundationalModelLibrary::PrimitiveBehaviors::BooleanFunctions::Not");
+ // Implies
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_.Implies(), "FoundationalModelLibrary::PrimitiveBehaviors::BooleanFunctions::Implies");
+ // ToString
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_.ToString(), "FoundationalModelLibrary::PrimitiveBehaviors::BooleanFunctions::ToString");
+ // ToBoolean
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_.ToBoolean(), "FoundationalModelLibrary::PrimitiveBehaviors::BooleanFunctions::ToBoolean");
+ // ////////////////////
+ // String functions
+ // Concat
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.string.Concat(), "FoundationalModelLibrary::PrimitiveBehaviors::StringFunctions::Concat");
+ // Size
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.string.Size(), "FoundationalModelLibrary::PrimitiveBehaviors::StringFunctions::Size");
+ // Substring
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.string.Substring(), "FoundationalModelLibrary::PrimitiveBehaviors::StringFunctions::Substring");
+ // ////////////////////
+ // List functions
+ // ListSize
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.list.ListSize(), "FoundationalModelLibrary::PrimitiveBehaviors::ListFunctions::ListSize");
+ // ListGet
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.list.ListGet(), "FoundationalModelLibrary::PrimitiveBehaviors::ListFunctions::ListGet");
+ // ListConcat
+ this.registerOpaqueBehaviorExecution(new org.eclipse.papyrus.moka.fuml.standardlibrary.library.list.ListConcat(), "FoundationalModelLibrary::PrimitiveBehaviors::ListFunctions::ListConcat");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void registerOpaqueBehaviorExecution(OpaqueBehaviorExecution behaviorExecution, String behaviorQualifiedName) {
+ behaviorExecution.types.add(this.opaqueBehaviorsMap.get(behaviorQualifiedName));
+ locus.factory.primitiveBehaviorPrototypes.add(behaviorExecution);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardServicesRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardServicesRegistry.java
new file mode 100644
index 00000000000..107652bc43d
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/StandardServicesRegistry.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.fuml.standardlibrary;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.registry.AbstractSystemServicesRegistry;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.library.io.StandardInputChannelImpl;
+import org.eclipse.papyrus.moka.fuml.standardlibrary.library.io.StandardOutputChannelImpl;
+import org.eclipse.uml2.uml.Class;
+
+/**
+ * Registers system services related to the foundational model library.
+ * This includes standard input/ouput channel services
+ *
+ */
+public class StandardServicesRegistry extends AbstractSystemServicesRegistry {
+
+ protected final static String FUML_LIBRARY_NAME = "FoundationalModelLibrary";
+ protected final static String STANDARD_INPUT_CHANNEL_SERVICE_NAME = "FoundationalModelLibrary::BasicInputOutput::StandardInputChannel" ;
+ protected final static String STANDARD_OUTPUT_CHANNEL_SERVICE_NAME = "FoundationalModelLibrary::BasicInputOutput::StandardOutputChannel" ;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.fuml.registry.AbstractSystemServicesRegistry#instantiateServices()
+ */
+ @Override
+ public List<Object_> instantiateServices() {
+ List<String> serviceQualifiedNames = new ArrayList<String>() ;
+ serviceQualifiedNames.add(STANDARD_INPUT_CHANNEL_SERVICE_NAME) ;
+ serviceQualifiedNames.add(STANDARD_OUTPUT_CHANNEL_SERVICE_NAME) ;
+ return this.instantiateServices(FUML_LIBRARY_NAME, serviceQualifiedNames);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.fuml.registry.AbstractSystemServicesRegistry#instantiateService(org.eclipse.uml2.uml.Class)
+ */
+ @Override
+ protected Object_ instantiateService(Class service) {
+ if (service.getQualifiedName().equals(STANDARD_INPUT_CHANNEL_SERVICE_NAME)) {
+ return new StandardInputChannelImpl(service) ;
+ }
+ else if (service.getQualifiedName().equals(STANDARD_OUTPUT_CHANNEL_SERVICE_NAME)) {
+ return new StandardOutputChannelImpl(service) ;
+ }
+ return null;
+ }
+
+
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/And.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/And.java
new file mode 100644
index 00000000000..02eaf8e7868
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/And.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class And extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Boolean x = ((BooleanValue)inputParameters.get(0).values.get(0)).value;
+ Boolean y = ((BooleanValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x && y;
+ result.type = this.locus.factory.getBuiltInType("Boolean"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of And " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new And();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Implies.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Implies.java
new file mode 100644
index 00000000000..29508697cae
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Implies.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Implies extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Boolean x = ((BooleanValue)inputParameters.get(0).values.get(0)).value;
+ Boolean y = ((BooleanValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = (x && !y) ? false : true;
+ result.type = this.locus.factory.getBuiltInType("Boolean"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Implies " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Implies();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Not.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Not.java
new file mode 100644
index 00000000000..74afc711eb0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Not.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Not extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Boolean x = ((BooleanValue)inputParameters.get(0).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = !x;
+ result.type = this.locus.factory.getBuiltInType("Boolean"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Not " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Not();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Or.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Or.java
new file mode 100644
index 00000000000..ab5fc5623ea
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Or.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Or extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Boolean x = ((BooleanValue)inputParameters.get(0).values.get(0)).value;
+ Boolean y = ((BooleanValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x || y;
+ result.type = this.locus.factory.getBuiltInType("Boolean"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Or " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Or();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java
new file mode 100644
index 00000000000..d1757e0c10e
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToBoolean.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToBoolean extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ String x = ((StringValue)inputParameters.get(0).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = new Boolean(x);
+ result.type = this.locus.factory.getBuiltInType("Boolean"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToBoolean " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ToBoolean();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToString.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToString.java
new file mode 100644
index 00000000000..e136b70411c
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/ToString.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToString extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Boolean x = ((BooleanValue)inputParameters.get(0).values.get(0)).value;
+ StringValue result = new StringValue();
+ result.value = x.toString();
+ result.type = this.locus.factory.getBuiltInType("String"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToString " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ToString();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Xor.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Xor.java
new file mode 100644
index 00000000000..31492354ed0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/boolean_/Xor.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.boolean_;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Xor extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Boolean x = ((BooleanValue)inputParameters.get(0).values.get(0)).value;
+ Boolean y = ((BooleanValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x ^ y;
+ result.type = this.locus.factory.getBuiltInType("Boolean"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Xor " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Xor();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Abs.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Abs.java
new file mode 100644
index 00000000000..d1c572e7b08
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Abs.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Abs extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = Math.abs(x);
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Abs " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ // ADDED:
+ return new Abs();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Add.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Add.java
new file mode 100644
index 00000000000..aa31380fcf5
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Add.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Add extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = x + y;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of + " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Add();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div.java
new file mode 100644
index 00000000000..54f53fb1107
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Div.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Div extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = x / y;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Div " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Div();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Greater.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Greater.java
new file mode 100644
index 00000000000..8d03920de62
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Greater.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Greater extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x > y;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of > " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Greater();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/GreaterOrEqual.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/GreaterOrEqual.java
new file mode 100644
index 00000000000..1192f6bdfed
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/GreaterOrEqual.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class GreaterOrEqual extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x >= y;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of >= " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new GreaterOrEqual();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Lower.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Lower.java
new file mode 100644
index 00000000000..2be275a2c88
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Lower.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Lower extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x < y;
+ List<Value> outputs = new ArrayList<Value>();
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of < " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Lower();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/LowerOrEqual.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/LowerOrEqual.java
new file mode 100644
index 00000000000..19f07bcf178
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/LowerOrEqual.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class LowerOrEqual extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x <= y;
+ List<Value> outputs = new ArrayList<Value>();
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of <= " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new LowerOrEqual();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Max.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Max.java
new file mode 100644
index 00000000000..90ff6290be7
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Max.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Max extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = Math.max(x, y);
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Max " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Max();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Min.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Min.java
new file mode 100644
index 00000000000..8fdab6998af
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Min.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Min extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = Math.min(x, y);
+ List<Value> outputs = new ArrayList<Value>();
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Min " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Min();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Minus.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Minus.java
new file mode 100644
index 00000000000..4c3d3fd54d8
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Minus.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Minus extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = x - y;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of - " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ // ADDED:
+ return new Minus();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Mod.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Mod.java
new file mode 100644
index 00000000000..2b76ea081d3
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Mod.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Mod extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = x % y;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Mod " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ // ADDED
+ return new Mod();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Neg.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Neg.java
new file mode 100644
index 00000000000..524b04186e5
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Neg.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Neg extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = -x;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Neg " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Neg();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Times.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Times.java
new file mode 100644
index 00000000000..ac8108769c7
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/Times.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Times extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = x * y;
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of * " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Times();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java
new file mode 100644
index 00000000000..97c505c9238
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToInteger.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToInteger extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ String x = ((StringValue)inputParameters.get(0).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = new Integer(x);
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToInteger " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ // ADDED
+ return new ToInteger();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToString.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToString.java
new file mode 100644
index 00000000000..9a0b997bede
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToString.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToString extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ StringValue result = new StringValue();
+ result.value = x.toString();
+ result.type = this.locus.factory.getBuiltInType("String"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToString " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ // ADDED
+ return new ToString();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToUnlimitedNatural.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToUnlimitedNatural.java
new file mode 100644
index 00000000000..4d06c732a27
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/integer/ToUnlimitedNatural.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToUnlimitedNatural extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((IntegerValue)inputParameters.get(0).values.get(0)).value;
+ UnlimitedNaturalValue result = new UnlimitedNaturalValue();
+ result.value = x;
+ result.type = this.locus.factory.getBuiltInType("UnlimitedNatural"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToUnlimitedNatural " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ToUnlimitedNatural();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java
new file mode 100644
index 00000000000..9d1fb711b12
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardInputChannelImpl.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.io;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.registry.SystemServicesRegistryUtils;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.Operation;
+
+public class StandardInputChannelImpl extends Object_ {
+
+ protected static OpaqueBehavior readLineMethod ;
+ protected static BufferedReader bufferedReader ;
+
+ public StandardInputChannelImpl(Class service) {
+ super() ;
+ this.types.add(service) ;
+ }
+
+ @Override
+ public Execution dispatch(Operation operation) {
+ if (operation.getName().equals("readLine"))
+ return new ReadLineExecution(operation) ;
+ // TODO complete with other operations
+ return null ;
+ }
+
+ protected class ReadLineExecution extends OpaqueBehaviorExecution {
+
+ protected Operation operation ;
+
+ public ReadLineExecution(Operation operation) {
+ this.operation = operation ;
+ }
+
+ @Override
+ public Value new_() {
+ return new ReadLineExecution(operation) ;
+ }
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ // This implementation does not produce errorStatus information.
+ try {
+ if (bufferedReader == null)
+ bufferedReader = new BufferedReader(new InputStreamReader(System.in)) ;
+ String line = bufferedReader.readLine() ;
+ StringValue result = new StringValue() ;
+ result.value = "" + line ;
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of readLine " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Behavior getBehavior() {
+ if (readLineMethod == null) {
+ readLineMethod = SystemServicesRegistryUtils.getInstance().generateOpaqueBehaviorSignature(operation) ;
+ }
+ return readLineMethod ;
+ }
+
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java
new file mode 100644
index 00000000000..709dd08c603
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/io/StandardOutputChannelImpl.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.io;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.registry.SystemServicesRegistryUtils;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.Operation;
+
+public class StandardOutputChannelImpl extends Object_ {
+
+ protected static OpaqueBehavior writeLineMethod ;
+ protected static OpaqueBehavior writeMethod;
+
+ public StandardOutputChannelImpl(Class service) {
+ super() ;
+ this.types.add(service) ;
+ }
+
+ @Override
+ public Execution dispatch(Operation operation) {
+ if (operation.getName().equals("writeLine"))
+ return new WriteLineExecution(operation) ;
+ else if (operation.getName().equals("write"))
+ return new Write(operation) ;
+ // TODO complete with other operations
+ return null ;
+ }
+
+ protected class WriteLineExecution extends OpaqueBehaviorExecution {
+
+ protected Operation operation ;
+
+ public WriteLineExecution(Operation operation) {
+ this.operation = operation ;
+ }
+
+ @Override
+ public Value new_() {
+ return new WriteLineExecution(operation) ;
+ }
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ // Supposed to have only one input argument, corresponding to parameter 'value'
+ try {
+ String message = ((StringValue)inputParameters.get(0).values.get(0)).value;
+ System.out.println(message);
+ // This implementation does not produce errorStatus information.
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of writeLine " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Behavior getBehavior() {
+ if (writeLineMethod == null) {
+ writeLineMethod = SystemServicesRegistryUtils.getInstance().generateOpaqueBehaviorSignature(operation) ;
+ }
+ return writeLineMethod ;
+ }
+
+ }
+
+ protected class Write extends OpaqueBehaviorExecution {
+
+ protected Operation operation ;
+
+ public Write(Operation operation) {
+ this.operation = operation ;
+ }
+
+ @Override
+ public Value new_() {
+ return new Write(operation) ;
+ }
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ // Supposed to have only one input argument, corresponding to parameter 'value'
+ try {
+ String message = inputParameters.get(0).values.get(0).toString();
+ System.out.print(message);
+ // This implementation does not produce errorStatus information.
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of write " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Behavior getBehavior() {
+ if (writeMethod == null) {
+ writeMethod = SystemServicesRegistryUtils.getInstance().generateOpaqueBehaviorSignature(operation) ;
+ }
+ return writeMethod ;
+ }
+
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListConcat.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListConcat.java
new file mode 100644
index 00000000000..1319e36888d
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListConcat.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.list;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ListConcat extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ List<Value> list1 = inputParameters.get(0).values;
+ List<Value> list2 = inputParameters.get(1).values;
+ List<Value> result = new ArrayList<Value>();
+ result.addAll(list1) ;
+ result.addAll(list2) ;
+ outputParameters.get(0).values = result;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ListConcat " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ListConcat();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListGet.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListGet.java
new file mode 100644
index 00000000000..bc9f72a1bfc
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListGet.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.list;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ListGet extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer index = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ List<Value> list = inputParameters.get(0).values; // CORRECTED "get(1)" to "get(0)"
+ List<Value> outputs = new ArrayList<Value>();
+ if (index > 0 && index <= list.size()) { // ADDED if statement
+ outputs.add(list.get(index - 1));
+ }
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ListGet " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ListGet();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListSize.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListSize.java
new file mode 100644
index 00000000000..30738745c9f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/list/ListSize.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.list;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ListSize extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ List<Value> list = inputParameters.get(0).values;
+ IntegerValue result = new IntegerValue();
+ result.value = list.size();
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ListSize " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ListSize();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Concat.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Concat.java
new file mode 100644
index 00000000000..16e655293a7
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Concat.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.string;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Concat extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ String x = ((StringValue)inputParameters.get(0).values.get(0)).value;
+ String y = ((StringValue)inputParameters.get(1).values.get(0)).value;
+ StringValue result = new StringValue();
+ result.value = "" + x + y;
+ result.type = this.locus.factory.getBuiltInType("String"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Concat " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Concat();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Size.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Size.java
new file mode 100644
index 00000000000..e8aceb65221
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Size.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.string;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Size extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ String x = ((StringValue)inputParameters.get(0).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ result.value = x.length();
+ result.type = this.locus.factory.getBuiltInType("Integer"); // ADDED
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Size " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Size();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Substring.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Substring.java
new file mode 100644
index 00000000000..24ee155d79a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/string/Substring.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.string;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Substring extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ String x = ((StringValue)inputParameters.get(0).values.get(0)).value;
+ Integer lower = ((IntegerValue)inputParameters.get(1).values.get(0)).value;
+ Integer upper = ((IntegerValue)inputParameters.get(2).values.get(0)).value;
+
+ // ADDED if statement
+ List<Value> outputs = new ArrayList<Value>();
+ if (lower >= 1 && lower <= x.length() && upper >= 1 && upper <= x.length() && lower <= upper) {
+ StringValue result = new StringValue();
+ result.value = x.substring(lower-1, upper); // CHANGED "lower" to "lower-1"
+ result.type = this.locus.factory.getBuiltInType("String"); // ADDED
+ outputs.add(result);
+ }
+
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Substring " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Substring();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Greater.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Greater.java
new file mode 100644
index 00000000000..6c651efe6f3
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Greater.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Greater extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((UnlimitedNaturalValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = y >= 0 && (x == -1 || x > y) ;
+ result.type = this.locus.factory.getBuiltInType("Boolean");
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of > " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Greater();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/GreaterOrEqual.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/GreaterOrEqual.java
new file mode 100644
index 00000000000..ae7b4d5f6df
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/GreaterOrEqual.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class GreaterOrEqual extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((UnlimitedNaturalValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x == y || x < 0 || y >=0 && x > y ;
+ result.type = this.locus.factory.getBuiltInType("Boolean");
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of >= " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new GreaterOrEqual();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Lower.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Lower.java
new file mode 100644
index 00000000000..0441efc2bb4
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Lower.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Lower extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((UnlimitedNaturalValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x >= 0 && (y < 0 || x < y);
+ List<Value> outputs = new ArrayList<Value>();
+ result.type = this.locus.factory.getBuiltInType("Boolean"); // ADDED
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of < " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Lower();
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/LowerOrEqual.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/LowerOrEqual.java
new file mode 100644
index 00000000000..823042ef446
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/LowerOrEqual.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class LowerOrEqual extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((UnlimitedNaturalValue)inputParameters.get(1).values.get(0)).value;
+ BooleanValue result = new BooleanValue();
+ result.value = x == y || y < 0 || x >= 0 && x < y ;
+ List<Value> outputs = new ArrayList<Value>();
+ result.type = this.locus.factory.getBuiltInType("Boolean");
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of <= " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new LowerOrEqual();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Max.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Max.java
new file mode 100644
index 00000000000..1759911fd2c
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Max.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Max extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((UnlimitedNaturalValue)inputParameters.get(1).values.get(0)).value;
+ UnlimitedNaturalValue result = new UnlimitedNaturalValue();
+ result.value = (x < 0 || y < 0) ? -1 : Math.max(x, y) ;
+ result.type = this.locus.factory.getBuiltInType("UnlimitedNatural") ;
+ List<Value> outputs = new ArrayList<Value>() ;
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Max " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Max();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Min.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Min.java
new file mode 100644
index 00000000000..590f15b2e04
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/Min.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class Min extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ Integer y = ((UnlimitedNaturalValue)inputParameters.get(1).values.get(0)).value;
+ UnlimitedNaturalValue result = new UnlimitedNaturalValue();
+ if (x < 0) {
+ result.value = y ;
+ }
+ else if (y < 0) {
+ result.value = x ;
+ }
+ else {
+ result.value = Math.min(x, y) ;
+ }
+ List<Value> outputs = new ArrayList<Value>();
+ result.type = this.locus.factory.getBuiltInType("UnlimitedNatural");
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of Min " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new Min();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java
new file mode 100644
index 00000000000..79ab93d916b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToInteger.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToInteger extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ IntegerValue result = new IntegerValue();
+ if (x != 1)
+ result.value = new Integer(x);
+ result.type = this.locus.factory.getBuiltInType("Integer");
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToInteger " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ToInteger();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToString.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToString.java
new file mode 100644
index 00000000000..3b42aaa5309
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToString.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToString extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ Integer x = ((UnlimitedNaturalValue)inputParameters.get(0).values.get(0)).value;
+ StringValue result = new StringValue();
+ if (x == -1)
+ result.value = "*" ;
+ else
+ result.value = x.toString();
+ result.type = this.locus.factory.getBuiltInType("String");
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToString " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ToString();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java
new file mode 100644
index 00000000000..f2ceee0e414
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml.standardlibrary/src/org/eclipse/papyrus/moka/fuml/standardlibrary/library/unlimitednatural/ToUnlimitedNatural.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.standardlibrary.library.unlimitednatural;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ToUnlimitedNatural extends OpaqueBehaviorExecution {
+
+ @Override
+ public void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters) {
+ try {
+ String x = ((StringValue)inputParameters.get(0).values.get(0)).value;
+ UnlimitedNaturalValue result = new UnlimitedNaturalValue();
+ Integer value = null ;
+ if (x.equals("*")) {
+ result.value = -1 ;
+ }
+ else {
+ try {
+ value = new Integer(x);
+ }
+ catch (NumberFormatException badFormat) {}
+ if (value != null && value >= 0) {
+ result.value = value ;
+ }
+ }
+ result.type = this.locus.factory.getBuiltInType("UnlimitedNatural");
+ List<Value> outputs = new ArrayList<Value>();
+ outputs.add(result);
+ outputParameters.get(0).values = outputs;
+ } catch (Exception e) {
+ Debug.println("An error occured during the execution of ToUnlimitedNatural " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Value new_() {
+ return new ToUnlimitedNatural();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.classpath b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.classpath
new file mode 100644
index 00000000000..ec07c2d49d9
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.project b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.project
new file mode 100644
index 00000000000..2e1c3b8286b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.moka.fuml</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.settings/org.eclipse.jdt.core.prefs b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..71383e636d5
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.moka.fuml;singleton:=true
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.moka.fuml.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="0.10.0",
+ org.eclipse.emf;bundle-version="2.6.0",
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.moka;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
+ org.eclipse.debug.core;bundle-version="3.8.0",
+ org.eclipse.papyrus.moka.ui;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.moka.fuml;uses:="org.eclipse.ui.plugin,org.osgi.framework",
+ org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions,
+ org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions,
+ org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions,
+ org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities,
+ org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities,
+ org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities,
+ org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel,
+ org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors,
+ org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications,
+ org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1,
+ org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL2,
+ org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL3,
+ org.eclipse.papyrus.moka.fuml.debug,
+ org.eclipse.papyrus.moka.fuml.registry
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %Bundle-Vendor
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/about.html b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/build.properties b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/build.properties
new file mode 100644
index 00000000000..a0d2dc54f65
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/build.properties
@@ -0,0 +1,12 @@
+source.. = src/, generated/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ build.properties,\
+ generated/,\
+ model/,\
+ schema/
+jre.compilation.profile = JavaSE-1.6
+src.includes = about.html
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/ActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/ActionActivation.java
new file mode 100644
index 00000000000..644aa86368d
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/ActionActivation.java
@@ -0,0 +1,376 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ControlToken;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ForkNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ObjectToken;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.ConditionalNode;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LoopNode;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Pin;
+import org.eclipse.uml2.uml.UMLFactory;
+
+public abstract class ActionActivation extends ActivityNodeActivation {
+
+ /*
+ * The activations of the pins owned by the action of this action
+ * activation.
+ */
+ public List<PinActivation> pinActivations = new ArrayList<PinActivation>();
+
+ /*
+ * Whether this action activation is already firing. This attribute is only
+ * used if the action for this action activation has isLocallyReentrant =
+ * false (the default). If isLocallyReentrant=true, then firing always just
+ * remains false.
+ */
+ public Boolean firing;
+
+ public void run() {
+ // Run this action activation and any outoging fork node attached to it.
+ super.run();
+ if(this.outgoingEdges.size() > 0) {
+ this.outgoingEdges.get(0).target.run();
+ }
+ this.firing = false;
+ }
+
+ public List<Token> takeOfferedTokens() {
+ // If the action is not locally reentrant, then mark this activation as
+ // firing.
+ // Take any incoming offers of control tokens, then concurrently fire
+ // all input pin activations.
+ // Note: This is included here to happen in the same isolation scope as
+ // the isReady test.
+ this.firing = !((Action)this.node).isLocallyReentrant();
+ List<Token> offeredTokens = new ArrayList<Token>();
+ List<ActivityEdgeInstance> incomingEdges = this.incomingEdges;
+ for(int i = 0; i < incomingEdges.size(); i++) {
+ ActivityEdgeInstance incomingEdge = incomingEdges.get(i);
+ List<Token> tokens = incomingEdge.takeOfferedTokens();
+ for(int j = 0; j < tokens.size(); j++) {
+ Token token = tokens.get(j);
+ token.withdraw();
+ offeredTokens.add(token);
+ }
+ }
+ Action action = (Action)(this.node);
+ // *** Fire all input pins concurrently. ***
+ List<InputPin> inputPins = getInputs(action); // CHANGED from: action.getInputs();
+ for(Iterator<InputPin> i = inputPins.iterator(); i.hasNext();) {
+ InputPin pin = i.next();
+ PinActivation pinActivation = this.getPinActivation(pin);
+ List<Token> tokens = pinActivation.takeOfferedTokens();
+ pinActivation.fire(tokens);
+ for(int j = 0; j < tokens.size(); j++) {
+ Token token = tokens.get(j);
+ offeredTokens.add(token);
+ }
+ }
+ return offeredTokens;
+ }
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Do the main action behavior then concurrently fire all output pin
+ // activations
+ // and offer a single control token. Then activate the action again,
+ // if it is still ready to fire and has at least one token actually
+ // being
+ // offered to it.
+ do {
+ Debug.println("[fire] Action " + this.node.getName() + "...");
+ Debug.println("[event] Fire activity=" + this.getActivityExecution().getBehavior().getName() + " action=" + this.node.getName());
+ this.doAction();
+ incomingTokens = this.completeAction();
+ } while(incomingTokens.size() > 0);
+ }
+
+ public void terminate() {
+ // Terminate this action activation and any outgoing fork node attached
+ // to it.
+ super.terminate();
+ if(this.outgoingEdges.size() > 0) {
+ this.outgoingEdges.get(0).target.terminate();
+ }
+ }
+
+ public List<Token> completeAction() {
+ // Concurrently fire all output pin activations and offer a single
+ // control token. Then check if the action should fire again
+ // and, if so, return additional incoming tokens for this.
+ this.sendOffers();
+ Debug.println("[fire] Checking if " + this.node.getName() + " should fire again...");
+ _beginIsolation();
+ List<Token> incomingTokens = new ArrayList<Token>();
+ this.firing = false;
+ if(this.isReady()) {
+ incomingTokens = this.takeOfferedTokens();
+ this.firing = this.isFiring() & incomingTokens.size() > 0;
+ }
+ _endIsolation();
+ return incomingTokens;
+ }
+
+ public Boolean isReady() {
+ // In addition to the default condition, check that, if the action has
+ // isLocallyReentrant=false, then the activation is not currently
+ // firing,
+ // and that the sources of all incoming edges (control flows) have
+ // offers and all input pin activations are ready.
+ // [This assumes that all edges directly incoming to the action are
+ // control flows.]
+ boolean ready = super.isReady() & (((Action)this.node).isLocallyReentrant() | !this.isFiring());
+ int i = 1;
+ while(ready & i <= this.incomingEdges.size()) {
+ ready = this.incomingEdges.get(i - 1).hasOffer();
+ i = i + 1;
+ }
+ List<InputPin> inputPins = getInputs((Action)this.node); // CHANGED from: ((Action)(this.node)).getInputs();
+ int j = 1;
+ while(ready & j <= inputPins.size()) {
+ ready = this.getPinActivation(inputPins.get(j - 1)).isReady();
+ j = j + 1;
+ }
+ return ready;
+ }
+
+ public Boolean isFiring() {
+ // Indicate whether this action activation is currently firing or not.
+ return this.firing == null? false: this.firing; // ADDED check for null
+ }
+
+ public abstract void doAction();
+
+ public void sendOffers() {
+ // Fire all output pins and send offers on all outgoing control flows.
+ Action action = (Action)(this.node);
+ // *** Send offers from all output pins concurrently. ***
+ List<OutputPin> outputPins = getOutputs(action); // CHANGED from: action.getOutputs();
+ for(Iterator<OutputPin> i = outputPins.iterator(); i.hasNext();) {
+ OutputPin outputPin = i.next();
+ PinActivation pinActivation = this.getPinActivation(outputPin);
+ pinActivation.sendUnofferedTokens();
+ }
+ // Send offers on all outgoing control flows.
+ if(this.outgoingEdges.size() > 0) {
+ List<Token> tokens = new ArrayList<Token>();
+ tokens.add(new ControlToken());
+ this.addTokens(tokens);
+ this.outgoingEdges.get(0).sendOffer(tokens);
+ }
+ }
+
+ public void createNodeActivations() {
+ // Create node activations for the input and output pins of the action
+ // for this activation.
+ // [Note: Pins are owned by their actions, not by the enclosing activity
+ // (or group), so they must be activated through the action activation.]
+ Action action = (Action)(this.node);
+ List<ActivityNode> inputPinNodes = new ArrayList<ActivityNode>();
+ List<InputPin> inputPins = getInputs(action); // CHANGED from: action.getInputs();
+ for(int i = 0; i < inputPins.size(); i++) {
+ InputPin inputPin = inputPins.get(i);
+ inputPinNodes.add(inputPin);
+ }
+ this.group.createNodeActivations(inputPinNodes);
+ for(int i = 0; i < inputPinNodes.size(); i++) {
+ ActivityNode node = inputPinNodes.get(i);
+ this.addPinActivation((PinActivation)(this.group.getNodeActivation(node)));
+ }
+ List<ActivityNode> outputPinNodes = new ArrayList<ActivityNode>();
+ List<OutputPin> outputPins = getOutputs(action); // CHANGED from: action.getOutputs();
+ for(int i = 0; i < outputPins.size(); i++) {
+ OutputPin outputPin = outputPins.get(i);
+ outputPinNodes.add(outputPin);
+ }
+ this.group.createNodeActivations(outputPinNodes);
+ for(int i = 0; i < outputPinNodes.size(); i++) {
+ ActivityNode node = outputPinNodes.get(i);
+ this.addPinActivation((PinActivation)(this.group.getNodeActivation(node)));
+ }
+ }
+
+ public void addOutgoingEdge(ActivityEdgeInstance edge) {
+ // If there are no outgoing activity edge instances, create a single
+ // activity edge instance with a fork node execution at the other end.
+ // Add the give edge to the fork node execution that is the target of
+ // the activity edge instance out of this action execution.
+ // [This assumes that all edges directly outgoing from the action are
+ // control flows, with an implicit fork for offers out of the action.]
+ ActivityNodeActivation forkNodeActivation;
+ if(this.outgoingEdges.size() == 0) {
+ forkNodeActivation = new ForkNodeActivation();
+ forkNodeActivation.running = false; // ADDED
+ ActivityEdgeInstance newEdge = new ActivityEdgeInstance();
+ super.addOutgoingEdge(newEdge);
+ forkNodeActivation.addIncomingEdge(newEdge);
+ } else {
+ forkNodeActivation = this.outgoingEdges.get(0).target;
+ }
+ forkNodeActivation.addOutgoingEdge(edge);
+ }
+
+ public void addPinActivation(PinActivation pinActivation) {
+ // Add a pin activation to this action activation.
+ this.pinActivations.add(pinActivation);
+ pinActivation.actionActivation = this;
+ }
+
+ public PinActivation getPinActivation(Pin pin) {
+ // Precondition: The given pin is owned by the action of the action
+ // activation.
+ // Return the pin activation corresponding to the given pin.
+ PinActivation pinActivation = null;
+ int i = 1;
+ while(pinActivation == null & i <= this.pinActivations.size()) {
+ PinActivation thisPinActivation = this.pinActivations.get(i - 1);
+ if(thisPinActivation.node == pin) {
+ pinActivation = thisPinActivation;
+ }
+ i = i + 1;
+ }
+ return pinActivation;
+ }
+
+ public void putToken(OutputPin pin, Value value) {
+ // Precondition: The action execution has fired and the given pin is
+ // owned by the action of the action execution.
+ // Place a token for the given value on the pin activation corresponding
+ // to the given output pin.
+ Debug.println("[putToken] node = " + this.node.getName());
+ ObjectToken token = new ObjectToken();
+ token.value = value;
+ PinActivation pinActivation = this.getPinActivation(pin);
+ pinActivation.addToken(token);
+ }
+
+ public void putTokens(OutputPin pin, List<Value> values) {
+ // Precondition: The action execution has fired and the given pin is
+ // owned by the action of the action execution.
+ // Place tokens for the given values on the pin activation corresponding
+ // to the given output pin.
+ // Debug.println("[putTokens] node = " + this.node.getName());
+ for(int i = 0; i < values.size(); i++) {
+ Value value = values.get(i);
+ this.putToken(pin, value);
+ }
+ }
+
+ public List<Value> getTokens(InputPin pin) {
+ // Precondition: The action execution has fired and the given pin is
+ // owned by the action of the action execution.
+ // Get any tokens held by the pin activation corresponding to the given
+ // input pin and return them
+ // (but leave the tokens on the pin).
+ Debug.println("[getTokens] node = " + this.node.getName() + ", pin = " + pin.getName());
+ PinActivation pinActivation = this.getPinActivation(pin);
+ List<Token> tokens = pinActivation.getUnofferedTokens();
+ List<Value> values = new ArrayList<Value>();
+ for(int i = 0; i < tokens.size(); i++) {
+ Token token = tokens.get(i);
+ Value value = ((ObjectToken)token).value;
+ if(value != null) {
+ values.add(value);
+ }
+ }
+ return values;
+ }
+
+ public List<Value> takeTokens(InputPin pin) {
+ // Precondition: The action execution has fired and the given pin is
+ // owned by the action of the action execution.
+ // Take any tokens held by the pin activation corresponding to the given
+ // input pin and return them.
+ Debug.println("[takeTokens] node = " + this.node.getName() + ", pin = " + pin.getName());
+ PinActivation pinActivation = this.getPinActivation(pin);
+ List<Token> tokens = pinActivation.takeUnofferedTokens();
+ List<Value> values = new ArrayList<Value>();
+ for(int i = 0; i < tokens.size(); i++) {
+ Token token = tokens.get(i);
+ Value value = ((ObjectToken)token).value;
+ if(value != null) {
+ values.add(value);
+ }
+ }
+ return values;
+ }
+
+ public Boolean isSourceFor(ActivityEdgeInstance edgeInstance) {
+ // If this action has an outgoing fork node, check that the fork node is
+ // the source of the given edge instance.
+ boolean isSource = false;
+ if(this.outgoingEdges.size() > 0) {
+ isSource = this.outgoingEdges.get(0).target.isSourceFor(edgeInstance);
+ }
+ return isSource;
+ }
+
+ public Boolean valueParticipatesInLink(Value value, Link link) {
+ // Test if the given value participates in the given link.
+ List<FeatureValue> linkFeatureValues = link.getFeatureValues();
+ boolean participates = false;
+ int i = 1;
+ while(!participates & i <= linkFeatureValues.size()) {
+ participates = linkFeatureValues.get(i - 1).values.get(0).equals(value);
+ i = i + 1;
+ }
+ return participates;
+ }
+
+ public BooleanValue makeBooleanValue(Boolean value) {
+ // Make a Boolean value using the built-in Boolean primitive type.
+ // [This ensures that Boolean values created internally are the same as
+ // the default used for evaluating Boolean literals.]
+ LiteralBoolean booleanLiteral = UMLFactory.eINSTANCE.createLiteralBoolean();
+ booleanLiteral.setValue(value);
+ return (BooleanValue)(this.getExecutionLocus().executor.evaluate(booleanLiteral));
+ }
+
+ // ADDED:
+ protected static List<InputPin> getInputs(Action action) {
+ return action instanceof LoopNode? ((LoopNode)action).getLoopVariableInputs():
+ action.getInputs();
+ }
+
+ protected static List<OutputPin> getOutputs(Action action) {
+ return action instanceof LoopNode? ((LoopNode)action).getResults():
+ action instanceof ConditionalNode? ((ConditionalNode)action).getResults():
+ action.getOutputs();
+ }
+ //
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallActionActivation.java
new file mode 100644
index 00000000000..46742380c67
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallActionActivation.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.uml2.uml.CallAction;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+
+public abstract class CallActionActivation extends InvocationActionActivation {
+
+ /*
+ * The set of execution object for currently ongoing calls made through this
+ * call action activation.
+ */
+ public List<Execution> callExecutions = new ArrayList<Execution>();
+
+ public void doAction() {
+ // Get the call execution object, set its input parameters from the
+ // argument pins and execute it.
+ // Once execution completes, copy the values of the output parameters of
+ // the call execution to the result pins of the call action execution,
+ // then destroy the execution.
+ Execution callExecution = this.getCallExecution();
+ if(callExecution != null) {
+ this.callExecutions.add(callExecution);
+ CallAction callAction = (CallAction)(this.node);
+ List<InputPin> argumentPins = callAction.getArguments();
+ List<OutputPin> resultPins = callAction.getResults();
+ List<Parameter> parameters = callExecution.getBehavior().getOwnedParameters();
+ int pinNumber = 1;
+ int i = 1;
+ while(i <= parameters.size()) {
+ Parameter parameter = parameters.get(i - 1);
+ if(parameter.getDirection() == ParameterDirectionKind.IN_LITERAL | parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = parameter;
+ parameterValue.values = this.takeTokens(argumentPins.get(pinNumber - 1));
+ callExecution.setParameterValue(parameterValue);
+ pinNumber = pinNumber + 1;
+ }
+ i = i + 1;
+ }
+ callExecution.execute();
+ List<ParameterValue> outputParameterValues = callExecution.getOutputParameterValues();
+ pinNumber = 1;
+ i = 1;
+ while(i <= parameters.size()) {
+ Parameter parameter = parameters.get(i - 1);
+ if((parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) | (parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL) | (parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL)) {
+ for(int j = 0; j < outputParameterValues.size(); j++) {
+ ParameterValue outputParameterValue = outputParameterValues.get(j);
+ if(outputParameterValue.parameter == parameter) {
+ OutputPin resultPin = resultPins.get(pinNumber - 1);
+ this.putTokens(resultPin, outputParameterValue.values);
+ }
+ }
+ pinNumber = pinNumber + 1;
+ }
+ i = i + 1;
+ }
+ callExecution.destroy();
+ this.removeCallExecution(callExecution);
+ }
+ }
+
+ public abstract Execution getCallExecution();
+
+ public void terminate() {
+ // Terminate all call executions (if any), then terminate the call
+ // action activation (self).
+ for(int i = 0; i < this.callExecutions.size(); i++) {
+ Execution execution = this.callExecutions.get(i);
+ execution.terminate();
+ }
+ super.terminate();
+ }
+
+ public void removeCallExecution(Execution execution) {
+ // Remove the given execution from the current list of call executions.
+ boolean notFound = true;
+ int i = 1;
+ while(notFound & i <= this.callExecutions.size()) {
+ if(this.callExecutions.get(i - 1) == execution) {
+ this.callExecutions.remove(i - 1);
+ notFound = false;
+ }
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallBehaviorActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallBehaviorActionActivation.java
new file mode 100644
index 00000000000..0b171b3b92f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallBehaviorActionActivation.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.CallBehaviorAction;
+
+public class CallBehaviorActionActivation extends CallActionActivation {
+
+ public Execution getCallExecution() {
+ // Create and execution for the given behavior at the current locus and
+ // return the resulting execution object.
+ // If the given behavior is in the context of a classifier, then pass
+ // the current context object as the context for the call.
+ // Otherwise, use a null context.
+ // [Note that this requires the behavior context to be compatible with
+ // the type of the current contect object.]
+ Behavior behavior = ((CallBehaviorAction)(this.node)).getBehavior();
+ Object_ context;
+ if(behavior.getContext() == null) {
+ context = null;
+ } else {
+ // Debug.println("[getCallExecution] behavior context = " +
+ // behavior.context.name);
+ context = this.getExecutionContext();
+ }
+ // Debug.println("[getCallExecution] context = " + context);
+ return this.getExecutionLocus().factory.createExecution(behavior, context);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallOperationActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallOperationActionActivation.java
new file mode 100644
index 00000000000..7140f7bab29
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/CallOperationActionActivation.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.uml2.uml.CallOperationAction;
+
+public class CallOperationActionActivation extends CallActionActivation {
+
+ public Execution getCallExecution() {
+ // If the value on the target input pin is a reference, dispatch the
+ // operation to it and return the resulting execution object.
+ CallOperationAction action = (CallOperationAction)(this.node);
+ Value target = this.takeTokens(action.getTarget()).get(0);
+ Execution execution;
+ if(target instanceof Reference) {
+ execution = ((Reference)target).dispatch(action.getOperation());
+ } else {
+ execution = null;
+ }
+ return execution;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InputPinActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InputPinActivation.java
new file mode 100644
index 00000000000..f639623f43a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InputPinActivation.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import org.eclipse.uml2.uml.Pin;
+
+public class InputPinActivation extends PinActivation {
+
+ public void receiveOffer() {
+ // Forward the offer to the action activation. [When all input pins are
+ // ready, the action will fire them.]
+ this.actionActivation.receiveOffer();
+ }
+
+ public Boolean isReady() {
+ // Return true if the total number of values already being offered by
+ // this pin plus those being offered
+ // by the sources of incoming edges is at least equal to the minimum
+ // multiplicity of the pin.
+ boolean ready = super.isReady();
+ if(ready) {
+ int totalValueCount = this.countUnofferedTokens() + this.countOfferedValues();
+ int minimum = ((Pin)this.node).getLower();
+ ready = totalValueCount >= minimum;
+ }
+ return ready;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InvocationActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InvocationActionActivation.java
new file mode 100644
index 00000000000..7d0c7af4940
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/InvocationActionActivation.java
@@ -0,0 +1,17 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+public abstract class InvocationActionActivation extends ActionActivation {
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/OutputPinActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/OutputPinActivation.java
new file mode 100644
index 00000000000..42df9fb586a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/OutputPinActivation.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import java.util.List;
+
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.MokaConstants;
+import org.eclipse.papyrus.moka.communication.event.isuspendresume.Suspend_Event;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.debug.MokaThread;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.debug.StackFrameManager;
+import org.eclipse.papyrus.moka.fuml.presentation.FUMLPresentationUtils;
+import org.eclipse.papyrus.moka.ui.presentation.AnimationUtils;
+import org.eclipse.uml2.uml.ActivityNode;
+
+public class OutputPinActivation extends PinActivation {
+
+ /**
+ * Overriding introduced to connect with the debug API
+ *
+ * (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ObjectNodeActivation#sendOffers(java.util.List)
+ */
+ @Override
+ public void sendOffers(List<Token> tokens) {
+ // Connection with the debug api
+ Locus locus = this.getActivityExecution().locus ;
+ if (locus.isInDebugMode) {
+ this.incomingTokens_DEBUG = tokens ;
+ if (locus.engine.isTerminated())
+ return ;
+ boolean animationMarkerNeedsToBeRemoved = false ;
+ long date = 0 ;
+ if (MokaConstants.MOKA_AUTOMATIC_ANIMATION) {
+ date = System.currentTimeMillis() ;
+ AnimationUtils.getInstance().addAnimationMarker(node) ;
+ animationMarkerNeedsToBeRemoved = true ;
+ }
+ MokaStackFrame stackFrame = FUMLPresentationUtils.getMokaStackFrame(this) ;
+ stackFrame.setThread(locus.mainThread) ;
+ StackFrameManager.getInstance().setStackFrame(this.getActivityExecution(), stackFrame) ;
+ //locus.stackFrames = new MokaStackFrame[]{stackFrame} ;
+ int reasonForSuspending = FUMLExecutionEngine.controlDelegate.shallSuspend(this.getActivityExecution(), this) ;
+ if (reasonForSuspending != -1) {
+ locus.mainThread.setSuspended(true) ;
+ locus.mainThread.setStackFrames(null) ;
+ locus.stackFrames = StackFrameManager.getInstance().getStackFrames() ;
+ Suspend_Event breakpointEvent = new Suspend_Event(locus.mainThread, reasonForSuspending, new MokaThread[]{locus.mainThread}) ;
+ locus.engine.sendEvent(breakpointEvent) ;
+ try {
+ FUMLExecutionEngine.controlDelegate.suspend(this.getActivityExecution()) ;
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ locus.mainThread.setSuspended(false) ;
+ }
+ if (animationMarkerNeedsToBeRemoved) {
+ try {
+ long ellapsed = System.currentTimeMillis() - date ;
+ long delay = Math.max(1,MokaConstants.MOKA_ANIMATION_DELAY - ellapsed) ;
+ Thread.sleep(delay) ;
+ } catch (InterruptedException e1) {
+ Activator.log.error(e1);
+ }
+ AnimationUtils.getInstance().removeAnimationMarker(node) ;
+ }
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // End: Connection with the debug api
+ super.sendOffers(tokens);
+ }
+
+
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/PinActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/PinActivation.java
new file mode 100644
index 00000000000..d7843599b65
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/PinActivation.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ObjectNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.uml2.uml.Pin;
+
+public abstract class PinActivation extends ObjectNodeActivation {
+
+ /*
+ * The activation of the action that owns the pin for this pin activation.
+ */
+ public ActionActivation actionActivation;
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Add all incoming tokens to the pin.
+ Debug.println("[fire] Pin " + (this.node == null ? "" : this.node.getName() + "..."));
+ this.addTokens(incomingTokens);
+ }
+
+ public List<Token> takeOfferedTokens() {
+ // Take only a number of tokens only up to the limit allowed by
+ // the multiplicity upper bound of the pin for this activation.
+ int count = this.countUnofferedTokens();
+ int upper = -1;
+ // Note: A pin activation used in an expansion activation group
+ // will have this.node == null.
+ if(this.node != null) {
+ upper = ((Pin)(this.node)).getUpper();
+ }
+ List<Token> tokens = new ArrayList<Token>();
+ // Note: upper < 0 indicates an unbounded upper multiplicity.
+ if(upper < 0 | count < upper) {
+ List<ActivityEdgeInstance> incomingEdges = this.incomingEdges;
+ for(int i = 0; i < incomingEdges.size(); i++) {
+ ActivityEdgeInstance edge = incomingEdges.get(i);
+ int incomingCount = edge.countOfferedValues();
+ List<Token> incomingTokens = new ArrayList<Token>();
+ if(upper < 0 | incomingCount < upper - count) {
+ incomingTokens = edge.takeOfferedTokens();
+ count = count + incomingCount;
+ } else if(count < upper) {
+ incomingTokens = edge.takeOfferedTokens(upper - count);
+ count = upper;
+ }
+ for(int j = 0; j < incomingTokens.size(); j++) {
+ Token token = incomingTokens.get(j);
+ tokens.add(token);
+ }
+ }
+ }
+ return tokens;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/SendSignalActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/SendSignalActionActivation.java
new file mode 100644
index 00000000000..335b0dec9b9
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/BasicActions/SendSignalActionActivation.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.SignalInstance;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.SendSignalAction;
+import org.eclipse.uml2.uml.Signal;
+
+public class SendSignalActionActivation extends InvocationActionActivation {
+
+ public void doAction() {
+ // Get the value from the target pin. If the value is not a reference,
+ // then do nothing.
+ // Otherwise, construct a signal using the values from the argument pins
+ // and send it to the referent object.
+ SendSignalAction action = (SendSignalAction)(this.node);
+ Value target = this.takeTokens(action.getTarget()).get(0);
+ if(target instanceof Reference) {
+ Signal signal = action.getSignal();
+ SignalInstance signalInstance = new SignalInstance();
+ signalInstance.type = signal;
+ List<Property> attributes = signal.getOwnedAttributes();
+ List<InputPin> argumentPins = action.getArguments();
+ for(int i = 0; i < attributes.size(); i++) {
+ Property attribute = attributes.get(i);
+ InputPin argumentPin = argumentPins.get(i);
+ List<Value> values = this.takeTokens(argumentPin);
+ signalInstance.setFeatureValue(attribute, values, 0);
+ }
+ ((Reference)target).send(signalInstance);
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionActivation.java
new file mode 100644
index 00000000000..d119f42db48
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionActivation.java
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.SignalInstance;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.uml2.uml.AcceptEventAction;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.SignalEvent;
+import org.eclipse.uml2.uml.Trigger;
+
+public class AcceptEventActionActivation extends ActionActivation {
+
+ /*
+ * If the accept event action activation is waiting for an event, then this
+ * is the accepter it has registered for the event.
+ */
+ public AcceptEventActionEventAccepter eventAccepter;
+
+ public Boolean waiting;
+
+ public void run() {
+ // Create an event accepter and initialize waiting to false.
+ super.run();
+ this.eventAccepter = new AcceptEventActionEventAccepter();
+ this.eventAccepter.actionActivation = this;
+ this.waiting = false;
+ }
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Register the event accepter for this accept event action activation
+ // with the context object of the enclosing activity execution
+ // and wait for an event to be accepted.
+ Debug.println("[fire] Action " + this.node.getName() + "...");
+ this.getExecutionContext().register(this.eventAccepter);
+ this.waiting = true;
+ this.firing = false;
+ this.suspend();
+ }
+
+ public Boolean isReady() {
+ // An accept event action activiation is ready to fire only if it is not
+ // already waiting for an event.
+ boolean ready;
+ if(this.isWaiting()) { // CHANGED "this.waiting" to "this.isWaiting()".
+ ready = false;
+ } else {
+ ready = super.isReady();
+ }
+ return ready;
+ }
+
+ // ADDED:
+ public Boolean isWaiting() {
+ return this.waiting == null? false: this.waiting;
+ }
+ //
+
+ public void doAction() {
+ // Do nothing. [This will never be called.]
+ return;
+ }
+
+ public void accept(SignalInstance signalInstance) {
+ // Accept a signal occurance for the given signal instance.
+ // If the action does not unmarshall, then place the signal instance on
+ // the result pin, if any.
+ // If the action does unmarshall, then get the feature values of the
+ // signal instance, and place the values for each feature on the
+ // corresponding output pin.
+ // Concurrently fire all output pins while offering a single control
+ // token.
+ // If there are no incoming edges, then re-register this accept event
+ // action execution with the context object.
+ AcceptEventAction action = (AcceptEventAction)(this.node);
+ List<OutputPin> resultPins = action.getResults();
+ Debug.println("[accept] action = " + action.getName() + ", signalinstance = " + signalInstance);
+ if(this.running) {
+ if(!action.isUnmarshall()) {
+ List<Value> result = new ArrayList<Value>();
+ result.add(signalInstance);
+ if(resultPins.size() > 0) {
+ this.putTokens(resultPins.get(0), result);
+ }
+ } else {
+ List<FeatureValue> featureValues = signalInstance.getFeatureValues();
+ for(int i = 0; i < featureValues.size(); i++) {
+ FeatureValue featureValue = featureValues.get(i);
+ OutputPin resultPin = resultPins.get(i);
+ this.putTokens(resultPin, featureValue.values);
+ }
+ }
+ this.sendOffers();
+ this.waiting = false;
+ Debug.println("[fire] Checking if " + this.node.getName() + " should fire again...");
+ this.receiveOffer();
+ this.resume();
+ }
+ }
+
+ public Boolean match(SignalInstance signalInstance) {
+ // Return true if the given signal instance matches a trigger of the
+ // accept action of this activation.
+ AcceptEventAction action = (AcceptEventAction)(this.node);
+ List<Trigger> triggers = action.getTriggers();
+ Signal signal = signalInstance.type;
+ boolean matches = false;
+ int i = 1;
+ while(!matches & i <= triggers.size()) {
+ matches = ((SignalEvent)(triggers.get(i - 1).getEvent())).getSignal() == signal;
+ i = i + 1;
+ }
+ return matches;
+ }
+
+ public void terminate() {
+ // Terminate this action and unregister its event accepter.
+ super.terminate();
+ if(this.isWaiting()) { // CHANGED "this.waiting" to "this.isWaiting()".
+ this.getExecutionContext().unregister(this.eventAccepter);
+ this.waiting = false;
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionEventAccepter.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionEventAccepter.java
new file mode 100644
index 00000000000..36897d0a945
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/AcceptEventActionEventAccepter.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.EventAccepter;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.SignalInstance;
+
+public class AcceptEventActionEventAccepter extends EventAccepter {
+
+ /*
+ * The accept event action activation on behalf of which this event accepter
+ * is waiting.
+ */
+ public AcceptEventActionActivation actionActivation;
+
+ public void accept(SignalInstance signalInstance) {
+ // Accept a signal occurance for the given signal instance.
+ // Forward the signal occuranceto the action activation.
+ this.actionActivation.accept(signalInstance);
+ }
+
+ public Boolean match(SignalInstance signalInstance) {
+ // Return true if the given signal instance matches a trigger of the
+ // accept action of the action activation.
+ return this.actionActivation.match(signalInstance);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadExtentActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadExtentActionActivation.java
new file mode 100644
index 00000000000..81816936535
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadExtentActionActivation.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.ReadExtentAction;
+
+public class ReadExtentActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the extent, at the current execution locus, of the classifier
+ // (which must be a class) identified in the action.
+ // Place references to the resulting set of objects on the result pin.
+ ReadExtentAction action = (ReadExtentAction)(this.node);
+ List<ExtensionalValue> objects = this.getExecutionLocus().getExtent(action.getClassifier());
+ // Debug.println("[doAction] " + action.classifier.name + " has " +
+ // objects.size() + " instance(s).");
+ List<Value> references = new ArrayList<Value>();
+ for(int i = 0; i < objects.size(); i++) {
+ Value object = objects.get(i);
+ Reference reference = new Reference();
+ reference.referent = (Object_)object;
+ references.add(reference);
+ }
+ this.putTokens(action.getResult(), references);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadIsClassifiedObjectActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadIsClassifiedObjectActionActivation.java
new file mode 100644
index 00000000000..f52b719844f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReadIsClassifiedObjectActionActivation.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.ReadIsClassifiedObjectAction;
+
+public class ReadIsClassifiedObjectActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the value on the object input pin and determine if it is
+ // classified by the classifier specified in the action.
+ // If the isDirect attribute of the action is false, then place true on
+ // the result output pin if the input object has the specified
+ // classifier or of one its (direct or indirect) descendants as a type.
+ // If the isDirect attribute of the action is true, then place true on
+ // the result output pin if the input object has the specified
+ // classifier as a type.
+ // Otherwise place false on the result output pin.
+ ReadIsClassifiedObjectAction action = (ReadIsClassifiedObjectAction)(this.node);
+ Value input = this.takeTokens(action.getObject()).get(0);
+ List<Classifier> types = input.getTypes();
+ boolean result = false;
+ int i = 1;
+ while(!result & i <= types.size()) {
+ Classifier type = types.get(i - 1);
+ if(type == action.getClassifier()) {
+ result = true;
+ } else if(!action.isDirect()) {
+ result = this.checkAllParents(type, action.getClassifier());
+ }
+ i = i + 1;
+ }
+ List<Value> values = new ArrayList<Value>();
+ values.add(this.makeBooleanValue(result));
+ this.putTokens(action.getResult(), values);
+ }
+
+ public Boolean checkAllParents(Classifier type, Classifier classifier) {
+ // Check if the given classifier matches any of the direct or indirect
+ // ancestors of a given type.
+ List<Classifier> directParents = type.getGenerals();
+ boolean matched = false;
+ int i = 1;
+ while(!matched & i <= directParents.size()) {
+ Classifier directParent = directParents.get(i - 1);
+ if(directParent == classifier) {
+ matched = true;
+ } else {
+ matched = this.checkAllParents(directParent, classifier);
+ }
+ i = i + 1;
+ }
+ return matched;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReclassifyObjectActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReclassifyObjectActionActivation.java
new file mode 100644
index 00000000000..23c1a30498b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReclassifyObjectActionActivation.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.ReclassifyObjectAction;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class ReclassifyObjectActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the value of the object input pin. If it is not a reference, then
+ // do nothing. Otherwise, do the following.
+ // Remove all types from the referent object that are in the set of old
+ // classifiers but not the set of new classifiers (or just all types
+ // that are not new classifiers, if isReplaceAll is true).
+ // Remove the feature values from the referent object for all
+ // classifiers that are removed.
+ // Add all new classifiers as types of the referent object that are not
+ // already types.
+ // Add (empty) feature values to the referent object for the structural
+ // features of all added classifiers.
+ ReclassifyObjectAction action = (ReclassifyObjectAction)(this.node);
+ List<Classifier> newClassifiers = action.getNewClassifiers();
+ List<Classifier> oldClassifiers = action.getOldClassifiers();
+ Value input = this.takeTokens(action.getObject()).get(0);
+ if(input instanceof Reference) {
+ Object_ object = ((Reference)input).referent;
+ int i = 1;
+ while(i <= object.types.size()) {
+ Class type = object.types.get(i - 1);
+ boolean toBeRemoved = true;
+ int j = 1;
+ while(toBeRemoved & j <= newClassifiers.size()) {
+ toBeRemoved = (type != newClassifiers.get(j - 1));
+ j = j + 1;
+ }
+ if(toBeRemoved & !action.isReplaceAll()) {
+ boolean notInOld = true;
+ int k = 1;
+ while(notInOld & k <= oldClassifiers.size()) {
+ notInOld = (type != oldClassifiers.get(k - 1));
+ k = k + 1;
+ }
+ toBeRemoved = !notInOld;
+ }
+ if(toBeRemoved) {
+ object.types.remove(i - 1);
+ object.removeFeatureValues(type);
+ } else {
+ i = i + 1;
+ }
+ }
+ for(int n = 0; n < newClassifiers.size(); n++) {
+ Classifier classifier = newClassifiers.get(n);
+ boolean toBeAdded = true;
+ int j = 1;
+ while(toBeAdded & j <= object.types.size()) {
+ toBeAdded = (classifier != object.types.get(j - 1));
+ j = j + 1;
+ }
+ if(toBeAdded) {
+ object.types.add((Class)classifier);
+ List<NamedElement> members = classifier.getMembers();
+ for(int k = 0; k < members.size(); k++) {
+ NamedElement member = members.get(k);
+ if(member instanceof StructuralFeature) {
+ object.setFeatureValue((StructuralFeature)member, new ArrayList<Value>(), 0);
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReduceActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReduceActionActivation.java
new file mode 100644
index 00000000000..b1e5f26b486
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/ReduceActionActivation.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.ReduceAction;
+
+public class ReduceActionActivation extends ActionActivation {
+
+ /*
+ * The current execution of the reducer behavior.
+ */
+ public Execution currentExecution;
+
+ public void doAction() {
+ // Get the values of the collection input pin.
+ // If the input pin has no values, then do nothing. Otherwise, do the
+ // following.
+ // Repeatedly invoke the reducer behavior on successive pairs to reduce
+ // the collection to a single value, and place that value on the result
+ // pin.
+ // To invoke the reducer behavior, compile it to create an execution,
+ // make the execution the current execution, place the appropriate
+ // values on its input parameters, and execute it.
+ ReduceAction action = (ReduceAction)(this.node);
+ List<Value> values = this.takeTokens(action.getCollection());
+ if(values.size() > 0) {
+ List<Parameter> parameters = action.getReducer().getOwnedParameters();
+ Parameter input1 = null;
+ Parameter input2 = null;
+ Parameter output = null;
+ int i = 1;
+ while(i <= parameters.size()) {
+ Parameter parameter = parameters.get(i - 1);
+ if(parameter.getDirection() == ParameterDirectionKind.IN_LITERAL) {
+ if(input1 == null) {
+ input1 = parameter;
+ } else {
+ input2 = parameter;
+ }
+ } else if(parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL | parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL) {
+ output = parameter;
+ }
+ i = i + 1;
+ }
+ ParameterValue parameterValue1 = new ParameterValue();
+ parameterValue1.parameter = input1;
+ parameterValue1.values = new ArrayList<Value>();
+ parameterValue1.values.add(values.get(0));
+ int j = 2;
+ while(j <= values.size()) {
+ this.currentExecution = this.getExecutionLocus().factory.createExecution(action.getReducer(), this.getExecutionContext());
+ this.currentExecution.setParameterValue(parameterValue1);
+ ParameterValue parameterValue2 = new ParameterValue();
+ parameterValue2.parameter = input2;
+ parameterValue2.values = new ArrayList<Value>();
+ parameterValue2.values.add(values.get(j - 1));
+ this.currentExecution.setParameterValue(parameterValue2);
+ this.currentExecution.execute();
+ parameterValue1.values = this.currentExecution.getParameterValue(output).values;
+ j = j + 1;
+ if(parameterValue1.values.isEmpty() & j <= values.size()) {
+ parameterValue1.values.add(values.get(j - 1));
+ j = j + 1;
+ }
+ }
+ this.putTokens(action.getResult(), parameterValue1.values);
+ }
+ }
+
+ public void terminate() {
+ // If there is a current execution, terminate it. Then terminate self.
+ if(this.currentExecution != null) {
+ this.currentExecution.terminate();
+ }
+ super.terminate();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java
new file mode 100644
index 00000000000..6b362fb11cc
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.StartClassifierBehaviorAction;
+
+public class StartClassifierBehaviorActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the value on the object input pin. If it is not a reference, then
+ // do nothing.
+ // Start the classifier behavior of the referent object for the
+ // classifier given as the type of the object input pin.
+ // If the object input pin has no type, then start the classifier
+ // behaviors of all types of the referent object. [The required behavior
+ // in this case is not clear from the spec.]
+ StartClassifierBehaviorAction action = (StartClassifierBehaviorAction)(this.node);
+ Value object = this.takeTokens(action.getObject()).get(0);
+ if(object instanceof Reference) {
+ ((Reference)object).startBehavior((Class)(action.getObject().getType()), new ArrayList<ParameterValue>());
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartObjectBehaviorActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartObjectBehaviorActionActivation.java
new file mode 100644
index 00000000000..750d241e74a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartObjectBehaviorActionActivation.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.InvocationActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.StartObjectBehaviorAction;
+
+public class StartObjectBehaviorActionActivation extends InvocationActionActivation {
+
+ public void doAction() {
+ // Get the value on the object input pin. If it is not a reference, then
+ // do nothing.
+ // Start the behavior of the referent object for the classifier given as
+ // the type of the object input pin, with parameter values taken from
+ // the argument input pins.
+ // If the object input pin has no type, then start the classifier
+ // behaviors of all types of the referent object.
+ StartObjectBehaviorAction action = (StartObjectBehaviorAction)(this.node);
+ Value object = this.takeTokens(action.getObject()).get(0);
+ if(object instanceof Reference) {
+ Class type = (Class)(action.getObject().getType());
+ List<InputPin> argumentPins = action.getArguments();
+ List<ParameterValue> inputs = new ArrayList<ParameterValue>();
+ if(type != null) {
+ Behavior behavior;
+ if(type instanceof Behavior) {
+ behavior = (Behavior)type;
+ } else {
+ behavior = type.getClassifierBehavior();
+ }
+ if(behavior != null) {
+ List<Parameter> parameters = behavior.getOwnedParameters();
+ int pinNumber = 1;
+ int i = 1;
+ while(i <= parameters.size()) {
+ Parameter parameter = parameters.get(i - 1);
+ int j = pinNumber;
+ if(parameter.getDirection() == ParameterDirectionKind.IN_LITERAL | parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = parameter;
+ parameterValue.values = this.takeTokens(argumentPins.get(j - 1));
+ inputs.add(parameterValue);
+ j = j + 1;
+ }
+ pinNumber = j;
+ i = i + 1;
+ }
+ }
+ }
+ ((Reference)object).startBehavior(type, inputs);
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/AddStructuralFeatureValueActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/AddStructuralFeatureValueActionActivation.java
new file mode 100644
index 00000000000..c0a7580df04
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/AddStructuralFeatureValueActionActivation.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StructuredValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.ChoiceStrategy;
+import org.eclipse.uml2.uml.AddStructuralFeatureValueAction;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class AddStructuralFeatureValueActionActivation extends WriteStructuralFeatureActionActivation {
+
+ public void doAction() {
+ // Get the values of the object and value input pins.
+ // If the given feature is an association end, then create a link
+ // between the object and value inputs.
+ // Otherwise, if the object input is a structural value, then add a
+ // value to the values for the feature.
+ // If isReplaceAll is true, first remove all current matching links or
+ // feature values.
+ // If isReplaceAll is false and there is an insertAt pin, insert the
+ // value at the appropriate position.
+ AddStructuralFeatureValueAction action = (AddStructuralFeatureValueAction)(this.node);
+ StructuralFeature feature = action.getStructuralFeature();
+ Association association = this.getAssociation(feature);
+ Value value = this.takeTokens(action.getObject()).get(0);
+ List<Value> inputValues = this.takeTokens(action.getValue());
+ // NOTE: Multiplicity of the value input pin is required to be 1..1.
+ Value inputValue = inputValues.get(0);
+ int insertAt = 0;
+ if(action.getInsertAt() != null) {
+ insertAt = ((UnlimitedNaturalValue)this.takeTokens(action.getInsertAt()).get(0)).value;
+ }
+ if(association != null) {
+ List<Link> links = this.getMatchingLinks(association, feature, value);
+ Property oppositeEnd = this.getOppositeEnd(association, feature);
+ int position = 0;
+ if(oppositeEnd.isOrdered()) {
+ position = this.getMatchingLinks(association, oppositeEnd, inputValue).size() + 1;
+ }
+ if(action.isReplaceAll()) {
+ for(int i = 0; i < links.size(); i++) {
+ Link link = links.get(i);
+ link.destroy();
+ }
+ } else if(feature.isUnique()) {
+ int i = 1;
+ boolean destroyed = false;
+ while(!destroyed & i <= links.size()) {
+ Link link = links.get(i - 1);
+ FeatureValue featureValue = link.getFeatureValue(feature);
+ if(featureValue.values.get(0).equals(inputValue)) {
+ position = link.getFeatureValue(oppositeEnd).position;
+ link.destroy();
+ destroyed = true;
+ }
+ i = i + 1;
+ }
+ }
+ Link newLink = new Link();
+ newLink.type = association;
+ newLink.setFeatureValue(feature, inputValues, insertAt);
+ List<Value> oppositeValues = new ArrayList<Value>();
+ oppositeValues.add(value);
+ newLink.setFeatureValue(oppositeEnd, oppositeValues, position);
+ newLink.addTo(this.getExecutionLocus());
+ } else if(value instanceof StructuredValue) {
+ // If the value is a data value, then it must be copied before
+ // any change is made.
+ if(!(value instanceof Reference)) {
+ value = value.copy();
+ }
+ StructuredValue structuredValue = (StructuredValue)value;
+ if(action.isReplaceAll()) {
+ structuredValue.setFeatureValue(feature, inputValues, 0);
+ } else {
+ FeatureValue featureValue = structuredValue.getFeatureValue(feature);
+ if(featureValue.values.size() > 0 & insertAt == 0) {
+ // *** If there is no insertAt pin, then the structural
+ // feature must be unordered, and the insertion position is
+ // immaterial. ***
+ insertAt = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy("choice")).choose(featureValue.values.size());
+ }
+ if(feature.isUnique()) {
+ // Remove any existing value that duplicates the input value
+ int j = position(inputValue, featureValue.values, 1);
+ if(j > 0) {
+ featureValue.values.remove(j - 1);
+ }
+ }
+ if(insertAt <= 0) { // Note: insertAt = -1 indicates an
+ // unlimited value of "*"
+ featureValue.values.add(inputValue);
+ } else {
+ featureValue.values.add(insertAt - 1, inputValue);
+ }
+ }
+ }
+ if(action.getResult() != null) {
+ this.putToken(action.getResult(), value);
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearAssociationActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearAssociationActionActivation.java
new file mode 100644
index 00000000000..f5e9a3dbff4
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearAssociationActionActivation.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.ClearAssociationAction;
+
+public class ClearAssociationActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the extent, at the current execution locus, of the given
+ // association.
+ // Read the object input pin. Destroy all links in which the object
+ // participates.
+ ClearAssociationAction action = (ClearAssociationAction)(this.node);
+ List<ExtensionalValue> extent = this.getExecutionLocus().getExtent(action.getAssociation());
+ Value objectValue = this.takeTokens(action.getObject()).get(0);
+ for(int i = 0; i < extent.size(); i++) {
+ Link link = (Link)(extent.get(i));
+ if(this.valueParticipatesInLink(objectValue, link)) {
+ link.destroy();
+ }
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearStructuralFeatureActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearStructuralFeatureActionActivation.java
new file mode 100644
index 00000000000..cc5d4495fdb
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ClearStructuralFeatureActionActivation.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StructuredValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.ClearStructuralFeatureAction;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class ClearStructuralFeatureActionActivation extends StructuralFeatureActionActivation {
+
+ public void doAction() {
+ // Get the value of the object input pin.
+ // If the given feature is an association end, then
+ // destroy all links that have the object input on the opposite end.
+ // Otherwise, if the object input is a structured value, then
+ // set the appropriate feature of the input value to be empty.
+ ClearStructuralFeatureAction action = (ClearStructuralFeatureAction)(this.node);
+ StructuralFeature feature = action.getStructuralFeature();
+ Association association = this.getAssociation(feature);
+ Value value = this.takeTokens(action.getObject()).get(0);
+ if(association != null) {
+ List<Link> links = this.getMatchingLinks(association, feature, value);
+ for(int i = 0; i < links.size(); i++) {
+ Link link = links.get(i);
+ link.destroy();
+ }
+ } else if(value instanceof StructuredValue) {
+ // If the value is a data value, then it must be copied before
+ // any change is made.
+ if(!(value instanceof Reference)) {
+ value = value.copy();
+ }
+ ((StructuredValue)value).setFeatureValue(action.getStructuralFeature(), new ArrayList<Value>(), 0);
+ }
+ if(action.getResult() != null) {
+ this.putToken(action.getResult(), value);
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateLinkActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateLinkActionActivation.java
new file mode 100644
index 00000000000..87ccf1d0ebc
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateLinkActionActivation.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.CreateLinkAction;
+import org.eclipse.uml2.uml.LinkEndCreationData;
+import org.eclipse.uml2.uml.LinkEndData;
+
+public class CreateLinkActionActivation extends WriteLinkActionActivation {
+
+ public void doAction() {
+ // If the association has any unique ends, then destroy an existing link
+ // that matches all ends of the link being created.
+ // Get the extent at the current execution locus of the association for
+ // which a link is being created.
+ // Destroy all links that have a value for any end for which
+ // isReplaceAll is true.
+ // Create a new link for the association, at the current locus, with the
+ // given end data values,
+ // inserted at the given insertAt position (for ordered ends).
+ CreateLinkAction action = (CreateLinkAction)(this.node);
+ List<LinkEndCreationData> endDataList = new ArrayList<LinkEndCreationData>();
+ for(LinkEndData data : action.getEndData()) {
+ endDataList.add((LinkEndCreationData)data);
+ }
+ Association linkAssociation = this.getAssociation();
+ List<ExtensionalValue> extent = this.getExecutionLocus().getExtent(linkAssociation);
+ boolean unique = false;
+ for(int i = 0; i < endDataList.size(); i++) {
+ if(endDataList.get(i).getEnd().isUnique()) {
+ unique = true;
+ }
+ }
+ for(int i = 0; i < extent.size(); i++) {
+ ExtensionalValue value = extent.get(i);
+ Link link = (Link)value;
+ boolean match = true;
+ boolean destroy = false;
+ int j = 1;
+ while(j <= endDataList.size()) {
+ LinkEndCreationData endData = endDataList.get(j - 1);
+ if(this.endMatchesEndData(link, endData)) {
+ if(endData.isReplaceAll()) {
+ destroy = true;
+ }
+ } else {
+ match = false;
+ }
+ j = j + 1;
+ }
+ if(destroy | unique & match) {
+ link.destroy();
+ }
+ }
+ Link newLink = new Link();
+ newLink.type = linkAssociation;
+ for(int i = 0; i < endDataList.size(); i++) {
+ LinkEndCreationData endData = endDataList.get(i);
+ int insertAt = 0;
+ if(endData.getInsertAt() != null) {
+ insertAt = ((UnlimitedNaturalValue)(this.takeTokens(endData.getInsertAt()).get(0))).value;
+ }
+ newLink.setFeatureValue(endData.getEnd(), this.takeTokens(endData.getValue()), insertAt);
+ }
+ newLink.addTo(this.getExecutionLocus());
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateObjectActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateObjectActionActivation.java
new file mode 100644
index 00000000000..1ae6eb53f76
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/CreateObjectActionActivation.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.CreateObjectAction;
+
+public class CreateObjectActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Create an object with the given classifier (which must be a class) as
+ // its type, at the same locus as the action activation.
+ // Place a reference to the object on the result pin of the action.
+ CreateObjectAction action = (CreateObjectAction)(this.node);
+ Reference reference = new Reference();
+ reference.referent = this.getExecutionLocus().instantiate((Class)(action.getClassifier()));
+ this.putToken(action.getResult(), reference);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyLinkActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyLinkActionActivation.java
new file mode 100644
index 00000000000..74ea5406bf0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyLinkActionActivation.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.ChoiceStrategy;
+import org.eclipse.uml2.uml.DestroyLinkAction;
+import org.eclipse.uml2.uml.LinkEndData;
+import org.eclipse.uml2.uml.LinkEndDestructionData;
+import org.eclipse.uml2.uml.Property;
+
+public class DestroyLinkActionActivation extends WriteLinkActionActivation {
+
+ public void doAction() {
+ // Get the extent, at the current execution locus, of the association
+ // for which links are being destroyed.
+ // Destroy all links that match the given link end destruction data.
+ // For unique ends, or non-unique ends for which isDestroyDuplicates is
+ // true, match links with a matching value for that end.
+ // For non-unique, ordered ends for which isDestroyDuplicates is false,
+ // match links with an end value at the given destroyAt position. [Must
+ // a value be given, too, in this case?]
+ // For non-unique, non-ordered ends for which isDestroyDuplicates is
+ // false, pick one matching link (if any) non-deterministically. [The
+ // semantics of this case is not clear from the current spec.]
+ Debug.println("[doAction] DestroyLinkAction...");
+ DestroyLinkAction action = (DestroyLinkAction)(this.node);
+ List<LinkEndDestructionData> destructionDataList = new ArrayList<LinkEndDestructionData>();
+ for(LinkEndData data : action.getEndData()) {
+ destructionDataList.add((LinkEndDestructionData)data);
+ }
+ Debug.println("[doAction] end data size = " + destructionDataList.size());
+ boolean destroyOnlyOne = false;
+ int j = 1;
+ while(!destroyOnlyOne & j <= destructionDataList.size()) {
+ LinkEndDestructionData endData = destructionDataList.get(j - 1);
+ destroyOnlyOne = !endData.getEnd().isUnique() & !endData.getEnd().isOrdered() & !endData.isDestroyDuplicates();
+ j = j + 1;
+ }
+ List<LinkEndData> endDataList = new ArrayList<LinkEndData>();
+ for(int i = 0; i < destructionDataList.size(); i++) {
+ LinkEndDestructionData endData = destructionDataList.get(i);
+ Debug.println("[doAction] Matching end = " + endData.getEnd().getName());
+ endDataList.add(endData);
+ }
+ List<ExtensionalValue> extent = this.getExecutionLocus().getExtent(this.getAssociation());
+ List<ExtensionalValue> matchingLinks = new ArrayList<ExtensionalValue>();
+ for(int i = 0; i < extent.size(); i++) {
+ ExtensionalValue value = extent.get(i);
+ Link link = (Link)value;
+ if(this.linkMatchesEndData(link, endDataList)) {
+ matchingLinks.add(link);
+ }
+ }
+ // Now that matching is done, ensure that all tokens on end data input
+ // pins
+ // are consumed.
+ for(int i = 0; i < destructionDataList.size(); i++) {
+ LinkEndDestructionData endData = destructionDataList.get(i);
+ Property end = endData.getEnd();
+ if(!endData.isDestroyDuplicates() & !end.isUnique() & end.isOrdered()) {
+ this.takeTokens(endData.getDestroyAt());
+ }
+ Debug.println("[doAction] Consuming tokens for end " + end.getName());
+ this.takeTokens(endData.getValue());
+ }
+ if(destroyOnlyOne) {
+ // *** If there is more than one matching link,
+ // non-deterministically choose one. ***
+ if(matchingLinks.size() > 0) {
+ int i = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy("choice")).choose(matchingLinks.size());
+ matchingLinks.get(i - 1).destroy();
+ }
+ } else {
+ for(int i = 0; i < matchingLinks.size(); i++) {
+ ExtensionalValue matchingLink = matchingLinks.get(i);
+ matchingLink.destroy();
+ }
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyObjectActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyObjectActionActivation.java
new file mode 100644
index 00000000000..447ab45d7ea
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/DestroyObjectActionActivation.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.DestroyObjectAction;
+import org.eclipse.uml2.uml.Property;
+
+public class DestroyObjectActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the value on the target input pin.
+ // If the value is not a reference, then the action has no effect.
+ // Otherwise, do the following.
+ // If isDestroyLinks is true, destroy all links in which the referent
+ // participates.
+ // If isDestroyOwnedObjects is true, destroy all objects owned by the
+ // referent via composition links.
+ // Destroy the referent object.
+ DestroyObjectAction action = (DestroyObjectAction)(this.node);
+ Value value = this.takeTokens(action.getTarget()).get(0);
+ this.destroyObject(value, action.isDestroyLinks(), action.isDestroyOwnedObjects());
+ }
+
+ public void destroyObject(Value value, Boolean isDestroyLinks, Boolean isDestroyOwnedObjects) {
+ // If the given value is a reference, then destroy the referenced
+ // object, per the given destroy action attribute values.
+ // Debug.println("[destroyObject] object = " + value.objectId());
+ if(value instanceof Reference) {
+ Reference reference = (Reference)value;
+ if(isDestroyLinks | isDestroyOwnedObjects) {
+ Debug.println("[destroyObject] Destroying links...");
+ List<ExtensionalValue> extensionalValues = this.getExecutionLocus().extensionalValues;
+ for(int i = 0; i < extensionalValues.size(); i++) {
+ ExtensionalValue extensionalValue = extensionalValues.get(i);
+ if(extensionalValue instanceof Link) {
+ Link link = (Link)extensionalValue;
+ if(this.valueParticipatesInLink(reference, link)) {
+ if(isDestroyLinks | this.objectIsComposite(reference, link)) {
+ // Debug.println("[destroyObject] Destroying link "
+ // + link.objectId());
+ link.destroy();
+ }
+ }
+ }
+ }
+ }
+ if(isDestroyOwnedObjects) {
+ Debug.println("[destroyObject] Destroying owned objects...");
+ List<FeatureValue> objectFeatureValues = reference.getFeatureValues();
+ for(int i = 0; i < objectFeatureValues.size(); i++) {
+ FeatureValue featureValue = objectFeatureValues.get(i);
+ if(((Property)featureValue.feature).getAggregation() == AggregationKind.COMPOSITE_LITERAL) {
+ List<Value> values = featureValue.values;
+ for(int j = 0; j < values.size(); j++) {
+ Value ownedValue = values.get(j);
+ this.destroyObject(ownedValue, isDestroyLinks, isDestroyOwnedObjects);
+ }
+ }
+ }
+ }
+ reference.destroy();
+ }
+ }
+
+ public Boolean objectIsComposite(Reference reference, Link link) {
+ // Test whether the given reference participates in the given link as a
+ // composite.
+ List<FeatureValue> linkFeatureValues = link.getFeatureValues();
+ boolean isComposite = false;
+ int i = 1;
+ while(!isComposite & i <= linkFeatureValues.size()) {
+ FeatureValue featureValue = linkFeatureValues.get(i - 1);
+ if(!featureValue.values.get(0).equals(reference) & ((Property)featureValue.feature).getAggregation() == AggregationKind.COMPOSITE_LITERAL) {
+ isComposite = true;
+ }
+ i = i + 1;
+ }
+ return isComposite;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/LinkActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/LinkActionActivation.java
new file mode 100644
index 00000000000..76c21d9b291
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/LinkActionActivation.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.LinkAction;
+import org.eclipse.uml2.uml.LinkEndData;
+import org.eclipse.uml2.uml.LinkEndDestructionData;
+import org.eclipse.uml2.uml.Property;
+
+public abstract class LinkActionActivation extends ActionActivation {
+
+ public Boolean linkMatchesEndData(Link link, List<LinkEndData> endDataList) {
+ // Test whether the given link matches the given end data.
+ boolean matches = true;
+ int i = 1;
+ while(matches & i <= endDataList.size()) {
+ matches = this.endMatchesEndData(link, endDataList.get(i - 1));
+ i = i + 1;
+ }
+ return matches;
+ }
+
+ public Boolean endMatchesEndData(Link link, LinkEndData endData) {
+ // Test whether the appropriate end of the given link matches the given
+ // end data.
+ boolean matches = false;
+ if(endData.getValue() == null) {
+ matches = true;
+ } else {
+ Property end = endData.getEnd();
+ FeatureValue linkFeatureValue = link.getFeatureValue(end);
+ Value endValue = this.getTokens(endData.getValue()).get(0);
+ if(endData instanceof LinkEndDestructionData) {
+ if(!((LinkEndDestructionData)endData).isDestroyDuplicates() & !end.isUnique() & end.isOrdered()) {
+ int destroyAt = ((UnlimitedNaturalValue)(this.getTokens(((LinkEndDestructionData)endData).getDestroyAt()).get(0))).value;
+ matches = linkFeatureValue.values.get(0).equals(endValue) && linkFeatureValue.position == destroyAt;
+ } else {
+ matches = linkFeatureValue.values.get(0).equals(endValue);
+ }
+ } else {
+ matches = linkFeatureValue.values.get(0).equals(endValue);
+ }
+ }
+ return matches;
+ }
+
+ public Association getAssociation() {
+ // Get the association for the link action of this activation.
+ return (Association)(((LinkAction)(this.node)).getEndData().get(0).getEnd().getAssociation());
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadLinkActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadLinkActionActivation.java
new file mode 100644
index 00000000000..ec446580068
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadLinkActionActivation.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.uml2.uml.LinkEndData;
+import org.eclipse.uml2.uml.ReadLinkAction;
+
+public class ReadLinkActionActivation extends LinkActionActivation {
+
+ public void doAction() {
+ // Get the extent, at the current execution locus, of the association to
+ // which the action applies.
+ // For all links that match the link end data, place the value of the
+ // remaining "open" end on the result pin.
+ ReadLinkAction action = (ReadLinkAction)(this.node);
+ List<LinkEndData> endDataList = action.getEndData();
+ LinkEndData openEnd = null;
+ int i = 1;
+ while((openEnd == null) & i <= endDataList.size()) {
+ if(endDataList.get(i - 1).getValue() == null) {
+ openEnd = endDataList.get(i - 1);
+ }
+ i = i + 1;
+ }
+ List<ExtensionalValue> extent = this.getExecutionLocus().getExtent(this.getAssociation());
+ List<FeatureValue> featureValues = new ArrayList<FeatureValue>();
+ for(int j = 0; j < extent.size(); j++) {
+ ExtensionalValue value = extent.get(j);
+ Link link = (Link)value;
+ if(this.linkMatchesEndData(link, endDataList)) {
+ FeatureValue featureValue = link.getFeatureValue(openEnd.getEnd());
+ if(!openEnd.getEnd().isOrdered() | featureValues.size() == 0) {
+ featureValues.add(featureValue);
+ } else {
+ int n = featureValue.position;
+ boolean continueSearching = true;
+ int k = 0;
+ while(continueSearching & k < featureValues.size()) {
+ k = k + 1;
+ continueSearching = featureValues.get(k - 1).position < n;
+ }
+ if(continueSearching) {
+ featureValues.add(featureValue);
+ } else {
+ featureValues.add(k - 1, featureValue);
+ }
+ }
+ }
+ }
+ for(int j = 0; j < featureValues.size(); j++) {
+ FeatureValue featureValue = featureValues.get(j);
+ this.putToken(action.getResult(), featureValue.values.get(0));
+ }
+ // Now that matching is done, ensure that all tokens on end data input
+ // pins
+ // are consumed.
+ for(int k = 0; k < endDataList.size(); k++) {
+ LinkEndData endData = endDataList.get(k);
+ if(endData.getValue() != null) {
+ this.takeTokens(endData.getValue());
+ }
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadSelfActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadSelfActionActivation.java
new file mode 100644
index 00000000000..6d1ca769e17
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadSelfActionActivation.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.ReadSelfAction;
+
+public class ReadSelfActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the context object of the activity execution containing this
+ // action activation and place a reference to it on the result output
+ // pin.
+ // Debug.println("[ReadSelfActionActivation] Start...");
+ Reference context = new Reference();
+ context.referent = this.getExecutionContext();
+ // Debug.println("[ReadSelfActionActivation] context object = " +
+ // context.referent);
+ OutputPin resultPin = ((ReadSelfAction)(this.node)).getResult();
+ this.putToken(resultPin, context);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadStructuralFeatureActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadStructuralFeatureActionActivation.java
new file mode 100644
index 00000000000..0fe5c25a91b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ReadStructuralFeatureActionActivation.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StructuredValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.ReadStructuralFeatureAction;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class ReadStructuralFeatureActionActivation extends StructuralFeatureActionActivation {
+
+ public void doAction() {
+ // Get the value of the object input pin.
+ // If the given feature is an association end, then get all values of
+ // the that end.
+ // for which the opposite end has the object input value and place them
+ // on the result pin.
+ // Otherwise, if the object input value is a structural value, then get
+ // the values
+ // of the appropriate feature of the input value and place them on the
+ // result output pin.
+ ReadStructuralFeatureAction action = (ReadStructuralFeatureAction)(this.node);
+ StructuralFeature feature = action.getStructuralFeature();
+ Association association = this.getAssociation(feature);
+ Value value = this.takeTokens(action.getObject()).get(0);
+ List<Value> resultValues = new ArrayList<Value>();
+ if(association != null) {
+ List<Link> links = this.getMatchingLinks(association, feature, value);
+ for(int i = 0; i < links.size(); i++) {
+ Link link = links.get(i);
+ resultValues.add(link.getFeatureValue(feature).values.get(0));
+ }
+ } else if(value instanceof StructuredValue) {
+ // Debug.println("[ReadStructuralFeatureActionActivation] value = "
+ // + value +", structural feature = " + feature.name);
+ resultValues = ((StructuredValue)value).getFeatureValue(feature).values;
+ }
+ this.putTokens(action.getResult(), resultValues);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java
new file mode 100644
index 00000000000..96dbc0c031e
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StructuredValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.ChoiceStrategy;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.RemoveStructuralFeatureValueAction;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class RemoveStructuralFeatureValueActionActivation extends WriteStructuralFeatureActionActivation {
+
+ public void doAction() {
+ // Get the values of the object and value input pins.
+ // If the given feature is an association end, then destroy any matching
+ // links.
+ // Otherwise, if the object input is a structural value, remove values
+ // from the given feature.
+ // If isRemoveDuplicates is true, then destroy all current matching
+ // links or remove all values equal to the input value.
+ // If isRemoveDuplicates is false and there is no removeAt input pin,
+ // remove any one feature value equal to the input value (if there are
+ // any that are equal).
+ // If isRemoveDuplicates is false, and there is a removeAt input pin
+ // remove the feature value at that position.
+ RemoveStructuralFeatureValueAction action = (RemoveStructuralFeatureValueAction)(this.node);
+ StructuralFeature feature = action.getStructuralFeature();
+ Association association = this.getAssociation(feature);
+ Value value = this.takeTokens(action.getObject()).get(0);
+ Value inputValue = null;
+ if(action.getValue() != null) {
+ // NOTE: Multiplicity of the value input pin is required to be 1..1.
+ inputValue = this.takeTokens(action.getValue()).get(0);
+ }
+ int removeAt = 0;
+ if(action.getRemoveAt() != null) {
+ removeAt = ((UnlimitedNaturalValue)this.takeTokens(action.getRemoveAt()).get(0)).value;
+ }
+ if(association != null) {
+ List<Link> links = this.getMatchingLinks(association, feature, value);
+ if(action.isRemoveDuplicates()) {
+ for(int i = 0; i < links.size(); i++) {
+ Link link = links.get(i);
+ link.destroy();
+ }
+ } else if(action.getRemoveAt() == null) {
+ // *** If there is more than one matching link,
+ // non-deterministically choose one. ***
+ if(links.size() > 0) {
+ int i = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy("choice")).choose(links.size());
+ links.get(i - 1).destroy();
+ }
+ } else {
+ boolean notFound = true;
+ int i = 1;
+ while(notFound & i < links.size()) {
+ Link link = links.get(i - 1);
+ if(link.getFeatureValue(feature).position == removeAt) {
+ notFound = false;
+ link.destroy();
+ }
+ }
+ }
+ } else if(value instanceof StructuredValue) {
+ // If the value is a data value, then it must be copied before
+ // any change is made.
+ if(!(value instanceof Reference)) {
+ value = value.copy();
+ }
+ FeatureValue featureValue = ((StructuredValue)value).getFeatureValue(action.getStructuralFeature());
+ if(action.isRemoveDuplicates()) {
+ int j = this.position(inputValue, featureValue.values, 1);
+ while(j > 0) {
+ featureValue.values.remove(j - 1);
+ j = this.position(inputValue, featureValue.values, j);
+ }
+ } else if(action.getRemoveAt() == null) {
+ List<Integer> positions = new ArrayList<Integer>();
+ int j = this.position(inputValue, featureValue.values, 1);
+ while(j > 0) {
+ positions.add(j);
+ j = this.position(inputValue, featureValue.values, j);
+ }
+ if(positions.size() > 0) {
+ // *** Nondeterministically choose which value to remove.
+ // ***
+ int k = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy("choice")).choose(positions.size());
+ featureValue.values.remove(positions.get(k - 1) - 1);
+ }
+ } else {
+ if(featureValue.values.size() >= removeAt) {
+ featureValue.values.remove(removeAt - 1);
+ }
+ }
+ }
+ if(action.getResult() != null) {
+ this.putToken(action.getResult(), value);
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/StructuralFeatureActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/StructuralFeatureActionActivation.java
new file mode 100644
index 00000000000..9922b44c7a6
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/StructuralFeatureActionActivation.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Link;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public abstract class StructuralFeatureActionActivation extends ActionActivation {
+
+ public Association getAssociation(StructuralFeature feature) {
+ // If the structural feature for the action of this activation is an
+ // association end,
+ // then get the associated association.
+ Association association = null;
+ if(feature instanceof Property) {
+ association = ((Property)feature).getAssociation();
+ }
+ return association;
+ }
+
+ public List<Link> getMatchingLinks(Association association, StructuralFeature end, Value oppositeValue) {
+ // Get the links of the given binary association whose end opposite
+ // to the given end has the given value
+ Property oppositeEnd = this.getOppositeEnd(association, end);
+ List<ExtensionalValue> extent = this.getExecutionLocus().getExtent(association);
+ List<Link> links = new ArrayList<Link>();
+ for(int i = 0; i < extent.size(); i++) {
+ ExtensionalValue link = extent.get(i);
+ if(link.getFeatureValue(oppositeEnd).values.get(0).equals(oppositeValue)) {
+ if(!end.isOrdered() | links.size() == 0) {
+ links.add((Link)link);
+ } else {
+ int n = link.getFeatureValue(end).position;
+ boolean continueSearching = true;
+ int j = 0;
+ while(continueSearching & j < links.size()) {
+ j = j + 1;
+ continueSearching = links.get(j - 1).getFeatureValue(end).position < n;
+ }
+ if(continueSearching) {
+ links.add((Link)link);
+ } else {
+ links.add(j - 1, (Link)link);
+ }
+ }
+ }
+ }
+ return links;
+ }
+
+ public Property getOppositeEnd(Association association, StructuralFeature end) {
+ // Get the end of a binary association opposite to the given end.
+ Property oppositeEnd = association.getMemberEnds().get(0);
+ if(oppositeEnd == end) {
+ oppositeEnd = association.getMemberEnds().get(1);
+ }
+ return oppositeEnd;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java
new file mode 100644
index 00000000000..6f4588b6317
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.TestIdentityAction;
+
+public class TestIdentityActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the values from the first and second input pins and test if they
+ // are equal. (Note the equality of references is defined to be that
+ // they have identical referents.)
+ // If they are equal, place true on the pin execution for the result
+ // output pin, otherwise place false.
+ TestIdentityAction action = (TestIdentityAction)(this.node);
+ Value firstValue = this.takeTokens(action.getFirst()).get(0);
+ Value secondValue = this.takeTokens(action.getSecond()).get(0);
+ Value testResult = this.makeBooleanValue(firstValue.equals(secondValue));
+ this.putToken(action.getResult(), testResult);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ValueSpecificationActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ValueSpecificationActionActivation.java
new file mode 100644
index 00000000000..5d736529b21
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/ValueSpecificationActionActivation.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.ValueSpecificationAction;
+
+public class ValueSpecificationActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Evaluate the value specification for the action and place the result
+ // on the result pin of the action.
+ ValueSpecificationAction action = (ValueSpecificationAction)(this.node);
+ Value value = this.getExecutionLocus().executor.evaluate(action.getValue());
+ this.putToken(action.getResult(), value);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteLinkActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteLinkActionActivation.java
new file mode 100644
index 00000000000..88db8285f54
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteLinkActionActivation.java
@@ -0,0 +1,17 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+public abstract class WriteLinkActionActivation extends LinkActionActivation {
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteStructuralFeatureActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteStructuralFeatureActionActivation.java
new file mode 100644
index 00000000000..e367e1c9755
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/IntermediateActions/WriteStructuralFeatureActionActivation.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public abstract class WriteStructuralFeatureActionActivation extends StructuralFeatureActionActivation {
+
+ public Integer position(Value value, List<Value> list, Integer startAt) {
+ // Return the position (counting from 1) of the first occurance of the
+ // given value in the given list at or after the starting index, or 0 if
+ // it is not found.
+ boolean found = false;
+ int i = startAt;
+ while(!found & i <= list.size()) {
+ found = list.get(i - 1).equals(value);
+ i = i + 1;
+ }
+ if(!found) {
+ i = 1;
+ }
+ return i - 1;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ClauseActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ClauseActivation.java
new file mode 100644
index 00000000000..66f072092d0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ClauseActivation.java
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Clause;
+
+public class ClauseActivation {
+
+ /*
+ * The activation of the conditional node that contains the clause for this
+ * clause activation.
+ */
+ public ConditionalNodeActivation conditionalNodeActivation;
+
+ public Clause clause;
+
+ public void receiveControl() {
+ // If all predecessors to the clause for this activation have run their
+ // tests and failed, then run the test for this clause.
+ // If the test succeeds, then terminate any other clauses that may be
+ // running and run the body of this clause.
+ // If the test fails, then pass control to successor clauses.
+ Debug.println("[receiveControl] clauseActivation = " + this);
+ if(this.isReady()) {
+ Debug.println("[receiveControl] Running test...");
+ this.runTest();
+ BooleanValue decision = this.getDecision();
+ // Note that the decision may be null if the test was terminated
+ // before completion.
+ if(decision != null) {
+ if(decision.value == true) {
+ Debug.println("[receiveControl] Test succeeded.");
+ this.selectBody();
+ } else {
+ Debug.println("[receiveControl] Test failed.");
+ List<ClauseActivation> successors = this.getSuccessors();
+ // *** Give control to all successors concurrently. ***
+ for(Iterator<ClauseActivation> i = successors.iterator(); i.hasNext();) {
+ ClauseActivation successor = i.next();
+ successor.receiveControl();
+ }
+ }
+ }
+ }
+ }
+
+ public Boolean isReady() {
+ // Test if all predecessors to this clause activation have failed.
+ List<ClauseActivation> predecessors = this.getPredecessors();
+ boolean ready = true;
+ int i = 1;
+ while(ready & i <= predecessors.size()) {
+ ClauseActivation predecessor = predecessors.get(i - 1);
+ BooleanValue decisionValue = predecessor.getDecision();
+ // Note that the decision will be null if the predecessor clause has
+ // not run yet.
+ if(decisionValue == null) {
+ ready = false;
+ } else {
+ ready = !decisionValue.value;
+ }
+ i = i + 1;
+ }
+ return ready;
+ }
+
+ public void runTest() {
+ // Run the test of the clause for this clause activation.
+ this.conditionalNodeActivation.runTest(this.clause);
+ }
+
+ public void selectBody() {
+ // Select the body of the clause for this clause activation.
+ this.conditionalNodeActivation.selectBody(this.clause);
+ }
+
+ public BooleanValue getDecision() {
+ // Get the value (if any) on the decider pin of the clause for this
+ // clause activation.
+ List<Value> deciderValues = this.conditionalNodeActivation.getPinValues(this.clause.getDecider());
+ BooleanValue deciderValue = null;
+ if(deciderValues.size() > 0) {
+ deciderValue = (BooleanValue)(deciderValues.get(0));
+ }
+ return deciderValue;
+ }
+
+ public List<ClauseActivation> getPredecessors() {
+ // Return the clause activations for the predecessors of the clause for
+ // this clause activation.
+ List<ClauseActivation> predecessors = new ArrayList<ClauseActivation>();
+ List<Clause> predecessorClauses = this.clause.getPredecessorClauses();
+ for(int i = 0; i < predecessorClauses.size(); i++) {
+ Clause predecessorClause = predecessorClauses.get(i);
+ predecessors.add(this.conditionalNodeActivation.getClauseActivation(predecessorClause));
+ }
+ return predecessors;
+ }
+
+ public List<ClauseActivation> getSuccessors() {
+ // Return the clause activations for the successors of the clause for
+ // this clause activation.
+ List<ClauseActivation> successors = new ArrayList<ClauseActivation>();
+ List<Clause> successorClauses = this.clause.getSuccessorClauses();
+ for(int i = 0; i < successorClauses.size(); i++) {
+ Clause successorClause = successorClauses.get(i);
+ successors.add(this.conditionalNodeActivation.getClauseActivation(successorClause));
+ }
+ return successors;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ConditionalNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ConditionalNodeActivation.java
new file mode 100644
index 00000000000..f02a3905f10
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/ConditionalNodeActivation.java
@@ -0,0 +1,176 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.ChoiceStrategy;
+import org.eclipse.uml2.uml.Clause;
+import org.eclipse.uml2.uml.ConditionalNode;
+import org.eclipse.uml2.uml.ExecutableNode;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Pin;
+
+public class ConditionalNodeActivation extends StructuredActivityNodeActivation {
+
+ /*
+ * The activations for each clause in the conditional node for this node
+ * activation.
+ */
+ public List<ClauseActivation> clauseActivations = new ArrayList<ClauseActivation>();
+
+ /*
+ * The set of clauses which meet the conditions to have their bodies
+ * activated.
+ */
+ public List<Clause> selectedClauses = new ArrayList<Clause>();
+
+ /*
+ * The clause chosen from the set of selectedClauses to actually be
+ * executed.
+ */
+ public Clause selectedClause;
+
+ public void doStructuredActivity() {
+ // Run all the non-executable, non-pin nodes in the conditional node.
+ // Activate all clauses in the conditional node and pass control to
+ // those that are ready (i.e., have no predecessors).
+ // If one or more clauses have succeeded in being selected, choose one
+ // non-deterministically and run its body, then copy the outputs of that
+ // clause to the output pins of the node.
+ ConditionalNode node = (ConditionalNode)(this.node);
+ List<ActivityNodeActivation> nodeActivations = this.activationGroup.nodeActivations;
+ List<ActivityNodeActivation> nonExecutableNodeActivations = new ArrayList<ActivityNodeActivation>();
+ for(int i = 0; i < nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations.get(i);
+ if(!(nodeActivation.node instanceof ExecutableNode | nodeActivation.node instanceof Pin)) {
+ nonExecutableNodeActivations.add(nodeActivation);
+ }
+ }
+ this.activationGroup.run(nonExecutableNodeActivations);
+ this.clauseActivations.clear();
+ List<Clause> clauses = node.getClauses();
+ for(int i = 0; i < clauses.size(); i++) {
+ Clause clause = clauses.get(i);
+ ClauseActivation clauseActivation = new ClauseActivation();
+ clauseActivation.clause = clause;
+ clauseActivation.conditionalNodeActivation = this;
+ this.clauseActivations.add(clauseActivation);
+ }
+ this.selectedClauses.clear();
+ List<ClauseActivation> readyClauseActivations = new ArrayList<ClauseActivation>();
+ for(int i = 0; i < this.clauseActivations.size(); i++) {
+ ClauseActivation clauseActivation = this.clauseActivations.get(i);
+ Debug.println("[doStructuredActivity] clauseActivations[" + i + "] = " + clauseActivation);
+ if(clauseActivation.isReady()) {
+ Debug.println("[doStructuredActivity] Clause activation is ready.");
+ readyClauseActivations.add(clauseActivation);
+ }
+ }
+ // *** Give control to all ready clauses concurrently. ***
+ for(Iterator<ClauseActivation> i = readyClauseActivations.iterator(); i.hasNext();) {
+ ClauseActivation clauseActivation = (ClauseActivation)i.next();
+ Debug.println("[doStructuredActivity] Giving control to " + clauseActivation + "...");
+ clauseActivation.receiveControl();
+ }
+ this.selectedClause = null;
+ if(this.selectedClauses.size() > 0 & this.isRunning()) {
+ Debug.println("[doStructuredActivity] " + this.selectedClauses.size() + " clause(s) selected.");
+ // *** If multiple clauses are selected, choose one
+ // non-deterministically. ***
+ int i = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy("choice")).choose(this.selectedClauses.size());
+ this.selectedClause = this.selectedClauses.get(i - 1);
+ Debug.println("[doStructuredActivity] Running selectedClauses[" + i + "] = " + this.selectedClause);
+ for(int j = 0; j < clauses.size(); j++) {
+ Clause clause = clauses.get(j);
+ if(clause != selectedClause) {
+ List<ExecutableNode> testNodes = clause.getTests();
+ for(int k = 0; k < testNodes.size(); k++) {
+ ExecutableNode testNode = testNodes.get(k);
+ this.activationGroup.getNodeActivation(testNode).terminate();
+ }
+ }
+ }
+ this.activationGroup.runNodes(this.makeActivityNodeList(this.selectedClause.getBodies()));
+ }
+ }
+
+ public void completeBody() {
+ // Complete the activation of the body of a conditional note by
+ // copying the outputs of the selected clause (if any) to the output
+ // pins of the node and terminating the activation of all nested nodes.
+ if(this.selectedClause != null) {
+ ConditionalNode node = (ConditionalNode)(this.node);
+ List<OutputPin> resultPins = node.getResults();
+ List<OutputPin> bodyOutputPins = this.selectedClause.getBodyOutputs();
+ for(int k = 0; k < resultPins.size(); k++) {
+ OutputPin resultPin = resultPins.get(k);
+ OutputPin bodyOutputPin = bodyOutputPins.get(k);
+ this.putTokens(resultPin, this.getPinValues(bodyOutputPin));
+ }
+ }
+ this.activationGroup.terminateAll();
+ }
+
+ public List<Token> completeAction() {
+ // Only complete the conditional node if it is not suspended.
+ if(!this.isSuspended()) {
+ completeBody();
+ }
+ return super.completeAction();
+ }
+
+ public ClauseActivation getClauseActivation(Clause clause) {
+ // Get the clause activation corresponding to the given clause.
+ // Debug.println("[getClauseActivation] clause = " + clause);
+ ClauseActivation selectedClauseActivation = null;
+ int i = 1;
+ while((selectedClauseActivation == null) & i <= this.clauseActivations.size()) {
+ ClauseActivation clauseActivation = this.clauseActivations.get(i - 1);
+ // Debug.println("[getClauseActivations] clauseActivations[" + i +
+ // "].clause = " + clauseActivation.clause);
+ if(clauseActivation.clause == clause) {
+ selectedClauseActivation = clauseActivation;
+ }
+ i = i + 1;
+ }
+ return selectedClauseActivation;
+ }
+
+ public void runTest(Clause clause) {
+ // Run the test for the given clause.
+ if(this.isRunning()) {
+ this.activationGroup.runNodes(this.makeActivityNodeList(clause.getTests()));
+ }
+ }
+
+ public void selectBody(Clause clause) {
+ // Add the clause to the list of selected clauses.
+ this.selectedClauses.add(clause);
+ }
+
+ public void resume() {
+ // When this conditional node is resumed after being suspended, complete
+ // its body and then resume it as a structured activity node.
+ // [Note that this presumes that accept event actions are not allowed
+ // in the test part of a clause of a conditional node.]
+ completeBody();
+ super.resume();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/LoopNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/LoopNodeActivation.java
new file mode 100644
index 00000000000..00f1a2f0a68
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/LoopNodeActivation.java
@@ -0,0 +1,256 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.OutputPinActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.ExecutableNode;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.LoopNode;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Pin;
+
+public class LoopNodeActivation extends StructuredActivityNodeActivation {
+
+ public List<Values> bodyOutputLists = new ArrayList<Values>();
+ public Boolean isTerminateAll;
+
+ public void doStructuredActivity() {
+ // Set the initial values for the body outputs to the values of the loop
+ // variable input pins.
+ // If isTestedFirst is true, then repeatedly run the test part and the
+ // body part of the loop, copying values from the body outputs to the
+ // loop variables.
+ // If isTestedFirst is false, then repeatedly run the body part and the
+ // test part of the loop, copying values from the body outputs to the
+ // loop variables.
+ // When the test fails, copy the values of the body outputs to the loop
+ // outputs.
+ // [Note: The body outputs are used for the loop outputs, rather than
+ // the loop variables, since values on the loop variables may be
+ // consumed when running the test for the last time.]
+ LoopNode loopNode = (LoopNode)(this.node);
+ List<InputPin> loopVariableInputs = loopNode.getLoopVariableInputs();
+
+ this.bodyOutputLists.clear(); // Added
+
+ for(int i = 0; i < loopVariableInputs.size(); i++) {
+ InputPin loopVariableInput = loopVariableInputs.get(i);
+ Values bodyOutputList = new Values();
+ bodyOutputList.values = this.takeTokens(loopVariableInput);
+ this.bodyOutputLists.add(bodyOutputList);
+ }
+ this.isTerminateAll = false;
+ this.doLoop(true);
+ }
+
+ public void doLoop(Boolean continuing) {
+ // If isTestedFirst is true, then repeatedly run the test part and the
+ // body part of the loop, copying values from the body outputs to the
+ // loop variables.
+ // If isTestedFirst is false, then repeatedly run the body part and the
+ // test part of the loop, copying values from the body outputs to the
+ // loop variables.
+ LoopNode loopNode = (LoopNode)(this.node);
+ List<OutputPin> loopVariables = loopNode.getLoopVariables();
+ List<OutputPin> resultPins = this.getResults(); // CHANGED from: loopNode.getResults();
+ while(continuing) {
+ // Set loop variable values
+ this.runLoopVariables();
+ for(int i = 0; i < loopVariables.size(); i++) {
+ OutputPin loopVariable = loopVariables.get(i);
+ Values bodyOutputList = bodyOutputLists.get(i);
+ List<Value> values = bodyOutputList.values;
+ this.putPinValues(loopVariable, values);
+ ((OutputPinActivation)this.activationGroup.getNodeActivation(loopVariable)).sendUnofferedTokens();
+ }
+ // Run all the non-executable, non-pin nodes in the conditional
+ // node.
+ List<ActivityNodeActivation> nodeActivations = this.activationGroup.nodeActivations;
+ List<ActivityNodeActivation> nonExecutableNodeActivations = new ArrayList<ActivityNodeActivation>();
+ for(int i = 0; i < nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations.get(i);
+ if(!(nodeActivation.node instanceof ExecutableNode | nodeActivation.node instanceof Pin)) {
+ nonExecutableNodeActivations.add(nodeActivation);
+ }
+ }
+ this.activationGroup.run(nonExecutableNodeActivations);
+ // Run the loop
+ if(loopNode.isTestedFirst()) {
+ continuing = this.runTest();
+ if(continuing) {
+ this.runBody();
+ }
+ } else {
+ this.runBody();
+ if(this.isRunning() & !this.isSuspended()) {
+ continuing = this.runTest();
+ }
+ }
+ if(!this.isTerminateAll & this.isRunning() & !this.isSuspended()) {
+ this.activationGroup.terminateAll();
+ } else {
+ continuing = false;
+ }
+ Debug.println("[doStructuredActivity] " + (continuing ? "Continuing." : this.isSuspended() ? "Suspended" : "Done."));
+ }
+ if(!this.isTerminateAll & this.isRunning() & !this.isSuspended()) {
+ for(int i = 0; i < bodyOutputLists.size(); i++) {
+ Values bodyOutputList = bodyOutputLists.get(i);
+ OutputPin resultPin = resultPins.get(i);
+ this.putTokens(resultPin, bodyOutputList.values);
+ }
+ }
+ }
+
+ public Boolean runTest() {
+ // Run the test part of the loop node for this node activation.
+ // Return the value on the decider pin.
+ Debug.println("[runTest] Running test...");
+ LoopNode loopNode = (LoopNode)(this.node);
+ this.activationGroup.runNodes(this.makeActivityNodeList(loopNode.getTests()));
+ List<Value> values = this.getPinValues(loopNode.getDecider());
+ // If there is no decider value, treat it as false.
+ boolean decision = false;
+ if(values.size() > 0) {
+ decision = ((BooleanValue)(values.get(0))).value;
+ }
+ Debug.println("[runTest] " + (decision ? "Test succeeded." : "Test failed."));
+ return decision;
+ }
+
+ public void runBody() {
+ // Run the body part of the loop node for this node activation and save
+ // the body outputs.
+ Debug.println("[runBody] Running body...");
+ LoopNode loopNode = (LoopNode)this.node;
+ this.activationGroup.runNodes(this.makeActivityNodeList(loopNode.getBodyParts()));
+ if(!this.isTerminateAll && !this.isSuspended()) {
+ this.saveBodyOutputs();
+ }
+ }
+
+ public void saveBodyOutputs() {
+ // Save the body outputs for use in the next iteration.
+ LoopNode loopNode = (LoopNode)this.node;
+ List<OutputPin> bodyOutputs = loopNode.getBodyOutputs();
+ List<Values> bodyOutputLists = this.bodyOutputLists;
+ for(int i = 0; i < bodyOutputs.size(); i++) {
+ OutputPin bodyOutput = bodyOutputs.get(i);
+ Values bodyOutputList = bodyOutputLists.get(i);
+ bodyOutputList.values = this.getPinValues(bodyOutput);
+ }
+ }
+
+ public void runLoopVariables() {
+ // Run the loop variable pins of the loop node for this node activation.
+ this.activationGroup.runNodes(this.makeLoopVariableList());
+ }
+
+ public void createNodeActivations() {
+ // In addition to creating activations for contained nodes, create
+ // activations for any loop variables.
+
+ super.createNodeActivations();
+ this.activationGroup.createNodeActivations(this.makeLoopVariableList());
+ }
+
+ public List<ActivityNode> makeLoopVariableList() {
+ // Return an activity node list containing the loop variable pins for
+ // the loop node of this activation.
+ LoopNode loopNode = (LoopNode)(this.node);
+ List<ActivityNode> nodes = new ArrayList<ActivityNode>();
+ List<OutputPin> loopVariables = loopNode.getLoopVariables();
+ for(int i = 0; i < loopVariables.size(); i++) {
+ OutputPin loopVariable = loopVariables.get(i);
+ nodes.add(loopVariable);
+ }
+ return nodes;
+ }
+
+ public void terminateAll() {
+ // Copy the values of the body outputs to the loop outputs, and then
+ // terminate all activations in the loop.
+ this.isTerminateAll = true;
+ LoopNode loopNode = (LoopNode) this.node;
+ List<OutputPin> bodyOutputs = loopNode.getBodyOutputs();
+ List<OutputPin> resultPins = this.getResults();
+ for (int i = 0; i < bodyOutputs.size(); i++) {
+ OutputPin bodyOutput = bodyOutputs.get(i);
+ OutputPin resultPin = resultPins.get(i);
+ this.putTokens(resultPin, this.getPinValues(bodyOutput));
+ }
+ super.terminateAll();
+ }
+
+ public void resume() {
+ // When this loop node is resumed after being suspended, continue with
+ // its next iteration (if any). Once the loop has completed execution
+ // without being suspended again, complete the action.
+ LoopNode loopNode = (LoopNode)(this.node);
+ this.saveBodyOutputs();
+ if (!this.isTerminateAll) {
+ if(loopNode.isMustIsolate()) {
+ _beginIsolation();
+ this.continueLoop();
+ _endIsolation();
+ } else {
+ this.continueLoop();
+ }
+ }
+ if(this.isSuspended()) {
+ // NOTE: If the subsequent iteration of the loop suspends it again,
+ // then it is necessary to remove the previous suspension from the
+ // containing activity node activation group.
+ this.group.resume(this);
+ } else {
+ super.resume();
+ }
+ }
+
+ public void continueLoop() {
+ // Continue the loop node when it is resumed after being suspended. If
+ // isTestedFirst is true, then continue executing the loop. If
+ // isTestedFirst is false, then run the test to determine whether
+ // the loop should be continued or completed.
+ // [Note that this presumes that an accept event action is not allowed
+ // in the test part of a loop node.]
+ LoopNode loopNode = (LoopNode)(this.node);
+ boolean continuing = true;
+ if(!loopNode.isTestedFirst()) {
+ continuing = this.runTest();
+ }
+ if(this.isRunning()) {
+ this.activationGroup.terminateAll();
+ this.doLoop(continuing);
+ }
+ }
+
+ // ADDED:
+ private List<OutputPin> getResults() {
+ LoopNode node = (LoopNode)this.node;
+ List<OutputPin> results = new ArrayList<OutputPin>(node.getResults());
+ List<OutputPin> loopVariables = node.getLoopVariables();
+ results.removeAll(loopVariables);
+ return results;
+ }
+ //
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/StructuredActivityNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/StructuredActivityNodeActivation.java
new file mode 100644
index 00000000000..dcc779150ab
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/StructuredActivityNodeActivation.java
@@ -0,0 +1,211 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.PinActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ObjectToken;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.ExecutableNode;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.StructuredActivityNode;
+
+public class StructuredActivityNodeActivation extends ActionActivation {
+
+ /*
+ * The group of activations of the activity nodes contained in the
+ * structured activity node.
+ */
+ public ActivityNodeActivationGroup activationGroup;
+
+ public void doAction() {
+ // If the structured activity node has mustIsolate=true, then carry out
+ // its behavior with isolation.
+ // Otherwise just activate it normally.
+ if(((StructuredActivityNode)(this.node)).isMustIsolate()) {
+ _beginIsolation();
+ this.doStructuredActivity();
+ _endIsolation();
+ } else {
+ this.doStructuredActivity();
+ }
+ }
+
+ public void doStructuredActivity() {
+ // Run all activations of contained nodes. When this is complete,
+ // return.
+ // (This is the default behavior for a structured activity node used
+ // simply as a group. It is overridden for the execution of conditional
+ // and loop nodes.)
+ Action action = (Action)(this.node);
+ // *** Concurrently send offers from all input pins. ***
+ List<InputPin> inputPins = getInputs(action); // CHANGED from: action.getInputs();
+ for(Iterator<InputPin> i = inputPins.iterator(); i.hasNext();) {
+ InputPin inputPin = i.next();
+ PinActivation pinActivation = this.getPinActivation(inputPin);
+ pinActivation.sendUnofferedTokens();
+ }
+ this.activationGroup.run(this.activationGroup.nodeActivations);
+ }
+
+ public void terminate() {
+ // Terminate the execution of all contained node activations (which
+ // completes the performance of the structured activity node
+ // activation), and then terminate this node itself.
+ this.terminateAll();
+ super.terminate();
+ }
+
+ public ActivityNodeActivation getNodeActivation(ActivityNode node) {
+ // If this structured activity node activation is not for the given
+ // node, then check if there is an activation for the node in the
+ // activation group.
+ ActivityNodeActivation thisActivation = super.getNodeActivation(node);
+ ActivityNodeActivation activation = null;
+ if(thisActivation != null) {
+ activation = thisActivation;
+ } else if(this.activationGroup != null) {
+ activation = this.activationGroup.getNodeActivation(node);
+ }
+ return activation;
+ }
+
+ public List<ActivityNode> makeActivityNodeList(List<ExecutableNode> nodes) {
+ // Return an activity node list containing the given list of executable
+ // nodes
+ // and any pins that they own.
+ List<ActivityNode> activityNodes = new ArrayList<ActivityNode>();
+ for(int i = 0; i < nodes.size(); i++) {
+ ActivityNode node = nodes.get(i);
+ activityNodes.add(node);
+ if(node instanceof Action) {
+ Action action = (Action)node;
+ List<InputPin> inputPins = getInputs(action); // CHANGED from: action.getInputs();
+ for(int j = 0; j < inputPins.size(); j++) {
+ InputPin inputPin = inputPins.get(j);
+ activityNodes.add(inputPin);
+ }
+ List<OutputPin> outputPins = getOutputs(action); // CHANGED from: action.getOutputs();
+ for(int j = 0; j < outputPins.size(); j++) {
+ OutputPin outputPin = outputPins.get(j);
+ activityNodes.add(outputPin);
+ }
+ }
+ }
+ return activityNodes;
+ }
+
+ public List<Value> getPinValues(OutputPin pin) {
+ // Return the values of the tokens on the pin activation corresponding
+ // to the given pin in the internal activation group for this node
+ // activation.
+ PinActivation pinActivation = (PinActivation)(this.activationGroup.getNodeActivation(pin));
+ List<Token> tokens = pinActivation.getTokens();
+ List<Value> values = new ArrayList<Value>();
+ for(int i = 0; i < tokens.size(); i++) {
+ Token token = tokens.get(i);
+ Value value = ((ObjectToken)token).value;
+ if(value != null) {
+ values.add(value);
+ }
+ }
+ return values;
+ }
+
+ public void putPinValues(OutputPin pin, List<Value> values) {
+ // Place tokens for the given values on the pin activation corresponding
+ // to the given output pin on the internal activation group for this
+ // node activation.
+ PinActivation pinActivation = (PinActivation)(this.activationGroup.getNodeActivation(pin));
+ for(int i = 0; i < values.size(); i++) {
+ Value value = values.get(i);
+ ObjectToken token = new ObjectToken();
+ token.value = value;
+ pinActivation.addToken(token);
+ }
+ }
+
+ public void createNodeActivations() {
+ // Create an activation group and create node activations for all the
+ // nodes within the structured activity node.
+ super.createNodeActivations();
+
+ this.activationGroup = new ActivityNodeActivationGroup();
+ this.activationGroup.containingNodeActivation = this;
+ this.activationGroup.createNodeActivations(((StructuredActivityNode)(this.node)).getNodes());
+ }
+
+ public void createEdgeInstances() {
+ // Create instances for all edges owned by this node.
+ this.activationGroup.createEdgeInstances(((StructuredActivityNode)(this.node)).getEdges());
+ }
+
+ public Boolean isSourceFor(ActivityEdgeInstance edgeInstance) {
+ // Returns true if this node is either the source for the given
+ // edgeInstance itself or if it contains the source in its
+ // activation group.
+ boolean isSource = super.isSourceFor(edgeInstance);
+ if(!isSource) {
+ isSource = this.activationGroup.hasSourceFor(edgeInstance);
+ }
+ return isSource;
+ }
+
+ public void terminateAll() {
+ // Terminate the execution of all contained node activations (which
+ // completes the performance of the structured activity node
+ // activation).
+ this.activationGroup.terminateAll();
+ }
+
+ public Boolean isSuspended() {
+ // Check if the activation group for this node is suspended.
+ return this.activationGroup.isSuspended();
+ }
+
+ public List<Token> completeAction() {
+ // Only actually complete this structured activity node if it is not
+ // suspended.
+ List<Token> incomingTokens = new ArrayList<Token>();
+ if(!this.isSuspended()) {
+ incomingTokens = super.completeAction();
+ }
+ return incomingTokens;
+ }
+
+ public void resume() {
+ // When this structured activity node is resumed after being suspended,
+ // then complete its prior firing and, if there are more incoming
+ // tokens, fire it again. If, after that, the node is not suspended,
+ // then finish its resumption.
+ List<Token> incomingTokens = super.completeAction();
+ if(incomingTokens.size() > 0) {
+ this.fire(incomingTokens);
+ }
+ if(!this.isSuspended()) {
+ super.resume();
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/Values.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/Values.java
new file mode 100644
index 00000000000..1b1a50373c3
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/CompleteStructuredActivities/Values.java
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public class Values {
+
+ public List<Value> values = new ArrayList<Value>();
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionActivationGroup.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionActivationGroup.java
new file mode 100644
index 00000000000..d66654af7dc
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionActivationGroup.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.OutputPinActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.ExpansionRegion;
+
+public class ExpansionActivationGroup extends ActivityNodeActivationGroup {
+
+ /*
+ * Output pin activations corresponding, in order, to the input pins of the
+ * expansion region of this activation group.
+ */
+ public List<OutputPinActivation> regionInputs = new ArrayList<OutputPinActivation>();
+
+ /*
+ * Output pin activations corresponding, in order, to the input expansion
+ * nodes of the expansion region of this activation group.
+ */
+ public List<OutputPinActivation> groupInputs = new ArrayList<OutputPinActivation>();
+
+ /*
+ * The expansion region activation this activation group is for.
+ */
+ public ExpansionRegionActivation regionActivation;
+
+ /*
+ * Output pin activations corresponding, in order, to the output expansion
+ * nodes of the expansion region of this activation group.
+ */
+ public List<OutputPinActivation> groupOutputs = new ArrayList<OutputPinActivation>();
+
+ /*
+ * The index (starting at 1) of this activation group in the list held by
+ * the expansion region activation.
+ */
+ public Integer index;
+
+ public ActivityNodeActivation getNodeActivation(ActivityNode node) {
+ // If the given node is an input pin of the expansion region, then
+ // return the corresponding region-input output-pin activation.
+ // If the given node is an input expansion node of the expansion region,
+ // then return the corresponding group-input output-pin activation.
+ // If the given node is an output expansion node of the expansion
+ // region, then return the corresponding group-output output-pin
+ // activation.
+ // Otherwise return the node activation from the activation group, as
+ // usual.
+ ExpansionRegion region = (ExpansionRegion)(this.regionActivation.node);
+ // List<InputPin> inputs = region.getInputs();
+ ActivityNodeActivation activation = null;
+ int i = 1;
+ while(activation == null & i <= region.getInputs().size()) {
+ if(node == region.getInputs().get(i - 1)) {
+ activation = this.regionInputs.get(i - 1);
+ }
+ i = i + 1;
+ }
+ int j = 1;
+ while(activation == null & j <= region.getInputElements().size()) {
+ if(node == region.getInputElements().get(j - 1)) {
+ activation = this.groupInputs.get(j - 1);
+ }
+ j = j + 1;
+ }
+ int k = 1;
+ while(activation == null & k <= region.getOutputElements().size()) {
+ if(node == region.getOutputElements().get(k - 1)) {
+ activation = this.groupOutputs.get(k - 1);
+ }
+ k = k + 1;
+ }
+ if(activation == null) {
+ activation = super.getNodeActivation(node);
+ }
+ return activation;
+ }
+
+ public ActivityExecution getActivityExecution() {
+ // Get the activity execution that contains the expansion region
+ // activation for this activation group.
+ return this.regionActivation.getActivityExecution();
+ }
+
+ public void suspend(ActivityNodeActivation activation) {
+ // Suspend the given activation in this activation group. If this is
+ // the only suspended activation, then suspend the associated region
+ // activation.
+ if(!this.isSuspended()) {
+ this.regionActivation.suspend();
+ }
+ super.suspend(activation);
+ }
+
+ public void resume(ActivityNodeActivation activation) {
+ // Resume the given activation in this activation group. If this is the
+ // last suspended activation, then resume the associated region
+ // activation.
+ super.resume(activation);
+ if(!this.isSuspended()) {
+ this.regionActivation.resume(this);
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionNodeActivation.java
new file mode 100644
index 00000000000..4c99267ae0b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionNodeActivation.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ObjectNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.uml2.uml.ExpansionNode;
+import org.eclipse.uml2.uml.ExpansionRegion;
+
+public class ExpansionNodeActivation extends ObjectNodeActivation {
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Take tokens from all incoming edges.
+ Debug.println("[fire] Expansion node " + this.node.getName() + "...");
+ this.addTokens(incomingTokens);
+ }
+
+ public void receiveOffer() {
+ // Forward the offer on to the expansion region.
+ this.getExpansionRegionActivation().receiveOffer();
+ }
+
+ public Boolean isReady() {
+ // An expansion node is always fired by its expansion region.
+ return false;
+ }
+
+ public ExpansionRegionActivation getExpansionRegionActivation() {
+ // Return the expansion region activation corresponding to this
+ // expansion node, in the context of the activity node activation group
+ // this expansion node activation is in.
+ ExpansionNode node = (ExpansionNode)(this.node);
+ ExpansionRegion region = node.getRegionAsInput();
+ if(region == null) {
+ region = node.getRegionAsOutput();
+ }
+ return (ExpansionRegionActivation)(this.group.getNodeActivation(region));
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionRegionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionRegionActivation.java
new file mode 100644
index 00000000000..ac64fe6a74a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/ExpansionRegionActivation.java
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.OutputPinActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+import org.eclipse.uml2.uml.ExpansionKind;
+import org.eclipse.uml2.uml.ExpansionNode;
+import org.eclipse.uml2.uml.ExpansionRegion;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.StructuredActivityNode;
+
+public class ExpansionRegionActivation extends ActionActivation {
+
+ /*
+ * The set of expansion activation groups for this expansion region
+ * activation. One activation group is created corresponding to each token
+ * held by the first input expansion node activation for the expansion
+ * region.
+ */
+ public List<ExpansionActivationGroup> activationGroups = new ArrayList<ExpansionActivationGroup>();
+
+ /*
+ * The tokens taken from each of the input pin activations for this
+ * expansion region activation. These are preserved for initializing the
+ * region inputs of each of the activation groups.
+ */
+ public List<TokenSet> inputTokens = new ArrayList<TokenSet>();
+
+ /*
+ * The tokens taken from each of the input expansion node activations for
+ * this expansion region activation. These are preserved for initializing
+ * the group input of each of the activation groups.
+ */
+ public List<TokenSet> inputExpansionTokens = new ArrayList<TokenSet>();
+
+ public Integer next;
+
+ public List<Token> takeOfferedTokens() {
+ // Take the tokens from the input pin and input expansion node
+ // activations and save them.
+ super.takeOfferedTokens();
+ ExpansionRegion region = (ExpansionRegion)(this.node);
+ List<InputPin> inputPins = region.getInputs();
+ List<ExpansionNode> inputElements = region.getInputElements();
+ this.inputTokens.clear();
+ this.inputExpansionTokens.clear();
+ for(int i = 0; i < inputPins.size(); i++) {
+ InputPin inputPin = inputPins.get(i);
+ TokenSet tokenSet = new TokenSet();
+ tokenSet.tokens = this.getPinActivation(inputPin).takeTokens();
+ this.inputTokens.add(tokenSet);
+ }
+ int n = this.numberOfValues();
+ for(int i = 0; i < inputElements.size(); i++) {
+ ExpansionNode inputElement = inputElements.get(i);
+ ExpansionNodeActivation expansionNodeActivation = this.getExpansionNodeActivation(inputElement);
+ expansionNodeActivation.fire(expansionNodeActivation.takeOfferedTokens());
+ List<Token> tokens = expansionNodeActivation.takeTokens();
+ TokenSet tokenSet = new TokenSet();
+ int j = 1;
+ while(j <= n) {
+ tokenSet.tokens.add(tokens.get(j - 1));
+ j = j + 1;
+ }
+ this.inputExpansionTokens.add(tokenSet);
+ }
+ return new ArrayList<Token>();
+ }
+
+ public void doAction() {
+ // If the expansion region has mustIsolate=true, then carry out its
+ // behavior with isolation.
+ // Otherwise just activate it normally.
+ if(((StructuredActivityNode)(this.node)).isMustIsolate()) {
+ _beginIsolation();
+ this.doStructuredActivity();
+ _endIsolation();
+ } else {
+ this.doStructuredActivity();
+ }
+ }
+
+ public void doStructuredActivity() {
+ // Create a number of expansion region activation groups equal to the
+ // number of values expanded in the region,
+ // setting the region inputs and group inputs for each group.
+ // Run the body of the region in each group, either iteratively or in
+ // parallel.
+ // Add the outputs of each activation group to the corresonding output
+ // expansion node activations.
+ ExpansionRegion region = (ExpansionRegion)this.node;
+ List<InputPin> inputPins = region.getInputs();
+ List<ExpansionNode> inputElements = region.getInputElements();
+ List<ExpansionNode> outputElements = region.getOutputElements();
+ this.activationGroups.clear();
+ int n = this.inputExpansionTokens.get(0).tokens.size();
+ int k = 1;
+ while(k <= n) {
+ ExpansionActivationGroup activationGroup = new ExpansionActivationGroup();
+ activationGroup.regionActivation = this;
+ activationGroup.index = k;
+ int j = 1;
+ while(j <= inputPins.size()) {
+ OutputPinActivation regionInput = new OutputPinActivation();
+ regionInput.run();
+ activationGroup.regionInputs.add(regionInput);
+ j = j + 1;
+ }
+ j = 1;
+ while(j <= inputElements.size()) {
+ OutputPinActivation groupInput = new OutputPinActivation();
+ groupInput.run();
+ activationGroup.groupInputs.add(groupInput);
+ j = j + 1;
+ }
+ j = 1;
+ while(j <= outputElements.size()) {
+ OutputPinActivation groupOutput = new OutputPinActivation();
+ groupOutput.run();
+ activationGroup.groupOutputs.add(groupOutput); // CHANGED "new OutputPinActivation()" to "groupOutput"
+ j = j + 1;
+ }
+ activationGroup.createNodeActivations(region.getNodes());
+ activationGroup.createEdgeInstances(region.getEdges());
+ this.activationGroups.add(activationGroup);
+ k = k + 1;
+ }
+ // List<ExpansionActivationGroup> activationGroups =
+ // this.activationGroups;
+ if(region.getMode() == ExpansionKind.ITERATIVE_LITERAL) {
+ Debug.println("[doStructuredActivity] Expansion mode = iterative");
+ this.next = 1;
+ this.runIterative();
+ } else if(region.getMode() == ExpansionKind.PARALLEL_LITERAL) {
+ Debug.println("[doStructuredActivity] Expansion mode = parallel");
+ this.runParallel();
+ }
+ this.doOutput();
+ }
+
+ public void runIterative() {
+ // Run the body of the region iteratively, either until all activation
+ // groups have run or until the region is suspended.
+ List<ExpansionActivationGroup> activationGroups = this.activationGroups;
+ while(this.next <= activationGroups.size() & !this.isSuspended()) {
+ ExpansionActivationGroup activationGroup = activationGroups.get(this.next - 1);
+ this.runGroup(activationGroup);
+ this.next = this.next + 1;
+ }
+ }
+
+ public void runParallel() {
+ // Run the body of the region concurrently.
+ List<ExpansionActivationGroup> activationGroups = this.activationGroups;
+ // *** Activate all groups concurrently. ***
+ for(Iterator<ExpansionActivationGroup> i = activationGroups.iterator(); i.hasNext();) {
+ ExpansionActivationGroup activationGroup = i.next();
+ this.runGroup(activationGroup);
+ }
+ }
+
+ public void doOutput() {
+ // Place tokens on the output expansion nodes.
+ ExpansionRegion region = (ExpansionRegion)this.node;
+ List<ExpansionNode> outputElements = region.getOutputElements();
+ Debug.println("[doOutput] Expansion region " + region.getName() + " is " + (this.isSuspended() ? "suspended." : "completed."));
+ if(!this.isSuspended()) {
+ for(int i = 0; i < activationGroups.size(); i++) {
+ ExpansionActivationGroup activationGroup = activationGroups.get(i);
+ List<OutputPinActivation> groupOutputs = activationGroup.groupOutputs;
+ for(int j = 0; j < groupOutputs.size(); j++) {
+ OutputPinActivation groupOutput = groupOutputs.get(j);
+ ExpansionNode outputElement = outputElements.get(j);
+ this.getExpansionNodeActivation(outputElement).addTokens(groupOutput.takeTokens());
+ }
+ }
+ }
+ }
+
+ public void terminate() {
+ // Terminate the execution of all contained node activations (which
+ // completes the performance of the expansion region activation).
+ List<ExpansionActivationGroup> activationGroups = this.activationGroups;
+ for(int i = 0; i < activationGroups.size(); i++) {
+ ExpansionActivationGroup activationGroup = this.activationGroups.get(i);
+ List<OutputPinActivation> groupOutputs = activationGroup.groupOutputs;
+ _beginIsolation();
+ for(int j = 0; j < groupOutputs.size(); j++) {
+ OutputPinActivation groupOutput = groupOutputs.get(j);
+ groupOutput.fire(groupOutput.takeOfferedTokens());
+ }
+ activationGroup.terminateAll();
+ _endIsolation();
+ }
+ super.terminate();
+ }
+
+ public void sendOffers() {
+ // Fire all output expansion nodes and send offers on all outgoing
+ // control flows.
+ ExpansionRegion region = (ExpansionRegion)(this.node);
+ // *** Send offers from all output expansion nodes concurrently. ***
+ List<ExpansionNode> outputElements = region.getOutputElements();
+ for(Iterator<ExpansionNode> i = outputElements.iterator(); i.hasNext();) {
+ ExpansionNode outputElement = i.next();
+ this.getExpansionNodeActivation(outputElement).sendUnofferedTokens();
+ }
+ // Send offers on all outgoing control flows.
+ super.sendOffers();
+ }
+
+ public void runGroup(ExpansionActivationGroup activationGroup) {
+ // Set up the inputs for the group with the given index, run the group
+ // and then fire the group outputs.
+ if(this.isRunning()) {
+ Debug.println("[runGroup] groupInput[0] = " + this.inputExpansionTokens.get(0).tokens.get(activationGroup.index - 1).getValue());
+ List<TokenSet> inputTokens = this.inputTokens;
+ for(int j = 0; j < inputTokens.size(); j++) {
+ TokenSet tokenSet = inputTokens.get(j);
+ OutputPinActivation regionInput = activationGroup.regionInputs.get(j);
+ regionInput.clearTokens();
+ regionInput.addTokens(tokenSet.tokens);
+ regionInput.sendUnofferedTokens();
+ }
+ List<TokenSet> inputExpansionTokens = this.inputExpansionTokens;
+ for(int j = 0; j < inputExpansionTokens.size(); j++) {
+ TokenSet tokenSet = inputExpansionTokens.get(j);
+ OutputPinActivation groupInput = activationGroup.groupInputs.get(j);
+ groupInput.clearTokens();
+ if(tokenSet.tokens.size() >= activationGroup.index) {
+ groupInput.addToken(tokenSet.tokens.get(activationGroup.index - 1));
+ }
+ groupInput.sendUnofferedTokens();
+ }
+ activationGroup.run(activationGroup.nodeActivations);
+ this.terminateGroup(activationGroup);
+ }
+ }
+
+ public void terminateGroup(ExpansionActivationGroup activationGroup) {
+ // Terminate the given activation group, after preserving any group
+ // outputs.
+ if(this.isRunning() & !this.isSuspended()) {
+ List<OutputPinActivation> groupOutputs = activationGroup.groupOutputs;
+ for(int i = 0; i < groupOutputs.size(); i++) {
+ OutputPinActivation groupOutput = groupOutputs.get(i);
+ groupOutput.fire(groupOutput.takeOfferedTokens());
+ }
+ activationGroup.terminateAll();
+ }
+ }
+
+ public ExpansionNodeActivation getExpansionNodeActivation(ExpansionNode node) {
+ // Return the expansion node activation corresponding to the given
+ // expansion node, in the context of the activity node activation group
+ // this expansion region activation is in.
+ // [Note: Expansion regions do not own their expansion nodes. Instead,
+ // they are own as object nodes by the enclosing activity or group.
+ // Therefore, they will already be activated along with their expansion
+ // region.]
+ return (ExpansionNodeActivation)(this.group.getNodeActivation(node));
+ }
+
+ public Integer numberOfValues() {
+ // Return the number of values to be acted on by the expansion region of
+ // this activation, which is the minimum of the number of values offered
+ // to each of the input expansion nodes of the activation.
+ ExpansionRegion region = (ExpansionRegion)(this.node);
+ List<ExpansionNode> inputElements = region.getInputElements();
+ int n = this.getExpansionNodeActivation(inputElements.get(0)).countOfferedValues();
+ int i = 2;
+ while(i <= inputElements.size()) {
+ int count = this.getExpansionNodeActivation(inputElements.get(i - 1)).countOfferedValues();
+ if(count < n) {
+ n = count;
+ }
+ i = i + 1;
+ }
+ return n;
+ }
+
+ public Boolean isSuspended() {
+ // Check if the activation group for this node is suspended.
+ boolean suspended = false;
+ int i = 1;
+ while(i <= this.activationGroups.size() & !suspended) {
+ ActivityNodeActivationGroup group = this.activationGroups.get(i - 1);
+ suspended = group.isSuspended();
+ i = i + 1;
+ }
+ return suspended;
+ }
+
+ public void resume(ExpansionActivationGroup activationGroup) {
+ // Resume an expansion region after the suspension of the given
+ // activation group. If the region is iterative, then continue with the
+ // iteration. If the region is parallel, and there are no more suspended
+ // activation groups, then generate the expansion node output.
+ ExpansionRegion region = (ExpansionRegion)this.node;
+ this.resume();
+ this.terminateGroup(activationGroup);
+ if(region.getMode() == ExpansionKind.ITERATIVE_LITERAL) {
+ this.runIterative();
+ }
+ this.doOutput();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/TokenSet.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/TokenSet.java
new file mode 100644
index 00000000000..c1974e1f452
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/ExtraStructuredActivities/TokenSet.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.Token;
+
+public class TokenSet {
+
+ /*
+ * The set of tokens in this input set.
+ */
+ public List<Token> tokens = new ArrayList<Token>();
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java
new file mode 100644
index 00000000000..56c3ee900df
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java
@@ -0,0 +1,202 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.MokaConstants;
+import org.eclipse.papyrus.moka.communication.event.isuspendresume.Suspend_Event;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.debug.MokaThread;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.debug.StackFrameManager;
+import org.eclipse.papyrus.moka.fuml.presentation.FUMLPresentationUtils;
+import org.eclipse.papyrus.moka.ui.presentation.AnimationUtils;
+import org.eclipse.uml2.uml.ActivityEdge;
+
+public class ActivityEdgeInstance {
+
+ /*
+ * The activity edge of which this is an instance. [This is optional to
+ * allow for an implicit fork node execution to be connected to its action
+ * execution by an edge instance which does not have a corresponding node in
+ * the model.]
+ */
+ public ActivityEdge edge;
+
+ /*
+ * The activity group that contains this activity edge instance.
+ */
+ public ActivityNodeActivationGroup group;
+
+ /*
+ * The source of this activity edge instance. The node of the source must be
+ * the same as the source of the edge of this edge instance.
+ */
+ public ActivityNodeActivation source;
+
+ /*
+ * The target of this activity edge instance. The node of the target must be
+ * the same as the target of the edge of this edge instance.
+ */
+ public ActivityNodeActivation target;
+
+ public List<Offer> offers = new ArrayList<Offer>();
+
+ public void sendOffer(List<Token> tokens) {
+ // Send an offer from the source to the target.
+ // Keep the offered tokens until taken by the target.
+ // (Note that any one edge should only be handling either all object
+ // tokens or all control tokens.)
+ Offer offer = new Offer();
+ for(int i = 0; i < tokens.size(); i++) {
+ Token token = tokens.get(i);
+ // Debug.println("[sendOffer] token value = " + token.get());
+ offer.offeredTokens.add(token);
+ }
+ this.offers.add(offer);
+
+ // Connection with the debug api
+ if (this.group != null) { // TODO : Understand why group may be null
+ Locus locus = this.group.getActivityExecution().locus ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ boolean animationMarkerNeedsToBeRemoved = false ;
+ long date = 0 ;
+ if (MokaConstants.MOKA_AUTOMATIC_ANIMATION) {
+ date = System.currentTimeMillis() ;
+ AnimationUtils.getInstance().addAnimationMarker(edge) ;
+ animationMarkerNeedsToBeRemoved = true ;
+ }
+ MokaStackFrame stackFrame = FUMLPresentationUtils.getMokaStackFrame(this) ;
+ //stackFrame.setModelElement(this.edge) ;
+ stackFrame.setThread(locus.mainThread) ;
+ stackFrame.setName(this.edge.getName()) ;
+ StackFrameManager.getInstance().setStackFrame(this.group.getActivityExecution(), stackFrame) ;
+ int reasonForSuspending = FUMLExecutionEngine.controlDelegate.shallSuspend(this.group.getActivityExecution(), this) ;
+ if (reasonForSuspending != -1) {
+ locus.mainThread.setSuspended(true) ;
+ locus.mainThread.setStackFrames(null) ;
+ //locus.stackFrames = new MokaStackFrame[]{stackFrame} ;
+ locus.stackFrames = StackFrameManager.getInstance().getStackFrames() ;
+ Suspend_Event breakpointEvent = new Suspend_Event(locus.mainThread, reasonForSuspending, new MokaThread[]{locus.mainThread}) ;
+ locus.engine.sendEvent(breakpointEvent) ;
+ try {
+ FUMLExecutionEngine.controlDelegate.suspend(this.group.getActivityExecution()) ;
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ locus.mainThread.setSuspended(false) ;
+ }
+ if (animationMarkerNeedsToBeRemoved) {
+ try {
+ long ellapsed = System.currentTimeMillis() - date ;
+ long delay = Math.max(1,MokaConstants.MOKA_ANIMATION_DELAY - ellapsed) ;
+ Thread.sleep(delay) ;
+ } catch (InterruptedException e1) {
+ Activator.log.error(e1);
+ }
+ AnimationUtils.getInstance().removeAnimationMarker(edge) ;
+ }
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ }
+
+ // End: Connection with the debug api
+
+ this.target.receiveOffer();
+ }
+
+ public Integer countOfferedValues() {
+ // Return the number of values being offered in object tokens.
+ int count = 0;
+ List<Offer> offers = this.offers;
+ for(int i = 0; i < offers.size(); i++) {
+ count = count + offers.get(i).countOfferedValues();
+ }
+ return count;
+ }
+
+ public List<Token> takeOfferedTokens() {
+ // Take all the offered tokens and return them.
+ List<Token> tokens = new ArrayList<Token>();
+ while(this.offers.size() > 0) {
+ List<Token> offeredTokens = this.offers.get(0).getOfferedTokens();
+ for(int i = 0; i < offeredTokens.size(); i++) {
+ tokens.add(offeredTokens.get(i));
+ }
+ this.offers.remove(0);
+ }
+ return tokens;
+ }
+
+ public List<Token> takeOfferedTokens(Integer maxCount) {
+ // Take all the offered tokens, up to the given maximum count of
+ // non-null object tokens, and return them.
+ List<Token> tokens = new ArrayList<Token>();
+ int remainingCount = maxCount;
+ while(this.offers.size() > 0 & remainingCount > 0) {
+ Offer offer = this.offers.get(0);
+ List<Token> offeredTokens = offer.getOfferedTokens();
+ int count = offer.countOfferedValues();
+ if(count <= remainingCount) {
+ for(int i = 0; i < offeredTokens.size(); i++) {
+ tokens.add(offeredTokens.get(i));
+ }
+ remainingCount = remainingCount - count;
+ this.offers.remove(0);
+ } else {
+ for(int i = 0; i < remainingCount; i++) {
+ Token token = offeredTokens.get(i);
+ if(token.getValue() != null) {
+ tokens.add(token);
+ }
+ }
+ offer.removeOfferedValues(remainingCount);
+ remainingCount = 0;
+ }
+ }
+ return tokens;
+ }
+
+ public List<Token> getOfferedTokens() {
+ // Get the offered tokens (after which the tokens will still be
+ // offered).
+ List<Token> tokens = new ArrayList<Token>();
+ List<Offer> offers = this.offers;
+ for(int i = 0; i < offers.size(); i++) {
+ List<Token> offeredTokens = offers.get(i).getOfferedTokens();
+ for(int j = 0; j < offeredTokens.size(); j++) {
+ tokens.add(offeredTokens.get(j));
+ }
+ }
+ return tokens;
+ }
+
+ public Boolean hasOffer() {
+ // Return true if there are any pending offers.
+ boolean hasTokens = false;
+ int i = 1;
+ while(!hasTokens & i <= this.offers.size()) {
+ hasTokens = this.offers.get(i - 1).hasTokens();
+ i = i + 1;
+ }
+ return hasTokens;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityExecution.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityExecution.java
new file mode 100644
index 00000000000..5d4ec8b35a8
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityExecution.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.debug.StackFrameManager;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+
+public class ActivityExecution extends Execution {
+
+ /*
+ * The group of activations of the activity nodes of the activity.
+ */
+ public ActivityNodeActivationGroup activationGroup;
+
+ public void execute() {
+ // Execute the activity for this execution by creating an activity node
+ // activation group and activating all the activity nodes in the
+ // activity.
+ // When this is complete, copy the values on the tokens offered by
+ // output parameter nodes to the corresponding output parameters.
+ Activity activity = (Activity)(this.getTypes().get(0));
+ Debug.println("[execute] Activity " + activity.getName() + "...");
+ // Debug.println("[execute] context = " + this.context.objectId());
+ Debug.println("[event] Execute activity=" + activity.getName());
+ this.activationGroup = new ActivityNodeActivationGroup();
+ this.activationGroup.activityExecution = this;
+ this.activationGroup.activate(activity.getNodes(), activity.getEdges());
+ // Debug.println("[execute] Getting output parameter node activations...");
+ List<ActivityParameterNodeActivation> outputActivations = this.activationGroup.getOutputParameterNodeActivations();
+ // Debug.println("[execute] There are " + outputActivations.size() +
+ // " output parameter node activations.");
+ for(int i = 0; i < outputActivations.size(); i++) {
+ ActivityParameterNodeActivation outputActivation = outputActivations.get(i);
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = ((ActivityParameterNode)(outputActivation.node)).getParameter();
+ List<Token> tokens = outputActivation.getTokens();
+ for(int j = 0; j < tokens.size(); j++) {
+ Token token = tokens.get(j);
+ Value value = ((ObjectToken)token).value;
+ if(value != null) {
+ parameterValue.values.add(value);
+ Debug.println("[event] Output activity=" + activity.getName() + " parameter=" + parameterValue.parameter.getName() + " value=" + value);
+ }
+ }
+ this.setParameterValue(parameterValue);
+ }
+ // Statement added for connection with the DebugAPI
+ StackFrameManager.getInstance().popActivityExecution() ;
+ Debug.println("[execute] Activity " + activity.getName() + " completed.");
+ }
+
+ public Value copy() {
+ // Create a new activity execution that is a copy of this execution.
+ // [Note: This currently just returns a non-executing execution for the
+ // same activity as this execution.]
+ return super.copy();
+ }
+
+ public Value new_() {
+ // Create a new activity execution with empty properties.
+ return new ActivityExecution();
+ }
+
+ public void terminate() {
+ // Terminate all node activations (which will ultimately result in the
+ // activity execution completing).
+ if (this.activationGroup != null) {
+ this.activationGroup.terminateAll();
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityFinalNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityFinalNodeActivation.java
new file mode 100644
index 00000000000..f007a76e0aa
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityFinalNodeActivation.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities.ExpansionActivationGroup;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+
+public class ActivityFinalNodeActivation extends ControlNodeActivation {
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Terminate the activity execution or structured node activation
+ // containing this activation.
+ Debug.println("[fire] Activity final node " + this.node.getName() + "...");
+ if(incomingTokens.size() > 0 | this.incomingEdges.size() == 0) {
+ if(this.group.activityExecution != null) {
+ this.group.activityExecution.terminate();
+ } else if(this.group.containingNodeActivation != null) {
+ this.group.containingNodeActivation.terminateAll();
+ } else if(this.group instanceof ExpansionActivationGroup) {
+ ((ExpansionActivationGroup)this.group).regionActivation.terminate();
+ }
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivation.java
new file mode 100644
index 00000000000..d1bf5f9a1cf
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivation.java
@@ -0,0 +1,353 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.MokaConstants;
+import org.eclipse.papyrus.moka.communication.event.isuspendresume.Suspend_Event;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.debug.MokaThread;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.SemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.debug.StackFrameManager;
+import org.eclipse.papyrus.moka.fuml.presentation.FUMLPresentationUtils;
+import org.eclipse.papyrus.moka.ui.presentation.AnimationUtils;
+import org.eclipse.uml2.uml.ActivityNode;
+
+public abstract class ActivityNodeActivation extends SemanticVisitor {
+
+ /*
+ * The group that contains this activity node activation.
+ */
+ public ActivityNodeActivationGroup group;
+
+ /*
+ * The activity node being activated by this activity node activation. The
+ * node must be owned by the activity (type) of the activity execution of
+ * this node activation. [This is optional, to allow for fork node edge
+ * queues and implicit fork and join node activations for actions to not
+ * have nodes in the model.]
+ */
+ public ActivityNode node;
+
+ /*
+ * The set of activity edge instances for the incoming edges of the node.
+ */
+ public List<ActivityEdgeInstance> incomingEdges = new ArrayList<ActivityEdgeInstance>();
+
+ /*
+ * The set of activity edge instances for the outgoing edges of the node.
+ */
+ public List<ActivityEdgeInstance> outgoingEdges = new ArrayList<ActivityEdgeInstance>();
+
+ /*
+ * If true, this node activation is enabled for execution once all its other
+ * prerequesites are satisfied.
+ */
+ public Boolean running;
+
+ public List<Token> heldTokens = new ArrayList<Token>();
+
+ public void run() {
+ // Run the activation of this node.
+ if(this.node != null) {
+ Debug.println("[run] node = " + this.node.getName());
+ } else {
+ Debug.println("[run] Anonymous activation of type " + this.getClass().getName());
+ }
+ this.running = true;
+ }
+
+ public void receiveOffer() {
+ // Receive an offer from an incoming edge.
+ // Check if all prerequisites have been satisfied. If so, fire.
+ Debug.println("[receiveOffer] " + (this.node == null ? "..." : "node = " + this.node.getName()));
+ _beginIsolation();
+ boolean ready = this.isReady();
+ List<Token> tokens = new ArrayList<Token>();
+ if(ready) {
+ Debug.println("[receiveOffer] Firing.");
+ tokens = this.takeOfferedTokens();
+ }
+ _endIsolation();
+ if(ready) {
+ this.fire(tokens);
+ }
+ }
+
+ public List<Token> takeOfferedTokens() {
+ // Get tokens from all incoming edges.
+ List<Token> allTokens = new ArrayList<Token>();
+ List<ActivityEdgeInstance> incomingEdges = this.incomingEdges;
+ for(int i = 0; i < incomingEdges.size(); i++) {
+ ActivityEdgeInstance incomingEdge = incomingEdges.get(i);
+ List<Token> tokens = incomingEdge.takeOfferedTokens();
+ for(int j = 0; j < tokens.size(); j++) {
+ Token token = tokens.get(j);
+ allTokens.add(token);
+ }
+ }
+ return allTokens;
+ }
+
+ // public abstract void fire(List<Token> incomingTokens);
+
+ // This property is introduced for connection to the debug API
+ public List<Token> incomingTokens_DEBUG ;
+
+ public void fire(List<Token> incomingTokens) {
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ this.incomingTokens_DEBUG = incomingTokens ;
+ if (locus.engine.isTerminated())
+ return ;
+ boolean animationMarkerNeedsToBeRemoved = false ;
+ long date = 0 ;
+ if (MokaConstants.MOKA_AUTOMATIC_ANIMATION) {
+ date = System.currentTimeMillis() ;
+ AnimationUtils.getInstance().addAnimationMarker(node) ;
+ animationMarkerNeedsToBeRemoved = true ;
+ }
+ MokaStackFrame stackFrame = FUMLPresentationUtils.getMokaStackFrame(this) ;
+ stackFrame.setThread(locus.mainThread) ;
+ stackFrame.setName(this.node.getName()) ;
+ StackFrameManager.getInstance().setStackFrame(this.getActivityExecution(), stackFrame) ;
+ int reasonForSuspending = FUMLExecutionEngine.controlDelegate.shallSuspend(this.getActivityExecution(), this) ;
+ if (reasonForSuspending != -1) {
+ locus.mainThread.setSuspended(true) ;
+ locus.mainThread.setStackFrames(null) ;
+ //locus.stackFrames = new MokaStackFrame[]{stackFrame} ;
+ locus.stackFrames = StackFrameManager.getInstance().getStackFrames() ;
+ Suspend_Event breakpointEvent = new Suspend_Event(locus.mainThread, reasonForSuspending, new MokaThread[]{locus.mainThread}) ;
+ locus.engine.sendEvent(breakpointEvent) ;
+ try {
+ FUMLExecutionEngine.controlDelegate.suspend(this.getActivityExecution()) ;
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ locus.mainThread.setSuspended(false) ;
+ }
+ if (animationMarkerNeedsToBeRemoved) {
+ try {
+ long ellapsed = System.currentTimeMillis() - date ;
+ long delay = Math.max(1,MokaConstants.MOKA_ANIMATION_DELAY - ellapsed) ;
+ Thread.sleep(delay) ;
+ } catch (InterruptedException e1) {
+ Activator.log.error(e1);
+ }
+ AnimationUtils.getInstance().removeAnimationMarker(node) ;
+ }
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ }
+ //
+
+ public void sendOffers(List<Token> tokens) {
+ // Send offers for the given set of tokens over all outgoing edges (if
+ // there are any tokens actually being offered).
+ if(tokens.size() > 0) {
+ // *** Send all outgoing offers concurrently. ***
+ List<ActivityEdgeInstance> outgoingEdges = this.outgoingEdges;
+ for(Iterator<ActivityEdgeInstance> i = outgoingEdges.iterator(); i.hasNext();) {
+ ActivityEdgeInstance outgoingEdge = i.next();
+ // Debug.println("[sendOffers] Sending offer to " +
+ // outgoingEdge.target.node.getName() + ".");
+ outgoingEdge.sendOffer(tokens);
+ }
+ }
+ }
+
+ public void terminate() {
+ // Terminate the activation of this node.
+ if(this.running) {
+ if(this.node != null) {
+ Debug.println("[terminate] node = " + this.node.getName());
+ } else {
+ Debug.println("[terminate] Anonymous activation of type " + this.getClass().getName());
+ }
+ }
+ this.running = false;
+ }
+
+ public Boolean isReady() {
+ // Check if all the prerequisites for this node have been satisfied.
+ // By default, check that this node is running.
+ return this.isRunning();
+ }
+
+ public Boolean isRunning() {
+ // Test whether this node activation is running.
+ return this.running;
+ }
+
+ public void addOutgoingEdge(ActivityEdgeInstance edge) {
+ // Add an activity edge instance as an outgoing edge of this activity
+ // node activation.
+ edge.source = this;
+ this.outgoingEdges.add(edge);
+ }
+
+ public void addIncomingEdge(ActivityEdgeInstance edge) {
+ // Add an activity edge instance as an incoming edge of this activity
+ // node activation.
+ edge.target = this;
+ this.incomingEdges.add(edge);
+ }
+
+ public void createNodeActivations() {
+ // Create node activations for any subnodes of the node for this
+ // activation.
+ // For most kinds of nodes, this does nothing.
+ return;
+ }
+
+ public void createEdgeInstances() {
+ // Create edge instances for any edge instances owned by the node for
+ // this activation.
+ // For most kinds of nodes, this does nothing.
+ return;
+ }
+
+ public Boolean isSourceFor(ActivityEdgeInstance edgeInstance) {
+ // Check if this node activation is the effective source for the given
+ // edge instance.
+ return edgeInstance.source == this;
+ }
+
+ public ActivityExecution getActivityExecution() {
+ // Return the activity execution that contains this activity node
+ // activation, directly or indirectly.
+ return this.group.getActivityExecution();
+ }
+
+ public Object_ getExecutionContext() {
+ // Get the context object for the containing activity execution.
+ return this.getActivityExecution().context;
+ }
+
+ public Locus getExecutionLocus() {
+ // Get the locus of the containing activity execution.
+ return this.getActivityExecution().locus;
+ }
+
+ public ActivityNodeActivation getNodeActivation(ActivityNode node) {
+ // Get the activity node activation corresponding to the given activity
+ // node, in the context of this activity node activation.
+ // By default, return this activity node activation, if it is for the
+ // given node, otherwise return nothing.
+ ActivityNodeActivation activation = null;
+ if(node == this.node) {
+ activation = this;
+ }
+ return activation;
+ }
+
+ public void addToken(Token token) {
+ // Transfer the given token to be held by this node.
+ if(this.node == null) {
+ Debug.println("[addToken] ...");
+ } else {
+ Debug.println("[addToken] node = " + this.node.getName());
+ }
+ Token transferredToken = token.transfer(this);
+ // Debug.println("[addToken] Adding token with value = " +
+ // transferredToken.get());
+ this.heldTokens.add(transferredToken);
+ }
+
+ public Integer removeToken(Token token) {
+ // Remove the given token, if it is held by this node activation.
+ // Return the position (counting from 1) of the removed token (0 if
+ // there is none removed).
+ boolean notFound = true;
+ int i = 1;
+ while(notFound & i <= this.heldTokens.size()) {
+ if(this.heldTokens.get(i - 1) == token) {
+ if(this.node == null) {
+ Debug.println("[removeToken] ...");
+ } else {
+ Debug.println("[removeToken] node = " + this.node.getName());
+ }
+ this.heldTokens.remove(i - 1);
+ notFound = false;
+ }
+ i = i + 1;
+ }
+ if(notFound) {
+ i = 0;
+ } else {
+ i = i - 1;
+ }
+ return i;
+ }
+
+ public void addTokens(List<Token> tokens) {
+ // Transfer the given tokens to be the held tokens for this node.
+ // if (this.node == null) {
+ // Debug.println("[addTokens] ...");
+ // } else {
+ // Debug.println("[addTokens] node = " + this.node.getName());
+ // }
+ for(int i = 0; i < tokens.size(); i++) {
+ Token token = tokens.get(i);
+ this.addToken(token);
+ }
+ }
+
+ public List<Token> takeTokens() {
+ // Take the tokens held by this node activation.
+ List<Token> tokens = this.getTokens();
+ this.clearTokens();
+ return tokens;
+ }
+
+ public void clearTokens() {
+ // Remove all held tokens.
+ while(this.heldTokens.size() > 0) {
+ this.heldTokens.get(0).withdraw();
+ }
+ }
+
+ public List<Token> getTokens() {
+ // Get the tokens held by this node activation.
+ // Debug.println("[getTokens] node = " + this.node.getName());
+ List<Token> tokens = new ArrayList<Token>();
+ List<Token> heldTokens = this.heldTokens;
+ for(int i = 0; i < heldTokens.size(); i++) {
+ Token heldToken = heldTokens.get(i);
+ // Debug.println("[getTokens] token value = " +
+ // heldTokens.get());
+ tokens.add(heldToken);
+ }
+ return tokens;
+ }
+
+ public void suspend() {
+ // Suspend this activation within the activation group that contains it.
+ this.group.suspend(this);
+ }
+
+ public void resume() {
+ // Resume this activation within the activation group that contains it.
+ this.group.resume(this);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivationGroup.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivationGroup.java
new file mode 100644
index 00000000000..c054cf22d01
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityNodeActivationGroup.java
@@ -0,0 +1,313 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities.StructuredActivityNodeActivation;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.Pin;
+
+public class ActivityNodeActivationGroup {
+
+ /*
+ * The set of activity edge instances for this group.
+ */
+ public List<ActivityEdgeInstance> edgeInstances = new ArrayList<ActivityEdgeInstance>();
+
+ /*
+ * The set of activity node executions for this group.
+ */
+ public List<ActivityNodeActivation> nodeActivations = new ArrayList<ActivityNodeActivation>();
+
+ /*
+ * The activity execution to which this group belongs. (This will be empty
+ * if the group is for a structured activity node activation.)
+ */
+ public ActivityExecution activityExecution;
+
+ /*
+ * The structured activity node activation to which this group belongs.
+ * (This will be empty if the group is for an activity execution.)
+ */
+ public StructuredActivityNodeActivation containingNodeActivation;
+
+ /*
+ * Activity node activations in this activation group that are suspended
+ * waiting for an event occurrence. If an activation group has a containing
+ * node activation and any suspended activations, then the containing node
+ * activation will also be suspended.
+ */
+ public List<ActivityNodeActivation> suspendedActivations = new ArrayList<ActivityNodeActivation>();
+
+ public void run(List<ActivityNodeActivation> activations) {
+ // Run the given node activations and then (concurrently) send an offer
+ // to all activations for nodes with no incoming edges within the given
+ // set.
+ for(int i = 0; i < activations.size(); i++) {
+ ActivityNodeActivation activation = activations.get(i);
+ activation.run();
+ }
+ Debug.println("[run] Checking for enabled nodes...");
+ List<ActivityNodeActivation> enabledActivations = new ArrayList<ActivityNodeActivation>();
+ for(int i = 0; i < activations.size(); i++) {
+ ActivityNodeActivation activation = activations.get(i);
+ Debug.println("[run] Checking node " + activation.node.getName() + "...");
+ if(activation instanceof ActionActivation | activation instanceof ControlNodeActivation | activation instanceof ActivityParameterNodeActivation) {
+ boolean isEnabled = this.checkIncomingEdges(activation.incomingEdges, activations);
+ // For an action activation, also consider incoming edges to
+ // input pins
+ if(isEnabled & activation instanceof ActionActivation) {
+ List<InputPin> inputPins = ((Action)activation.node).getInputs();
+ int j = 1;
+ while(j <= inputPins.size() & isEnabled) {
+ InputPin inputPin = inputPins.get(j - 1);
+ List<ActivityEdgeInstance> inputEdges = ((ActionActivation)activation).getPinActivation(inputPin).incomingEdges;
+ isEnabled = this.checkIncomingEdges(inputEdges, activations);
+ j = j + 1;
+ }
+ }
+ if(isEnabled) {
+ Debug.println("[run] Node " + activation.node.getName() + " is enabled.");
+ enabledActivations.add(activation);
+ }
+ }
+ }
+ // Debug.println("[run] " + enabledActivations.size() +
+ // " node(s) are enabled.");
+ // *** Send offers to all enabled nodes concurrently. ***
+ for(Iterator<ActivityNodeActivation> i = enabledActivations.iterator(); i.hasNext();) {
+ ActivityNodeActivation activation = i.next();
+ Debug.println("[run] Sending offer to node " + activation.node.getName() + ".");
+ activation.receiveOffer();
+ }
+ }
+
+ public Boolean checkIncomingEdges(List<ActivityEdgeInstance> incomingEdges, List<ActivityNodeActivation> activations) {
+ // Check if any incoming edges have a source in a given set of
+ // activations.
+ int j = 1;
+ boolean notFound = true;
+ while(j <= incomingEdges.size() & notFound) {
+ int k = 1;
+ while(k <= activations.size() & notFound) {
+ if(activations.get(k - 1).isSourceFor(incomingEdges.get(j - 1))) {
+ notFound = false;
+ }
+ k = k + 1;
+ }
+ j = j + 1;
+ }
+ return notFound;
+ }
+
+ public void runNodes(List<ActivityNode> nodes) {
+ // Run the node activations associated with the given nodes in this
+ // activation group.
+ List<ActivityNodeActivation> nodeActivations = new ArrayList<ActivityNodeActivation>();
+ for(int i = 0; i < nodes.size(); i++) {
+ ActivityNode node = nodes.get(i);
+ ActivityNodeActivation nodeActivation = this.getNodeActivation(node);
+ if(nodeActivation != null) {
+ nodeActivations.add(nodeActivation);
+ }
+ }
+ this.run(nodeActivations);
+ }
+
+ public void activate(List<ActivityNode> nodes, List<ActivityEdge> edges) {
+ // Activate and run the given set of nodes with the given set of edges,
+ // within this activation group.
+ this.createNodeActivations(nodes);
+ this.createEdgeInstances(edges);
+ this.run(this.nodeActivations);
+ // Debug.println("[activate] Exiting.");
+ }
+
+ public void terminateAll() {
+ // Terminate all node activations in the group.
+ Debug.println("[terminateAll] Terminating activation group for " + (this.activityExecution != null ? "activity " + this.activityExecution.getTypes().get(0).getName() : this.containingNodeActivation != null ? "node " + this.containingNodeActivation.node.getName() : "expansion region") + ".");
+ List<ActivityNodeActivation> nodeActivations = this.nodeActivations;
+ for(int i = 0; i < nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations.get(i);
+ nodeActivation.terminate();
+ }
+ this.suspendedActivations.clear();
+ }
+
+ public void createNodeActivations(List<ActivityNode> nodes) {
+ // Add activity node activations for the given set of nodes to this
+ // group and create edge instances between them.
+ for(int i = 0; i < nodes.size(); i++) {
+ ActivityNode node = nodes.get(i);
+ Debug.println("[createNodeActivations] Creating a node activation for " + node.getName() + "...");
+ this.createNodeActivation(node);
+ }
+ }
+
+ public ActivityNodeActivation createNodeActivation(ActivityNode node) {
+ // Create an activity node activation for a given activity node in this
+ // activity node activation group.
+ ActivityNodeActivation activation = (ActivityNodeActivation)(this.getActivityExecution().locus.factory.instantiateVisitor(node));
+ activation.node = node;
+ activation.running = false;
+ this.addNodeActivation(activation);
+ activation.createNodeActivations();
+ return activation;
+ }
+
+ public void addNodeActivation(ActivityNodeActivation activation) {
+ // Add the given node activation to this group.
+ activation.group = this;
+ this.nodeActivations.add(activation);
+ }
+
+ public ActivityNodeActivation getNodeActivation(ActivityNode node) {
+ // Return the node activation (if any) in this group,
+ // or any nested group, corresponding to the given activity node.
+ // If this is a group for a structured activity node activation,
+ // also include the pin activations for that node activation.
+ ActivityNodeActivation activation = null;
+ if(this.containingNodeActivation != null && node instanceof Pin) {
+ activation = this.containingNodeActivation.getPinActivation((Pin)node);
+ }
+ if(activation == null) {
+ int i = 1;
+ while(activation == null & i <= this.nodeActivations.size()) {
+ activation = this.nodeActivations.get(i - 1).getNodeActivation(node);
+ i = i + 1;
+ }
+ }
+ return activation;
+ }
+
+ public void createEdgeInstances(List<ActivityEdge> edges) {
+ // Create instance edges for the given activity edges, as well as for
+ // edge instances within any nodes activated in this group.
+ for(int i = 0; i < edges.size(); i++) {
+ ActivityEdge edge = edges.get(i);
+ Debug.println("[createEdgeInstances] Creating an edge instance from " + edge.getSource().getName() + " to " + edge.getTarget().getName() + ".");
+ ActivityEdgeInstance edgeInstance = new ActivityEdgeInstance();
+ edgeInstance.edge = edge;
+ this.addEdgeInstance(edgeInstance);
+ this.getNodeActivation(edge.getSource()).addOutgoingEdge(edgeInstance);
+ this.getNodeActivation(edge.getTarget()).addIncomingEdge(edgeInstance);
+ // Debug.println("[createEdgeInstances] Edge instance created...");
+ }
+ List<ActivityNodeActivation> nodeActivations = this.nodeActivations;
+ for(int i = 0; i < nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations.get(i);
+ nodeActivation.createEdgeInstances();
+ }
+ // Debug.println("[createEdgeInstances] Done creating edge instances.");
+ }
+
+ public void addEdgeInstance(ActivityEdgeInstance instance) {
+ // Add the given edge instance to this group.
+ instance.group = this;
+ this.edgeInstances.add(instance);
+ }
+
+ public ActivityExecution getActivityExecution() {
+ // Return the activity execution to which this group belongs, directly
+ // or indirectly.
+ ActivityExecution activityExecution = this.activityExecution;
+ if(activityExecution == null) {
+ activityExecution = this.containingNodeActivation.group.getActivityExecution();
+ }
+ // Debug.println("[getActivityExecution] activityExecution = " +
+ // activityExecution);
+ return activityExecution;
+ }
+
+ public List<ActivityParameterNodeActivation> getOutputParameterNodeActivations() {
+ // Return the set of all activations in this group of activity parameter
+ // nodes for output (inout, out and return) parameters.
+ List<ActivityParameterNodeActivation> parameterNodeActivations = new ArrayList<ActivityParameterNodeActivation>();
+ List<ActivityNodeActivation> nodeActivations = this.nodeActivations;
+ for(int i = 0; i < nodeActivations.size(); i++) {
+ ActivityNodeActivation activation = nodeActivations.get(i);
+ if(activation instanceof ActivityParameterNodeActivation) {
+ if(activation.incomingEdges.size() > 0) {
+ parameterNodeActivations.add((ActivityParameterNodeActivation)activation);
+ }
+ }
+ }
+ return parameterNodeActivations;
+ }
+
+ public Boolean hasSourceFor(ActivityEdgeInstance edgeInstance) {
+ // Returns true if this activation group has a node activation
+ // corresponding to the source of the given edge instance.
+ boolean hasSource = false;
+ List<ActivityNodeActivation> activations = this.nodeActivations;
+ int i = 1;
+ while(!hasSource & i <= activations.size()) {
+ hasSource = activations.get(i - 1).isSourceFor(edgeInstance);
+ i = i + 1;
+ }
+ return hasSource;
+ }
+
+ public Boolean isSuspended() {
+ // Check if this activitation group has any suspended activations and
+ // is,
+ // therefore, itself suspended.
+ return this.suspendedActivations.size() > 0;
+ }
+
+ public void suspend(ActivityNodeActivation activation) {
+ // Suspend the given activation in this activation group. If this is
+ // the only suspended activation, and the activation group has a
+ // containing node activation, then suspend that containing activation.
+ Debug.println("[suspend] node=" + (activation.node == null ? "null" : activation.node.getName()));
+ if(!this.isSuspended()) {
+ StructuredActivityNodeActivation containingNodeActivation = this.containingNodeActivation;
+ if(containingNodeActivation != null) {
+ containingNodeActivation.suspend();
+ }
+ }
+ this.suspendedActivations.add(activation);
+ }
+
+ public void resume(ActivityNodeActivation activation) {
+ // Resume the given activation by removing it from the suspended
+ // activation list for this activation group. If this is the last
+ // suspended activation, and the activation group has a containing
+ // node activation, then resume that containing activation.
+ Debug.println("[resume] node=" + (activation.node == null ? "null" : activation.node.getName()));
+ boolean found = false;
+ int i = 1;
+ while(!found & i <= this.suspendedActivations.size()) {
+ if(this.suspendedActivations.get(i - 1) == activation) {
+ this.suspendedActivations.remove(i - 1);
+ found = true;
+ }
+ i = i + 1;
+ }
+ if(!this.isSuspended()) {
+ StructuredActivityNodeActivation containingNodeActivation = this.containingNodeActivation;
+ if(containingNodeActivation != null) {
+ containingNodeActivation.resume();
+ }
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityParameterNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityParameterNodeActivation.java
new file mode 100644
index 00000000000..0f9c7d372bb
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityParameterNodeActivation.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+import org.eclipse.uml2.uml.Parameter;
+
+public class ActivityParameterNodeActivation extends ObjectNodeActivation {
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // If there are no incoming edges, this is an activation of an input
+ // activity parameter node.
+ // Get the values from the input parameter indicated by the activity
+ // parameter node and offer those values as object tokens.
+ if(this.node.getIncomings().size() == 0) {
+ Debug.println("[fire] Input activity parameter node " + this.node.getName() + "...");
+ Parameter parameter = ((ActivityParameterNode)(this.node)).getParameter();
+ ParameterValue parameterValue = this.getActivityExecution().getParameterValue(parameter);
+ // Debug.println("[fire] parameter = " + parameter.name);
+ if(parameterValue != null) {
+ Debug.println("[fire] Parameter has " + parameterValue.values.size() + " value(s).");
+ // List<Token> tokens = new ArrayList<Token>();
+ List<Value> values = parameterValue.values;
+ for(int i = 0; i < values.size(); i++) {
+ Value value = values.get(i);
+ ObjectToken token = new ObjectToken();
+ token.value = value;
+ this.addToken(token);
+ }
+ this.sendUnofferedTokens();
+ }
+ }
+ // If there are one or more incoming edges, this is an activation of an
+ // output activity parameter node.
+ // Take the tokens offered on incoming edges and add them to the set of
+ // tokens being offered.
+ // [Note that an output activity parameter node may fire multiple times,
+ // accumulating tokens offered to it.]
+ else {
+ Debug.println("[fire] Output activity parameter node " + this.node.getName() + "...");
+ this.addTokens(incomingTokens);
+ }
+ }
+
+ public void clearTokens() {
+ // Clear all held tokens only if this is an input parameter node.
+ if(this.node.getIncomings().size() == 0) {
+ super.clearTokens();
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlNodeActivation.java
new file mode 100644
index 00000000000..aca82d2b7f1
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlNodeActivation.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public abstract class ControlNodeActivation extends ActivityNodeActivation {
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // By default, offer all tokens on all outgoing edges.
+ if(this.node != null) {
+ Debug.println("[fire] Control node " + this.node.getName() + "...");
+ }
+ this.sendOffers(incomingTokens);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlToken.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlToken.java
new file mode 100644
index 00000000000..956eec05cfe
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ControlToken.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public class ControlToken extends Token {
+
+ public Boolean equals(Token other) {
+ // Return true if the other token is a control token, because control
+ // tokens are interchangable.
+ return other instanceof ControlToken;
+ }
+
+ public Token copy() {
+ // Return a new control token.
+ return new ControlToken();
+ }
+
+ public Boolean isControl() {
+ // Return true for a control token.
+ return true;
+ }
+
+ public Value getValue() {
+ // Control tokens do not have values.
+ return null;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java
new file mode 100644
index 00000000000..5f54b89788a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java
@@ -0,0 +1,313 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.MokaConstants;
+import org.eclipse.papyrus.moka.communication.event.isuspendresume.Suspend_Event;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.debug.MokaThread;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.debug.StackFrameManager;
+import org.eclipse.papyrus.moka.fuml.presentation.FUMLPresentationUtils;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.ui.presentation.AnimationUtils;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.DecisionNode;
+import org.eclipse.uml2.uml.ObjectFlow;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class DecisionNodeActivation extends ControlNodeActivation {
+
+ /*
+ * The current execution of the decision input behavior (if any).
+ */
+ public Execution decisionInputExecution;
+
+ public void fire(List<Token> incomingTokens) {
+ // Inserted for connection with the debug api
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ boolean animationMarkerNeedsToBeRemoved = false ;
+ long date = 0 ;
+ this.incomingTokens_DEBUG = incomingTokens ;
+ if (locus.engine.isTerminated())
+ return ;
+ if (MokaConstants.MOKA_AUTOMATIC_ANIMATION) {
+ date = System.currentTimeMillis() ;
+ AnimationUtils.getInstance().addAnimationMarker(node) ;
+ animationMarkerNeedsToBeRemoved = true ;
+ }
+ MokaStackFrame stackFrame = FUMLPresentationUtils.getMokaStackFrame(this) ;
+ stackFrame.setThread(locus.mainThread) ;
+ stackFrame.setName(this.node.getName()) ;
+ StackFrameManager.getInstance().setStackFrame(this.getActivityExecution(), stackFrame) ;
+ int reasonForSuspending = FUMLExecutionEngine.controlDelegate.shallSuspend(this.getActivityExecution(), this) ;
+ if (reasonForSuspending != -1) {
+ locus.mainThread.setSuspended(true) ;
+ locus.mainThread.setStackFrames(null) ;
+ //locus.stackFrames = new MokaStackFrame[]{stackFrame} ;
+ locus.stackFrames = StackFrameManager.getInstance().getStackFrames() ;
+ Suspend_Event breakpointEvent = new Suspend_Event(locus.mainThread, reasonForSuspending, new MokaThread[]{locus.mainThread}) ;
+ locus.engine.sendEvent(breakpointEvent) ;
+ try {
+ FUMLExecutionEngine.controlDelegate.suspend(this.getActivityExecution()) ;
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ locus.mainThread.setSuspended(false) ;
+ }
+ if (animationMarkerNeedsToBeRemoved) {
+ try {
+ long ellapsed = System.currentTimeMillis() - date ;
+ long delay = Math.max(1,MokaConstants.MOKA_ANIMATION_DELAY - ellapsed) ;
+ Thread.sleep(delay) ;
+ } catch (InterruptedException e1) {
+ Activator.log.error(e1);
+ }
+ AnimationUtils.getInstance().removeAnimationMarker(node) ;
+ }
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Get the decision values and test them on each guard.
+ // Forward the offer over the edges for which the test succeeds.
+ Debug.println("[fire] Decision node " + this.node.getName() + "...");
+ // List<Token> incomingTokens = this.takeOfferedTokens();
+ List<Token> removedControlTokens = this.removeJoinedControlTokens(incomingTokens);
+ List<Value> decisionValues = this.getDecisionValues(incomingTokens);
+ List<ActivityEdgeInstance> outgoingEdges = this.outgoingEdges;
+ for(int i = 0; i < outgoingEdges.size(); i++) {
+ ActivityEdgeInstance edgeInstance = outgoingEdges.get(i);
+ ValueSpecification guard = edgeInstance.edge.getGuard();
+ List<Token> offeredTokens = new ArrayList<Token>();
+ for(int j = 0; j < incomingTokens.size(); j++) {
+ Token incomingToken = incomingTokens.get(j);
+ Value decisionValue = decisionValues.get(j);
+ if(this.test(guard, decisionValue)) {
+ offeredTokens.add(incomingToken);
+ }
+ }
+ if(offeredTokens.size() > 0) {
+ for(int j = 0; j < removedControlTokens.size(); j++) {
+ Token removedControlToken = removedControlTokens.get(j);
+ offeredTokens.add(removedControlToken);
+ }
+ edgeInstance.sendOffer(offeredTokens);
+ }
+ }
+ }
+
+ public List<Value> getDecisionValues(List<Token> incomingTokens) {
+ // If there is neither a decision input flow nor a decision input
+ // behavior, then return the set of values from the incoming tokens.
+ // [In this case, the single incoming edge must be an object flow.]
+ // If there is a decision input flow, but no decision input behavior,
+ // then return a list of the decision input values equal in size to the
+ // number of incoming tokens.
+ // If there is both a decision input flow and a decision input behavior,
+ // then execute the decision input behavior once for each incoming token
+ // and return the set of resulting values.
+ // If the primary incoming edge is an object flow, then the value on
+ // each object token is passed to the decision input behavior, along
+ // with the decision input flow value, if any.
+ // If the primary incoming edge is a control flow, then the decision
+ // input behavior only receives the decision input flow, if any.
+ Value decisionInputValue = this.getDecisionInputFlowValue();
+ List<Value> decisionValues = new ArrayList<Value>();
+ for(int i = 0; i < incomingTokens.size(); i++) {
+ Token incomingToken = incomingTokens.get(i);
+ Value value = this.executeDecisionInputBehavior(incomingToken.getValue(), decisionInputValue);
+ decisionValues.add(value);
+ }
+ // Debug.println("[getDecisionValues] " + decisionValues.size() +
+ // " decision value(s):");
+ for(int i = 0; i < decisionValues.size(); i++) {
+ Value decisionValue = decisionValues.get(i);
+ Debug.println("[getDecisionValues] decisionValues[" + i + "] = " + decisionValue);
+ }
+ return decisionValues;
+ }
+
+ public Value executeDecisionInputBehavior(Value inputValue, Value decisionInputValue) {
+ // Create the decision input execution from the decision input behavior.
+ // If the behavior has input parameter(s), set the input parameter(s) of
+ // the execution to the given value(s).
+ // Execute the decision input execution and then remove it.
+ // Return the value of the output parameter of the execution.
+ // If there is no decision input behavior, the decision input value is
+ // returned, if one is given, otherwise the input value is used as the
+ // decision value.
+ Debug.println("[executeDecisionBehavior] inputValue = " + inputValue);
+ Behavior decisionInputBehavior = ((DecisionNode)(this.node)).getDecisionInput();
+ Value decisionInputResult = null;
+ if(decisionInputBehavior == null) {
+ if(decisionInputValue != null) {
+ decisionInputResult = decisionInputValue;
+ } else {
+ decisionInputResult = inputValue;
+ }
+ } else {
+ this.decisionInputExecution = this.getExecutionLocus().factory.createExecution(decisionInputBehavior, this.getExecutionContext());
+ int i = 1;
+ int j = 0;
+ while((j == 0 | (j == 1 & decisionInputValue != null)) & i <= decisionInputBehavior.getOwnedParameters().size()) {
+ Parameter parameter = decisionInputBehavior.getOwnedParameters().get(i - 1);
+ if(parameter.getDirection().equals(ParameterDirectionKind.IN_LITERAL) | parameter.getDirection().equals(ParameterDirectionKind.INOUT_LITERAL)) {
+ ParameterValue inputParameterValue = new ParameterValue();
+ inputParameterValue.parameter = parameter;
+ j = j + 1;
+ if(j == 1 && inputValue != null) {
+ inputParameterValue.values.add(inputValue);
+ } else {
+ inputParameterValue.values.add(decisionInputValue);
+ }
+ this.decisionInputExecution.setParameterValue(inputParameterValue);
+ }
+ i = i + 1;
+ }
+ this.decisionInputExecution.execute();
+ List<ParameterValue> outputParameterValues = this.decisionInputExecution.getOutputParameterValues();
+ decisionInputExecution.destroy();
+ decisionInputResult = outputParameterValues.get(0).values.get(0);
+ }
+ return decisionInputResult;
+ }
+
+ public void terminate() {
+ // Terminate the decision input execution, if any, and then terminate
+ // this activation.
+ if(this.decisionInputExecution != null) {
+ this.decisionInputExecution.terminate();
+ }
+ super.terminate();
+ }
+
+ public Boolean isReady() {
+ // Check that all incoming edges have sources that are offering tokens.
+ // [This should be at most two incoming edges, if there is a decision
+ // input flow.]
+ int i = 1;
+ boolean ready = true;
+ while(ready & i <= this.incomingEdges.size()) {
+ ready = this.incomingEdges.get(i - 1).hasOffer();
+ i = i + 1;
+ }
+ return ready;
+ }
+
+ public List<Token> takeOfferedTokens() {
+ // Get tokens from the incoming edge that is not the decision input
+ // flow.
+ ObjectFlow decisionInputFlow = ((DecisionNode)(this.node)).getDecisionInputFlow();
+ List<Token> allTokens = new ArrayList<Token>();
+ List<ActivityEdgeInstance> incomingEdges = this.incomingEdges;
+ for(int i = 0; i < incomingEdges.size(); i++) {
+ ActivityEdgeInstance edgeInstance = incomingEdges.get(i);
+ if(edgeInstance.edge != decisionInputFlow) {
+ List<Token> tokens = edgeInstance.takeOfferedTokens();
+ for(int j = 0; j < tokens.size(); j++) {
+ allTokens.add(tokens.get(j));
+ }
+ }
+ }
+ return allTokens;
+ }
+
+ public Value getDecisionInputFlowValue() {
+ // Take the next token available on the decision input flow, if any, and
+ // return its value.
+ ActivityEdgeInstance decisionInputFlowInstance = this.getDecisionInputFlowInstance();
+ Value value = null;
+ if(decisionInputFlowInstance != null) {
+ List<Token> tokens = decisionInputFlowInstance.takeOfferedTokens();
+ if(tokens.size() > 0) {
+ value = tokens.get(0).getValue();
+ }
+ }
+ return value;
+ }
+
+ public ActivityEdgeInstance getDecisionInputFlowInstance() {
+ // Get the activity edge instance for the decision input flow, if any.
+ ActivityEdge decisionInputFlow = ((DecisionNode)(this.node)).getDecisionInputFlow();
+ ActivityEdgeInstance edgeInstance = null;
+ if(decisionInputFlow != null) {
+ int i = 1;
+ while(edgeInstance == null & i <= this.incomingEdges.size()) {
+ ActivityEdgeInstance incomingEdge = this.incomingEdges.get(i - 1);
+ if(incomingEdge.edge == decisionInputFlow) {
+ edgeInstance = incomingEdge;
+ }
+ i = i + 1;
+ }
+ }
+ return edgeInstance;
+ }
+
+ public Boolean test(ValueSpecification guard, Value value) {
+ // Test if the given value matches the guard. If there is no guard,
+ // return true.
+ boolean guardResult = true;
+ if(guard != null) {
+ Value guardValue = this.getExecutionLocus().executor.evaluate(guard);
+ guardResult = guardValue.equals(value);
+ }
+ return guardResult;
+ }
+
+ public List<Token> removeJoinedControlTokens(List<Token> incomingTokens) {
+ // If the primary incoming edge is an object flow, then remove any
+ // control tokens from the incoming tokens and return them.
+ // [Control tokens may effectively be offered on an object flow outgoing
+ // from a join node that has both control and object flows incoming.]
+ List<Token> removedControlTokens = new ArrayList<Token>();
+ if(this.hasObjectFlowInput()) {
+ int i = 1;
+ while(i <= incomingTokens.size()) {
+ Token token = incomingTokens.get(i - 1);
+ if(token.isControl()) {
+ removedControlTokens.add(token);
+ incomingTokens.remove(i - 1);
+ i = i - 1;
+ }
+ i = i + 1;
+ }
+ }
+ return removedControlTokens;
+ }
+
+ public Boolean hasObjectFlowInput() {
+ // Check that the primary incoming edge is an object flow.
+ ActivityEdge decisionInputFlow = ((DecisionNode)(this.node)).getDecisionInputFlow();
+ boolean isObjectFlow = false;
+ int i = 1;
+ while(!isObjectFlow & i <= this.incomingEdges.size()) {
+ ActivityEdge edge = this.incomingEdges.get(i - 1).edge;
+ isObjectFlow = edge != decisionInputFlow & edge instanceof ObjectFlow;
+ i = i + 1;
+ }
+ return isObjectFlow;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/FlowFinalNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/FlowFinalNodeActivation.java
new file mode 100644
index 00000000000..f08df12bb25
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/FlowFinalNodeActivation.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class FlowFinalNodeActivation extends ControlNodeActivation {
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Consume all incoming tokens.
+ Debug.println("[fire] Flow final node " + this.node.getName() + "...");
+ for(int i = 0; i < incomingTokens.size(); i++) {
+ Token token = incomingTokens.get(i);
+ token.withdraw();
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkNodeActivation.java
new file mode 100644
index 00000000000..6f1f2852d32
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkNodeActivation.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public class ForkNodeActivation extends ControlNodeActivation {
+
+ public void fire(List<Token> incomingTokens) {
+ if (this.group != null) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ }
+ // Create forked tokens for all incoming tokens and offer them on all
+ // outgoing edges.
+ if(this.node == null) {
+ Debug.println("[fire] Anonymous fork node.");
+ } else {
+ Debug.println("[fire] Fork node " + this.node.getName() + "...");
+ }
+ List<ActivityEdgeInstance> outgoingEdges = this.outgoingEdges;
+ int outgoingEdgeCount = outgoingEdges.size();
+ List<Token> forkedTokens = new ArrayList<Token>();
+ for(int i = 0; i < incomingTokens.size(); i++) {
+ Token token = incomingTokens.get(i);
+ ForkedToken forkedToken = new ForkedToken();
+ forkedToken.baseToken = token;
+ forkedToken.remainingOffersCount = outgoingEdgeCount;
+ forkedToken.baseTokenIsWithdrawn = false;
+ forkedTokens.add(forkedToken);
+ }
+ this.addTokens(forkedTokens);
+ this.sendOffers(forkedTokens);
+ }
+
+ public void terminate() {
+ // Remove any offered tokens and terminate.
+ this.clearTokens();
+ super.terminate();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkedToken.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkedToken.java
new file mode 100644
index 00000000000..4a34e88eef6
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ForkedToken.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public class ForkedToken extends Token {
+
+ public Token baseToken;
+
+ /*
+ * The remaining number of outstanding offers for this token on outgoing
+ * edges of the fork node.
+ */
+ public Integer remainingOffersCount;
+
+ /*
+ * Indicates whether withdraw() has been called on the base token.
+ */
+ public Boolean baseTokenIsWithdrawn;
+
+ public Boolean isControl() {
+ // Test if the base token is a control token.
+ return this.baseToken.isControl();
+ }
+
+ public void withdraw() {
+ // If the base token is not withdrawn, then withdraw it.
+ // Decrement the remaining offers count.
+ // When the remaining number of offers is zero, then remove this token
+ // from its holder.
+ if(!this.baseTokenIsWithdrawn & !this.baseToken.isWithdrawn()) {
+ this.baseToken.withdraw();
+ // NOTE: This keeps a base token that is a forked token from being
+ // withdrawn more than once, since withdrawing a forked token may
+ // not actually remove it from its fork node holder.
+ this.baseTokenIsWithdrawn = true;
+ }
+ if(this.remainingOffersCount > 0) {
+ this.remainingOffersCount = this.remainingOffersCount - 1;
+ }
+ if(this.remainingOffersCount == 0) {
+ super.withdraw();
+ }
+ }
+
+ public Token copy() {
+ // Return a copy of the base token.
+ return this.baseToken.copy();
+ }
+
+ public Boolean equals(Token otherToken) {
+ // Test if this token is equal to another token.
+ return this == otherToken;
+ }
+
+ public Value getValue() {
+ // Return the value of the base token.
+ return this.baseToken.getValue();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/InitialNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/InitialNodeActivation.java
new file mode 100644
index 00000000000..51c40f7ac07
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/InitialNodeActivation.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+
+public class InitialNodeActivation extends ControlNodeActivation {
+
+ public void fire(List<Token> incomingTokens) {
+ super.fire(incomingTokens) ;
+ Locus locus = this.getExecutionLocus() ;
+ if (locus.isInDebugMode) {
+ if (locus.engine.isTerminated())
+ return ;
+ }
+ // Create a single token and send offers for it.
+ List<Token> tokens = new ArrayList<Token>();
+ tokens.add(new ControlToken());
+ this.addTokens(tokens);
+ this.sendOffers(tokens);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/JoinNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/JoinNodeActivation.java
new file mode 100644
index 00000000000..c2e6058fc64
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/JoinNodeActivation.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+public class JoinNodeActivation extends ControlNodeActivation {
+
+ public Boolean isReady() {
+ // Check that all incoming edges have sources that are offering tokens.
+ boolean ready = true;
+ int i = 1;
+ while(ready & i <= this.incomingEdges.size()) {
+ ready = this.incomingEdges.get(i - 1).hasOffer();
+ i = i + 1;
+ }
+ return ready;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/MergeNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/MergeNodeActivation.java
new file mode 100644
index 00000000000..283956b1db0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/MergeNodeActivation.java
@@ -0,0 +1,17 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+public class MergeNodeActivation extends ControlNodeActivation {
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectNodeActivation.java
new file mode 100644
index 00000000000..99d2b602241
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectNodeActivation.java
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class ObjectNodeActivation extends ActivityNodeActivation {
+
+ /*
+ * The number of held tokens that have already been offered.
+ */
+ public Integer offeredTokenCount;
+
+ public void run() {
+ // Initialize the offered token count to zero.
+ super.run();
+ this.offeredTokenCount = 0;
+ }
+
+ public void sendOffers(List<Token> tokens) {
+ // If the set of tokens to be sent is empty, then offer a null token
+ // instead.
+ // Otherwise, offer the given tokens as usual.
+ if(tokens.size() == 0) {
+ ObjectToken token = new ObjectToken();
+ token.holder = this;
+ tokens.add(token);
+ }
+ super.sendOffers(tokens);
+ }
+
+ public void terminate() {
+ // Remove any offered tokens and terminate.
+ this.clearTokens();
+ super.terminate();
+ }
+
+ public void addToken(Token token) {
+ // Transfer the given token to be held by this node only if it is a
+ // non-null object token.
+ // If it is a control token or a null token, consume it without holding
+ // it.
+ if(token.getValue() == null) {
+ token.withdraw();
+ } else {
+ super.addToken(token);
+ }
+ }
+
+ public Integer removeToken(Token token) {
+ // Remove the given token, if it is held by this node activation.
+ int i = super.removeToken(token);
+ if(i > 0 & i <= this.offeredTokenCount) {
+ this.offeredTokenCount = this.offeredTokenCount - 1;
+ }
+ return i;
+ }
+
+ public void clearTokens() {
+ // Remove all held tokens.
+ super.clearTokens();
+ this.offeredTokenCount = 0;
+ }
+
+ public Integer countOfferedValues() {
+ // Count the total number of non-null object tokens being offered to
+ // this node activation.
+ int totalValueCount = 0;
+ int i = 1;
+ while(i <= this.incomingEdges.size()) {
+ totalValueCount = totalValueCount + this.incomingEdges.get(i - 1).countOfferedValues();
+ i = i + 1;
+ }
+ return totalValueCount;
+ }
+
+ public void sendUnofferedTokens() {
+ // Send offers over all outgoing edges, if there are any tokens to be
+ // offered.
+ List<Token> tokens = this.getUnofferedTokens();
+ this.offeredTokenCount = this.offeredTokenCount + tokens.size();
+ this.sendOffers(tokens);
+ }
+
+ public Integer countUnofferedTokens() {
+ // Return the number of unoffered tokens that are to be offered next.
+ // (By default, this is all unoffered tokens.)
+ if(this.heldTokens.size() == 0) {
+ this.offeredTokenCount = 0;
+ }
+ return this.heldTokens.size() - this.offeredTokenCount;
+ }
+
+ public List<Token> getUnofferedTokens() {
+ // Get the next set of unoffered tokens to be offered and return it.
+ // [Note: This effectively treats all object flows as if they have
+ // weight=*, rather than the weight=1 default in the current
+ // superstructure semantics.]
+ List<Token> tokens = new ArrayList<Token>();
+ int i = 1;
+ while(i <= this.countUnofferedTokens()) {
+ tokens.add(this.heldTokens.get(this.offeredTokenCount + i - 1));
+ i = i + 1;
+ }
+ return tokens;
+ }
+
+ public List<Token> takeUnofferedTokens() {
+ // Take the next set of unoffered tokens to be offered from this node
+ // activation and return them.
+ List<Token> tokens = this.getUnofferedTokens();
+ for(int i = 0; i < tokens.size(); i++) {
+ Token token = tokens.get(i);
+ token.withdraw();
+ }
+ return tokens;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectToken.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectToken.java
new file mode 100644
index 00000000000..ddee2aa78a8
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ObjectToken.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public class ObjectToken extends Token {
+
+ /*
+ * The value carried by this token. A token may have no value, in which case
+ * it is a "null token".
+ */
+ public Value value;
+
+ public Boolean equals(Token other) {
+ // Test if this object token is the same as the other token.
+ return this == other;
+ }
+
+ public Token copy() {
+ // Return a new object token with the same value as this token.
+ // [Note: the holder of the copy is not set.]
+ ObjectToken copy = new ObjectToken();
+ copy.value = this.value;
+ return copy;
+ }
+
+ public Boolean isControl() {
+ // Return false for an object token.
+ return false;
+ }
+
+ public Value getValue() {
+ // Return the value of this object token.
+ return this.value;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Offer.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Offer.java
new file mode 100644
index 00000000000..4b9c1af6e6d
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Offer.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Offer {
+
+ public List<Token> offeredTokens = new ArrayList<Token>();
+
+ public Integer countOfferedValues() {
+ // Return the number of values being offered on object tokens.
+ // Remove any tokens that have already been withdrawn and don't include
+ // them in the count.
+ this.removeWithdrawnTokens();
+ int count = 0;
+ for(int i = 0; i < this.offeredTokens.size(); i++) {
+ if(this.offeredTokens.get(i).getValue() != null) {
+ count = count + 1;
+ }
+ }
+ return count;
+ }
+
+ public List<Token> getOfferedTokens() {
+ // Get the offered tokens, removing any that have been withdrawn.
+ this.removeWithdrawnTokens();
+ List<Token> tokens = new ArrayList<Token>();
+ List<Token> offeredTokens = this.offeredTokens;
+ for(int i = 0; i < this.offeredTokens.size(); i++) {
+ Token offeredToken = offeredTokens.get(i);
+ // Debug.println("[getOfferedTokens] token value = " +
+ // offeredToken.getValue());
+ tokens.add(offeredToken);
+ }
+ return tokens;
+ }
+
+ public void removeOfferedValues(Integer count) {
+ // Remove the given number of non-null object tokens from those in this
+ // offer.
+ int n = count;
+ int i = 1;
+ while(n > 0) {
+ if(this.offeredTokens.get(i - 1).getValue() != null) {
+ this.offeredTokens.remove(i - 1);
+ } else {
+ i = i + 1;
+ }
+ n = n - 1;
+ }
+ }
+
+ public void removeWithdrawnTokens() {
+ // Remove any tokens that have already been consumed.
+ // List<Token> offeredTokens = this.offeredTokens;
+ int i = 1;
+ while(i <= this.offeredTokens.size()) {
+ if(this.offeredTokens.get(i - 1).isWithdrawn()) {
+ this.offeredTokens.remove(i - 1);
+ i = i - 1;
+ }
+ i = i + 1;
+ }
+ }
+
+ public Boolean hasTokens() {
+ // Check whether this offer has any tokens that have not been withdrawn.
+ this.removeWithdrawnTokens();
+ return this.offeredTokens.size() > 0;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Token.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Token.java
new file mode 100644
index 00000000000..7a9887aced3
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/Token.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public abstract class Token {
+
+ public ActivityNodeActivation holder;
+
+ public Token transfer(ActivityNodeActivation holder) {
+ // if this token does not have any holder, make the given holder its
+ // holder.
+ // Otherwise, remove this token from its holder and return a copy of it
+ // transfered to a new holder.
+ Token token = this;
+ if(this.holder != null) {
+ this.withdraw();
+ token = this.copy();
+ }
+ token.holder = holder;
+ return token;
+ }
+
+ public void withdraw() {
+ // Remove this token from its holder, withdrawing any offers for it.
+ if(!this.isWithdrawn()) {
+ // Debug.println("[withdraw] Taking token with value = " +
+ // this.getValue());
+ this.holder.removeToken(this);
+ this.holder = null;
+ }
+ }
+
+ public abstract Boolean equals(Token other);
+
+ public abstract Token copy();
+
+ public Boolean isWithdrawn() {
+ // Test if this token has been withdrawn.
+ return this.holder == null;
+ }
+
+ public abstract Boolean isControl();
+
+ public abstract Value getValue();
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/BooleanValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/BooleanValue.java
new file mode 100644
index 00000000000..ee4eb384df6
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/BooleanValue.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class BooleanValue extends PrimitiveValue {
+
+ /*
+ * The actual Boolean value.
+ */
+ public Boolean value;
+
+ public ValueSpecification specify() {
+ // Return a literal boolean with the value of this boolean value.
+ LiteralBoolean literal = UMLFactory.eINSTANCE.createLiteralBoolean();
+ literal.setType(this.type);
+ literal.setValue(this.value);
+ return literal;
+ }
+
+ public Boolean equals(Value otherValue) {
+ // Test if this boolean value is equal to the otherValue.
+ // To be equal, the otherValue must have the same value as this boolean
+ // value.
+ boolean isEqual = false;
+ if(otherValue instanceof BooleanValue) {
+ isEqual = ((BooleanValue)otherValue).value.equals(this.value); // CHANGED == to equals;
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new boolean value with the same value as this boolean value.
+ BooleanValue newValue = (BooleanValue)(super.copy());
+ newValue.value = this.value;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Return a new boolean value with no value.
+ return new BooleanValue();
+ }
+
+ public String toString() {
+ String stringValue = "false";
+ if(this.value) {
+ stringValue = "true";
+ }
+ return stringValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/CompoundValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/CompoundValue.java
new file mode 100644
index 00000000000..926636b5ef3
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/CompoundValue.java
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public abstract class CompoundValue extends StructuredValue {
+
+ public List<FeatureValue> featureValues = new ArrayList<FeatureValue>();
+
+ public Boolean equals(Value otherValue) {
+ // Test if this data value is equal to the otherValue.
+ // To be equal, the otherValue must also be a compund value with the
+ // same types and equal values for each feature.
+ // Debug.println("[equals] othervalue instanceof CompoundValue = " +
+ // (otherValue instanceof CompoundValue));
+ // Debug.println("[equals] super.equals(otherValue) = " +
+ // super.equals(otherValue));
+ boolean isEqual = otherValue instanceof CompoundValue;
+ if(isEqual) {
+ CompoundValue otherCompoundValue = (CompoundValue)otherValue;
+ // Debug.println("[equals] " + this.featureValues.size() +
+ // " feature(s).");
+ isEqual = super.equals(otherValue) & otherCompoundValue.featureValues.size() == this.featureValues.size();
+ int i = 1;
+ while(isEqual & i <= this.featureValues.size()) {
+ FeatureValue thisFeatureValue = this.featureValues.get(i - 1);
+ boolean matched = false;
+ int j = 1;
+ while(!matched & j <= otherCompoundValue.featureValues.size()) {
+ FeatureValue otherFeatureValue = otherCompoundValue.featureValues.get(j - 1);
+ if(thisFeatureValue.feature == otherFeatureValue.feature) {
+ matched = thisFeatureValue.hasEqualValues(otherFeatureValue);
+ }
+ j = j + 1;
+ }
+ isEqual = matched;
+ i = i + 1;
+ }
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new data value with the same featureValues as this data
+ // value.
+ CompoundValue newValue = (CompoundValue)(super.copy());
+ List<FeatureValue> featureValues = this.featureValues;
+ for(int i = 0; i < featureValues.size(); i++) {
+ FeatureValue featureValue = featureValues.get(i);
+ newValue.featureValues.add(featureValue.copy());
+ }
+ return newValue;
+ }
+
+ public FeatureValue getFeatureValue(StructuralFeature feature) {
+ // Get the value(s) of the member of featureValues for the given
+ // feature.
+ FeatureValue featureValue = null;
+ int i = 1;
+ while(featureValue == null & i <= this.featureValues.size()) {
+ if(this.featureValues.get(i - 1).feature == feature) {
+ featureValue = this.featureValues.get(i - 1);
+ }
+ i = i + 1;
+ }
+ return featureValue;
+ }
+
+ public void setFeatureValue(StructuralFeature feature, List<Value> values, Integer position) {
+ // Set the value(s) of the member of featureValues for the given
+ // feature.
+ FeatureValue featureValue = this.getFeatureValue(feature);
+ if(featureValue == null) {
+ featureValue = new FeatureValue();
+ this.featureValues.add(featureValue);
+ }
+ featureValue.feature = feature;
+ featureValue.values = values;
+ featureValue.position = position;
+ }
+
+ public List<FeatureValue> getFeatureValues() {
+ // Return the feature values for this compound value.
+ return this.featureValues;
+ }
+
+ public void removeFeatureValues(Classifier classifier) {
+ // Remove all feature values for features whose type is the given
+ // classifier.
+ int i = 1;
+ while(i <= this.featureValues.size()) {
+ if(this.featureValues.get(i - 1).feature.getType() == classifier) {
+ this.featureValues.remove(i - 1);
+ } else {
+ i = i + 1;
+ }
+ }
+ }
+
+ public String toString() {
+ String buffer = "(" + this.objectId() + ":";
+ List<Classifier> types = this.getTypes();
+ int i = 1;
+ while(i <= types.size()) {
+ buffer = buffer + " " + types.get(i - 1).getName();
+ i = i + 1;
+ }
+ int k = 1;
+ while(k <= this.featureValues.size()) {
+ FeatureValue featureValue = this.featureValues.get(k - 1);
+ buffer = buffer + "\n\t\t" + featureValue.feature.getName() + "[" + featureValue.position + "] =";
+ int j = 1;
+ while(j <= featureValue.values.size()) {
+ Value value = featureValue.values.get(j - 1);
+ if (value instanceof Reference) {
+ Object_ object = ((Reference)value).referent;
+ buffer = buffer + " Reference to (" + object.objectId() + ":";
+ types = object.getTypes();
+ int n = 1;
+ while (n <= types.size()) {
+ buffer = buffer + " " + types.get(n - 1).getName();
+ n = n + 1;
+ }
+ buffer = buffer + ")";
+ } else {
+ buffer = buffer + " " + value.toString();
+ }
+ j = j + 1;
+ }
+ k = k + 1;
+ }
+ return buffer + ")";
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DataValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DataValue.java
new file mode 100644
index 00000000000..2585ed45dbe
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DataValue.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.DataType;
+
+public class DataValue extends CompoundValue {
+
+ /*
+ * The type of this data value. This must not be a primitive or an
+ * enumeration.
+ */
+ public DataType type;
+
+ public List<Classifier> getTypes() {
+ // Return the single type of this data value.
+ List<Classifier> types = new ArrayList<Classifier>();
+ types.add(this.type);
+ return types;
+ }
+
+ public Value copy() {
+ // Create a new data value with the same type and feature values as this
+ // data value.
+ DataValue newValue = (DataValue)(super.copy());
+ newValue.type = this.type;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Create a new data value with no type or feature values.
+ return new DataValue();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DispatchStrategy.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DispatchStrategy.java
new file mode 100644
index 00000000000..a8c5801858f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/DispatchStrategy.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.SemanticStrategy;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Operation;
+
+public abstract class DispatchStrategy extends SemanticStrategy {
+
+ public String getName() {
+ // Dispatch strategies are always named "dispatch".
+ return "dispatch";
+ }
+
+ public Execution dispatch(Object_ object, Operation operation) {
+ // Get the behavior for the given operation as determined by the type(s)
+ // of the given object, compile the behavior at the locus of the object,
+ // and return the resulting execution object.
+ return object.locus.factory.createExecution(this.getMethod(object, operation), object);
+ }
+
+ public abstract Behavior getMethod(Object_ object, Operation operation);
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/EnumerationValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/EnumerationValue.java
new file mode 100644
index 00000000000..07be5e8dac1
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/EnumerationValue.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class EnumerationValue extends Value {
+
+ /*
+ * The literal value of this enumeration value.
+ */
+ public EnumerationLiteral literal;
+
+ public Enumeration type;
+
+ public ValueSpecification specify() {
+ // Return an instance value with literal as the instance.
+ InstanceValue instanceValue = UMLFactory.eINSTANCE.createInstanceValue();
+ // InstanceSpecification instance =
+ // UMLFactory.eINSTANCE.createInstanceSpecification();
+ instanceValue.setType(this.type);
+ instanceValue.setInstance(this.literal);
+ return instanceValue;
+ }
+
+ public Boolean equals(Value otherValue) {
+ // Test if this enumeration value is equal to the otherValue.
+ // To be equal, the otherValue must also be an enumeration value with
+ // the same literal as this enumeration value.
+ boolean isEqual = false;
+ if(otherValue instanceof EnumerationValue) {
+ isEqual = ((EnumerationValue)otherValue).literal == this.literal;
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new enumeration value with the same literal as this
+ // enumeration value.
+ EnumerationValue newValue = (EnumerationValue)(super.copy());
+ newValue.type = this.type;
+ newValue.literal = this.literal;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Create a new enumeration value with no literal.
+ return new EnumerationValue();
+ }
+
+ public List<Classifier> getTypes() {
+ // Return the single type of this enumeration value.
+ List<Classifier> types = new ArrayList<Classifier>();
+ types.add(this.type);
+ return types;
+ }
+
+ public String toString() {
+ return literal.getName();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Evaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Evaluation.java
new file mode 100644
index 00000000000..4f4f3d14f84
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Evaluation.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.SemanticVisitor;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public abstract class Evaluation extends SemanticVisitor {
+
+ /*
+ * The value specification to be evaluated.
+ */
+ public ValueSpecification specification;
+
+ /*
+ * The locus at which this evaluation is taking place.
+ */
+ public Locus locus;
+
+ public abstract Value evaluate();
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/ExtensionalValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/ExtensionalValue.java
new file mode 100644
index 00000000000..bef54d38e84
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/ExtensionalValue.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+
+public abstract class ExtensionalValue extends CompoundValue {
+
+ /*
+ * The locus of the extent of which this value is a member. (If the value
+ * has been destroyed, it has no locus.)
+ */
+ public Locus locus;
+
+ public void destroy() {
+ // Remove this value from its locus (if it has not already been
+ // destroyed).
+ if(this.locus != null) {
+ this.locus.remove(this);
+ }
+ }
+
+ public Value copy() {
+ // Create a new extensional value with the same feature values at the
+ // same locus as this one.
+ ExtensionalValue newValue = (ExtensionalValue)(super.copy());
+ if(this.locus != null) {
+ this.locus.add(newValue);
+ }
+ return newValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/FeatureValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/FeatureValue.java
new file mode 100644
index 00000000000..0c6579be295
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/FeatureValue.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class FeatureValue {
+
+ /*
+ * The structural feature being given value(s).
+ */
+ public StructuralFeature feature;
+
+ /*
+ * The values of for the feature. Zero or more values are possible, as
+ * constrained by the multiplicity of the feature.
+ */
+ public List<Value> values = new ArrayList<Value>();
+
+ /*
+ * The position of this feature value in a set of ordered values for a
+ * feature of an association. [This is only relevant if the feature value is
+ * for a link and the feature is ordered.]
+ */
+ public Integer position;
+
+ public Boolean hasEqualValues(FeatureValue other) {
+ // Determine if this feature value has an equal set of values as another
+ // feature value.
+ // If the feature is ordered, then the values also have to be in the
+ // same order.
+ boolean equal = true;
+ if(this.values.size() != other.values.size()) {
+ equal = false;
+ } else {
+ // Debug.println("[hasEqualValues] feature = " + this.feature.name +
+ // ", " + this.values.size() + " value(s).");
+ if(this.feature.isOrdered()) {
+ int i = 1;
+ while(equal & i <= this.values.size()) {
+ equal = this.values.get(i - 1).equals(other.values.get(i - 1));
+ i = i + 1;
+ }
+ } else {
+ // Note: otherFeatureValues is used here solely as a holder for
+ // a copy of the list of other values,
+ // since the Java to UML mapping conventions do not allow
+ // "remove" on a local list variable.
+ FeatureValue otherFeatureValues = new FeatureValue();
+ List<Value> values = other.values;
+ for(int i = 0; i < values.size(); i++) {
+ Value value = values.get(i);
+ otherFeatureValues.values.add(value);
+ }
+ int i = 1;
+ while(equal & i <= this.values.size()) {
+ // Debug.println("[hasEqualValues] This value [" + (i-1) +
+ // "] = " + this.values.get(i-1));
+ boolean matched = false;
+ int j = 1;
+ while(!matched & j <= otherFeatureValues.values.size()) {
+ if(this.values.get(i - 1).equals(otherFeatureValues.values.get(j - 1))) {
+ // Debug.println("[hasEqualValues] Other value [" +
+ // (j-1) + "] = " +
+ // otherFeatureValues.values.get(j-1));
+ matched = true;
+ otherFeatureValues.values.remove(j - 1);
+ }
+ j = j + 1;
+ }
+ equal = matched;
+ i = i + 1;
+ }
+ }
+ }
+ return equal;
+ }
+
+ public FeatureValue copy() {
+ // Create a copy of this feature value.
+ FeatureValue newValue = new FeatureValue();
+ newValue.feature = this.feature;
+ newValue.position = this.position;
+ List<Value> values = this.values;
+ for(int i = 0; i < values.size(); i++) {
+ Value value = values.get(i);
+ newValue.values.add(value.copy());
+ }
+ return newValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/InstanceValueEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/InstanceValueEvaluation.java
new file mode 100644
index 00000000000..18db33d1d8a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/InstanceValueEvaluation.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class InstanceValueEvaluation extends Evaluation {
+
+ public Value evaluate() {
+ // If the instance specification is for an enumeration, then return the
+ // identified enumeration literal.
+ // If the instance specification is for a data type (but not a primitive
+ // value or an enumeration), then create a data value of the given data
+ // type.
+ // If the instance specification is for an object, then create an object
+ // at the current locus with the specified types.
+ // Set each feature of the created value to the result of evaluating the
+ // value specifications for the specified slot for the feature.
+ // Debug.println("[evaluate] InstanceValueEvaluation...");
+ InstanceSpecification instance = ((InstanceValue)this.specification).getInstance();
+ // List<Classifier> types = instance.getClassifiers();
+ // Classifier myType = types.get(0);
+ // Debug.println("[evaluate] type = " + myType.getName());
+ Value value;
+ if(instance instanceof EnumerationLiteral) {
+ // Debug.println("[evaluate] Type is an enumeration.");
+ EnumerationValue enumerationValue = new EnumerationValue();
+ // enumerationValue.type = (Enumeration)myType;
+ enumerationValue.type = ((EnumerationLiteral)instance).getEnumeration(); // ADDED
+ enumerationValue.literal = (EnumerationLiteral)instance;
+ value = enumerationValue;
+ Debug.println("[evaluate] type = " + enumerationValue.type.getName()); // ADDED
+ } else {
+ // ADDED:
+ List<Classifier> types = instance.getClassifiers();
+ Classifier myType = types.get(0);
+ Debug.println("[evaluate] type = " + myType.getName());
+ //
+ StructuredValue structuredValue = null;
+ if(myType instanceof DataType) {
+ // Debug.println("[evaluate] Type is a data type.");
+ DataValue dataValue = new DataValue();
+ dataValue.type = (DataType)myType;
+ structuredValue = dataValue;
+ } else {
+ Object_ object = null;
+ if(myType instanceof Behavior) {
+ // Debug.println("[evaluate] Type is a behavior.");
+ object = this.locus.factory.createExecution((Behavior)myType, null);
+ } else {
+ // Debug.println("[evaluate] Type is a class.");
+ object = new Object_();
+ for(int i = 0; i < types.size(); i++) {
+ Classifier type = types.get(i);
+ object.types.add((Class)type);
+ }
+ }
+ this.locus.add(object);
+ Reference reference = new Reference();
+ reference.referent = object;
+ structuredValue = reference;
+ }
+ structuredValue.createFeatureValues();
+ // Debug.println("[evaluate] " + instance.slot.size() +
+ // " slot(s).");
+ List<Slot> instanceSlots = instance.getSlots();
+ for(int i = 0; i < instanceSlots.size(); i++) {
+ Slot slot = instanceSlots.get(i);
+ List<Value> values = new ArrayList<Value>();
+ // Debug.println("[evaluate] feature = " +
+ // slot.definingFeature.getName() + ", " + slot.value.size() +
+ // " value(s).");
+ List<ValueSpecification> slotValues = slot.getValues();
+ for(int j = 0; j < slotValues.size(); j++) {
+ ValueSpecification slotValue = slotValues.get(j);
+ // Debug.println("[evaluate] Value = " +
+ // slotValue.getClass().getName());
+ values.add(this.locus.executor.evaluate(slotValue));
+ }
+ structuredValue.setFeatureValue(slot.getDefiningFeature(), values, 0);
+ }
+ value = structuredValue;
+ }
+ return value;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/IntegerValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/IntegerValue.java
new file mode 100644
index 00000000000..6e351061b2b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/IntegerValue.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class IntegerValue extends PrimitiveValue {
+
+ /*
+ * The actual Integer value.
+ */
+ public Integer value;
+
+ public ValueSpecification specify() {
+ // Return a literal integer with the value of this integer value.
+ LiteralInteger literal = UMLFactory.eINSTANCE.createLiteralInteger();
+ literal.setType(this.type);
+ literal.setValue(this.value);
+ return literal;
+ }
+
+ public Boolean equals(Value otherValue) {
+ // Test if this integer value is equal to the otherValue.
+ // To be equal, the otherValue must have the same value as this integer
+ // value.
+ boolean isEqual = false;
+ if(otherValue instanceof IntegerValue) {
+ isEqual = ((IntegerValue)otherValue).value.equals(this.value); // CHANGED == to equals
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new integer value with the same value as this integer value.
+ IntegerValue newValue = (IntegerValue)(super.copy());
+ newValue.value = this.value;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Create a new integer value with no value.
+ return new IntegerValue();
+ }
+
+ public String toString() {
+ String stringValue = "";
+ if(this.value == 0) {
+ stringValue = "0";
+ } else {
+ int positiveValue = this.value;
+ if(positiveValue < 0) {
+ positiveValue = -positiveValue;
+ }
+ do {
+ int digit = positiveValue % 10;
+ if(digit == 0) {
+ stringValue = "0" + stringValue;
+ } else if(digit == 1) {
+ stringValue = "1" + stringValue;
+ } else if(digit == 2) {
+ stringValue = "2" + stringValue;
+ } else if(digit == 3) {
+ stringValue = "3" + stringValue;
+ } else if(digit == 4) {
+ stringValue = "4" + stringValue;
+ } else if(digit == 5) {
+ stringValue = "5" + stringValue;
+ } else if(digit == 6) {
+ stringValue = "6" + stringValue;
+ } else if(digit == 7) {
+ stringValue = "7" + stringValue;
+ } else if(digit == 8) {
+ stringValue = "8" + stringValue;
+ } else if(digit == 9) {
+ stringValue = "9" + stringValue;
+ }
+ positiveValue = positiveValue / 10;
+ } while(positiveValue > 0);
+ if(this.value < 0) {
+ stringValue = "-" + stringValue;
+ }
+ }
+ return stringValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Link.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Link.java
new file mode 100644
index 00000000000..417d03a896f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Link.java
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
+
+public class Link extends ExtensionalValue {
+
+ /*
+ * The type of this link.
+ */
+ public Association type;
+
+ public void destroy() {
+ // Remove the type of this link and destroy it.
+ // Shift the positions of the feature values of any remaining links in
+ // the extent of the same association, for ends that are ordered.
+ Debug.println("[destroy] link = " + this.objectId());
+ List<Property> ends = this.type.getMemberEnds();
+ List<ExtensionalValue> extent = this.locus.getExtent(this.type);
+ for(int i = 0; i < extent.size(); i++) {
+ ExtensionalValue otherLink = extent.get(i);
+ for(int j = 0; j < ends.size(); j++) {
+ Property end = ends.get(j);
+ if(end.isOrdered()) {
+ FeatureValue featureValue = otherLink.getFeatureValue(end);
+ if(this.getFeatureValue(end).position < featureValue.position) {
+ featureValue.position = featureValue.position - 1;
+ }
+ }
+ }
+ }
+ this.type = null;
+ super.destroy();
+ }
+
+ public Value copy() {
+ // Create a new link with the same type, locus and feature values as
+ // this link.
+ Link newValue = (Link)(super.copy());
+ newValue.type = this.type;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Create a new link with no type or properies.
+ return new Link();
+ }
+
+ public List<Classifier> getTypes() {
+ // Return the single type of this link (if any).
+ List<Classifier> types = null;
+ if(this.type == null) {
+ types = new ArrayList<Classifier>();
+ } else {
+ types = new ArrayList<Classifier>();
+ types.add(this.type);
+ }
+ return types;
+ }
+
+ public Boolean isMatchingLink(ExtensionalValue link, Property end) {
+ // Test whether the given link matches the values of this link on all
+ // ends other than the given end.
+ List<Property> ends = this.type.getMemberEnds();
+ boolean matches = true;
+ int i = 1;
+ while(matches & i <= ends.size()) {
+ Property otherEnd = ends.get(i - 1);
+ if(otherEnd != end & !this.getFeatureValue(otherEnd).values.get(0).equals(link.getFeatureValue(otherEnd).values.get(0))) {
+ matches = false;
+ }
+ i = i + 1;
+ }
+ return matches;
+ }
+
+ public List<FeatureValue> getOtherFeatureValues(List<ExtensionalValue> extent, Property end) {
+ // Return all feature values for the given end of links in the given
+ // extent whose other ends match this link.
+ List<FeatureValue> featureValues = new ArrayList<FeatureValue>();
+ for(int i = 0; i < extent.size(); i++) {
+ ExtensionalValue link = extent.get(i);
+ if(link != this) {
+ if(isMatchingLink(link, end)) {
+ featureValues.add(link.getFeatureValue(end));
+ }
+ }
+ }
+ return featureValues;
+ }
+
+ public void addTo(Locus locus) {
+ // Add this link to the extent of its association at the given locus.
+ // Shift the positions of ends of other links, as appropriate, for ends
+ // that are ordered.
+ Debug.println("[addTo] link = " + this.objectId());
+ List<Property> ends = this.type.getMemberEnds();
+ List<ExtensionalValue> extent = locus.getExtent(this.type);
+ for(int i = 0; i < ends.size(); i++) {
+ Property end = ends.get(i);
+ if(end.isOrdered()) {
+ FeatureValue featureValue = this.getFeatureValue(end);
+ List<FeatureValue> otherFeatureValues = this.getOtherFeatureValues(extent, end);
+ int n = otherFeatureValues.size();
+ if(featureValue.position < 0 | featureValue.position > n) {
+ featureValue.position = n + 1;
+ } else {
+ if(featureValue.position == 0) {
+ featureValue.position = 1;
+ }
+ for(int j = 0; j < otherFeatureValues.size(); j++) {
+ FeatureValue otherFeatureValue = otherFeatureValues.get(j);
+ if(featureValue.position <= otherFeatureValue.position) {
+ otherFeatureValue.position = otherFeatureValue.position + 1;
+ }
+ }
+ }
+ }
+ }
+ locus.add(this);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralBooleanEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralBooleanEvaluation.java
new file mode 100644
index 00000000000..8b379bfd28f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralBooleanEvaluation.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralBoolean;
+
+public class LiteralBooleanEvaluation extends LiteralEvaluation {
+
+ public Value evaluate() {
+ // Evaluate a literal boolean, producing a boolean value.
+ LiteralBoolean literal = (LiteralBoolean)specification;
+ BooleanValue booleanValue = new BooleanValue();
+ booleanValue.type = this.getType("Boolean");
+ booleanValue.value = literal.booleanValue();
+ return booleanValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralEvaluation.java
new file mode 100644
index 00000000000..3c5caa299a3
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralEvaluation.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.PrimitiveType;
+
+public abstract class LiteralEvaluation extends Evaluation {
+
+ public PrimitiveType getType(String builtInTypeName) {
+ // Get the type of the specification. If that is null, then use the
+ // built-in type of the given name.
+ PrimitiveType type = (PrimitiveType)(this.specification.getType());
+ if(type == null) {
+ type = this.locus.factory.getBuiltInType(builtInTypeName);
+ }
+ return type;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralIntegerEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralIntegerEvaluation.java
new file mode 100644
index 00000000000..cf86d556cc3
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralIntegerEvaluation.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralInteger;
+
+public class LiteralIntegerEvaluation extends LiteralEvaluation {
+
+ public Value evaluate() {
+ // Evaluate a literal integer, producing an integer value.
+ LiteralInteger literal = (LiteralInteger)specification;
+ IntegerValue integerValue = new IntegerValue();
+ integerValue.type = this.getType("Integer");
+ integerValue.value = literal.integerValue();
+ return integerValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralNullEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralNullEvaluation.java
new file mode 100644
index 00000000000..e6d502c1322
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralNullEvaluation.java
@@ -0,0 +1,23 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+public class LiteralNullEvaluation extends LiteralEvaluation {
+
+ public Value evaluate() {
+ // Evaluate a literal null, returning nothing (since a null represents
+ // an "absence of any value").
+ return null;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralRealEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralRealEvaluation.java
new file mode 100644
index 00000000000..bd84f6167f7
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralRealEvaluation.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralReal;
+
+public class LiteralRealEvaluation extends LiteralEvaluation {
+
+ public Value evaluate() {
+ // Evaluate a real integer, producing a real value.
+ LiteralReal literal = (LiteralReal)specification;
+ RealValue realValue = new RealValue();
+ realValue.type = this.getType("Real");
+ realValue.value = literal.getValue();
+ return realValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralStringEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralStringEvaluation.java
new file mode 100644
index 00000000000..8b843030350
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralStringEvaluation.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralString;
+
+public class LiteralStringEvaluation extends LiteralEvaluation {
+
+ public Value evaluate() {
+ // Evaluate a literal string, producing a string value.
+ LiteralString literal = (LiteralString)specification;
+ StringValue stringValue = new StringValue();
+ stringValue.type = this.getType("String");
+ stringValue.value = literal.getValue();
+ return stringValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralUnlimitedNaturalEvaluation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralUnlimitedNaturalEvaluation.java
new file mode 100644
index 00000000000..9106d2fa525
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/LiteralUnlimitedNaturalEvaluation.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+
+public class LiteralUnlimitedNaturalEvaluation extends LiteralEvaluation {
+
+ public Value evaluate() {
+ // Evaluate a literal unlimited natural producing an unlimited natural
+ // value.
+ LiteralUnlimitedNatural literal = (LiteralUnlimitedNatural)specification;
+ UnlimitedNaturalValue unlimitedNaturalValue = new UnlimitedNaturalValue();
+ unlimitedNaturalValue.type = this.getType("UnlimitedNatural");
+ unlimitedNaturalValue.value = literal.getValue();
+ return unlimitedNaturalValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Object_.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Object_.java
new file mode 100644
index 00000000000..73cab0a4cbe
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Object_.java
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.EventAccepter;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.ObjectActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.SignalInstance;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Operation;
+
+public class Object_ extends ExtensionalValue {
+
+ /*
+ * The classes under which this object is currently classified. (A destroyed
+ * object has no types.)
+ */
+ public List<Class> types = new ArrayList<Class>();
+
+ /*
+ * The object activation handling the active behavior of this object.
+ */
+ public ObjectActivation objectActivation;
+
+ public void startBehavior(Class classifier, List<ParameterValue> inputs) {
+ // Create an object activation for this object (if one does not already
+ // exist) and start its behavior(s).
+ // Debug.println("[startBehavior] On object...");
+ if(this.objectActivation == null) {
+ this.objectActivation = new ObjectActivation();
+ this.objectActivation.object = this;
+ }
+ // Debug.println("[startBehavior] objectActivation = " +
+ // objectActivation);
+ this.objectActivation.startBehavior(classifier, inputs);
+ }
+
+ public Execution dispatch(Operation operation) {
+ // Dispatch the given operation to a method execution, using a dispatch
+ // strategy.
+ return ((DispatchStrategy)this.locus.factory.getStrategy("dispatch")).dispatch(this, operation);
+ }
+
+ public void send(SignalInstance signalInstance) {
+ // If the object is active, add the given signal instance to the event
+ // pool and signal that a new signal instance has arrived.
+ if(this.objectActivation != null) {
+ this.objectActivation.send(signalInstance);
+ }
+ }
+
+ public void destroy() {
+ // Stop the object activation (if any), clear all types and destroy the
+ // object as an extensional value.
+ Debug.println("[destroy] object = " + this.objectId());
+ if(this.objectActivation != null) {
+ this.objectActivation.stop();
+ this.objectActivation = null;
+ }
+ this.types.clear();
+ super.destroy();
+ }
+
+ public void register(EventAccepter accepter) {
+ // Register the given accept event accepter to wait for a dispatched
+ // signal event.
+ if(this.objectActivation != null) {
+ this.objectActivation.register(accepter);
+ }
+ }
+
+ public void unregister(EventAccepter accepter) {
+ // Remove the given event accepter for the list of waiting event
+ // accepters.
+ if(this.objectActivation != null) {
+ this.objectActivation.unregister(accepter);
+ }
+ }
+
+ public Value copy() {
+ // Create a new object that is a copy of this object at the same locus
+ // as this object.
+ // However, the new object will NOT have any object activation (i.e, its
+ // classifier behaviors will not be started).
+ Object_ newObject = (Object_)(super.copy());
+ List<Class> types = this.types;
+ for(int i = 0; i < types.size(); i++) {
+ Class type = types.get(i);
+ newObject.types.add(type);
+ }
+ return newObject;
+ }
+
+ public Value new_() {
+ // Create a new object with no type, feature values or locus.
+ return new Object_();
+ }
+
+ public List<Classifier> getTypes() {
+ // Return the types of this object.
+ List<Classifier> types = new ArrayList<Classifier>();
+ List<Class> myTypes = this.types;
+ for(int i = 0; i < myTypes.size(); i++) {
+ Class type = myTypes.get(i);
+ types.add(type);
+ }
+ return types;
+ }
+
+ public String toString() {
+ return this.objectId() ;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/PrimitiveValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/PrimitiveValue.java
new file mode 100644
index 00000000000..92b1a3e785c
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/PrimitiveValue.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.PrimitiveType;
+
+public abstract class PrimitiveValue extends Value {
+
+ public PrimitiveType type;
+
+ public Value copy() {
+ // Create a new value that is equal to this primitive value.
+ PrimitiveValue newValue = (PrimitiveValue)(super.copy());
+ newValue.type = this.type;
+ return newValue;
+ }
+
+ public List<Classifier> getTypes() {
+ // Return the single primitive type of this value.
+ List<Classifier> types = new ArrayList<Classifier>();
+ types.add(this.type);
+ return types;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RealValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RealValue.java
new file mode 100644
index 00000000000..77a0555c5a2
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RealValue.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralReal;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class RealValue extends PrimitiveValue {
+
+ /*
+ * The actual Real value.
+ */
+ public double value;
+
+ public ValueSpecification specify() {
+ // Return a literal real with the value of this real value.
+ LiteralReal literal = UMLFactory.eINSTANCE.createLiteralReal();
+ literal.setType(this.type);
+ literal.setValue(this.value);
+ return literal;
+ }
+
+ public Boolean equals(Value otherValue) {
+ // Test if this real value is equal to the otherValue.
+ // To be equal, the otherValue must have the same value as this real
+ // value.
+ boolean isEqual = false;
+ if(otherValue instanceof RealValue) {
+ isEqual = ((RealValue)otherValue).value == this.value;
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new real value with the same value as this real value.
+ RealValue newValue = (RealValue)(super.copy());
+ newValue.value = this.value;
+ return newValue;
+ }
+
+ public Value new_() {
+ return new RealValue();
+ }
+
+ public String toString() {
+ String stringValue = "";
+ if(this.value == 0) {
+ stringValue = "0";
+ } else {
+ double positiveValue = this.value;
+ if(positiveValue < 0) {
+ positiveValue = -positiveValue;
+ }
+ int exponent = 0;
+ if(positiveValue < .1) {
+ while(positiveValue < .1) {
+ positiveValue = positiveValue * 10;
+ exponent = exponent - 1;
+ }
+ } else if(positiveValue > 1) {
+ while(positiveValue > 1) {
+ positiveValue = positiveValue / 10;
+ exponent = exponent + 1;
+ }
+ }
+ // This gives 9 significant digits in the mantissa.
+ for(int i = 0; i < 9; i++) {
+ positiveValue = positiveValue * 10;
+ }
+ IntegerValue integerValue = new IntegerValue();
+ integerValue.value = (int)positiveValue;
+ stringValue = "0." + integerValue.toString();
+ integerValue.value = exponent;
+ stringValue = stringValue + "E" + integerValue.toString();
+ if(this.value < 0) {
+ stringValue = "-" + stringValue;
+ }
+ }
+ return stringValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RedefinitionBasedDispatchStrategy.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RedefinitionBasedDispatchStrategy.java
new file mode 100644
index 00000000000..25d2ea58991
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/RedefinitionBasedDispatchStrategy.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.List;
+
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Operation;
+
+public class RedefinitionBasedDispatchStrategy extends DispatchStrategy {
+
+ public Behavior getMethod(Object_ object, Operation operation) {
+ // Get the method that corresponds to the given operation for the given
+ // object.
+ // [If there is more than one type with a method for the operation, then
+ // the first one is arbitrarily chosen.]
+ Behavior method = null;
+ int i = 1;
+ while(method == null & i <= object.types.size()) {
+ Class type = object.types.get(i - 1);
+ List<NamedElement> members = type.getMembers();
+ int j = 1;
+ while(method == null & j <= members.size()) {
+ NamedElement member = members.get(j - 1);
+ if(member instanceof Operation) {
+ Operation memberOperation = (Operation)member;
+ if(this.operationsMatch(memberOperation, operation)) {
+ method = memberOperation.getMethods().get(0);
+ }
+ }
+ j = j + 1;
+ }
+ i = i + 1;
+ }
+ return method;
+ }
+
+ public Boolean operationsMatch(Operation ownedOperation, Operation baseOperation) {
+ // Check if the owned operation is equal to or a redefinition (directly
+ // or indirectly) of the base operation.
+ boolean matches = false;
+ if(ownedOperation == baseOperation) {
+ matches = true;
+ } else {
+ int i = 1;
+ while(!matches & i <= ownedOperation.getRedefinedOperations().size()) {
+ matches = this.operationsMatch(ownedOperation.getRedefinedOperations().get(i - 1), baseOperation);
+ i = i + 1;
+ }
+ }
+ return matches;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Reference.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Reference.java
new file mode 100644
index 00000000000..5b150d00d81
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Reference.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.SignalInstance;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class Reference extends StructuredValue {
+
+ public Object_ referent;
+
+ public void startBehavior(Class classifier, List<ParameterValue> inputs) {
+ // Asynchronously start the behavior of the given classifier for the
+ // referent object.
+ this.referent.startBehavior(classifier, inputs);
+ }
+
+ public Execution dispatch(Operation operation) {
+ // Dispatch the given operation to the referent object.
+ return this.referent.dispatch(operation);
+ }
+
+ public void send(SignalInstance signalInstance) {
+ // Send the given signal instance to the referent object.
+ this.referent.send(signalInstance);
+ }
+
+ public void destroy() {
+ // Destroy the referent.
+ this.referent.destroy();
+ }
+
+ public Boolean equals(Value otherValue) {
+ // Test if this reference is equal to the otherValue.
+ // To be equal, the otherValue must also be a reference, with the same
+ // referent as this reference.
+ boolean isEqual = false;
+ if(otherValue instanceof Reference) {
+ isEqual = (((Reference)otherValue).referent == this.referent);
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new reference with the same referent as this reference.
+ Reference newValue = (Reference)(super.copy());
+ newValue.referent = this.referent;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Create a new reference with no referent.
+ return new Reference();
+ }
+
+ public List<Classifier> getTypes() {
+ // Get the types of the referent object.
+ return this.referent.getTypes();
+ }
+
+ public FeatureValue getFeatureValue(StructuralFeature feature) {
+ // Get the feature value associated with the given feature in the
+ // referent object.
+ return this.referent.getFeatureValue(feature);
+ }
+
+ public void setFeatureValue(StructuralFeature feature, List<Value> values, Integer position) {
+ // Set the values associated with the given feature in the referent
+ // object.
+ this.referent.setFeatureValue(feature, values, position);
+ }
+
+ public List<FeatureValue> getFeatureValues() {
+ // Return the feature values of the referent.
+ return this.referent.getFeatureValues();
+ }
+
+ public String toString() {
+ return "Reference to " + this.referent.toString();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StringValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StringValue.java
new file mode 100644
index 00000000000..76ad22e56f4
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StringValue.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class StringValue extends PrimitiveValue {
+
+ public String value;
+
+ public ValueSpecification specify() {
+ // Return a literal string with the value of this string value.
+ LiteralString literal = UMLFactory.eINSTANCE.createLiteralString();
+ literal.setType(this.type);
+ literal.setValue(this.value);
+ return literal;
+ }
+
+ public Boolean equals(Value otherValue) {
+ // Test if this string value is equal to the otherValue.
+ // To be equal, the otherValue must have the same value as this string
+ // value.
+ boolean isEqual = false;
+ if(otherValue instanceof StringValue) {
+ isEqual = ((StringValue)otherValue).value.equals(this.value);
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new string value with the same value as this string value.
+ StringValue newValue = (StringValue)(super.copy());
+ newValue.value = this.value;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Create a new string value with no value.
+ return new StringValue();
+ }
+
+ public String toString() {
+ return value;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StructuredValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StructuredValue.java
new file mode 100644
index 00000000000..3aafdb67095
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/StructuredValue.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.StructuralFeature;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public abstract class StructuredValue extends Value {
+
+ public ValueSpecification specify() {
+ // Return an instance value that specifies this structured value.
+ // Debug.println("[specify] StructuredValue...");
+ InstanceValue instanceValue = UMLFactory.eINSTANCE.createInstanceValue();
+ InstanceSpecification instance = UMLFactory.eINSTANCE.createInstanceSpecification();
+ instanceValue.setType(null);
+ instanceValue.setInstance(instance);
+ instance.getClassifiers().addAll(this.getTypes());
+ List<FeatureValue> featureValues = this.getFeatureValues();
+ // Debug.println("[specify] " + featureValues.size() + " feature(s).");
+ for(int i = 0; i < featureValues.size(); i++) {
+ FeatureValue featureValue = featureValues.get(i);
+ Slot slot = UMLFactory.eINSTANCE.createSlot();
+ slot.setDefiningFeature(featureValue.feature);
+ // Debug.println("[specify] feature = " + featureValue.feature.name
+ // + ", " + featureValue.values.size() + " value(s).");
+ List<Value> values = featureValue.values;
+ for(int j = 0; j < values.size(); j++) {
+ Value value = values.get(j);
+ // Debug.println("[specify] value = " + value);
+ slot.getValues().add(value.specify());
+ }
+ instance.getSlots().add(slot);
+ }
+ return instanceValue;
+ }
+
+ public abstract FeatureValue getFeatureValue(StructuralFeature feature);
+
+ public abstract void setFeatureValue(StructuralFeature feature, List<Value> values, Integer position);
+
+ public abstract List<FeatureValue> getFeatureValues();
+
+ public void createFeatureValues() {
+ // Create empty feature values for all structural features, direct and
+ // inherited, of the types of this structured value.
+ List<Classifier> types = this.getTypes();
+ for(int i = 0; i < types.size(); i++) {
+ Classifier type = types.get(i);
+ this.createFeatureValuesFromType(type); // REPLACED body of loop
+ }
+ }
+
+ // ADDED
+ public void createFeatureValuesFromType(Classifier type) {
+ // Create empty feature values for all structural features from the
+ // given type and all its direct and indirect parents.
+ // [Note that this is necessary in order to set the feature values for
+ // private structural features of parent classifiers, since these are
+ // not actually inherited.]
+ List<NamedElement> ownedMembers = type.getOwnedMembers();
+ for(int i = 0; i < ownedMembers.size(); i++) {
+ NamedElement member = ownedMembers.get(i);
+ if(member instanceof StructuralFeature) {
+ this.setFeatureValue((StructuralFeature)member, new ArrayList<Value>(), 0);
+ }
+ }
+
+ List<Classifier> generals = type.getGenerals();
+ for (int i = 0; i < generals.size(); i++) {
+ Classifier general = generals.get(i);
+ this.createFeatureValuesFromType(general);
+ }
+ }
+ //
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/UnlimitedNaturalValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/UnlimitedNaturalValue.java
new file mode 100644
index 00000000000..4c375644aff
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/UnlimitedNaturalValue.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class UnlimitedNaturalValue extends PrimitiveValue {
+
+ /*
+ * The actual unlimited natural value.
+ */
+ public Integer value;
+
+ public ValueSpecification specify() {
+ // Return a literal unlimited natural with the value of this unlimited
+ // natural value.
+ LiteralUnlimitedNatural literal = UMLFactory.eINSTANCE.createLiteralUnlimitedNatural();
+ literal.setType(this.type);
+ literal.setValue(this.value);
+ return literal;
+ }
+
+ public Boolean equals(Value otherValue) {
+ // Test if this unlimited natural value is equal to the otherValue.
+ // To be equal, the otherValue must have the same value as this
+ // unlimited natural value.
+ boolean isEqual = false;
+ if(otherValue instanceof UnlimitedNaturalValue) {
+ isEqual = ((UnlimitedNaturalValue)otherValue).value.equals(this.value); // CHANGED == to equals
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new unlimited natural value with the same value as this
+ // value.
+ UnlimitedNaturalValue newValue = (UnlimitedNaturalValue)(super.copy());
+ newValue.value = this.value;
+ return newValue;
+ }
+
+ public Value new_() {
+ // Create a new unlimited natural value with no value.
+ return new UnlimitedNaturalValue();
+ }
+
+ public String toString() {
+ String stringValue = "*";
+ if(this.value >= 0) {
+ IntegerValue integerValue = new IntegerValue();
+ integerValue.value = this.value;
+ stringValue = integerValue.toString();
+ }
+ return stringValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Value.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Value.java
new file mode 100644
index 00000000000..6603dc3216c
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Classes/Kernel/Value.java
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.SemanticVisitor;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public abstract class Value extends SemanticVisitor {
+
+ public abstract ValueSpecification specify();
+
+ public Boolean equals(Value otherValue) {
+ // Test if this value is equal to otherValue. To be equal, this value
+ // must have the same type as otherValue.
+ // This operation must be overridden in Value subclasses to check for
+ // equality of properties defined in those subclasses.
+ List<Classifier> myTypes = this.getTypes();
+ List<Classifier> otherTypes = otherValue.getTypes();
+ boolean isEqual = true;
+ // Debug.println("[equals] Value...");
+ // Debug.println("[equals] this has " + myTypes.size() +
+ // "types, other has " + otherTypes.size() + ".");
+ if(myTypes.size() != otherTypes.size()) {
+ isEqual = false;
+ } else {
+ // Debug.println("[equals] " + myTypes.size() + " type(s).");
+ int i = 1;
+ while(isEqual & i <= myTypes.size()) {
+ // Debug.println("[equals] this type = " +
+ // myTypes.get(i-1).name);
+ boolean matched = false;
+ int j = 1;
+ while(!matched & j <= otherTypes.size()) {
+ // Debug.println("[equals] other type = " +
+ // otherTypes.get(j-1).name);
+ matched = (otherTypes.get(j - 1) == myTypes.get(i - 1));
+ j = j + 1;
+ }
+ isEqual = matched;
+ i = i + 1;
+ }
+ }
+ return isEqual;
+ }
+
+ public Value copy() {
+ // Create a new value that is equal to this value.
+ // By default, this operation simply creates a new value with empty
+ // properties.
+ // It must be overridden in each Value subclass to do the superclass
+ // copy and then appropriately set properties defined in the subclass.
+ return this.new_();
+ }
+
+ public abstract Value new_();
+
+ public abstract List<Classifier> getTypes();
+
+ public Boolean hasType(Classifier type) {
+ // Check if this object has the given classifier as a type.
+ List<Classifier> types = this.getTypes();
+ boolean found = false;
+ int i = 1;
+ while(!found & i <= types.size()) {
+ found = (types.get(i - 1) == type);
+ i = i + 1;
+ }
+ return found;
+ }
+
+ public abstract String toString();
+
+ public String objectId() {
+ // Return an identifier for this object.
+ // [Non-normative.]
+ return super.toString();
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/Execution.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/Execution.java
new file mode 100644
index 00000000000..8495fe44af0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/Execution.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+
+public abstract class Execution extends Object_ {
+
+ /*
+ * The object that provides the context for this execution. The type of the
+ * context of the execution must be the context of the type (behavior) of
+ * the execution.
+ */
+ public Object_ context;
+
+ /*
+ * The parameterValues for this execution. All parameterValues must have a
+ * parameter that is a parameter of the type of this execution. The values
+ * of all input (in and in-out) parameters must be set before the execution
+ * is executed.
+ */
+ public List<ParameterValue> parameterValues = new ArrayList<ParameterValue>();
+
+ public abstract void execute();
+
+ public void terminate() {
+ // Terminate an ongoing execution. By default, do nothing.
+ return;
+ }
+
+ public Value copy() {
+ // Create a new execution that has the same behavior and parameterValues
+ // as this execution.
+ // Debug.println("[Copy] execution = " + this);
+ Execution newValue = (Execution)(super.copy());
+ newValue.context = this.context;
+ List<ParameterValue> parameterValues = this.parameterValues;
+ for(int i = 0; i < parameterValues.size(); i++) {
+ ParameterValue parameterValue = parameterValues.get(i);
+ newValue.parameterValues.add(parameterValue.copy());
+ }
+ // Debug.println("[Copy] Done.");
+ return newValue;
+ }
+
+ public abstract Value new_();
+
+ public void setParameterValue(ParameterValue parameterValue) {
+ // Set the given parameter value for this execution.
+ // If a parameter value already existed for the parameter of the given
+ // parameter value, then replace its value.
+ // Debug.println("[setParameterValue] parameter = " +
+ // parameterValue.parameter.name + " with " +
+ // parameterValue.values.size() + " values");
+ ParameterValue existingParameterValue = this.getParameterValue(parameterValue.parameter);
+ if(existingParameterValue == null) {
+ this.parameterValues.add(parameterValue);
+ } else {
+ existingParameterValue.values = parameterValue.values;
+ }
+ }
+
+ public ParameterValue getParameterValue(Parameter parameter) {
+ // Get the parameter value of this execution corresponding to the given
+ // parameter (if any).
+ ParameterValue parameterValue = null;
+ int i = 1;
+ while(parameterValue == null & i <= this.parameterValues.size()) {
+ if(this.parameterValues.get(i - 1).parameter == parameter) {
+ parameterValue = this.parameterValues.get(i - 1);
+ }
+ i = i + 1;
+ }
+ return parameterValue;
+ }
+
+ public List<ParameterValue> getOutputParameterValues() {
+ // Return the parameter values for output (in-out, out and return)
+ // parameters.
+ List<ParameterValue> outputs = new ArrayList<ParameterValue>();
+ List<ParameterValue> parameterValues = this.parameterValues;
+ for(int i = 0; i < parameterValues.size(); i++) {
+ ParameterValue parameterValue = parameterValues.get(i);
+ Parameter parameter = parameterValue.parameter;
+ if((parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) | (parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL) | (parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL)) {
+ outputs.add(parameterValue);
+ }
+ }
+ return outputs;
+ }
+
+ public Behavior getBehavior() {
+ // Get the behavior that is the type of this execution.
+ return (Behavior)(this.getTypes().get(0));
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/OpaqueBehaviorExecution.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/OpaqueBehaviorExecution.java
new file mode 100644
index 00000000000..62097cb60cb
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/OpaqueBehaviorExecution.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+
+public abstract class OpaqueBehaviorExecution extends Execution {
+
+ public void execute() {
+ // Execute the body of the opaque behavior.
+ Debug.println("[execute] Opaque behavior " + this.getBehavior().getName() + "...");
+ List<Parameter> parameters = this.getBehavior().getOwnedParameters();
+ List<ParameterValue> inputs = new ArrayList<ParameterValue>();
+ List<ParameterValue> outputs = new ArrayList<ParameterValue>();
+ for(int i = 0; i < parameters.size(); i++) {
+ Parameter parameter = parameters.get(i);
+ if((parameter.getDirection() == ParameterDirectionKind.IN_LITERAL) | (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL)) {
+ inputs.add(this.getParameterValue(parameter));
+ }
+ if((parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) | (parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL) | (parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL)) {
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = parameter;
+ this.setParameterValue(parameterValue);
+ outputs.add(parameterValue);
+ }
+ }
+ this.doBody(inputs, outputs);
+ }
+
+ public abstract void doBody(List<ParameterValue> inputParameters, List<ParameterValue> outputParameters);
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/ParameterValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/ParameterValue.java
new file mode 100644
index 00000000000..a05b5c23a51
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/BasicBehaviors/ParameterValue.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Parameter;
+
+public class ParameterValue {
+
+ public Parameter parameter;
+
+ /*
+ * The values of for the parameter. Zero or more values are possible, as
+ * constrained by the multiplicity of the parameter.
+ */
+ public List<Value> values = new ArrayList<Value>();
+
+ public ParameterValue copy() {
+ // Create a new parameter value for the same parameter as this parameter
+ // value, but with copies of the values of this parameter value.
+ ParameterValue newValue = new ParameterValue();
+ newValue.parameter = this.parameter;
+ List<Value> values = this.values;
+ for(int i = 0; i < values.size(); i++) {
+ Value value = values.get(i);
+ newValue.values.add(value.copy());
+ }
+ return newValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ArrivalSignal.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ArrivalSignal.java
new file mode 100644
index 00000000000..98b8e27113b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ArrivalSignal.java
@@ -0,0 +1,17 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications;
+
+public class ArrivalSignal {
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ClassifierBehaviorExecution.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ClassifierBehaviorExecution.java
new file mode 100644
index 00000000000..da4e71474a0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ClassifierBehaviorExecution.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+
+public class ClassifierBehaviorExecution {
+
+ /*
+ * The execution of the associated classifier behavior for a certain object.
+ */
+ public Execution execution;
+
+ /*
+ * The classifier whose behavior is being executed. (This must be an active
+ * class.)
+ */
+ public Class classifier;
+
+ /*
+ * The object activation that owns this classifier behavior execution.
+ */
+ public ObjectActivation objectActivation;
+
+ public void execute(Class classifier, List<ParameterValue> inputs) {
+ // Set the classifier for this classifier behavior execution to the
+ // given class.
+ // If the given class is a behavior, set the execution to be the object
+ // of the object activation of the classifier behavior execution.
+ // Otherwise the class must be an active class, so get an execution
+ // object for the classifier behavior for the class.
+ // Set the input parameters for the execution to the given values.
+ // Then start the active behavior of this ClassifierBehaviorExecution
+ // object, which will execute the execution object on a separate thread
+ // of control.
+ // Debug.println("[execute] Executing behavior for " + classifier.name +
+ // "...");
+ this.classifier = classifier;
+ Object_ object = this.objectActivation.object;
+ if(classifier instanceof Behavior) {
+ this.execution = (Execution)object;
+ } else {
+ this.execution = object.locus.factory.createExecution(classifier.getClassifierBehavior(), object);
+ }
+ if(inputs != null) {
+ for(int i = 0; i < inputs.size(); i++) {
+ ParameterValue input = inputs.get(i);
+ this.execution.setParameterValue(input);
+ }
+ }
+ _startObjectBehavior();
+ }
+
+ public void _startObjectBehavior() {
+ this.execution.execute();
+ }
+
+ public void terminate() {
+ // Terminate the associated execution.
+ // If the execution is not itself the object of the object activation,
+ // then destroy it.
+ // Debug.println("[terminate] Terminating behavior for " +
+ // classifier.name + "...");
+ this.execution.terminate();
+ if(this.execution != this.objectActivation.object) {
+ this.execution.destroy();
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/EventAccepter.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/EventAccepter.java
new file mode 100644
index 00000000000..7b8d9979e82
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/EventAccepter.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications;
+
+public abstract class EventAccepter {
+
+ public abstract void accept(SignalInstance signalInstance);
+
+ public abstract Boolean match(SignalInstance signalInstance);
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/FIFOGetNextEventStrategy.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/FIFOGetNextEventStrategy.java
new file mode 100644
index 00000000000..b7df045e6c6
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/FIFOGetNextEventStrategy.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications;
+
+public class FIFOGetNextEventStrategy extends GetNextEventStrategy {
+
+ public SignalInstance getNextEvent(ObjectActivation objectActivation) {
+ // Get the first event from the given event pool. The event is removed
+ // from the pool.
+ SignalInstance signalInstance = objectActivation.eventPool.get(0);
+ objectActivation.eventPool.remove(0);
+ return signalInstance;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/GetNextEventStrategy.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/GetNextEventStrategy.java
new file mode 100644
index 00000000000..938c02d901e
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/GetNextEventStrategy.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.SemanticStrategy;
+
+public abstract class GetNextEventStrategy extends SemanticStrategy {
+
+ public String getName() {
+ // Get next event strategies are always named "getNextEvent".
+ return "getNextEvent";
+ }
+
+ public abstract SignalInstance getNextEvent(ObjectActivation objectActivation);
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ObjectActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ObjectActivation.java
new file mode 100644
index 00000000000..a6154c1ba00
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/ObjectActivation.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.ChoiceStrategy;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+
+public class ObjectActivation {
+
+ /*
+ * The executing classifier behaviors for this object activation.
+ */
+ public List<ClassifierBehaviorExecution> classifierBehaviorExecutions = new ArrayList<ClassifierBehaviorExecution>();
+
+ /*
+ * The set of event accepters waiting for signals to be received by the
+ * object of this object activation.
+ */
+ public List<EventAccepter> waitingEventAccepters = new ArrayList<EventAccepter>();
+
+ /*
+ * The pool of signals sent to the object of this object activation, pending
+ * dispatching as events. (All the data values in the pool must be signal
+ * instances -- that is, they must have a single type that is a signal.)
+ */
+ public List<SignalInstance> eventPool = new ArrayList<SignalInstance>();
+
+ /*
+ * The object whose active behavior is being handled by this active object.
+ */
+ public Object_ object;
+
+ public void stop() {
+ // Stop this object activation by terminating all classifier behavior
+ // executions.
+ List<ClassifierBehaviorExecution> classifierBehaviorExecutions = this.classifierBehaviorExecutions;
+ for(int i = 0; i < classifierBehaviorExecutions.size(); i++) {
+ ClassifierBehaviorExecution classifierBehaviorExecution = classifierBehaviorExecutions.get(i);
+ classifierBehaviorExecution.terminate();
+ }
+ }
+
+ public void register(EventAccepter accepter) {
+ // Register the given event accepter to wait for a dispatched signal
+ // event.
+ Debug.println("[register] object = " + this.object);
+ Debug.println("[register] accepter = " + accepter);
+ this.waitingEventAccepters.add(accepter);
+ }
+
+ public void unregister(EventAccepter accepter) {
+ // Remove the given event accepter for the list of waiting event
+ // accepters.
+ Debug.println("[unregister] object = " + this.object);
+ Debug.println("[unregister] accepter = " + accepter);
+ boolean notFound = true;
+ int i = 1;
+ while(notFound & i <= this.waitingEventAccepters.size()) {
+ if(this.waitingEventAccepters.get(i - 1) == accepter) {
+ this.waitingEventAccepters.remove(i - 1);
+ notFound = false;
+ }
+ i = i + 1;
+ }
+ }
+
+ public void dispatchNextEvent() {
+ // Get the next signal instance out of the event pool.
+ // If there is one or more waiting event accepters with triggers that
+ // match the signal instance, then dispatch it to exactly one of those
+ // waiting accepters.
+ if(this.eventPool.size() > 0) {
+ SignalInstance signalInstance = this.getNextEvent();
+ Debug.println("[dispatchNextEvent] signalInstance = " + signalInstance);
+ List<Integer> matchingEventAccepterIndexes = new ArrayList<Integer>();
+ List<EventAccepter> waitingEventAccepters = this.waitingEventAccepters;
+ for(int i = 0; i < waitingEventAccepters.size(); i++) {
+ EventAccepter eventAccepter = waitingEventAccepters.get(i);
+ if(eventAccepter.match(signalInstance)) {
+ matchingEventAccepterIndexes.add(i);
+ }
+ }
+ if(matchingEventAccepterIndexes.size() > 0) {
+ // *** Choose one matching event accepter non-deterministically.
+ // ***
+ int j = ((ChoiceStrategy)this.object.locus.factory.getStrategy("choice")).choose(matchingEventAccepterIndexes.size());
+ EventAccepter selectedEventAccepter = this.waitingEventAccepters.get(matchingEventAccepterIndexes.get(j - 1));
+ this.waitingEventAccepters.remove(j - 1);
+ selectedEventAccepter.accept(signalInstance);
+ }
+ }
+ }
+
+ public SignalInstance getNextEvent() {
+ // Get the next event from the event pool, using a get next event
+ // strategy.
+ return ((GetNextEventStrategy)this.object.locus.factory.getStrategy("getNextEvent")).getNextEvent(this);
+ }
+
+ public void send(SignalInstance signalInstance) {
+ // Add the given signal instance to the event pool and signal that a new
+ // signal instance has arrived.
+ this.eventPool.add((SignalInstance)(signalInstance.copy()));
+ _send(new ArrivalSignal());
+ }
+
+ public void startBehavior(Class classifier, List<ParameterValue> inputs) {
+ // Start the event dispatch loop for this object activation (if it has
+ // not already been started).
+ // If a classifier is given that is a type of the object of this object
+ // activation and there is not already a classifier behavior execution
+ // for it,
+ // then create a classifier behavior execution for it.
+ // Otherwise, create a classifier behavior execution for each of the
+ // types of the object of this object activation which has a classifier
+ // behavior or which is a behavior itself
+ // and for which there is not currently a classifier behavior execution.
+ // Start EventDispatchLoop
+ _startObjectBehavior();
+ if(classifier == null) {
+ Debug.println("[startBehavior] Starting behavior for all classifiers...");
+ // *** Start all classifier behaviors concurrently. ***
+ List<Class> types = this.object.types;
+ for(Iterator<Class> i = types.iterator(); i.hasNext();) {
+ Class type = i.next();
+ if(type instanceof Behavior | type.getClassifierBehavior() != null) {
+ this.startBehavior(type, new ArrayList<ParameterValue>());
+ }
+ }
+ } else {
+ Debug.println("[startBehavior] Starting behavior for " + classifier.getName() + "...");
+ boolean notYetStarted = true;
+ int i = 1;
+ while(notYetStarted & i <= this.classifierBehaviorExecutions.size()) {
+ notYetStarted = (this.classifierBehaviorExecutions.get(i - 1).classifier != classifier);
+ i = i + 1;
+ }
+ if(notYetStarted) {
+ ClassifierBehaviorExecution newExecution = new ClassifierBehaviorExecution();
+ newExecution.objectActivation = this;
+ this.classifierBehaviorExecutions.add(newExecution);
+ newExecution.execute(classifier, inputs);
+ }
+ }
+ }
+
+
+ int signalCount = 0;
+ public void _startObjectBehavior() {
+ // *** This should start the EventDispatchLoop ***
+
+ while (this.signalCount > 0) {
+ this.dispatchNextEvent();
+ signalCount = signalCount - 1;
+ }
+ } // _startObjectBehavior
+
+ public void _send(ArrivalSignal signal) {
+ // Signal the arrival of a new signal instance in the event pool.
+ // *** This should send an ArrivalSignal to the EventDispatchLoop. ***
+
+ this.signalCount = this.signalCount + 1;
+ if (this.signalCount == 1) {
+ this._startObjectBehavior();
+ }
+ } // _send
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/SignalInstance.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/SignalInstance.java
new file mode 100644
index 00000000000..81adfbc7587
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/CommonBehaviors/Communications/SignalInstance.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.CompoundValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Signal;
+
+public class SignalInstance extends CompoundValue {
+
+ public Signal type;
+
+ public List<Classifier> getTypes() {
+ // Return the single type of this signal instance.
+ List<Classifier> types = new ArrayList<Classifier>();
+ types.add(this.type);
+ return types;
+ }
+
+ public Value new_() {
+ // Create a new signal instance with no type or feature values.
+ return new SignalInstance();
+ }
+
+ public Value copy() {
+ // Create a new signal instance with the same type and feature values as
+ // this signal instance.
+ SignalInstance newValue = (SignalInstance)(super.copy());
+ newValue.type = this.type;
+ return newValue;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ChoiceStrategy.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ChoiceStrategy.java
new file mode 100644
index 00000000000..80354508f7a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ChoiceStrategy.java
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+public abstract class ChoiceStrategy extends SemanticStrategy {
+
+ public String getName() {
+ // The name of a choice strategy is always "choice".
+ return "choice";
+ }
+
+ public abstract Integer choose(Integer size);
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactory.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactory.java
new file mode 100644
index 00000000000..8d5599010cd
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactory.java
@@ -0,0 +1,179 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.debug.StackFrameManager;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Evaluation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public abstract class ExecutionFactory {
+
+ /*
+ * The locus at which this factory resides.
+ */
+ public Locus locus;
+
+ /*
+ * The set of opaque behavior executions to be used to execute the primitive
+ * behaviors known to the factory.
+ */
+ public List<OpaqueBehaviorExecution> primitiveBehaviorPrototypes = new ArrayList<OpaqueBehaviorExecution>();
+
+ /*
+ * The set of primitive types that have corresponding literal value
+ * specifications. Must include Integer, Boolean, String and
+ * UnlimitedNatural.
+ */
+ public List<PrimitiveType> builtInTypes = new ArrayList<PrimitiveType>();
+
+ /*
+ * The set of semantic strategies currently registered with this execution
+ * factory.
+ */
+ public List<SemanticStrategy> strategies = new ArrayList<SemanticStrategy>();
+
+ public Execution createExecution(Behavior behavior, Object_ context) {
+ // Create an execution object for a given behavior.
+ // The execution will take place at the locus of the factory in the
+ // given context.
+ // If the context is empty, the execution is assumed to provide its own
+ // context.
+ Execution execution;
+ if(behavior instanceof OpaqueBehavior) {
+ execution = this.instantiateOpaqueBehaviorExecution((OpaqueBehavior)behavior);
+ } else {
+ execution = (Execution)this.instantiateVisitor(behavior);
+ execution.types.add(behavior);
+ execution.createFeatureValues();
+ }
+ this.locus.add(execution);
+ if(context == null) {
+ execution.context = execution;
+ } else {
+ execution.context = context;
+ }
+ // Statement added for connection with the DebugAPI
+ if (execution instanceof ActivityExecution)
+ StackFrameManager.getInstance().pushActivityExecution((ActivityExecution)execution) ;
+ return execution;
+ }
+
+ public Evaluation createEvaluation(ValueSpecification specification) {
+ // Create an evaluation object for a given value specification.
+ // The evaluation will take place at the locus of the factory.
+ Evaluation evaluation = (Evaluation)this.instantiateVisitor(specification);
+ evaluation.specification = specification;
+ evaluation.locus = this.locus;
+ return evaluation;
+ }
+
+ public abstract SemanticVisitor instantiateVisitor(Element element);
+
+ public OpaqueBehaviorExecution instantiateOpaqueBehaviorExecution(OpaqueBehavior behavior) {
+ // Return a copy of the prototype for the primitive behavior execution
+ // of the given opaque behavior.
+ OpaqueBehaviorExecution execution = null;
+ int i = 1;
+ while(execution == null & i <= this.primitiveBehaviorPrototypes.size()) {
+ // Debug.println("[instantiateOpaqueExecution] Checking " +
+ // this.primitiveBehaviorPrototypes.get(i).objectId() + "...");
+ OpaqueBehaviorExecution prototype = this.primitiveBehaviorPrototypes.get(i - 1);
+ if (prototype.getBehavior() == behavior) {
+ execution = (OpaqueBehaviorExecution)(prototype.copy());
+ }
+ i = i + 1;
+ }
+ if(execution == null) {
+ Debug.println("[instantiateOpaqueExecution] No prototype execution found for " + behavior.getName() + ".");
+ }
+ return execution;
+ }
+
+ public void addPrimitiveBehaviorPrototype(OpaqueBehaviorExecution execution) {
+ // Add an opaque behavior execution to use as a prototype for
+ // instantiating the corresponding primitive opaque behavior.
+ // Precondition: No primitive behavior prototype for the type of the
+ // given execution should already exist.
+ this.primitiveBehaviorPrototypes.add(execution);
+ }
+
+ public void addBuiltInType(PrimitiveType type) {
+ // Add the given primitive type as a built-in type.
+ // Precondition: No built-in type with the same name should already
+ // exist.
+ this.builtInTypes.add(type);
+ }
+
+ public PrimitiveType getBuiltInType(String name) {
+ // Return the built-in type with the given name.
+ PrimitiveType type = null;
+ int i = 1;
+ while(type == null & i <= this.builtInTypes.size()) {
+ PrimitiveType primitiveType = this.builtInTypes.get(i - 1);
+ if(primitiveType.getName().equals(name)) {
+ type = primitiveType;
+ }
+ i = i + 1;
+ }
+ return type;
+ }
+
+ public void setStrategy(SemanticStrategy strategy) {
+ // Set the strategy for a semantic variation point. Any existing
+ // strategy for the same SVP is replaced.
+ int i = this.getStrategyIndex(strategy.getName());
+ if(i <= this.strategies.size()) {
+ this.strategies.remove(i - 1);
+ }
+ this.strategies.add(strategy);
+ }
+
+ public SemanticStrategy getStrategy(String name) {
+ // Get the strategy with the given name.
+ int i = this.getStrategyIndex(name);
+ SemanticStrategy strategy = null;
+ if(i <= this.strategies.size()) {
+ strategy = this.strategies.get(i - 1);
+ }
+ return strategy;
+ }
+
+ public Integer getStrategyIndex(String name) {
+ // Get the index of the strategy with the given name.
+ // If there is no such strategy, return the size of the strategies list.
+ List<SemanticStrategy> strategies = this.strategies;
+ int i = 1;
+ boolean unmatched = true;
+ while(unmatched & (i <= strategies.size())) {
+ if(strategies.get(i - 1).getName().equals(name)) {
+ unmatched = false;
+ } else {
+ i = i + 1;
+ }
+ }
+ return i;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactoryL1.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactoryL1.java
new file mode 100644
index 00000000000..1959cc1c648
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/ExecutionFactoryL1.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.InstanceValueEvaluation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.LiteralBooleanEvaluation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.LiteralIntegerEvaluation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.LiteralNullEvaluation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.LiteralRealEvaluation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.LiteralStringEvaluation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.LiteralUnlimitedNaturalEvaluation;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralNull;
+import org.eclipse.uml2.uml.LiteralReal;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+
+public class ExecutionFactoryL1 extends ExecutionFactory {
+
+ public SemanticVisitor instantiateVisitor(Element element) {
+ // Instantiate a visitor object for the given element (at Conformance
+ // Level 1)
+ SemanticVisitor visitor = null;
+ if(element instanceof LiteralBoolean) {
+ visitor = new LiteralBooleanEvaluation();
+ } else if(element instanceof LiteralString) {
+ visitor = new LiteralStringEvaluation();
+ } else if(element instanceof LiteralNull) {
+ visitor = new LiteralNullEvaluation();
+ } else if(element instanceof InstanceValue) {
+ visitor = new InstanceValueEvaluation();
+ } else if(element instanceof LiteralUnlimitedNatural) {
+ visitor = new LiteralUnlimitedNaturalEvaluation();
+ } else if(element instanceof LiteralInteger) {
+ visitor = new LiteralIntegerEvaluation();
+ } else if(element instanceof LiteralReal) {
+ visitor = new LiteralRealEvaluation();
+ }
+ return visitor;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Executor.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Executor.java
new file mode 100644
index 00000000000..348a8f66f8a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Executor.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+import java.util.List;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+public class Executor {
+
+ /*
+ * The locus at which this executor resides.
+ */
+ public Locus locus;
+
+ public List<ParameterValue> execute(Behavior behavior, Object_ context, List<ParameterValue> inputs) {
+ // Execute the given behavior with the given input values in the given
+ // context, producing the given output values.
+ // There must be one input parameter value for each input (in or in-out)
+ // parameter of the behavior.
+ // The returned values include one parameter value for each output
+ // (in-out, out or return) parameter of the behavior.
+ // The execution instance is destroyed at completion.
+ Execution execution = this.locus.factory.createExecution(behavior, context);
+ for(int i = 0; i < inputs.size(); i++) {
+ execution.setParameterValue(inputs.get(i));
+ }
+ execution.execute();
+ List<ParameterValue> outputValues = execution.getOutputParameterValues();
+ execution.destroy();
+ return outputValues;
+ }
+
+ public Value evaluate(ValueSpecification specification) {
+ // Evaluate the given value specification, returning the specified
+ // value.
+ // Debug.println("[evaluate] Start...");
+ return this.locus.factory.createEvaluation(specification).evaluate();
+ }
+
+ public Reference start(Class type, List<ParameterValue> inputs) {
+ // Instantiate the given class and start any behavior of the resulting
+ // object.
+ // (The behavior of an object includes any classifier behaviors for an
+ // active object or the class of the object itself, if that is a
+ // behavior.)
+ Debug.println("[start] Starting " + type.getName() + "...");
+ Object_ object = this.locus.instantiate(type);
+ Debug.println("[start] Object = " + object);
+ object.startBehavior(type, inputs);
+ Reference reference = new Reference();
+ reference.referent = object;
+ return reference;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/FirstChoiceStrategy.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/FirstChoiceStrategy.java
new file mode 100644
index 00000000000..e692ecd2552
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/FirstChoiceStrategy.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+public class FirstChoiceStrategy extends ChoiceStrategy {
+
+ public Integer choose(Integer size) {
+ // Always choose one.
+ return 1;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Locus.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Locus.java
new file mode 100644
index 00000000000..4926e675fac
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/Locus.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.papyrus.moka.debug.MokaDebugTarget;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.ExtensionalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.debug.FumlThread;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+
+public class Locus {
+
+ public boolean isInDebugMode = false ;
+
+ public FUMLExecutionEngine engine ;
+
+ public FumlThread mainThread ;
+
+ public MokaStackFrame[] stackFrames ;
+
+ public void initDebugInformation(String debugMode, FUMLExecutionEngine engine) {
+ this.engine = engine ;
+ Locus.debugTarget = engine.getDebugTarget() ;
+ if (debugMode.equals(ILaunchManager.DEBUG_MODE)) {
+ this.isInDebugMode = true ;
+ this.mainThread = new FumlThread(engine.getDebugTarget()) ;
+ this.mainThread.setName("Main thread") ;
+ }
+ }
+
+ protected static MokaDebugTarget debugTarget ;
+
+ public static MokaDebugTarget getDebugTarget() {
+ return Locus.debugTarget ;
+ }
+
+ /*
+ * The executor to be used at this locus.
+ */
+ public Executor executor;
+
+ /*
+ * The factory to be used at this locus.
+ */
+ public ExecutionFactory factory;
+
+ /*
+ * The set of values that are members of classifier extents at this locus.
+ */
+ public List<ExtensionalValue> extensionalValues = new ArrayList<ExtensionalValue>();
+
+ public void setExecutor(Executor executor) {
+ // Set the executor for this locus.
+ this.executor = executor;
+ this.executor.locus = this;
+ }
+
+ public void setFactory(ExecutionFactory factory) {
+ // Set the factory for this locus.
+ this.factory = factory;
+ this.factory.locus = this;
+ }
+
+ public List<ExtensionalValue> getExtent(Classifier classifier) {
+ // Return the set of extensional values at this locus which have the
+ // given classifier as a type.
+ List<ExtensionalValue> extent = new ArrayList<ExtensionalValue>();
+ List<ExtensionalValue> extensionalValues = this.extensionalValues;
+ for(int i = 0; i < extensionalValues.size(); i++) {
+ ExtensionalValue value = extensionalValues.get(i);
+ List<Classifier> types = value.getTypes();
+ boolean conforms = false;
+ int j = 1;
+ while(!conforms & j <= types.size()) {
+ conforms = this.conforms(types.get(j - 1), classifier);
+ j = j + 1;
+ }
+ if(conforms) {
+ extent.add(value);
+ }
+ }
+ return extent;
+ }
+
+ public void add(ExtensionalValue value) {
+ // Add the given extensional value to this locus
+ value.locus = this;
+ this.extensionalValues.add(value);
+ }
+
+ public void remove(ExtensionalValue value) {
+ // Remove the given extensional value from this locus.
+ value.locus = null;
+ boolean notFound = true;
+ int i = 1;
+ while(notFound & i <= this.extensionalValues.size()) {
+ if(this.extensionalValues.get(i - 1) == value) {
+ this.extensionalValues.remove(i - 1);
+ notFound = false;
+ }
+ i = i + 1;
+ }
+ }
+
+ public Object_ instantiate(Class type) {
+ // Instantiate the given class at this locus.
+ Object_ object = null;
+ if(type instanceof Behavior) {
+ object = this.factory.createExecution((Behavior)type, null);
+ } else {
+ object = new Object_();
+ object.types.add(type);
+ object.createFeatureValues();
+ this.add(object);
+ }
+ return object;
+ }
+
+ public Boolean conforms(Classifier type, Classifier classifier) {
+ // Test if a type conforms to a given classifier, that is, the type is
+ // equal to or a descendant of the classifier.
+ boolean doesConform = false;
+ if(type == classifier) {
+ doesConform = true;
+ } else {
+ int i = 1;
+ while(!doesConform & i <= type.getGenerals().size()) {
+ doesConform = this.conforms(type.getGenerals().get(i - 1), classifier);
+ i = i + 1;
+ }
+ }
+ return doesConform;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticStrategy.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticStrategy.java
new file mode 100644
index 00000000000..eebf042c79f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticStrategy.java
@@ -0,0 +1,19 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+public abstract class SemanticStrategy {
+
+ public abstract String getName();
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticVisitor.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticVisitor.java
new file mode 100644
index 00000000000..2a530c94b98
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL1/SemanticVisitor.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1;
+
+import org.eclipse.papyrus.moka.fuml.debug.Debug;
+
+public abstract class SemanticVisitor {
+
+ public void _endIsolation() {
+ Debug.println("[_endIsolation] End isolation.");
+ }
+
+ public void _beginIsolation() {
+ Debug.println("[_beginIsolation] Begin isolation.");
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL2/ExecutionFactoryL2.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL2/ExecutionFactoryL2.java
new file mode 100644
index 00000000000..f46bf001559
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL2/ExecutionFactoryL2.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL2;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.CallBehaviorActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.CallOperationActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.InputPinActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.OutputPinActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.SendSignalActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.AddStructuralFeatureValueActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.ClearAssociationActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.ClearStructuralFeatureActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.CreateLinkActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.CreateObjectActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.DestroyLinkActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.DestroyObjectActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.ReadLinkActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.ReadSelfActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.ReadStructuralFeatureActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.RemoveStructuralFeatureValueActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.TestIdentityActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.IntermediateActions.ValueSpecificationActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityFinalNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityParameterNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.DecisionNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.FlowFinalNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ForkNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.InitialNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.JoinNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.MergeNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.ExecutionFactoryL1;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.SemanticVisitor;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.ActivityFinalNode;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+import org.eclipse.uml2.uml.AddStructuralFeatureValueAction;
+import org.eclipse.uml2.uml.CallBehaviorAction;
+import org.eclipse.uml2.uml.CallOperationAction;
+import org.eclipse.uml2.uml.ClearAssociationAction;
+import org.eclipse.uml2.uml.ClearStructuralFeatureAction;
+import org.eclipse.uml2.uml.CreateLinkAction;
+import org.eclipse.uml2.uml.CreateObjectAction;
+import org.eclipse.uml2.uml.DecisionNode;
+import org.eclipse.uml2.uml.DestroyLinkAction;
+import org.eclipse.uml2.uml.DestroyObjectAction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.FlowFinalNode;
+import org.eclipse.uml2.uml.ForkNode;
+import org.eclipse.uml2.uml.InitialNode;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.JoinNode;
+import org.eclipse.uml2.uml.MergeNode;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.ReadLinkAction;
+import org.eclipse.uml2.uml.ReadSelfAction;
+import org.eclipse.uml2.uml.ReadStructuralFeatureAction;
+import org.eclipse.uml2.uml.RemoveStructuralFeatureValueAction;
+import org.eclipse.uml2.uml.SendSignalAction;
+import org.eclipse.uml2.uml.TestIdentityAction;
+import org.eclipse.uml2.uml.ValueSpecificationAction;
+
+public class ExecutionFactoryL2 extends ExecutionFactoryL1 {
+
+ public SemanticVisitor instantiateVisitor(Element element) {
+ // Instantiate a visitor object for the given element (at Conformance
+ // Level 2)
+ SemanticVisitor visitor = null;
+ if(element instanceof Activity) {
+ visitor = new ActivityExecution();
+ } else if(element instanceof ActivityParameterNode) {
+ visitor = new ActivityParameterNodeActivation();
+ } else if(element instanceof InitialNode) {
+ visitor = new InitialNodeActivation();
+ } else if(element instanceof ActivityFinalNode) {
+ visitor = new ActivityFinalNodeActivation();
+ } else if(element instanceof FlowFinalNode) {
+ visitor = new FlowFinalNodeActivation();
+ } else if(element instanceof JoinNode) {
+ visitor = new JoinNodeActivation();
+ } else if(element instanceof MergeNode) {
+ visitor = new MergeNodeActivation();
+ } else if(element instanceof ForkNode) {
+ visitor = new ForkNodeActivation();
+ } else if(element instanceof DecisionNode) {
+ visitor = new DecisionNodeActivation();
+ } else if(element instanceof InputPin) {
+ visitor = new InputPinActivation();
+ } else if(element instanceof OutputPin) {
+ visitor = new OutputPinActivation();
+ } else if(element instanceof CallBehaviorAction) {
+ visitor = new CallBehaviorActionActivation();
+ } else if(element instanceof CallOperationAction) {
+ visitor = new CallOperationActionActivation();
+ } else if(element instanceof SendSignalAction) {
+ visitor = new SendSignalActionActivation();
+ } else if(element instanceof ReadSelfAction) {
+ visitor = new ReadSelfActionActivation();
+ } else if(element instanceof TestIdentityAction) {
+ visitor = new TestIdentityActionActivation();
+ } else if(element instanceof ValueSpecificationAction) {
+ visitor = new ValueSpecificationActionActivation();
+ } else if(element instanceof CreateObjectAction) {
+ visitor = new CreateObjectActionActivation();
+ } else if(element instanceof DestroyObjectAction) {
+ visitor = new DestroyObjectActionActivation();
+ } else if(element instanceof ReadStructuralFeatureAction) {
+ visitor = new ReadStructuralFeatureActionActivation();
+ } else if(element instanceof ClearStructuralFeatureAction) {
+ visitor = new ClearStructuralFeatureActionActivation();
+ } else if(element instanceof AddStructuralFeatureValueAction) {
+ visitor = new AddStructuralFeatureValueActionActivation();
+ } else if(element instanceof RemoveStructuralFeatureValueAction) {
+ visitor = new RemoveStructuralFeatureValueActionActivation();
+ } else if(element instanceof ReadLinkAction) {
+ visitor = new ReadLinkActionActivation();
+ } else if(element instanceof ClearAssociationAction) {
+ visitor = new ClearAssociationActionActivation();
+ } else if(element instanceof CreateLinkAction) {
+ visitor = new CreateLinkActionActivation();
+ } else if(element instanceof DestroyLinkAction) {
+ visitor = new DestroyLinkActionActivation();
+ } else {
+ visitor = super.instantiateVisitor(element);
+ }
+ return visitor;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL3/ExecutionFactoryL3.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL3/ExecutionFactoryL3.java
new file mode 100644
index 00000000000..b637d89c99e
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Loci/LociL3/ExecutionFactoryL3.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL3;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions.AcceptEventActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions.ReadExtentActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions.ReadIsClassifiedObjectActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions.ReclassifyObjectActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions.ReduceActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions.StartClassifierBehaviorActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions.StartObjectBehaviorActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities.ConditionalNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities.LoopNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.CompleteStructuredActivities.StructuredActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities.ExpansionNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.ExtraStructuredActivities.ExpansionRegionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.SemanticVisitor;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL2.ExecutionFactoryL2;
+import org.eclipse.uml2.uml.AcceptEventAction;
+import org.eclipse.uml2.uml.ConditionalNode;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExpansionNode;
+import org.eclipse.uml2.uml.ExpansionRegion;
+import org.eclipse.uml2.uml.LoopNode;
+import org.eclipse.uml2.uml.ReadExtentAction;
+import org.eclipse.uml2.uml.ReadIsClassifiedObjectAction;
+import org.eclipse.uml2.uml.ReclassifyObjectAction;
+import org.eclipse.uml2.uml.ReduceAction;
+import org.eclipse.uml2.uml.StartClassifierBehaviorAction;
+import org.eclipse.uml2.uml.StartObjectBehaviorAction;
+import org.eclipse.uml2.uml.StructuredActivityNode;
+
+public class ExecutionFactoryL3 extends ExecutionFactoryL2 {
+
+ public SemanticVisitor instantiateVisitor(Element element) {
+ // Instantiate a visitor object for the given element (at Conformance
+ // Level 3)
+ SemanticVisitor visitor = null;
+ if(element instanceof ConditionalNode) {
+ visitor = new ConditionalNodeActivation();
+ } else if(element instanceof LoopNode) {
+ visitor = new LoopNodeActivation();
+ } else if(element instanceof ExpansionRegion) {
+ visitor = new ExpansionRegionActivation();
+ }
+ // Note: Since ConditionalNode, LoopNode and ExpansionRegion are
+ // subclasses of
+ // StructuredActivityNode, element must be tested against the three
+ // subclasses before
+ // the superclass
+ else if(element instanceof StructuredActivityNode) {
+ visitor = new StructuredActivityNodeActivation();
+ } else if(element instanceof ExpansionNode) {
+ visitor = new ExpansionNodeActivation();
+ } else if(element instanceof ReadExtentAction) {
+ visitor = new ReadExtentActionActivation();
+ } else if(element instanceof ReadIsClassifiedObjectAction) {
+ visitor = new ReadIsClassifiedObjectActionActivation();
+ } else if(element instanceof ReclassifyObjectAction) {
+ visitor = new ReclassifyObjectActionActivation();
+ } else if(element instanceof StartObjectBehaviorAction) {
+ visitor = new StartObjectBehaviorActionActivation();
+ } else if(element instanceof StartClassifierBehaviorAction) {
+ visitor = new StartClassifierBehaviorActionActivation();
+ } else if(element instanceof AcceptEventAction) {
+ visitor = new AcceptEventActionActivation();
+ } else if(element instanceof ReduceAction) {
+ visitor = new ReduceActionActivation();
+ } else {
+ visitor = super.instantiateVisitor(element);
+ }
+ return visitor;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Semantics.uml b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Semantics.uml
new file mode 100644
index 00000000000..be318ea3cde
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Semantics.uml
@@ -0,0 +1,12543 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_0" name="fUML">
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics" name="Semantics">
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Actions" name="Actions">
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Actions-BasicActions" name="BasicActions">
+ <packageImport xmi:id="Semantics-Actions-BasicActions-_packageImport.0" importedPackage="Semantics-Activities-IntermediateActivities"/>
+ <packageImport xmi:id="Semantics-Actions-BasicActions-_packageImport.1">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Actions-BasicActions"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Actions-BasicActions-_packageImport.2" importedPackage="Semantics-CommonBehaviors-Communications"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-SendSignalActionActivation" name="SendSignalActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-SendSignalActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-SendSignalActionActivation">
+ <body>A send signal action activation is an invocation action activation for a send signal action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-SendSignalActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.CommonBehaviors.Communications.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-SendSignalActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-InvocationActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-SendSignalActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-BasicActions-SendSignalActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value from the target pin. If the value is not a reference, then do nothing.
+// Otherwise, construct a signal using the values from the argument pins and send it to the referent object.
+
+SendSignalAction action = (SendSignalAction)(this.node);
+Value target = this.takeTokens(action.target).getValue(0);
+
+if (target instanceof Reference) {
+ Signal signal = action.signal;
+
+ SignalInstance signalInstance = new SignalInstance();
+ signalInstance.type = signal;
+
+ PropertyList attributes = signal.ownedAttribute;
+ InputPinList argumentPins = action.argument;
+ for (int i = 0; i &lt; attributes.size(); i++) {
+ Property attribute = attributes.getValue(i);
+ InputPin argumentPin = argumentPins.getValue(i);
+ ValueList values = this.takeTokens(argumentPin);
+ signalInstance.setFeatureValue(attribute, values, 0);
+ }
+
+ ((Reference)target).send(signalInstance);
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-SendSignalActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-BasicActions-SendSignalActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-PinActivation" name="PinActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-PinActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-PinActivation">
+ <body>A pin activation is an object node activation for a node that is a pin.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-PinActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-PinActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ObjectNodeActivation"/>
+ <ownedAttribute xmi:id="Semantics-Actions-BasicActions-PinActivation-actionActivation" name="actionActivation" visibility="public" type="Semantics-Actions-BasicActions-ActionActivation" association="Semantics-Actions-BasicActions-A_pinActivations_actionActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-PinActivation-actionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-PinActivation-actionActivation">
+ <body>The activation of the action that owns the pin for this pin activation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-PinActivation-actionActivation-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-PinActivation-fire" name="fire" isReentrant="false" specification="Semantics-Actions-BasicActions-PinActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-PinActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-PinActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-PinActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Add all incoming tokens to the pin.
+
+Debug.println(&quot;[fire] Pin &quot; + (this.node==null? &quot;&quot;: this.node.name + &quot;...&quot;));
+
+this.addTokens(incomingTokens);
+
+
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens" name="takeOfferedTokens" isReentrant="false" specification="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take only a number of tokens only up to the limit allowed by
+// the multiplicity upper bound of the pin for this activation.
+
+int count = this.countUnofferedTokens();
+int upper = -1;
+
+// Note: A pin activation used in an expansion activation group
+// will have this.node == null.
+if (this.node != null) {
+ upper = ((Pin)(this.node)).multiplicityElement.upper.naturalValue;
+}
+
+TokenList tokens = new TokenList();
+
+// Note: upper &lt; 0 indicates an unbounded upper multiplicity.
+if (upper &lt; 0 | count &lt; upper) {
+ ActivityEdgeInstanceList incomingEdges = this.incomingEdges;
+ for (int i=0; i&lt;incomingEdges.size(); i++) {
+ ActivityEdgeInstance edge = incomingEdges.getValue(i);
+ int incomingCount = edge.countOfferedValues();
+ TokenList incomingTokens = new TokenList();
+ if (upper &lt; 0 | incomingCount &lt; upper - count) {
+ incomingTokens = edge.takeOfferedTokens();
+ count = count + incomingCount;
+ } else if (count &lt; upper) {
+ incomingTokens = edge.takeOfferedTokens(upper-count);
+ count = upper;
+ }
+ for (int j = 0; j &lt; incomingTokens.size(); j++) {
+ Token token = incomingTokens.getValue(j);
+ tokens.addValue(token);
+ }
+ }
+}
+
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-PinActivation-fire.1" name="fire" visibility="public" method="Semantics-Actions-BasicActions-PinActivation-fire">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-PinActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-PinActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-PinActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens.1" name="takeOfferedTokens" visibility="public" method="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens.1-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-PinActivation-takeOfferedTokens.1-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-OutputPinActivation" name="OutputPinActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-OutputPinActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-OutputPinActivation">
+ <body>An output pin activation is a pin activation for an output pin.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-OutputPinActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-OutputPinActivation-_generalization.0" general="Semantics-Actions-BasicActions-PinActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-InvocationActionActivation" name="InvocationActionActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-InvocationActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-InvocationActionActivation">
+ <body>An invocation action activation is an action activation of an invocation action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-InvocationActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-InvocationActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-InputPinActivation" name="InputPinActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-InputPinActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-InputPinActivation">
+ <body>An input pin activation is a pin activation for an input pin.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-InputPinActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-InputPinActivation-_generalization.0" general="Semantics-Actions-BasicActions-PinActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-InputPinActivation-receiveOffer" name="receiveOffer" isReentrant="false" specification="Semantics-Actions-BasicActions-InputPinActivation-receiveOffer.1">
+ <language>Java</language>
+ <body>// Forward the offer to the action activation. [When all input pins are ready, the action will fire them.]
+
+this.actionActivation.receiveOffer();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-InputPinActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Actions-BasicActions-InputPinActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-InputPinActivation-isReady-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return true if the total number of values already being offered by this pin plus those being offered
+// by the sources of incoming edges is at least equal to the minimum multiplicity of the pin.
+
+boolean ready = super.isReady();
+if (ready) {
+ int totalValueCount = this.countUnofferedTokens() + this.countOfferedValues();
+ int minimum = ((Pin)this.node).multiplicityElement.lower;
+ ready = totalValueCount >= minimum;
+}
+
+return ready;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-InputPinActivation-receiveOffer.1" name="receiveOffer" visibility="public" method="Semantics-Actions-BasicActions-InputPinActivation-receiveOffer"/>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-InputPinActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Actions-BasicActions-InputPinActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-InputPinActivation-isReady.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-CallActionActivation" name="CallActionActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-CallActionActivation">
+ <body>A call action activation is an invocation action activation for a call action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-CallActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-InvocationActionActivation"/>
+ <ownedAttribute xmi:id="Semantics-Actions-BasicActions-CallActionActivation-callExecutions" name="callExecutions" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" aggregation="composite" association="Semantics-Actions-BasicActions-A_callExecutions_callActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallActionActivation-callExecutions-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-CallActionActivation-callExecutions">
+ <body>The set of execution object for currently ongoing calls made through this call action activation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-CallActionActivation-callExecutions-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-CallActionActivation-callExecutions-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-CallActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-BasicActions-CallActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the call execution object, set its input parameters from the argument pins and execute it.
+// Once execution completes, copy the values of the output parameters of the call execution to the result pins of the call action execution, then destroy the execution.
+
+Execution callExecution = this.getCallExecution();
+
+if (callExecution != null) {
+ this.callExecutions.addValue(callExecution);
+
+ CallAction callAction = (CallAction)(this.node);
+ InputPinList argumentPins = callAction.argument;
+ OutputPinList resultPins = callAction.result;
+
+ ParameterList parameters = callExecution.getBehavior().ownedParameter;
+
+ int pinNumber = 1;
+ int i = 1;
+ while (i &lt;= parameters.size()) {
+ Parameter parameter = parameters.getValue(i-1);
+ if (parameter.direction == ParameterDirectionKind.in |
+ parameter.direction == ParameterDirectionKind.inout) {
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = parameter;
+ parameterValue.values = this.takeTokens(argumentPins.getValue(pinNumber-1));
+ callExecution.setParameterValue(parameterValue);
+ pinNumber = pinNumber + 1;
+ }
+ i = i + 1;
+ }
+
+ callExecution.execute();
+
+ ParameterValueList outputParameterValues = callExecution.getOutputParameterValues();
+
+ pinNumber = 1;
+ i = 1;
+ while (i &lt;= parameters.size()) {
+ Parameter parameter = parameters.getValue(i - 1);
+ if ((parameter.direction == ParameterDirectionKind.inout)
+ | (parameter.direction == ParameterDirectionKind.out)
+ | (parameter.direction == ParameterDirectionKind.return_)) {
+ for (int j = 0; j &lt; outputParameterValues.size(); j++) {
+ ParameterValue outputParameterValue = outputParameterValues.getValue(j);
+ if (outputParameterValue.parameter == parameter) {
+ OutputPin resultPin = resultPins.getValue(pinNumber - 1);
+ this.putTokens(resultPin, outputParameterValue.values);
+ }
+ }
+ pinNumber = pinNumber + 1;
+ }
+ i = i + 1;
+ }
+
+ callExecution.destroy();
+ this.removeCallExecution(callExecution);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-CallActionActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Actions-BasicActions-CallActionActivation-terminate.1">
+ <language>Java</language>
+ <body>// Terminate all call executions (if any), then terminate the call action activation (self).
+
+for (int i = 0; i &lt; this.callExecutions.size(); i++) {
+ Execution execution = this.callExecutions.getValue(i);
+ execution.terminate();
+}
+
+super.terminate();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-CallActionActivation-removeCallExecution" name="removeCallExecution" isReentrant="false" specification="Semantics-Actions-BasicActions-CallActionActivation-removeCallExecution.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-CallActionActivation-removeCallExecution-execution" name="execution" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution"/>
+ <language>Java</language>
+ <body>// Remove the given execution from the current list of call executions.
+
+boolean notFound = true;
+int i = 1;
+while (notFound &amp; i &lt;= this.callExecutions.size()) {
+ if (this.callExecutions.getValue(i-1) == execution) {
+ this.callExecutions.removeValue(i-1);
+ notFound = false;
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-CallActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-BasicActions-CallActionActivation-doAction"/>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-CallActionActivation-getCallExecution" name="getCallExecution" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallActionActivation-getCallExecution-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-CallActionActivation-getCallExecution">
+ <body>Get the execution object for the called behavior.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-CallActionActivation-getCallExecution-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-CallActionActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Actions-BasicActions-CallActionActivation-terminate"/>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-CallActionActivation-removeCallExecution.1" name="removeCallExecution" visibility="public" method="Semantics-Actions-BasicActions-CallActionActivation-removeCallExecution">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-CallActionActivation-removeCallExecution.1-execution" name="execution" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation" name="CallBehaviorActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-CallBehaviorActionActivation">
+ <body>A call behavior action activation is a call action activation for a call behavior action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-CallActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation-getCallExecution" name="getCallExecution" isReentrant="false" specification="Semantics-Actions-BasicActions-CallBehaviorActionActivation-getCallExecution.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation-getCallExecution-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <language>Java</language>
+ <body>// Create and execution for the given behavior at the current locus and return the resulting execution object.
+// If the given behavior is in the context of a classifier, then pass the current context object as the context for the call.
+// Otherwise, use a null context.
+// [Note that this requires the behavior context to be compatible with the type of the current contect object.]
+
+Behavior behavior = ((CallBehaviorAction)(this.node)).behavior;
+
+Object_ context;
+if (behavior.context == null) {
+ context = null;
+} else {
+ // Debug.println(&quot;[getCallExecution] behavior context = &quot; + behavior.context.name);
+ context = this.getExecutionContext();
+}
+
+// Debug.println(&quot;[getCallExecution] context = &quot; + context);
+
+return this.getExecutionLocus().factory.createExecution(behavior, context);
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation-getCallExecution.1" name="getCallExecution" visibility="public" method="Semantics-Actions-BasicActions-CallBehaviorActionActivation-getCallExecution">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-CallBehaviorActionActivation-getCallExecution.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation" name="CallOperationActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-CallOperationActionActivation">
+ <body>A call operation action activation is a call action activation for a call operation action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-CallActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation-getCallExecution" name="getCallExecution" isReentrant="false" specification="Semantics-Actions-BasicActions-CallOperationActionActivation-getCallExecution.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation-getCallExecution-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <language>Java</language>
+ <body>// If the value on the target input pin is a reference, dispatch the operation to it and return the resulting execution object.
+
+CallOperationAction action = (CallOperationAction)(this.node);
+Value target = this.takeTokens(action.target).getValue(0);
+
+Execution execution;
+if (target instanceof Reference) {
+ execution = ((Reference)target).dispatch(action.operation);
+}
+else {
+ execution = null;
+}
+
+return execution;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation-getCallExecution.1" name="getCallExecution" visibility="public" method="Semantics-Actions-BasicActions-CallOperationActionActivation-getCallExecution">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-CallOperationActionActivation-getCallExecution.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-BasicActions-ActionActivation" name="ActionActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-ActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-ActionActivation">
+ <body>An action activation is an activity node activation for a node that is an action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-ActionActivation-_ownedComment.1">
+ <body>import java.util.*;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-BasicActions-ActionActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ <ownedAttribute xmi:id="Semantics-Actions-BasicActions-ActionActivation-pinActivations" name="pinActivations" visibility="public" type="Semantics-Actions-BasicActions-PinActivation" association="Semantics-Actions-BasicActions-A_pinActivations_actionActivation">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-ActionActivation-pinActivations-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-ActionActivation-pinActivations">
+ <body>The activations of the pins owned by the action of this action activation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-pinActivations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-pinActivations-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Actions-BasicActions-ActionActivation-firing" name="firing" visibility="public">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-ActionActivation-firing-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-ActionActivation-firing">
+ <body>Whether this action activation is already firing. This attribute is only used if the action for this action activation has isLocallyReentrant = false (the default). If isLocallyReentrant=true, then firing always just remains false.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-run" name="run" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-run.1">
+ <language>Java</language>
+ <body>// Run this action activation and any outoging fork node attached to it.
+
+super.run();
+
+if (this.outgoingEdges.size() > 0) {
+ this.outgoingEdges.getValue(0).target.run();
+}
+
+this.firing = false;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens" name="takeOfferedTokens" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If the action is not locally reentrant, then mark this activation as firing.
+// Take any incoming offers of control tokens, then concurrently fire all input pin activations.
+
+// Note: This is included here to happen in the same isolation scope as the isReady test.
+this.firing = !((Action)this.node).isLocallyReentrant;
+
+TokenList offeredTokens = new TokenList();
+
+ActivityEdgeInstanceList incomingEdges = this.incomingEdges;
+for (int i = 0; i &lt; incomingEdges.size(); i++) {
+ ActivityEdgeInstance incomingEdge = incomingEdges.getValue(i);
+ TokenList tokens = incomingEdge.takeOfferedTokens();
+ for (int j = 0; j &lt; tokens.size(); j++) {
+ Token token = tokens.getValue(j);
+ token.withdraw();
+ offeredTokens.addValue(token);
+ }
+}
+
+Action action = (Action)(this.node);
+
+// *** Fire all input pins concurrently. ***
+InputPinList inputPins = action.input;
+for (Iterator i = inputPins.iterator(); i.hasNext();) {
+ InputPin pin = (InputPin)(i.next());
+ PinActivation pinActivation = this.getPinActivation(pin);
+ TokenList tokens = pinActivation.takeOfferedTokens();
+ pinActivation.fire(tokens);
+ for (int j = 0; j &lt; tokens.size(); j++) {
+ Token token = tokens.getValue(j);
+ offeredTokens.addValue(token);
+ }
+}
+
+return offeredTokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire" name="fire" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Do the main action behavior then concurrently fire all output pin activations
+// and offer a single control token. Then activate the action again,
+// if it is still ready to fire and has at least one token actually being
+// offered to it.
+
+do {
+
+ Debug.println(&quot;[fire] Action &quot; + this.node.name + &quot;...&quot;);
+ Debug.println(&quot;[event] Fire activity=&quot;
+ + this.getActivityExecution().getBehavior().name
+ + &quot; action=&quot; + this.node.name);
+
+ this.doAction();
+ incomingTokens = this.completeAction();
+
+} while (incomingTokens.size() > 0);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-terminate.1">
+ <language>Java</language>
+ <body>// Terminate this action activation and any outgoing fork node attached to it.
+
+super.terminate();
+
+if (this.outgoingEdges.size() > 0) {
+ this.outgoingEdges.getValue(0).target.terminate();
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isReady-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// In addition to the default condition, check that, if the action has isLocallyReentrant=false, then the activation is not currently firing,
+// and that the sources of all incoming edges (control flows) have offers and all input pin activations are ready.
+// [This assumes that all edges directly incoming to the action are control flows.]
+
+boolean ready = super.isReady() &amp; (((Action)this.node).isLocallyReentrant | !this.isFiring());
+
+int i = 1;
+while (ready &amp; i &lt;= this.incomingEdges.size()) {
+ ready = this.incomingEdges.getValue(i-1).hasOffer();
+ i = i + 1;
+}
+
+InputPinList inputPins = ((Action)(this.node)).input;
+int j = 1;
+while (ready &amp; j &lt;= inputPins.size()) {
+ ready = this.getPinActivation(inputPins.getValue(j-1)).isReady();
+ j = j + 1;
+}
+
+return ready;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-isFiring" name="isFiring" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-isFiring.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isFiring-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Indicate whether this action activation is currently firing or not.
+
+return firing;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-sendOffers" name="sendOffers" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-sendOffers.1">
+ <language>Java</language>
+ <body>// Fire all output pins and send offers on all outgoing control flows.
+
+Action action = (Action)(this.node);
+
+// *** Send offers from all output pins concurrently. ***
+OutputPinList outputPins = action.output;
+for (Iterator i = outputPins.iterator(); i.hasNext();) {
+ OutputPin outputPin = (OutputPin)i.next();
+ PinActivation pinActivation = this.getPinActivation(outputPin);
+ pinActivation.sendUnofferedTokens();
+}
+
+// Send offers on all outgoing control flows.
+if (this.outgoingEdges.size() > 0) {
+ TokenList tokens = new TokenList();
+ tokens.addValue(new ControlToken());
+ this.addTokens(tokens);
+ this.outgoingEdges.getValue(0).sendOffer(tokens);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-createNodeActivations" name="createNodeActivations" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-createNodeActivations.1">
+ <language>Java</language>
+ <body>// Create node activations for the input and output pins of the action for this activation.
+// [Note: Pins are owned by their actions, not by the enclosing activity (or group), so they must be activated through the action activation.]
+
+Action action = (Action)(this.node);
+
+ActivityNodeList inputPinNodes = new ActivityNodeList();
+InputPinList inputPins = action.input;
+for (int i = 0; i &lt; inputPins.size(); i++) {
+ InputPin inputPin = inputPins.getValue(i);
+ inputPinNodes.addValue(inputPin);
+}
+
+this.group.createNodeActivations(inputPinNodes);
+
+for (int i = 0; i &lt; inputPinNodes.size(); i++) {
+ ActivityNode node = inputPinNodes.getValue(i);
+ this.addPinActivation((PinActivation)(this.group.getNodeActivation(node)));
+}
+
+ActivityNodeList outputPinNodes = new ActivityNodeList();
+OutputPinList outputPins = action.output;
+for (int i = 0; i &lt; outputPins.size(); i++) {
+ OutputPin outputPin = outputPins.getValue(i);
+ outputPinNodes.addValue(outputPin);
+}
+
+this.group.createNodeActivations(outputPinNodes);
+
+for (int i = 0; i &lt; outputPinNodes.size(); i++) {
+ ActivityNode node = outputPinNodes.getValue(i);
+ this.addPinActivation((PinActivation)(this.group.getNodeActivation(node)));
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-addOutgoingEdge" name="addOutgoingEdge" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-addOutgoingEdge.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-addOutgoingEdge-edge" name="edge" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <language>Java</language>
+ <body>// If there are no outgoing activity edge instances, create a single activity edge instance with a fork node execution at the other end.
+// Add the give edge to the fork node execution that is the target of the activity edge instance out of this action execution.
+// [This assumes that all edges directly outgoing from the action are control flows, with an implicit fork for offers out of the action.]
+
+ActivityNodeActivation forkNodeActivation;
+
+if (this.outgoingEdges.size() == 0) {
+ forkNodeActivation = new ForkNodeActivation();
+ ActivityEdgeInstance newEdge = new ActivityEdgeInstance();
+ super.addOutgoingEdge(newEdge);
+ forkNodeActivation.addIncomingEdge(newEdge);
+}
+else {
+ forkNodeActivation = this.outgoingEdges.getValue(0).target;
+}
+
+forkNodeActivation.addOutgoingEdge(edge);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-addPinActivation" name="addPinActivation" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-addPinActivation.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-addPinActivation-pinActivation" name="pinActivation" visibility="public" type="Semantics-Actions-BasicActions-PinActivation"/>
+ <language>Java</language>
+ <body>// Add a pin activation to this action activation.
+
+this.pinActivations.addValue(pinActivation);
+pinActivation.actionActivation = this;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-getPinActivation" name="getPinActivation" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-getPinActivation.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getPinActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Actions-BasicActions-PinActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getPinActivation-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-Pin"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Precondition: The given pin is owned by the action of the action activation.
+// Return the pin activation corresponding to the given pin.
+
+PinActivation pinActivation = null;
+int i = 1;
+while (pinActivation == null &amp; i &lt;= this.pinActivations.size()) {
+ PinActivation thisPinActivation = this.pinActivations.getValue(i-1);
+ if (thisPinActivation.node == pin) {
+ pinActivation = thisPinActivation;
+ }
+ i = i + 1;
+}
+
+return pinActivation;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-putToken" name="putToken" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-putToken.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putToken-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putToken-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Precondition: The action execution has fired and the given pin is owned by the action of the action execution.
+// Place a token for the given value on the pin activation corresponding to the given output pin.
+
+Debug.println(&quot;[putToken] node = &quot; + this.node.name);
+
+ObjectToken token = new ObjectToken();
+token.value = value;
+
+PinActivation pinActivation = this.getPinActivation(pin);
+pinActivation.addToken(token);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens" name="putTokens" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-putTokens.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens-values-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Precondition: The action execution has fired and the given pin is owned by the action of the action execution.
+// Place tokens for the given values on the pin activation corresponding to the given output pin.
+
+// Debug.println(&quot;[putTokens] node = &quot; + this.node.name);
+
+for (int i = 0; i &lt; values.size(); i++) {
+ Value value = values.getValue(i);
+ this.putToken(pin, value);
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens" name="getTokens" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-getTokens.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-InputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Precondition: The action execution has fired and the given pin is owned by the action of the action execution.
+// Get any tokens held by the pin activation corresponding to the given input pin and return them
+// (but leave the tokens on the pin).
+
+Debug.println(&quot;[getTokens] node = &quot; + this.node.name + &quot;, pin = &quot; + pin.name);
+
+PinActivation pinActivation = this.getPinActivation(pin);
+TokenList tokens = pinActivation.getUnofferedTokens();
+
+ValueList values = new ValueList();
+for (int i = 0; i &lt; tokens.size(); i++) {
+ Token token = tokens.getValue(i);
+ Value value = ((ObjectToken)token).value;
+ if (value != null) {
+ values.addValue(value);
+ }
+}
+
+return values;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens" name="takeTokens" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-takeTokens.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-InputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Precondition: The action execution has fired and the given pin is owned by the action of the action execution.
+// Take any tokens held by the pin activation corresponding to the given input pin and return them.
+
+Debug.println(&quot;[takeTokens] node = &quot; + this.node.name + &quot;, pin = &quot; + pin.name);
+
+PinActivation pinActivation = this.getPinActivation(pin);
+TokenList tokens = pinActivation.takeUnofferedTokens();
+
+ValueList values = new ValueList();
+for (int i = 0; i &lt; tokens.size(); i++) {
+ Token token = tokens.getValue(i);
+ Value value = ((ObjectToken)token).value;
+ if (value != null) {
+ values.addValue(value);
+ }
+}
+
+return values;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-isSourceFor" name="isSourceFor" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-isSourceFor.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isSourceFor-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isSourceFor-edgeInstance" name="edgeInstance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <language>Java</language>
+ <body>// If this action has an outgoing fork node, check that the fork node is the source of the given edge instance.
+
+boolean isSource = false;
+if (this.outgoingEdges.size() > 0) {
+ isSource = this.outgoingEdges.getValue(0).target.isSourceFor(edgeInstance);
+}
+
+return isSource;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink" name="valueParticipatesInLink" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ <language>Java</language>
+ <body>// Test if the given value participates in the given link.
+
+FeatureValueList linkFeatureValues = link.getFeatureValues();
+
+boolean participates = false;
+int i = 1;
+while (!participates &amp; i &lt;= linkFeatureValues.size()) {
+ participates = linkFeatureValues.getValue(i-1).values.getValue(0).equals(value);
+ i = i + 1;
+}
+
+return participates;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue" name="makeBooleanValue" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue.1">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-BooleanValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue-value" name="value" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Make a Boolean value using the built-in Boolean primitive type.
+// [This ensures that Boolean values created internally are the same as the default used for evaluating Boolean literals.]
+
+LiteralBoolean booleanLiteral = new LiteralBoolean();
+booleanLiteral.value = value;
+return (BooleanValue)(this.getExecutionLocus().executor.evaluate(booleanLiteral));
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-BasicActions-ActionActivation-completeAction" name="completeAction" isReentrant="false" specification="Semantics-Actions-BasicActions-ActionActivation-completeAction.1">
+ <language>Java</language>
+ <body>// Concurrently fire all output pin activations and offer a single
+// control token. Then check if the action should fire again
+// and, if so, return additional incoming tokens for this.
+
+this.sendOffers();
+
+Debug.println(&quot;[fire] Checking if &quot; + this.node.name
+ + &quot; should fire again...&quot;);
+
+_beginIsolation();
+TokenList incomingTokens = new TokenList();
+this.firing = false;
+if (this.isReady()) {
+ incomingTokens = this.takeOfferedTokens();
+ this.firing = this.isFiring() &amp; incomingTokens.size() > 0;
+}
+_endIsolation();
+
+return incomingTokens;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-run.1" name="run" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-run"/>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens.1" name="takeOfferedTokens" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens.1-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeOfferedTokens.1-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire.1" name="fire" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-fire">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-terminate"/>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-completeAction.1" name="completeAction" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-completeAction">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-completeAction.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-completeAction.1-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-completeAction.1-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isReady.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-isFiring.1" name="isFiring" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-isFiring">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isFiring.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-doAction" name="doAction" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-BasicActions-ActionActivation-doAction-_ownedComment.0" annotatedElement="Semantics-Actions-BasicActions-ActionActivation-doAction">
+ <body>Do the required action behavior.&#xD;
+</body>
+ </ownedComment>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-sendOffers.1" name="sendOffers" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-sendOffers"/>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-createNodeActivations.1" name="createNodeActivations" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-createNodeActivations"/>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-addOutgoingEdge.1" name="addOutgoingEdge" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-addOutgoingEdge">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-addOutgoingEdge.1-edge" name="edge" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-addPinActivation.1" name="addPinActivation" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-addPinActivation">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-addPinActivation.1-pinActivation" name="pinActivation" visibility="public" type="Semantics-Actions-BasicActions-PinActivation"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-getPinActivation.1" name="getPinActivation" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-getPinActivation">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getPinActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Actions-BasicActions-PinActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getPinActivation.1-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-Pin"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-putToken.1" name="putToken" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-putToken">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putToken.1-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putToken.1-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens.1" name="putTokens" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-putTokens">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens.1-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens.1-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens.1-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-putTokens.1-values-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens.1" name="getTokens" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-getTokens">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens.1-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-InputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens.1-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-getTokens.1-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens.1" name="takeTokens" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-takeTokens">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens.1-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-InputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-BasicActions-ActionActivation-takeTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-isSourceFor.1" name="isSourceFor" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-isSourceFor">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isSourceFor.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-isSourceFor.1-edgeInstance" name="edgeInstance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink.1" name="valueParticipatesInLink" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink.1-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-valueParticipatesInLink.1-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue.1" name="makeBooleanValue" visibility="public" method="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue">
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-BooleanValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Actions-BasicActions-ActionActivation-makeBooleanValue.1-value" name="value" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Actions-BasicActions-A_pinActivations_actionActivation" name="A_pinActivations_actionActivation" visibility="private" memberEnd="Semantics-Actions-BasicActions-PinActivation-actionActivation Semantics-Actions-BasicActions-ActionActivation-pinActivations"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Actions-BasicActions-A_callExecutions_callActionActivation" name="A_callExecutions_callActionActivation" visibility="private" memberEnd="Semantics-Actions-BasicActions-A_callExecutions_callActionActivation-_ownedEnd.0 Semantics-Actions-BasicActions-CallActionActivation-callExecutions">
+ <ownedEnd xmi:id="Semantics-Actions-BasicActions-A_callExecutions_callActionActivation-_ownedEnd.0" visibility="private" type="Semantics-Actions-BasicActions-CallActionActivation" association="Semantics-Actions-BasicActions-A_callExecutions_callActionActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-BasicActions-A_callExecutions_callActionActivation-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Actions-IntermediateActions" name="IntermediateActions">
+ <packageImport xmi:id="Semantics-Actions-IntermediateActions-_packageImport.0" importedPackage="Semantics-Actions-BasicActions"/>
+ <packageImport xmi:id="Semantics-Actions-IntermediateActions-_packageImport.1">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Actions-IntermediateActions"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-WriteLinkActionActivation" name="WriteLinkActionActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-WriteLinkActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-WriteLinkActionActivation">
+ <body>A write link action activation is a link action activation for a write link action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-WriteLinkActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-WriteLinkActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-LinkActionActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation" name="WriteStructuralFeatureActionActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation">
+ <body>A write structural feature action activation is a structural feature action activation for a write structural feature action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position" name="position" isReentrant="false" specification="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position-list" name="list" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position-list-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position-list-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position-startAt" name="startAt" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the position (counting from 1) of the first occurance of the given value in the given list at or after the starting index, or 0 if it is not found.
+
+boolean found = false;
+int i = startAt;
+while (!found &amp; i &lt;= list.size()) {
+ found = list.getValue(i-1).equals(value);
+ i = i + 1;
+}
+
+if (!found) {
+ i = 1;
+}
+
+return i - 1;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1" name="position" visibility="public" method="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1-list" name="list" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1-list-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1-list-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation-position.1-startAt" name="startAt" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation" name="ValueSpecificationActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation">
+ <body>A value specification action activation is an action activation for a value specification action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Evaluate the value specification for the action and place the result on the result pin of the action.
+
+ValueSpecificationAction action = (ValueSpecificationAction)(this.node);
+
+Value value = this.getExecutionLocus().executor.evaluate(action.value);
+this.putToken(action.result, value);
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-ValueSpecificationActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-TestIdentityActionActivation" name="TestIdentityActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-TestIdentityActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-TestIdentityActionActivation">
+ <body>A test identity action activation is an action activation for a test identity action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-TestIdentityActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-TestIdentityActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-TestIdentityActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-TestIdentityActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the values from the first and second input pins and test if they are equal. (Note the equality of references is defined to be that they have identical referents.)
+// If they are equal, place true on the pin execution for the result output pin, otherwise place false.
+
+TestIdentityAction action = (TestIdentityAction)(this.node);
+
+Value firstValue = this.takeTokens(action.first).getValue(0);
+Value secondValue = this.takeTokens(action.second).getValue(0);
+
+Value testResult = this.makeBooleanValue(firstValue.equals(secondValue));
+this.putToken(action.result, testResult);
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-TestIdentityActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-TestIdentityActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation" name="StructuralFeatureActionActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation">
+ <body>A structural feature action activation is an action activation for a structural feature action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation" name="getAssociation" isReentrant="false" specification="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation-Parameter1-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If the structural feature for the action of this activation is an association end,
+// then get the associated association.
+
+Association association = null;
+if (feature instanceof Property) {
+ association = ((Property)feature).association;
+}
+
+return association;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks" name="getMatchingLinks" isReentrant="false" specification="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks-association" name="association" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks-end" name="end" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks-oppositeValue" name="oppositeValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks-Parameter1" name="Parameter1" visibility="public" type="Semantics-Classes-Kernel-Link" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the links of the given binary association whose end opposite
+// to the given end has the given value
+
+Property oppositeEnd = this.getOppositeEnd(association, end);
+
+ExtensionalValueList extent = this.getExecutionLocus().getExtent(association);
+
+LinkList links = new LinkList();
+for (int i = 0; i&lt;extent.size(); i++) {
+ ExtensionalValue link = extent.getValue(i);
+ if (link.getFeatureValue(oppositeEnd).values.getValue(0).equals(oppositeValue)) {
+ if (!end.multiplicityElement.isOrdered | links.size() == 0) {
+ links.addValue((Link)link);
+ } else {
+ int n = link.getFeatureValue(end).position;
+ boolean continueSearching = true;
+ int j = 0;
+ while (continueSearching &amp; j &lt; links.size()) {
+ j = j + 1;
+ continueSearching = links.getValue(j-1).getFeatureValue(end).position &lt; n;
+ }
+ if (continueSearching) {
+ links.addValue((Link)link);
+ } else {
+ links.addValue(j–1, (Link)link);
+ }
+ }
+ }
+}
+
+return links;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd" name="getOppositeEnd" isReentrant="false" specification="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd-association" name="association" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd-end" name="end" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Property"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the end of a binary association opposite to the given end.
+
+Property oppositeEnd = association.memberEnd.getValue(0);
+if (oppositeEnd == end) {
+ oppositeEnd = association.memberEnd.getValue(1);
+}
+
+return oppositeEnd;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation.1" name="getAssociation" visibility="public" method="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation.1-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getAssociation.1-Parameter1-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1" name="getMatchingLinks" visibility="public" method="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1-association" name="association" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1-end" name="end" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1-oppositeValue" name="oppositeValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Classes-Kernel-Link" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getMatchingLinks.1-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd.1" name="getOppositeEnd" visibility="public" method="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd.1-association" name="association" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd.1-end" name="end" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation-getOppositeEnd.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Property"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation" name="RemoveStructuralFeatureValueActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation">
+ <body>A remove structural feature action activation is a write structural feature action activation for a remove structural feature value action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.LociL1.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the values of the object and value input pins.
+// If the given feature is an association end, then destroy any matching links.
+// Otherwise, if the object input is a structural value, remove values from the given feature.
+// If isRemoveDuplicates is true, then destroy all current matching links or remove all values equal to the input value.
+// If isRemoveDuplicates is false and there is no removeAt input pin, remove any one feature value equal to the input value (if there are any that are equal).
+// If isRemoveDuplicates is false, and there is a removeAt input pin remove the feature value at that position.
+
+RemoveStructuralFeatureValueAction action = (RemoveStructuralFeatureValueAction)(this.node);
+StructuralFeature feature = action.structuralFeature;
+Association association = this.getAssociation(feature);
+
+Value value = this.takeTokens(action.object).getValue(0);
+
+Value inputValue = null;
+if (action.value != null) {
+ // NOTE: Multiplicity of the value input pin is required to be 1..1.
+ inputValue = this.takeTokens(action.value).getValue(0);
+}
+
+int removeAt = 0;
+if (action.removeAt != null) {
+ removeAt = ((UnlimitedNaturalValue)this.takeTokens(action.removeAt).getValue(0)).value.naturalValue;
+}
+
+if (association != null) {
+ LinkList links = this.getMatchingLinks(association, feature, value);
+
+ if (action.isRemoveDuplicates) {
+ for (int i = 0; i &lt; links.size(); i++) {
+ Link link = links.getValue(i);
+ link.destroy();
+ }
+
+ } else if (action.removeAt == null) {
+ // *** If there is more than one matching link, non-deterministically choose one. ***
+ if (links.size() > 0) {
+ int i = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy(&quot;choice&quot;)).choose(links.size());
+ links.getValue(i-1).destroy();
+ }
+
+ } else {
+ boolean notFound = true;
+ int i = 1;
+ while (notFound &amp; i &lt; links.size()) {
+ Link link = links.getValue(i-1);
+ if (link.getFeatureValue(feature).position == removeAt) {
+ notFound = false;
+ link.destroy();
+ }
+ }
+ }
+
+} else if (value instanceof StructuredValue) {
+ // If the value is a data value, then it must be copied before
+ // any change is made.
+ if (!(value instanceof Reference)) {
+ value = value.copy();
+ }
+
+ FeatureValue featureValue = ((StructuredValue)value).getFeatureValue(action.structuralFeature);
+
+ if (action.isRemoveDuplicates) {
+ int j = this.position(inputValue, featureValue.values, 1);
+ while (j > 0) {
+ featureValue.values.remove(j-1);
+ j = this.position(inputValue, featureValue.values, j);
+ }
+
+ } else if (action.removeAt == null) {
+ intList positions = new intList();
+ int j = this.position(inputValue, featureValue.values, 1);
+ while (j > 0) {
+ positions.addValue(j);
+ j = this.position(inputValue, featureValue.values, j);
+ }
+
+ if (positions.size()>0) {
+ // *** Nondeterministically choose which value to remove. ***
+ int k = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy(&quot;choice&quot;)).choose(positions.size());
+ featureValue.values.remove(positions.getValue(k-1) - 1);
+ }
+
+ } else {
+ if (featureValue.values.size() >= removeAt) {
+ featureValue.values.remove(removeAt-1);
+ }
+ }
+}
+
+if (action.result != null) {
+ this.putToken(action.result, value);
+}
+
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-RemoveStructuralFeatureValueActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-ReadLinkActionActivation" name="ReadLinkActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ReadLinkActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-ReadLinkActionActivation">
+ <body>A read link action activation is a link action activation for a read link action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ReadLinkActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-ReadLinkActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-LinkActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-ReadLinkActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-ReadLinkActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the extent, at the current execution locus, of the association to which the action applies.
+// For all links that match the link end data, place the value of the remaining &quot;open&quot; end on the result pin.
+
+ReadLinkAction action = (ReadLinkAction)(this.node);
+LinkEndDataList endDataList = action.endData;
+LinkEndData openEnd = null;
+
+int i = 1;
+while((openEnd == null) &amp; i &lt;= endDataList.size()) {
+ if (endDataList.getValue(i-1).value == null) {
+ openEnd = endDataList.getValue(i-1);
+ }
+ i = i + 1;
+}
+
+ExtensionalValueList extent = this.getExecutionLocus().getExtent(this.getAssociation());
+
+FeatureValueList featureValues = new FeatureValueList();
+for (int j = 0; j &lt; extent.size(); j++) {
+ ExtensionalValue value = extent.getValue(j);
+ Link link = (Link)value;
+ if (this.linkMatchesEndData(link, endDataList)) {
+ FeatureValue featureValue = link.getFeatureValue(openEnd.end);
+ if (!openEnd.end.multiplicityElement.isOrdered | featureValues.size() == 0) {
+ featureValues.addValue(featureValue);
+ } else {
+ int n = featureValue.position;
+ boolean continueSearching = true;
+ int k = 0;
+ while (continueSearching &amp; k &lt; featureValues.size()) {
+ k = k + 1;
+ continueSearching = featureValues.getValue(k-1).position &lt; n;
+ }
+ if (continueSearching) {
+ featureValue.addValue(featureValue);
+ } else {
+ featureValue.addValue(k-1, featureValue);
+ }
+ }
+ }
+}
+
+
+for (int j = 0; j &lt; featureValues.size(); j++) {
+ FeatureValue featureValue = featureValues.getValue(j);
+ this.putToken(action.result, featureValue.values.getValue(0));
+}
+
+// Now that matching is done, ensure that all tokens on end data input pins
+// are consumed.
+for (int k=0; k&lt;endDataList.size(); k++) {
+ LinkEndData endData = endDataList.getValue(k);
+ if (endData.value != null) {
+ this.takeTokens(endData.value);
+ }
+}
+
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-ReadLinkActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-ReadLinkActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-ReadSelfActionActivation" name="ReadSelfActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ReadSelfActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-ReadSelfActionActivation">
+ <body>A read self action activation is an action activation for a read self action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ReadSelfActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-ReadSelfActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-ReadSelfActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-ReadSelfActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the context object of the activity execution containing this action activation and place a reference to it on the result output pin.
+
+// Debug.println(&quot;[ReadSelfActionActivation] Start...&quot;);
+
+Reference context = new Reference();
+context.referent = this.getExecutionContext();
+
+// Debug.println(&quot;[ReadSelfActionActivation] context object = &quot; + context.referent);
+
+OutputPin resultPin = ((ReadSelfAction)(this.node)).result;
+this.putToken(resultPin, context);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-ReadSelfActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-ReadSelfActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation" name="ReadStructuralFeatureActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation">
+ <body>A read structural feature action activation is an action activation for a read structural feature action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value of the object input pin.
+// If the given feature is an association end, then get all values of the that end.
+// for which the opposite end has the object input value and place them on the result pin.
+// Otherwise, if the object input value is a structural value, then get the values
+// of the appropriate feature of the input value and place them on the result output pin.
+
+ReadStructuralFeatureAction action = (ReadStructuralFeatureAction)(this.node);
+StructuralFeature feature = action.structuralFeature;
+Association association = this.getAssociation(feature);
+
+Value value = this.takeTokens(action.object).getValue(0);
+ValueList resultValues = new ValueList();
+
+if (association != null) {
+ LinkList links = this.getMatchingLinks(association, feature, value);
+ for (int i = 0; i &lt; links.size(); i++) {
+ Link link = links.getValue(i);
+ resultValues.addValue(link.getFeatureValue(feature).values.getValue(0));
+ }
+} else if (value instanceof StructuredValue) {
+// Debug.println(&quot;[ReadStructuralFeatureActionActivation] value = &quot; + value +&quot;, structural feature = &quot; + feature.name);
+ resultValues = ((StructuredValue)value).getFeatureValue(feature).values;
+}
+
+this.putTokens(action.result, resultValues);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-ReadStructuralFeatureActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation" name="LinkActionActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-LinkActionActivation">
+ <body>A link action activation is an action activation for a link action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData" name="linkMatchesEndData" isReentrant="false" specification="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData-endDataList" name="endDataList" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-IntermediateActions-LinkEndData"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData-endDataList-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData-endDataList-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Test whether the given link matches the given end data.
+
+boolean matches = true;
+int i = 1;
+while (matches &amp; i &lt;= endDataList.size()) {
+ matches = this.endMatchesEndData(link, endDataList.getValue(i-1));
+ i = i + 1;
+}
+
+return matches;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData" name="endMatchesEndData" isReentrant="false" specification="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData-endData" name="endData" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-IntermediateActions-LinkEndData"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Test whether the appropriate end of the given link matches the given end data.
+
+boolean matches = false;
+if (endData.value == null) {
+ matches = true;
+} else {
+ Property end = endData.end;
+ FeatureValue linkFeatureValue = link.getFeatureValue(end);
+ Value endValue = this.getTokens(endData.value).getValue(0);
+ if (endData instanceof LinkEndDestructionData) {
+ if (!((LinkEndDestructionData)endData).isDestroyDuplicates &amp; !end.multiplicityElement.isUnique &amp; end.multiplicityElement.isOrdered) {
+ int destroyAt = ((UnlimitedNaturalValue)(this.getTokens(((LinkEndDestructionData)endData).destroyAt).getValue(0))).value.naturalValue;
+ matches = linkFeatureValue.values.getValue(0).equals(endValue) &amp;&amp; linkFeatureValue.position == destroyAt;
+ } else {
+ matches = linkFeatureValue.values.getValue(0).equals(endValue);
+ }
+ } else {
+ matches = linkFeatureValue.values.getValue(0).equals(endValue);
+ }
+}
+
+return matches;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-getAssociation" name="getAssociation" isReentrant="false" specification="Semantics-Actions-IntermediateActions-LinkActionActivation-getAssociation.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-getAssociation-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the association for the link action of this activation.
+
+return (Association)(((LinkAction)(this.node)).endData.getValue(0).end.association);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData.1" name="linkMatchesEndData" visibility="public" method="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData.1-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData.1-endDataList" name="endDataList" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-IntermediateActions-LinkEndData"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData.1-endDataList-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-linkMatchesEndData.1-endDataList-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData.1" name="endMatchesEndData" visibility="public" method="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData.1-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-endMatchesEndData.1-endData" name="endData" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-IntermediateActions-LinkEndData"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-getAssociation.1" name="getAssociation" visibility="public" method="Semantics-Actions-IntermediateActions-LinkActionActivation-getAssociation">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-LinkActionActivation-getAssociation.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation" name="DestroyLinkActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation">
+ <body>A destroy link action activation is a write link action activation for a destroy link action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.LociL1.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-WriteLinkActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the extent, at the current execution locus, of the association for which links are being destroyed.
+// Destroy all links that match the given link end destruction data.
+// For unique ends, or non-unique ends for which isDestroyDuplicates is true, match links with a matching value for that end.
+// For non-unique, ordered ends for which isDestroyDuplicates is false, match links with an end value at the given destroyAt position. [Must a value be given, too, in this case?]
+// For non-unique, non-ordered ends for which isDestroyDuplicates is false, pick one matching link (if any) non-deterministically. [The semantics of this case is not clear from the current spec.]
+
+Debug.println(&quot;[doAction] DestroyLinkAction...&quot;);
+
+DestroyLinkAction action = (DestroyLinkAction)(this.node);
+LinkEndDestructionDataList destructionDataList = action.endData;
+
+Debug.println(&quot;[doAction] end data size = &quot; + destructionDataList.size());
+
+boolean destroyOnlyOne = false;
+int j = 1;
+while (!destroyOnlyOne &amp; j &lt;= destructionDataList.size()) {
+ LinkEndDestructionData endData = destructionDataList.getValue(j-1);
+ destroyOnlyOne = !endData.end.multiplicityElement.isUnique &amp; !endData.end.multiplicityElement.isOrdered &amp; !endData.isDestroyDuplicates;
+ j = j + 1;
+}
+
+LinkEndDataList endDataList = new LinkEndDataList();
+for (int i = 0; i &lt; destructionDataList.size(); i++) {
+ LinkEndDestructionData endData = destructionDataList.getValue(i);
+ Debug.println(&quot;[doAction] Matching end = &quot; + endData.end.name);
+ endDataList.addValue(endData);
+}
+
+ExtensionalValueList extent = this.getExecutionLocus().getExtent(this.getAssociation());
+ExtensionalValueList matchingLinks = new ExtensionalValueList();
+
+for (int i = 0; i &lt; extent.size(); i++) {
+ ExtensionalValue value = extent.getValue(i);
+ Link link = (Link)value;
+ if (this.linkMatchesEndData(link, endDataList)) {
+ matchingLinks.addValue(link);
+ }
+}
+
+// Now that matching is done, ensure that all tokens on end data input pins
+// are consumed.
+for (int i = 0; i &lt; destructionDataList.size(); i++) {
+ LinkEndDestructionData endData = destructionDataList.getValue(i);
+ Property end = endData.end;
+ if (!endData.isDestroyDuplicates
+ &amp; !end.multiplicityElement.isUnique &amp; end.multiplicityElement.isOrdered) {
+ this.takeTokens(endData.destroyAt);
+ }
+ Debug.println(&quot;[doAction] Consuming tokens for end &quot; + end.name);
+ this.takeTokens(endData.value);
+}
+
+if (destroyOnlyOne) {
+ // *** If there is more than one matching link, non-deterministically choose one. ***
+ if (matchingLinks.size() > 0) {
+ int i = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy(&quot;choice&quot;)).choose(matchingLinks.size());
+ matchingLinks.getValue(i-1).destroy();
+ }
+} else {
+ for (int i = 0; i &lt; matchingLinks.size(); i++) {
+ ExtensionalValue matchingLink = matchingLinks.getValue(i);
+ matchingLink.destroy();
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-DestroyLinkActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation" name="DestroyObjectActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation">
+ <body>A destroy object action activation is an action activation for a destroy object action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value on the target input pin.
+// If the value is not a reference, then the action has no effect. Otherwise, do the following.
+// If isDestroyLinks is true, destroy all links in which the referent participates.
+// If isDestroyOwnedObjects is true, destroy all objects owned by the referent via composition links.
+// Destroy the referent object.
+
+DestroyObjectAction action = (DestroyObjectAction)(this.node);
+Value value = this.takeTokens(action.target).getValue(0);
+
+this.destroyObject(value, action.isDestroyLinks, action.isDestroyOwnedObjects);
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject" name="destroyObject" isReentrant="false" specification="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject-isDestroyLinks" name="isDestroyLinks" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject-isDestroyOwnedObjects" name="isDestroyOwnedObjects" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If the given value is a reference, then destroy the referenced object, per the given destroy action attribute values.
+
+// Debug.println(&quot;[destroyObject] object = &quot; + value.objectId());
+
+if (value instanceof Reference) {
+ Reference reference = (Reference)value;
+
+ if (isDestroyLinks | isDestroyOwnedObjects) {
+ Debug.println(&quot;[destroyObject] Destroying links...&quot;);
+ ExtensionalValueList extensionalValues = this.getExecutionLocus().extensionalValues;
+ for (int i = 0; i &lt; extensionalValues.size(); i++) {
+ ExtensionalValue extensionalValue = extensionalValues.getValue(i);
+ if (extensionalValue instanceof Link) {
+ Link link = (Link)extensionalValue;
+ if (this.valueParticipatesInLink(reference, link)) {
+ if (isDestroyLinks | this.objectIsComposite(reference, link)) {
+ // Debug.println(&quot;[destroyObject] Destroying link &quot; + link.objectId());
+ link.destroy();
+ }
+ }
+ }
+ }
+ }
+
+ if (isDestroyOwnedObjects) {
+ Debug.println(&quot;[destroyObject] Destroying owned objects...&quot;);
+ FeatureValueList objectFeatureValues = reference.getFeatureValues();
+ for (int i = 0; i &lt; objectFeatureValues.size(); i++) {
+ FeatureValue featureValue = objectFeatureValues.getValue(i);
+ if (((Property)featureValue.feature).aggregation == AggregationKind.composite) {
+ ValueList values = featureValue.values;
+ for (int j = 0; j &lt; values.size(); j++) {
+ Value ownedValue = values.getValue(j);
+ this.destroyObject(ownedValue, isDestroyLinks, isDestroyOwnedObjects);
+ }
+ }
+ }
+ }
+
+ reference.destroy();
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite" name="objectIsComposite" isReentrant="false" specification="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite.1">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite-reference" name="reference" visibility="public" type="Semantics-Classes-Kernel-Reference"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ <language>Java</language>
+ <body>// Test whether the given reference participates in the given link as a composite.
+
+FeatureValueList linkFeatureValues = link.getFeatureValues();
+
+boolean isComposite = false;
+int i = 1;
+while (!isComposite &amp; i &lt;= linkFeatureValues.size()) {
+ FeatureValue featureValue = linkFeatureValues.getValue(i-1);
+ if (!featureValue.values.getValue(0).equals(reference) &amp;
+ ((Property)featureValue.feature).aggregation == AggregationKind.composite) {
+ isComposite = true;
+ }
+ i = i + 1;
+}
+
+return isComposite;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-doAction"/>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject.1" name="destroyObject" visibility="public" method="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject.1-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject.1-isDestroyLinks" name="isDestroyLinks" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-destroyObject.1-isDestroyOwnedObjects" name="isDestroyOwnedObjects" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite.1" name="objectIsComposite" visibility="public" method="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite">
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite.1-reference" name="reference" visibility="public" type="Semantics-Classes-Kernel-Reference"/>
+ <ownedParameter xmi:id="Semantics-Actions-IntermediateActions-DestroyObjectActionActivation-objectIsComposite.1-link" name="link" visibility="public" type="Semantics-Classes-Kernel-Link"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-CreateLinkActionActivation" name="CreateLinkActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-CreateLinkActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-CreateLinkActionActivation">
+ <body>A create link action activation is a write link action activation for a create link action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-CreateLinkActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-CreateLinkActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-WriteLinkActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-CreateLinkActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-CreateLinkActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// If the association has any unique ends, then destroy an existing link
+// that matches all ends of the link being created.
+// Get the extent at the current execution locus of the association for which a link is being created.
+// Destroy all links that have a value for any end for which isReplaceAll is true.
+// Create a new link for the association, at the current locus, with the given end data values,
+// inserted at the given insertAt position (for ordered ends).
+
+CreateLinkAction action = (CreateLinkAction)(this.node);
+LinkEndCreationDataList endDataList = action.endData;
+
+Association linkAssociation = this.getAssociation();
+ExtensionalValueList extent = this.getExecutionLocus().getExtent(linkAssociation);
+
+boolean unique = false;
+for (int i = 0; i &lt; endDataList.size(); i++) {
+ if (endDataList.getValue(i).end.multiplicityElement.isUnique) {
+ unique = true;
+ }
+}
+
+for (int i = 0; i &lt; extent.size(); i++) {
+ ExtensionalValue value = extent.getValue(i);
+ Link link = (Link) value;
+
+ boolean match = true;
+ boolean destroy = false;
+ int j = 1;
+ while (j &lt;= endDataList.size()) {
+ LinkEndCreationData endData = endDataList.getValue(j - 1);
+ if (this.endMatchesEndData(link, endData)) {
+ if (endData.isReplaceAll) {
+ destroy = true;
+ }
+ } else {
+ match = false;
+ }
+ j = j + 1;
+ }
+ if (destroy | unique &amp; match ) {
+ link.destroy();
+ }
+}
+
+for (int i = 0; i &lt; extent.size(); i++) {
+ ExtensionalValue value = extent.getValue(i);
+ Link link = (Link)value;
+
+ boolean noMatch = true;
+ int j = 1;
+ while (noMatch &amp; j &lt;= endDataList.size()) {
+ LinkEndCreationData endData = endDataList.getValue(j-1);
+ if (endData.isReplaceAll &amp; this.endMatchesEndData(link, endData)) {
+ oldLink = link;
+ link.destroy();
+ noMatch = false;
+ }
+ j = j + 1;
+ }
+}
+
+Link newLink = new Link();
+newLink.type = linkAssociation;
+
+for (int i = 0; i &lt; endDataList.size(); i++) {
+ LinkEndCreationData endData = endDataList.getValue(i);
+
+ int insertAt = 0;
+ if (endData.insertAt != null) {
+ insertAt = ((UnlimitedNaturalValue) (this
+ .takeTokens(endData.insertAt).getValue(0))).value.naturalValue;
+ }
+
+ newLink.setFeatureValue(endData.end,
+ this.takeTokens(endData.value), insertAt);
+}
+
+newLink.addTo(this.getExecutionLocus());
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-CreateLinkActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-CreateLinkActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-CreateObjectActionActivation" name="CreateObjectActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-CreateObjectActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-CreateObjectActionActivation">
+ <body>A create object action activation is an action activation for a create object action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-CreateObjectActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-CreateObjectActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-CreateObjectActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-CreateObjectActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Create an object with the given classifier (which must be a class) as its type, at the same locus as the action activation.
+// Place a reference to the object on the result pin of the action.
+
+CreateObjectAction action = (CreateObjectAction)(this.node);
+
+Reference reference = new Reference();
+reference.referent = this.getExecutionLocus().instantiate((Class)(action.classifier));
+
+this.putToken(action.result, reference);
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-CreateObjectActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-CreateObjectActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation" name="ClearAssociationActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation">
+ <body>A clear association action activation is an action activation for a clear association action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the extent, at the current execution locus, of the given association.
+// Read the object input pin. Destroy all links in which the object participates.
+
+ClearAssociationAction action = (ClearAssociationAction)(this.node);
+
+ExtensionalValueList extent = this.getExecutionLocus().getExtent(action.association);
+Value objectValue = this.takeTokens(action.object).getValue(0);
+
+for (int i = 0; i &lt; extent.size(); i++) {
+ Link link = (Link)(extent.getValue(i));
+ if (this.valueParticipatesInLink(objectValue, link)) {
+ link.destroy();
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-ClearAssociationActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation" name="ClearStructuralFeatureActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation">
+ <body>A clear structural feature action activation is a structural feature action activation for a clear structural feature action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-StructuralFeatureActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value of the object input pin.
+// If the given feature is an association end, then
+// destroy all links that have the object input on the opposite end.
+// Otherwise, if the object input is a structured value, then
+// set the appropriate feature of the input value to be empty.
+
+ClearStructuralFeatureAction action = (ClearStructuralFeatureAction)(this.node);
+StructuralFeature feature = action.structuralFeature;
+Association association = this.getAssociation(feature);
+
+Value value = this.takeTokens(action.object).getValue(0);
+
+if (association != null) {
+ LinkList links = this.getMatchingLinks(association, feature, value);
+ for (int i = 0; i &lt; links.size(); i++) {
+ Link link = links.getValue(i);
+ link.destroy();
+ }
+} else if (value instanceof StructuredValue) {
+ // If the value is a data value, then it must be copied before
+ // any change is made.
+ if (!(value instanceof Reference)) {
+ value = value.copy();
+ }
+
+ ((StructuredValue)value).setFeatureValue(action.structuralFeature, new ValueList(), 0);
+}
+
+if (action.result != null) {
+ this.putToken(action.result, value);
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-ClearStructuralFeatureActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation" name="AddStructuralFeatureValueActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation-_ownedComment.0">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.LociL1.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation-_ownedComment.1" annotatedElement="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation">
+ <body>An add structural feature action value activation is a write structural feature action activation for an add structural feature value action.</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation-_generalization.0" general="Semantics-Actions-IntermediateActions-WriteStructuralFeatureActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the values of the object and value input pins.
+// If the given feature is an association end, then create a link between the object and value inputs.
+// Otherwise, if the object input is a structural value, then add a value to the values for the feature.
+// If isReplaceAll is true, first remove all current matching links or feature values.
+// If isReplaceAll is false and there is an insertAt pin, insert the value at the appropriate position.
+
+AddStructuralFeatureValueAction action = (AddStructuralFeatureValueAction)(this.node);
+StructuralFeature feature = action.structuralFeature;
+Association association = this.getAssociation(feature);
+
+Value value = this.takeTokens(action.object).getValue(0);
+ValueList inputValues = this.takeTokens(action.value);
+
+// NOTE: Multiplicity of the value input pin is required to be 1..1.
+Value inputValue = inputValues.getValue(0);
+
+int insertAt = 0;
+if (action.insertAt != null) {
+ insertAt = ((UnlimitedNaturalValue)this.takeTokens(action.insertAt).getValue(0)).value.naturalValue;
+}
+
+if (association != null) {
+ LinkList links = this.getMatchingLinks(association, feature, value);
+
+ Property oppositeEnd = this.getOppositeEnd(association, feature);
+ int position = 0;
+ if (oppositeEnd.multiplicityElement.isOrdered) {
+ position = -1;
+ }
+
+ if (action.isReplaceAll) {
+ for (int i = 0; i &lt; links.size(); i++) {
+ Link link = links.getValue(i);
+ link.destroy();
+ }
+ } else if (feature.multiplicityElement.isUnique) {
+ int i = 1;
+ boolean destroyed = false;
+ while (!destroyed &amp; i &lt;= links.size()) {
+ Link link = links.getValue(i - 1);
+ FeatureValue featureValue = link.getFeatureValue(feature);
+ if (featureValue.values.getValue(0).equals(inputValue)) {
+ position = link.getFeatureValue(oppositeEnd).position;
+ link.destroy();
+ destroyed = true;
+ }
+ i = i + 1;
+ }
+ }
+
+ Link newLink = new Link();
+ newLink.type = association;
+
+ newLink.setFeatureValue(feature, inputValues, insertAt);
+
+ ValueList oppositeValues = new ValueList();
+ oppositeValues.addValue(value);
+ newLink.setFeatureValue(oppositeEnd, oppositeValues, position);
+
+ newlink.addTo(this.getExecutionLocus());
+
+} else if (value instanceof StructuredValue) {
+ // If the value is a data value, then it must be copied before
+ // any change is made.
+ if (!(value instanceof Reference)) {
+ value = value.copy();
+ }
+
+ StructuredValue structuredValue = (StructuredValue)value;
+
+ if (action.isReplaceAll) {
+ structuredValue.setFeatureValue(feature, inputValues, 0);
+ } else {
+ FeatureValue featureValue = structuredValue.getFeatureValue(feature);
+
+ if (featureValue.values.size() > 0 &amp; insertAt == 0 ) {
+ // *** If there is no insertAt pin, then the structural feature must be unordered, and the insertion position is immaterial. ***
+ insertAt = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy(&quot;choice&quot;)).choose(featureValue.values.size());
+ }
+
+ if (feature.multiplicityElement.isUnique) {
+ // Remove any existing value that duplicates the input value
+ int j = position(inputValue, featureValue.values, 1);
+ if (j > 0) {
+ featureValue.values.remove(j-1);
+ }
+ }
+
+ if (insertAt &lt;= 0) { // Note: insertAt = -1 indicates an unlimited value of &quot;*&quot;
+ featureValue.values.addValue(inputValue);
+ } else {
+ featureValue.values.addValue(insertAt - 1, inputValue);
+ }
+ }
+}
+
+if (action.result != null) {
+ this.putToken(action.result, value);
+}
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-IntermediateActions-AddStructuralFeatureValueActionActivation-doAction"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Actions-CompleteActions" name="CompleteActions">
+ <packageImport xmi:id="Semantics-Actions-CompleteActions-_packageImport.0" importedPackage="Semantics-Actions-BasicActions"/>
+ <packageImport xmi:id="Semantics-Actions-CompleteActions-_packageImport.1">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Actions-CompleteActions"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation" name="StartClassifierBehaviorActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation">
+ <body>A start classifier behavior action activation is an action activation for a start classifier behavior action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value on the object input pin. If it is not a reference, then do nothing.
+// Start the classifier behavior of the referent object for the classifier given as the type of the object input pin.
+// If the object input pin has no type, then start the classifier behaviors of all types of the referent object. [The required behavior in this case is not clear from the spec.]
+
+StartClassifierBehaviorAction action = (StartClassifierBehaviorAction)(this.node);
+
+Value object = this.takeTokens(action.object).getValue(0);
+
+if (object instanceof Reference) {
+ ((Reference)object).startBehavior((Class)(action.object.typedElement.type), new ParameterValueList());
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-CompleteActions-StartClassifierBehaviorActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation" name="StartObjectBehaviorActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation">
+ <body>A start behavior action activation is an action activation for a start behavior action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-InvocationActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value on the object input pin. If it is not a reference, then do nothing.
+// Start the behavior of the referent object for the classifier given as the type of the object input pin, with parameter values taken from the argument input pins.
+// If the object input pin has no type, then start the classifier behaviors of all types of the referent object.
+
+StartObjectBehaviorAction action = (StartObjectBehaviorAction)(this.node);
+
+Value object = this.takeTokens(action.object).getValue(0);
+
+if (object instanceof Reference) {
+ Class type = (Class)(action.object.typedElement.type);
+ InputPinList argumentPins = action.argument;
+
+ ParameterValueList inputs = new ParameterValueList();
+
+ if (type != null) {
+ Behavior behavior;
+
+ if (type instanceof Behavior) {
+ behavior = (Behavior)type;
+ } else {
+ behavior = type.classifierBehavior;
+ }
+
+ if (behavior != null) {
+ ParameterList parameters = behavior.ownedParameter;
+
+ int pinNumber = 1;
+ int i = 1;
+ while (i &lt;= parameters.size()) {
+ Parameter parameter = parameters.getValue(i-1);
+ int j = pinNumber;
+ if (parameter.direction == ParameterDirectionKind.in |
+ parameter.direction == ParameterDirectionKind.inout) {
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = parameter;
+ parameterValue.values = this.takeTokens(argumentPins.getValue(j-1));
+ inputs.addValue(parameterValue);
+ j = j + 1;
+ }
+ pinNumber = j;
+ i = i + 1;
+ }
+ }
+ }
+
+ ((Reference)object).startBehavior(type, inputs);
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-CompleteActions-StartObjectBehaviorActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation" name="ReduceActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-ReduceActionActivation">
+ <body>A reduce action activation is an action activation for a reduce action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedAttribute xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-currentExecution" name="currentExecution" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" association="Semantics-Actions-CompleteActions-A_currentExecution_reduceActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-currentExecution-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-ReduceActionActivation-currentExecution">
+ <body>The current execution of the reducer behavior.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-currentExecution-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-CompleteActions-ReduceActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the values of the collection input pin.
+// If the input pin has no values, then do nothing. Otherwise, do the following.
+// Repeatedly invoke the reducer behavior on successive pairs to reduce the collection to a single value, and place that value on the result pin.
+// To invoke the reducer behavior, compile it to create an execution, make the execution the current execution, place the appropriate values on its input parameters, and execute it.
+
+ReduceAction action = (ReduceAction)(this.node);
+
+ValueList values = this.takeTokens(action.collection);
+
+if (values.size() > 0) {
+ ParameterList parameters = action.reducer.ownedParameter;
+ Parameter input1 = null;
+ Parameter input2 = null;
+ Parameter output = null;
+
+ int i = 1;
+ while (i &lt;= parameters.size()) {
+ Parameter parameter = parameters.getValue(i-1);
+ if (parameter.direction == ParameterDirectionKind.in) {
+ if (input1 == null) {
+ input1 = parameter;
+ }
+ else {
+ input2 = parameter;
+ }
+ }
+ else if (parameter.direction == ParameterDirectionKind.outout |
+ parameter.direction == ParameterDirectionKind.return_) {
+ output = parameter;
+ }
+ i = i + 1;
+ }
+
+ ParameterValue parameterValue1 = new ParameterValue();
+ parameterValue1.parameter = input1;
+ parameterValue1.values = new ValueList();
+ parameterValue1.values.addValue(values.getValue(0));
+
+ int j = 2;
+ while (j &lt;= values.size()) {
+ this.currentExecution = this.getExecutionLocus().factory.createExecution(action.reducer, this.getExecutionContext());
+
+ this.currentExecution.setParameterValue(parameterValue1);
+
+ ParameterValue parameterValue2 = new ParameterValue();
+ parameterValue2.parameter = input2;
+ parameterValue2.values = new ValueList();
+ parameterValue2.values.addValue(values.getValue(j-1));
+ this.currentExecution.setParameterValue(parameterValue2);
+
+ this.currentExecution.execute();
+
+ parameterValue1.values = this.currentExecution.getParameterValue(output).values;
+
+ j = j + 1;
+
+ if (parameterValue1.values.isEmpty() &amp; j &lt;= values.size()) {
+ parameterValue1.values.add(values.getValue(j - 1));
+ j = j + 1;
+ }
+
+ }
+
+ this.putTokens(action.result, parameterValue1.values);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Actions-CompleteActions-ReduceActionActivation-terminate.1">
+ <language>Java</language>
+ <body>// If there is a current execution, terminate it. Then terminate self.
+
+if (this.currentExecution != null) {
+ this.currentExecution.terminate();
+}
+
+super.terminate();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-CompleteActions-ReduceActionActivation-doAction"/>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-ReduceActionActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Actions-CompleteActions-ReduceActionActivation-terminate"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation" name="ReadIsClassifiedObjectActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation">
+ <body>A read-is-classified object activation is an action activation for a read-is-classified object action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value on the object input pin and determine if it is classified by the classifier specified in the action.
+// If the isDirect attribute of the action is false, then place true on the result output pin if the input object has the specified classifier or of one its (direct or indirect) descendants as a type.
+// If the isDirect attribute of the action is true, then place true on the result output pin if the input object has the specified classifier as a type.
+// Otherwise place false on the result output pin.
+
+ReadIsClassifiedObjectAction action = (ReadIsClassifiedObjectAction)(this.node);
+
+Value input = this.takeTokens(action.object).getValue(0);
+ClassifierList types = input.getTypes();
+
+boolean result = false;
+int i = 1;
+while (!result &amp; i &lt;= types.size()) {
+ Classifier type = types.getValue(i-1);
+
+ if (type == action.classifier) {
+ result = true;
+ }
+ else if (!action.isDirect) {
+ result = this.checkAllParents(type, action.classifier);
+ }
+
+ i = i + 1;
+}
+
+ValueList values = new ValueList();
+values.addValue(this.makeBooleanValue(result));
+
+this.putTokens(action.result, values);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents" name="checkAllParents" isReentrant="false" specification="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents.1">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check if the given classifier matches any of the direct or indirect ancestors of a given type.
+
+ClassifierList directParents = type.general;
+boolean matched = false;
+int i = 1;
+while (!matched &amp; i &lt;= directParents.size()) {
+ Classifier directParent = directParents.getValue(i-1);
+ if (directParent == classifier) {
+ matched = true;
+ } else {
+ matched = this.checkAllParents(directParent, classifier);
+ }
+ i = i + 1;
+}
+
+return matched;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-doAction"/>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents.1" name="checkAllParents" visibility="public" method="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents.1-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents.1-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-ReadIsClassifiedObjectActionActivation-checkAllParents.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation" name="ReclassifyObjectActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation">
+ <body>A reclassify object activation is an action activation for a reclassify object action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the value of the object input pin. If it is not a reference, then do nothing. Otherwise, do the following.
+// Remove all types from the referent object that are in the set of old classifiers but not the set of new classifiers (or just all types that are not new classifiers, if isReplaceAll is true).
+// Remove the feature values from the referent object for all classifiers that are removed.
+// Add all new classifiers as types of the referent object that are not already types.
+// Add (empty) feature values to the referent object for the structural features of all added classifiers.
+
+ReclassifyObjectAction action = (ReclassifyObjectAction)(this.node);
+ClassifierList newClassifiers = action.newClassifier;
+ClassifierList oldClassifiers = action.oldClassifier;
+
+Value input = this.takeTokens(action.object).getValue(0);
+
+if (input instanceof Reference) {
+ Object_ object = ((Reference)input).referent;
+
+ int i = 1;
+ while (i &lt;= object.types.size()) {
+ Class type = object.types.getValue(i-1);
+
+ boolean toBeRemoved = true;
+ int j = 1;
+ while (toBeRemoved &amp; j &lt;= newClassifiers.size()) {
+ toBeRemoved = (type != newClassifiers.getValue(j-1));
+ j = j + 1;
+ }
+
+ if (toBeRemoved &amp; !action.isReplaceAll) {
+ boolean notInOld = true;
+ int k = 1;
+ while (notInOld &amp; k &lt;= oldClassifiers.size()) {
+ notInOld = (type != oldClassifiers.getValue(k-1));
+ k = k + 1;
+ }
+ toBeRemoved = !notInOld;
+ }
+
+ if (toBeRemoved) {
+ object.types.removeValue(i-1);
+ object.removeFeatureValues(type);
+ } else {
+ i = i + 1;
+ }
+ }
+
+ for (int n = 0; n &lt; newClassifiers.size(); n++) {
+ Classifier classifier = newClassifiers.getValue(n);
+
+ boolean toBeAdded = true;
+ int j = 1;
+ while (toBeAdded &amp; j &lt;= object.types.size()) {
+ toBeAdded = (classifier != object.types.getValue(j-1));
+ j = j + 1;
+ }
+
+ if (toBeAdded) {
+ object.types.addValue((Class)classifier);
+ NamedElementList members = classifier.member;
+ for (int k = 0; k &lt; members.size(); k++) {
+ NamedElement member = members.getValue(k);
+ if (member instanceof StructuralFeature) {
+ object.setFeatureValue((StructuralFeature)member, new ValueList(), 0);
+ }
+ }
+ }
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-CompleteActions-ReclassifyObjectActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-ReadExtentActionActivation" name="ReadExtentActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReadExtentActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-ReadExtentActionActivation">
+ <body>A read extent action activation is an action activation for a read extent action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-ReadExtentActionActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-ReadExtentActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-ReadExtentActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-CompleteActions-ReadExtentActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Get the extent, at the current execution locus, of the classifier (which must be a class) identified in the action.
+// Place references to the resulting set of objects on the result pin.
+
+ReadExtentAction action = (ReadExtentAction)(this.node);
+ExtensionalValueList objects = this.getExecutionLocus().getExtent(action.classifier);
+
+// Debug.println(&quot;[doAction] &quot; + action.classifier.name + &quot; has &quot; + objects.size() + &quot; instance(s).&quot;);
+
+ValueList references = new ValueList();
+for (int i = 0; i &lt; objects.size(); i++) {
+ Value object = objects.getValue(i);
+ Reference reference = new Reference();
+ reference.referent = (Object_)object;
+ references.addValue(reference);
+}
+
+this.putTokens(action.result, references);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-ReadExtentActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-CompleteActions-ReadExtentActionActivation-doAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation" name="AcceptEventActionActivation">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-AcceptEventActionActivation">
+ <body>An accept event action activation is an action activation for an accept event action.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-_ownedComment.1">
+ <body>import java.util.Iterator;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedAttribute xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-eventAccepter" name="eventAccepter" visibility="public" type="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter" association="Semantics-Actions-CompleteActions-A_actionActivation_eventAccepter">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-eventAccepter-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-AcceptEventActionActivation-eventAccepter">
+ <body>If the accept event action activation is waiting for an event, then this is the accepter it has registered for the event.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-eventAccepter-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-waiting" name="waiting" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-run" name="run" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionActivation-run.1">
+ <language>Java</language>
+ <body>// Create an event accepter and initialize waiting to false.
+
+super.run();
+
+this.eventAccepter = new AcceptEventActionEventAccepter();
+this.eventAccepter.actionActivation = this;
+
+this.waiting = false;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire" name="fire" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Register the event accepter for this accept event action activation with the context object of the enclosing activity execution
+// and wait for an event to be accepted.
+
+Debug.println(&quot;[fire] Action &quot; + this.node.name + &quot;...&quot;);
+
+this.getExecutionContext().register(this.eventAccepter);
+this.waiting = true;
+this.firing = false;
+
+this.suspend();</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-isReady-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// An accept event action activiation is ready to fire only if it is not already waiting for an event.
+
+boolean ready;
+if (this.waiting) {
+ ready = false;
+} else {
+ ready = super.isReady();
+}
+
+return ready;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionActivation-doAction.1">
+ <language>Java</language>
+ <body>// Do nothing. [This will never be called.]
+
+return;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-accept" name="accept" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionActivation-accept.1">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-accept-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <language>Java</language>
+ <body>// Accept a signal occurance for the given signal instance.
+// If the action does not unmarshall, then place the signal instance on the result pin, if any.
+// If the action does unmarshall, then get the feature values of the signal instance, and place the values for each feature on the corresponding output pin.
+// Concurrently fire all output pins while offering a single control token.
+// If there are no incoming edges, then re-register this accept event action execution with the context object.
+
+AcceptEventAction action = (AcceptEventAction)(this.node);
+OutputPinList resultPins = action.result;
+
+Debug.println(&quot;[accept] action = &quot; + action.name + &quot;, signalinstance = &quot; + signalInstance);
+
+if (this.running) {
+ if (!action.isUnmarshall) {
+ ValueList result = new ValueList();
+ result.addValue(signalInstance);
+ if (resultPins.size() > 0) {
+ this.putTokens(resultPins.getValue(0), result);
+ }
+ } else {
+ FeatureValueList featureValues = signalInstance.getFeatureValues();
+ for (int i = 0; i &lt; featureValues.size(); i++) {
+ FeatureValue featureValue = featureValues.getValue(i);
+ OutputPin resultPin = resultPins.getValue(i);
+ this.putTokens(resultPin, featureValue.values);
+ }
+ }
+
+ this.sendOffers();
+
+ this.waiting = false;
+
+ Debug.println(&quot;[fire] Checking if &quot; + this.node.name + &quot; should fire again...&quot;);
+ this.receiveOffer();
+
+ this.resume();
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match" name="match" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match.1">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <language>Java</language>
+ <body>// Return true if the given signal instance matches a trigger of the accept action of this activation.
+
+AcceptEventAction action = (AcceptEventAction)(this.node);
+TriggerList triggers = action.trigger;
+Signal signal = signalInstance.type;
+
+boolean matches = false;
+int i = 1;
+while (!matches &amp; i &lt;= triggers.size()) {
+ matches = ((SignalEvent)(triggers.getValue(i-1).event)).signal == signal;
+ i = i + 1;
+}
+
+return matches;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionActivation-terminate.1">
+ <language>Java</language>
+ <body>// Terminate this action and unregister its event accepter.
+
+super.terminate();
+
+if (this.waiting) {
+ this.getExecutionContext().unregister(this.eventAccepter);
+ this.waiting = false;
+}</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-run.1" name="run" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionActivation-run"/>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire.1" name="fire" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-isReady.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionActivation-doAction"/>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-accept.1" name="accept" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionActivation-accept">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-accept.1-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match.1" name="match" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-match.1-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionActivation-terminate"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter" name="AcceptEventActionEventAccepter">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter">
+ <body>An accept event action event accepter handles signal reception events on the behalf of a specific accept event action activation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-_generalization.0" general="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ <ownedAttribute xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-actionActivation" name="actionActivation" visibility="public" type="Semantics-Actions-CompleteActions-AcceptEventActionActivation" association="Semantics-Actions-CompleteActions-A_actionActivation_eventAccepter">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-actionActivation-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-actionActivation">
+ <body>The accept event action activation on behalf of which this event accepter is waiting.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept" name="accept" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept.1">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <language>Java</language>
+ <body>// Accept a signal occurance for the given signal instance.
+// Forward the signal occuranceto the action activation.
+
+this.actionActivation.accept(signalInstance);</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match" name="match" isReentrant="false" specification="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match.1">
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return true if the given signal instance matches a trigger of the accept action of the action activation.
+
+return this.actionActivation.match(signalInstance);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept.1" name="accept" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept.1-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept.1">
+ <body>Accept a signal occurance for the given signal instance.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-accept.1-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match.1" name="match" visibility="public" method="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match">
+ <ownedComment xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match.1-_ownedComment.0" annotatedElement="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match.1">
+ <body>Determine if the given signal instance matches a trigger of the accept action of the action activation.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match.1-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <ownedParameter xmi:id="Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-match.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Actions-CompleteActions-A_actionActivation_eventAccepter" name="A_actionActivation_eventAccepter" visibility="private" memberEnd="Semantics-Actions-CompleteActions-AcceptEventActionActivation-eventAccepter Semantics-Actions-CompleteActions-AcceptEventActionEventAccepter-actionActivation"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Actions-CompleteActions-A_currentExecution_reduceActionActivation" name="A_currentExecution_reduceActionActivation" visibility="private" memberEnd="Semantics-Actions-CompleteActions-A_currentExecution_reduceActionActivation-_ownedEnd.0 Semantics-Actions-CompleteActions-ReduceActionActivation-currentExecution">
+ <ownedEnd xmi:id="Semantics-Actions-CompleteActions-A_currentExecution_reduceActionActivation-_ownedEnd.0" visibility="private" type="Semantics-Actions-CompleteActions-ReduceActionActivation" association="Semantics-Actions-CompleteActions-A_currentExecution_reduceActionActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Actions-CompleteActions-A_currentExecution_reduceActionActivation-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Activities" name="Activities">
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Activities-CompleteStructuredActivities" name="CompleteStructuredActivities">
+ <packageImport xmi:id="Semantics-Activities-CompleteStructuredActivities-_packageImport.0">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Activities-CompleteStructuredActivities-_packageImport.1" importedPackage="Semantics-Actions-BasicActions"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation" name="StructuredActivityNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation">
+ <body>A structured activity node activation is an action activation for an action that is a structured activity node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-_ownedComment.1">
+ <body>import java.util.*;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedAttribute xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-activationGroup" name="activationGroup" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup" aggregation="composite" association="Semantics-Activities-CompleteStructuredActivities-A_activationGroup_containingNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-activationGroup-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-activationGroup">
+ <body>The group of activations of the activity nodes contained in the structured activity node.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doAction.1">
+ <language>Java</language>
+ <body>// If the structured activity node has mustIsolate=true, then carry out its behavior with isolation.
+// Otherwise just activate it normally.
+
+if (((StructuredActivityNode)(this.node)).mustIsolate) {
+ _beginIsolation();
+ this.doStructuredActivity();
+ _endIsolation();
+} else {
+ this.doStructuredActivity();
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doStructuredActivity" name="doStructuredActivity" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doStructuredActivity.1">
+ <language>Java</language>
+ <body>// Run all activations of contained nodes. When this is complete, return.
+// (This is the default behavior for a structured activity node used simply as a group. It is overridden for the execution of conditional and loop nodes.)
+
+Action action = (Action)(this.node);
+
+// *** Concurrently send offers from all input pins. ***
+InputPinList inputPins = action.input;
+for (Iterator i = inputPins.iterator(); i.hasNext();) {
+ InputPin inputPin = (InputPin)i.next();
+ PinActivation pinActivation = this.getPinActivation(inputPin);
+ pinActivation.sendUnofferedTokens();
+}
+
+this.activationGroup.run(this.activationGroup.nodeActivations);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminate.1">
+ <language>Java</language>
+ <body>// Terminate the execution of all contained node activations (which
+// completes the performance of the structured activity node
+// activation), and then terminate this node itself.
+
+this.terminateAll();
+super.terminate();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation" name="getNodeActivation" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If this structured activity node activation is not for the given node, then check if there is an activation for the node in the activation group.
+
+ActivityNodeActivation thisActivation = super.getNodeActivation(node);
+
+ActivityNodeActivation activation = null;
+if (thisActivation != null) {
+ activation = thisActivation;
+} else if (this.activationGroup != null) {
+ activation = this.activationGroup.getNodeActivation(node);
+}
+
+return activation;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList" name="makeActivityNodeList" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-ExecutableNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return an activity node list containing the given list of executable nodes
+// and any pins that they own.
+
+ActivityNodeList activityNodes = new ActivityNodeList();
+
+for (int i = 0; i &lt; nodes.size(); i++) {
+ ActivityNode node = nodes.getValue(i);
+ activityNodes.addValue(node);
+
+ if (node instanceof Action) {
+ Action action = (Action)node;
+
+ InputPinList inputPins = action.input;
+ for (int j = 0; j &lt; inputPins.size(); j++) {
+ InputPin inputPin = inputPins.getValue(j);
+ activityNodes.addValue(inputPin);
+ }
+
+ OutputPinList outputPins = action.output;
+ for (int j = 0; j &lt; outputPins.size(); j++) {
+ OutputPin outputPin = outputPins.getValue(j);
+ activityNodes.addValue(outputPin);
+ }
+ }
+}
+
+return activityNodes;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues" name="getPinValues" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the values of the tokens on the pin activation corresponding to the given pin in the internal activation group for this node activation.
+
+PinActivation pinActivation = (PinActivation)(this.activationGroup.getNodeActivation(pin));
+TokenList tokens = pinActivation.getTokens();
+
+ValueList values = new ValueList();
+for (int i = 0; i &lt; tokens.size(); i++) {
+ Token token = tokens.getValue(i);
+ Value value = ((ObjectToken)token).value;
+ if (value != null) {
+ values.addValue(value);
+ }
+}
+
+return values;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues" name="putPinValues" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues-values-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Place tokens for the given values on the pin activation corresponding to the given output pin on the internal activation group for this node activation.
+
+PinActivation pinActivation = (PinActivation)(this.activationGroup.getNodeActivation(pin));
+
+for (int i = 0; i &lt; values.size(); i++) {
+ Value value = values.getValue(i);
+ ObjectToken token = new ObjectToken();
+ token.value = value;
+ pinActivation.addToken(token);
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createNodeActivations" name="createNodeActivations" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createNodeActivations.1">
+ <language>Java</language>
+ <body>// Create an activation group and create node activations for all the nodes within the structured activity node.
+
+super.createNodeActivations();
+
+this.activationGroup = new ActivityNodeActivationGroup();
+this.activationGroup.containingNodeActivation = this;
+this.activationGroup.createNodeActivations(((StructuredActivityNode)(this.node)).node);
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createEdgeInstances" name="createEdgeInstances" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createEdgeInstances.1">
+ <language>Java</language>
+ <body>// Create instances for all edges owned by this node.
+
+this.activationGroup.createEdgeInstances(((StructuredActivityNode)(this.node)).edge);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSourceFor" name="isSourceFor" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSourceFor.1">
+ <language>Java</language>
+ <body>// Returns true if this node is either the source for the given
+// edgeInstance itself or if it contains the source in its
+// activation group.
+
+boolean isSource = super.isSourceFor(edgeInstance);
+if (!isSource) {
+ isSource = this.activationGroup.hasSourceFor(edgeInstance);
+}
+return isSource;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminateAll" name="terminateAll" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminateAll.1">
+ <language>Java</language>
+ <body>// Terminate the execution of all contained node activations (which
+// completes the performance of the structured activity node
+// activation).
+
+this.activationGroup.terminateAll();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSuspended" name="isSuspended" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSuspended.1">
+ <language>Java</language>
+ <body>// Check if the activation group for this node is suspended.
+
+return this.activationGroup.isSuspended();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-completeAction" name="completeAction" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-completeAction.1">
+ <language>Java</language>
+ <body>// Only actually complete this structured activity node if it is not
+// suspended.
+
+TokenList incomingTokens = new TokenList();
+if (!this.isSuspended()) {
+ incomingTokens = super.completeAction();
+}
+return incomingTokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-resume" name="resume" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-resume.1">
+ <language>Java</language>
+ <body>// Only actually complete this structured activity node if it is not
+// suspended.
+
+TokenList incomingTokens = new TokenList();
+if (!this.isSuspended()) {
+ incomingTokens = super.completeAction();
+}
+return incomingTokens;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doAction"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doStructuredActivity.1" name="doStructuredActivity" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-doStructuredActivity"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminate"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation.1" name="getNodeActivation" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getNodeActivation.1-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1" name="makeActivityNodeList" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-ExecutableNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-makeActivityNodeList.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues.1" name="getPinValues" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues.1-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-getPinValues.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues.1" name="putPinValues" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues.1-pin" name="pin" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Actions-BasicActions-OutputPin"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues.1-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues.1-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-putPinValues.1-values-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createNodeActivations.1" name="createNodeActivations" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createNodeActivations"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createEdgeInstances.1" name="createEdgeInstances" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-createEdgeInstances"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSourceFor.1" name="isSourceFor" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSourceFor">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSourceFor.1-edgeInstance" name="edgeInstance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSourceFor.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminateAll.1" name="terminateAll" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-terminateAll"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSuspended.1" name="isSuspended" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSuspended">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-isSuspended.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-completeAction.1" name="completeAction" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-completeAction">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-completeAction.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-completeAction.1-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-completeAction.1-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-resume.1" name="resume" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-resume"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation" name="LoopNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation">
+ <body>A loop node activation is a structured activity node activation for a node that is a loop node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-_generalization.0" general="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation"/>
+ <ownedAttribute xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-bodyOutputLists" name="bodyOutputLists" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-Values" aggregation="composite" association="Semantics-Activities-CompleteStructuredActivities-A_bodyOutputLists_loopNodeActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-bodyOutputLists-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-bodyOutputLists-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doStructuredActivity" name="doStructuredActivity" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doStructuredActivity.1">
+ <language>Java</language>
+ <body>// Set the initial values for the body outputs to the values of the loop variable input pins.
+// If isTestedFirst is true, then repeatedly run the test part and the body part of the loop, copying values from the body outputs to the loop variables.
+// If isTestedFirst is false, then repeatedly run the body part and the test part of the loop, copying values from the body outputs to the loop variables.
+// When the test fails, copy the values of the body outputs to the loop outputs.
+// [Note: The body outputs are used for the loop outputs, rather than the loop variables, since values on the loop variables may be consumed when running the test for the last time.]
+
+LoopNode loopNode = (LoopNode)(this.node);
+InputPinList loopVariableInputs = loopNode.loopVariableInput;
+OutputPinList loopVariables = loopNode.loopVariable;
+OutputPinList resultPins = loopNode.result;
+
+ValuesList bodyOutputLists = this.bodyOutputLists;
+for (int i = 0; i &lt; loopVariableInputs.size(); i++) {
+ InputPin loopVariableInput = loopVariableInputs.getValue(i);
+ Values bodyOutputList = new Values();
+ bodyOutputList.values = this.takeTokens(loopVariableInput);
+ this.bodyOutputLists.addValue(bodyOutputList);
+}
+
+this.doLoop(true);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runTest" name="runTest" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runTest.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runTest-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Run the test part of the loop node for this node activation.
+// Return the value on the decider pin.
+
+Debug.println(&quot;[runTest] Running test...&quot;);
+
+LoopNode loopNode = (LoopNode)(this.node);
+
+this.activationGroup.runNodes(this.makeActivityNodeList(loopNode.test));
+
+ValueList values = this.getPinValues(loopNode.decider);
+
+// If there is no decider value, treat it as false.
+boolean decision = false;
+if (values.size() > 0) {
+ decision = ((BooleanValue)(values.getValue(0))).value;
+}
+
+Debug.println(&quot;[runTest] &quot; + (decision? &quot;Test succeeded.&quot;: &quot;Test failed.&quot;));
+
+return decision;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runBody" name="runBody" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runBody.1">
+ <language>Java</language>
+ <body>// Run the body part of the loop node for this node activation and save the body outputs.
+
+Debug.println(&quot;[runBody] Running body...&quot;);
+
+LoopNode loopNode = (LoopNode)this.node;
+
+this.activationGroup.runNodes(this.makeActivityNodeList(loopNode.bodyPart));
+
+if (!this.isSuspended()) {
+ this.saveBodyOutputs();
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runLoopVariables" name="runLoopVariables" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runLoopVariables.1">
+ <language>Java</language>
+ <body>// Run the loop variable pins of the loop node for this node activation.
+
+this.activationGroup.runNodes(this.makeLoopVariableList());
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-createNodeActivations" name="createNodeActivations" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-createNodeActivations.1">
+ <language>Java</language>
+ <body>// In addition to creating activations for contained nodes, create activations for any loop variables.
+
+super.createNodeActivations();
+this.activationGroup.createNodeActivations(this.makeLoopVariableList());
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList" name="makeLoopVariableList" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return an activity node list containing the loop variable pins for the loop node of this activation.
+
+LoopNode loopNode = (LoopNode)(this.node);
+ActivityNodeList nodes = new ActivityNodeList();
+
+OutputPinList loopVariables = loopNode.loopVariable;
+for (int i = 0; i &lt; loopVariables.size(); i++) {
+ OutputPin loopVariable = loopVariables.getValue(i);
+ nodes.addValue(loopVariable);
+}
+
+return nodes;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-terminateAll" name="terminateAll" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-terminateAll.1">
+ <language>Java</language>
+ <body>// Copy the values of the body outputs to the loop outputs, and then
+// terminate all activations in the loop.
+
+OutputPinList resultPins = ((LoopNode)this.node).result;
+
+for (int i = 0; i &lt; bodyOutputLists.size(); i++) {
+ Values bodyOutputList = bodyOutputLists.getValue(i);
+ OutputPin resultPin = resultPins.getValue(i);
+ this.putTokens(resultPin, bodyOutputList.values);
+}
+
+super.terminateAll();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doLoop" name="doLoop" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doLoop.1">
+ <language>Java</language>
+ <body>// If isTestedFirst is true, then repeatedly run the test part and the
+// body part of the loop, copying values from the body outputs to the
+// loop variables.
+// If isTestedFirst is false, then repeatedly run the body part and the
+// test part of the loop, copying values from the body outputs to the
+// loop variables.
+
+LoopNode loopNode = (LoopNode) (this.node);
+OutputPinList loopVariables = loopNode.loopVariable;
+OutputPinList resultPins = loopNode.result;
+
+while (continuing) {
+
+ // Set loop variable values
+ this.runLoopVariables();
+ for (int i = 0; i &lt; loopVariables.size(); i++) {
+ OutputPin loopVariable = loopVariables.getValue(i);
+ Values bodyOutputList = bodyOutputLists.getValue(i);
+ ValueList values = bodyOutputList.values;
+ this.putPinValues(loopVariable, values);
+ ((OutputPinActivation) this.activationGroup
+ .getNodeActivation(loopVariable)).sendUnofferedTokens();
+ }
+
+ // Run all the non-executable, non-pin nodes in the conditional
+ // node.
+ ActivityNodeActivationList nodeActivations = this.activationGroup.nodeActivations;
+ ActivityNodeActivationList nonExecutableNodeActivations =
+ new ActivityNodeActivationList();
+ for (int i = 0; i &lt; nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations
+ .getValue(i);
+ if (!(nodeActivation.node instanceof ExecutableNode |
+ nodeActivation.node instanceof Pin)) {
+ nonExecutableNodeActivations.addValue(nodeActivation);
+ }
+ }
+ this.activationGroup.run(nonExecutableNodeActivations);
+
+ // Run the loop
+ if (loopNode.isTestedFirst) {
+ continuing = this.runTest();
+ if (continuing) {
+ this.runBody();
+ }
+ } else {
+ this.runBody();
+ if (this.isRunning() &amp; !this.isSuspended()) {
+ continuing = this.runTest();
+ }
+ }
+
+ if (this.isRunning() &amp;&amp; !this.isSuspended()) {
+ this.activationGroup.terminateAll();
+ } else {
+ continuing = false;
+ }
+
+ Debug.println(&quot;[doStructuredActivity] &quot;
+ + (continuing? &quot;Continuing.&quot; :
+ this.isSuspended()? &quot;Suspended&quot;:
+ &quot;Done.&quot;));
+
+}
+
+if (this.isRunning() &amp;&amp; !this.isSuspended()) {
+ for (int i = 0; i &lt; bodyOutputLists.size(); i++) {
+ Values bodyOutputList = bodyOutputLists.getValue(i);
+ OutputPin resultPin = resultPins.getValue(i);
+ this.putTokens(resultPin, bodyOutputList.values);
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-saveBodyOutputs" name="saveBodyOutputs" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-saveBodyOutputs.1">
+ <language>Java</language>
+ <body>// Save the body outputs for use in the next iteration.
+
+LoopNode loopNode = (LoopNode) this.node;
+OutputPinList bodyOutputs = loopNode.bodyOutput;
+ValuesList bodyOutputLists = this.bodyOutputLists;
+for (int i = 0; i &lt; bodyOutputs.size(); i++) {
+ OutputPin bodyOutput = bodyOutputs.getValue(i);
+ Values bodyOutputList = bodyOutputLists.getValue(i);
+ bodyOutputList.values = this.getPinValues(bodyOutput);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-resume" name="resume" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-resume.1">
+ <language>Java</language>
+ <body>// When this loop node is resumed after being suspended, continue with
+// its next iteration (if any). Once the loop has completed execution
+// without being suspended again, complete the action.
+
+LoopNode loopNode = (LoopNode) (this.node);
+
+this.saveBodyOutputs();
+
+if (loopNode.mustIsolate) {
+ _beginIsolation();
+ this.continueLoop();
+ _endIsolation();
+} else {
+ this.continueLoop();
+}
+
+if (this.isSuspended()) {
+ // NOTE: If the subsequent iteration of the loop suspends it again,
+ // then it is necessary to remove the previous suspension from the
+ // containing activity node activation group.
+ this.group.resume(this);
+} else {
+ super.resume();
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-continueLoop" name="continueLoop" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-continueLoop.1">
+ <language>Java</language>
+ <body>// Continue the loop node when it is resumed after being suspended. If
+// isTestedFirst is true, then continue executing the loop. If
+// isTestedFirst is false, then run the test to determine whether
+// the loop should be continued or completed.
+// [Note that this presumes that an accept event action is not allowed
+// in the test part of a loop node.]
+
+LoopNode loopNode = (LoopNode) (this.node);
+
+boolean continuing = true;
+if (!loopNode.isTestedFirst) {
+ continuing = this.runTest();
+}
+
+if (this.isRunning()) {
+ this.activationGroup.terminateAll();
+ this.doLoop(continuing);
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doStructuredActivity.1" name="doStructuredActivity" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doStructuredActivity"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doLoop.1" name="doLoop" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doLoop">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-doLoop.1-continuing" name="continuing" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runTest.1" name="runTest" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runTest">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runTest.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runBody.1" name="runBody" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runBody"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-saveBodyOutputs.1" name="saveBodyOutputs" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-saveBodyOutputs"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runLoopVariables.1" name="runLoopVariables" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-runLoopVariables"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-createNodeActivations.1" name="createNodeActivations" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-createNodeActivations"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList.1" name="makeLoopVariableList" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-makeLoopVariableList.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-terminateAll.1" name="terminateAll" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-terminateAll"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-resume.1" name="resume" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-resume"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-continueLoop.1" name="continueLoop" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-continueLoop"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation" name="ConditionalNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation">
+ <body>A conditional node activation is a structured activity node activation for a node that is a conditional node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-_ownedComment.1">
+ <body>import java.util.Iterator;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.LociL1.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-_generalization.0" general="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation"/>
+ <ownedAttribute xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-clauseActivations" name="clauseActivations" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" aggregation="composite" association="Semantics-Activities-CompleteStructuredActivities-A_clauseActivations_conditionalNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-clauseActivations-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-clauseActivations">
+ <body>The activations for each clause in the conditional node for this node activation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-clauseActivations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-clauseActivations-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectedClauses" name="selectedClauses" visibility="public" association="Semantics-Activities-CompleteStructuredActivities-A_selectedClauses_clauseActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectedClauses-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectedClauses">
+ <body>The set of clauses which meet the conditions to have their bodies activated.</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectedClauses-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectedClauses-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-doStructuredActivity" name="doStructuredActivity" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-doStructuredActivity.1">
+ <language>Java</language>
+ <body>// Run all the non-executable, non-pin nodes in the conditional node.
+// Activate all clauses in the conditional node and pass control to those that are ready (i.e., have no predecessors).
+// If one or more clauses have succeeded in being selected, choose one non-deterministically and run its body, then copy the outputs of that clause to the output pins of the node.
+
+ConditionalNode node = (ConditionalNode)(this.node);
+
+ActivityNodeActivationList nodeActivations = this.activationGroup.nodeActivations;
+ActivityNodeActivationList nonExecutableNodeActivations = new ActivityNodeActivationList();
+for (int i = 0; i &lt; nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations.getValue(i);
+ if (!(nodeActivation.node instanceof ExecutableNode | nodeActivation.node instanceof Pin)) {
+ nonExecutableNodeActivations.addValue(nodeActivation);
+ }
+}
+
+this.activationGroup.run(nonExecutableNodeActivations);
+
+this.clauseActivations.clear();
+ClauseList clauses = node.clause;
+for (int i = 0; i &lt; clauses.size(); i++) {
+ Clause clause = clauses.getValue(i);
+ ClauseActivation clauseActivation = new ClauseActivation();
+ clauseActivation.clause = clause;
+ clauseActivation.conditionalNodeActivation = this;
+ this.clauseActivations.addValue(clauseActivation);
+}
+
+this.selectedClauses.clear();
+
+ClauseActivationList readyClauseActivations = new ClauseActivationList();
+for (int i = 0; i &lt; this.clauseActivations.size(); i++) {
+ ClauseActivation clauseActivation = this.clauseActivations.getValue(i);
+ Debug.println(&quot;[doStructuredActivity] clauseActivations[&quot; + i + &quot;] = &quot; + clauseActivation);
+ if (clauseActivation.isReady()) {
+ Debug.println(&quot;[doStructuredActivity] Clause activation is ready.&quot;);
+ readyClauseActivations.addValue(clauseActivation);
+ }
+}
+
+// *** Give control to all ready clauses concurrently. ***
+for (Iterator i = readyClauseActivations.iterator(); i.hasNext() ;) {
+ ClauseActivation clauseActivation = (ClauseActivation)i.next();
+ Debug.println(&quot;[doStructuredActivity] Giving control to &quot; + clauseActivation + &quot;...&quot;);
+ clauseActivation.receiveControl();
+}
+
+this.selectedClause = null;
+if (this.selectedClauses.size() > 0 &amp; this.isRunning()) {
+ Debug.println(&quot;[doStructuredActivity] &quot; + this.selectedClauses.size() + &quot; clause(s) selected.&quot;);
+
+ // *** If multiple clauses are selected, choose one non-deterministically. ***
+ int i = ((ChoiceStrategy)this.getExecutionLocus().factory.getStrategy(&quot;choice&quot;)).choose(this.selectedClauses.size());
+ Clause selectedClause = this.selectedClauses.getValue(i-1);
+
+ Debug.println(&quot;[doStructuredActivity] Running selectedClauses[&quot; + i + &quot;] = &quot; + selectedClause);
+
+ for (int j = 0; j &lt; clauses.size(); j++) {
+ Clause clause = clauses.getValue(j);
+ if (clause != selectedClause) {
+ ExecutableNodeList testNodes = clause.test;
+ for (int k = 0; k &lt; testNodes.size(); k++) {
+ ExecutableNode testNode = testNodes.getValue(k);
+ this.activationGroup.getNodeActivation(testNode).terminate();
+ }
+ }
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation" name="getClauseActivation" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation-clause" name="clause" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the clause activation corresponding to the given clause.
+
+// Debug.println(&quot;[getClauseActivation] clause = &quot; + clause);
+
+ClauseActivation selectedClauseActivation = null;
+int i = 1;
+while ((selectedClauseActivation == null) &amp; i &lt;= this.clauseActivations.size()) {
+ ClauseActivation clauseActivation = this.clauseActivations.getValue(i-1);
+ // Debug.println(&quot;[getClauseActivations] clauseActivations[&quot; + i + &quot;].clause = &quot; + clauseActivation.clause);
+ if (clauseActivation.clause == clause) {
+ selectedClauseActivation = clauseActivation;
+ }
+ i = i + 1;
+}
+
+return selectedClauseActivation;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-runTest" name="runTest" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-runTest.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-runTest-clause" name="clause" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Run the test for the given clause.
+
+if (this.isRunning()) {
+ this.activationGroup.runNodes(this.makeActivityNodeList(clause.test));
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectBody" name="selectBody" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectBody.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectBody-clause" name="clause" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Add the clause to the list of selected clauses.
+
+this.selectedClauses.addValue(clause);
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeBody" name="completeBody" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeBody.1">
+ <language>Java</language>
+ <body> // Complete the activation of the body of a conditional note by
+ // copying the outputs of the selected clause (if any) to the output
+ // pins of the node and terminating the activation of all nested nodes.
+
+ if (this.selectedClause != null) {
+ ConditionalNode node = (ConditionalNode) (this.node);
+ OutputPinList resultPins = node.result;
+ OutputPinList bodyOutputPins = this.selectedClause.bodyOutput;
+ for (int k = 0; k &lt; resultPins.size(); k++) {
+ OutputPin resultPin = resultPins.getValue(k);
+ OutputPin bodyOutputPin = bodyOutputPins.getValue(k);
+ this.putTokens(resultPin, this.getPinValues(bodyOutputPin));
+ }
+ }
+ this.activationGroup.terminateAll();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeAction" name="completeAction" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeAction.1">
+ <language>Java</language>
+ <body>// Only complete the conditional node if it is not suspended.
+
+if (!this.isSuspended()) {
+ completeBody();
+}
+return super.completeAction();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-resume" name="resume" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-resume.1">
+ <language>Java</language>
+ <body>// When this conditional node is resumed after being suspended, complete
+// its body and then resume it as a structured activity node.
+// [Note that this presumes that accept event actions are not allowed
+// in the test part of a clause of a conditional node.]
+
+completeBody();
+super.resume();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-doStructuredActivity.1" name="doStructuredActivity" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-doStructuredActivity"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeBody.1" name="completeBody" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeBody"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeAction.1" name="completeAction" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeAction">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeAction.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeAction.1-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-completeAction.1-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation.1" name="getClauseActivation" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-getClauseActivation.1-clause" name="clause" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-runTest.1" name="runTest" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-runTest">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-runTest.1-clause" name="clause" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectBody.1" name="selectBody" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectBody">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectBody.1-clause" name="clause" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-resume.1" name="resume" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-resume"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" name="ClauseActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-ClauseActivation">
+ <body>A clause activation defines the behavior of a clause within the context of a specific activation of the conditional node containing the clause.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-_ownedComment.1">
+ <body>import java.util.Iterator;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-conditionalNodeActivation" name="conditionalNodeActivation" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation" association="Semantics-Activities-CompleteStructuredActivities-A_clauseActivations_conditionalNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-conditionalNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-conditionalNodeActivation">
+ <body>The activation of the conditional node that contains the clause for this clause activation.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-clause" name="clause" visibility="public" association="Semantics-Activities-CompleteStructuredActivities-A_clause_clauseActivation">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities-Clause"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-receiveControl" name="receiveControl" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-receiveControl.1">
+ <language>Java</language>
+ <body>// If all predecessors to the clause for this activation have run their tests and failed, then run the test for this clause.
+// If the test succeeds, then terminate any other clauses that may be running and run the body of this clause.
+// If the test fails, then pass control to successor clauses.
+
+Debug.println(&quot;[receiveControl] clauseActivation = &quot; + this);
+
+if (this.isReady()) {
+ Debug.println(&quot;[receiveControl] Running test...&quot;);
+ this.runTest();
+
+ BooleanValue decision = this.getDecision();
+
+ // Note that the decision may be null if the test was terminated before completion.
+ if (decision != null) {
+ if (decision.value == true) {
+ Debug.println(&quot;[receiveControl] Test succeeded.&quot;);
+ this.selectBody();
+ } else {
+ Debug.println(&quot;[receiveControl] Test failed.&quot;);
+
+ ClauseActivationList successors = this.getSuccessors();
+
+ // *** Give control to all successors concurrently. ***
+ for (Iterator i = successors.iterator(); i.hasNext();) {
+ ClauseActivation successor = (ClauseActivation)i.next();
+ successor.receiveControl();
+ }
+ }
+ }
+}
+ </body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-isReady-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Test if all predecessors to this clause activation have failed.
+
+ClauseActivationList predecessors = this.getPredecessors();
+
+boolean ready = true;
+int i = 1;
+while (ready &amp; i &lt;= predecessors.size()) {
+ ClauseActivation predecessor = predecessors.getValue(i-1);
+ BooleanValue decisionValue = predecessor.getDecision();
+
+ // Note that the decision will be null if the predecessor clause has not run yet.
+ if (decisionValue == null) {
+ ready = false;
+ } else {
+ ready = !decisionValue.value;
+ }
+
+ i = i + 1;
+}
+
+return ready;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-runTest" name="runTest" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-runTest.1">
+ <language>Java</language>
+ <body>// Run the test of the clause for this clause activation.
+
+this.conditionalNodeActivation.runTest(this.clause);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-selectBody" name="selectBody" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-selectBody.1">
+ <language>Java</language>
+ <body>// Select the body of the clause for this clause activation.
+
+this.conditionalNodeActivation.selectBody(this.clause);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision" name="getDecision" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-BooleanValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the value (if any) on the decider pin of the clause for this clause activation.
+
+ValueList deciderValues = this.conditionalNodeActivation.getPinValues(this.clause.decider);
+
+BooleanValue deciderValue = null;
+if (deciderValues.size() > 0) {
+ deciderValue = (BooleanValue)(deciderValues.getValue(0));
+}
+
+return deciderValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors" name="getPredecessors" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the clause activations for the predecessors of the clause for this clause activation.
+
+ClauseActivationList predecessors = new ClauseActivationList();
+
+ClauseList predecessorClauses = this.clause.predecessorClause;
+for (int i = 0; i &lt; predecessorClauses.size(); i++) {
+ Clause predecessorClause = predecessorClauses.getValue(i);
+ predecessors.addValue(this.conditionalNodeActivation.getClauseActivation(predecessorClause));
+}
+
+return predecessors;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors" name="getSuccessors" isReentrant="false" specification="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors.1">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the clause activations for the successors of the clause for this clause activation.
+
+ClauseActivationList successors = new ClauseActivationList();
+
+ClauseList successorClauses = this.clause.successorClause;
+for (int i = 0; i &lt; successorClauses.size(); i++) {
+ Clause successorClause = successorClauses.getValue(i);
+ successors.addValue(this.conditionalNodeActivation.getClauseActivation(successorClause));
+}
+
+return successors;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-receiveControl.1" name="receiveControl" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-receiveControl"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-isReady.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-runTest.1" name="runTest" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-runTest"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-selectBody.1" name="selectBody" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-selectBody"/>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision.1" name="getDecision" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-BooleanValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getDecision.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors.1" name="getPredecessors" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getPredecessors.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors.1" name="getSuccessors" visibility="public" method="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors">
+ <ownedParameter xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-getSuccessors.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_clause_clauseActivation" name="A_clause_clauseActivation" visibility="private" memberEnd="Semantics-Activities-CompleteStructuredActivities-A_clause_clauseActivation-_ownedEnd.0 Semantics-Activities-CompleteStructuredActivities-ClauseActivation-clause">
+ <ownedEnd xmi:id="Semantics-Activities-CompleteStructuredActivities-A_clause_clauseActivation-_ownedEnd.0" visibility="private" type="Semantics-Activities-CompleteStructuredActivities-ClauseActivation" association="Semantics-Activities-CompleteStructuredActivities-A_clause_clauseActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_clause_clauseActivation-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_clause_clauseActivation-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_clauseActivations_conditionalNodeActivation" name="A_clauseActivations_conditionalNodeActivation" visibility="private" memberEnd="Semantics-Activities-CompleteStructuredActivities-ClauseActivation-conditionalNodeActivation Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-clauseActivations"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_selectedClauses_clauseActivation" name="A_selectedClauses_clauseActivation" visibility="private" memberEnd="Semantics-Activities-CompleteStructuredActivities-A_selectedClauses_clauseActivation-_ownedEnd.0 Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation-selectedClauses">
+ <ownedEnd xmi:id="Semantics-Activities-CompleteStructuredActivities-A_selectedClauses_clauseActivation-_ownedEnd.0" visibility="private" type="Semantics-Activities-CompleteStructuredActivities-ConditionalNodeActivation" association="Semantics-Activities-CompleteStructuredActivities-A_selectedClauses_clauseActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_activationGroup_containingNodeActivation" name="A_activationGroup_containingNodeActivation" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-containingNodeActivation Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation-activationGroup"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-CompleteStructuredActivities-Values" name="Values">
+ <ownedAttribute xmi:id="Semantics-Activities-CompleteStructuredActivities-Values-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value" association="Semantics-Activities-CompleteStructuredActivities-A_values_values">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-Values-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-Values-values-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_bodyOutputLists_loopNodeActivation" name="A_bodyOutputLists_loopNodeActivation" visibility="private" memberEnd="Semantics-Activities-CompleteStructuredActivities-A_bodyOutputLists_loopNodeActivation-_ownedEnd.0 Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation-bodyOutputLists">
+ <ownedEnd xmi:id="Semantics-Activities-CompleteStructuredActivities-A_bodyOutputLists_loopNodeActivation-_ownedEnd.0" visibility="private" type="Semantics-Activities-CompleteStructuredActivities-LoopNodeActivation" association="Semantics-Activities-CompleteStructuredActivities-A_bodyOutputLists_loopNodeActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_bodyOutputLists_loopNodeActivation-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_values_values" name="A_values_values" visibility="private" memberEnd="Semantics-Activities-CompleteStructuredActivities-A_values_values-_ownedEnd.0 Semantics-Activities-CompleteStructuredActivities-Values-values">
+ <ownedEnd xmi:id="Semantics-Activities-CompleteStructuredActivities-A_values_values-_ownedEnd.0" visibility="private" type="Semantics-Activities-CompleteStructuredActivities-Values" association="Semantics-Activities-CompleteStructuredActivities-A_values_values">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_values_values-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-CompleteStructuredActivities-A_values_values-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Activities-IntermediateActivities" name="IntermediateActivities">
+ <packageImport xmi:id="Semantics-Activities-IntermediateActivities-_packageImport.0">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Activities-IntermediateActivities-_packageImport.1" importedPackage="Semantics-CommonBehaviors-BasicBehaviors"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-Token" name="Token" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Token-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-Token">
+ <body>A token is an individual element of data or control that may flow across an activity edge.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Token-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-Token-holder" name="holder" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" association="Semantics-Activities-IntermediateActivities-A_heldTokens_holder">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-Token-holder-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Token-transfer" name="transfer" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Token-transfer.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-transfer-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-transfer-holder" name="holder" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ <language>Java</language>
+ <body>// if this token does not have any holder, make the given holder its holder.
+// Otherwise, remove this token from its holder and return a copy of it transfered to a new holder.
+
+Token token = this;
+if (this.holder != null) {
+ this.withdraw();
+ token = this.copy();
+}
+
+token.holder = holder;
+return token;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Token-withdraw" name="withdraw" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Token-withdraw.1">
+ <language>Java</language>
+ <body>// Remove this token from its holder, withdrawing any offers for it.
+
+if (!this.isWithdrawn()) {
+ // Debug.println(&quot;[withdraw] Taking token with value = &quot; + this.getValue());
+ this.holder.removeToken(this);
+ this.holder = null;
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Token-isWithdrawn" name="isWithdrawn" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Token-isWithdrawn.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-isWithdrawn-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Test if this token has been withdrawn.
+
+return this.holder == null;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Token-transfer.1" name="transfer" visibility="public" method="Semantics-Activities-IntermediateActivities-Token-transfer">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-transfer.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-transfer.1-holder" name="holder" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Token-withdraw.1" name="withdraw" visibility="public" method="Semantics-Activities-IntermediateActivities-Token-withdraw"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Token-equals" name="equals" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Token-equals-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-Token-equals">
+ <body>Test if this token is equal to another token.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-equals-other" name="other" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Token-copy" name="copy" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Token-copy-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-Token-copy">
+ <body>// Make a copy of this token.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Token-isWithdrawn.1" name="isWithdrawn" visibility="public" method="Semantics-Activities-IntermediateActivities-Token-isWithdrawn">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-isWithdrawn.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Token-isControl" name="isControl" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Token-isControl-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-Token-isControl">
+ <body>Test whether this is a control token.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-isControl-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Token-getValue" name="getValue" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Token-getValue-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-Token-getValue">
+ <body>Get the value associated with this token (if any).</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Token-getValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-Token-getValue-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-Offer" name="Offer">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Offer-_ownedComment.0">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-Offer-_ownedComment.1" annotatedElement="Semantics-Activities-IntermediateActivities-Offer">
+ <body>An offer is a group of tokens offered together. The grouping of offered tokens into offers usually does not matter for how the tokens may be accepted. However, control and object tokens may become grouped together in the same offer due to a join node that has both incoming control and object flows. In this case, the control tokens are implicitly accepted once all the object tokens in the same offer have been accepted.</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-Offer-offeredTokens" name="offeredTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" association="Semantics-Activities-IntermediateActivities-A_offeredTokens_offer">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-Offer-offeredTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-Offer-offeredTokens-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Offer-countOfferedValues" name="countOfferedValues" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Offer-countOfferedValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-countOfferedValues-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the number of values being offered on object tokens.
+// Remove any tokens that have already been withdrawn and don't include them in the count.
+
+this.removeWithdrawnTokens();
+
+int count = 0;
+for (int i = 0; i &lt; this.offeredTokens.size(); i++) {
+ if (this.offeredTokens.getValue(i).getValue() != null) {
+ count = count + 1;
+ }
+}
+
+return count;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens" name="getOfferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the offered tokens, removing any that have been withdrawn.
+
+this.removeWithdrawnTokens();
+
+TokenList tokens = new TokenList();
+TokenList offeredTokens = this.offeredTokens;
+for (int i = 0; i &lt; this.offeredTokens.size() ; i++) {
+ Token offeredToken = offeredTokens.getValue(i);
+ // Debug.println(&quot;[getOfferedTokens] token value = &quot; + offeredToken.getValue());
+ tokens.addValue(offeredToken);
+}
+
+return tokens;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Offer-removeOfferedValues" name="removeOfferedValues" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Offer-removeOfferedValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-removeOfferedValues-count" name="count" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Remove the given number of non-null object tokens from those in this offer.
+
+int n = count;
+int i = 1;
+while (n > 0) {
+ if (this.offeredTokens.getValue(i-1).getValue() != null) {
+ this.offeredTokens.removeValue(i-1);
+ } else {
+ i = i + 1;
+ }
+ n = n - 1;
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Offer-removeWithdrawnTokens" name="removeWithdrawnTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Offer-removeWithdrawnTokens.1">
+ <language>Java</language>
+ <body>// Remove any tokens that have already been consumed.
+
+TokenList offeredTokens = this.offeredTokens;
+int i = 1;
+while (i &lt;= this.offeredTokens.size()) {
+ if (this.offeredTokens.getValue(i-1).isWithdrawn()) {
+ this.offeredTokens.remove(i-1);
+ i = i - 1;
+ }
+ i = i + 1;
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-Offer-hasTokens" name="hasTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-Offer-hasTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-hasTokens-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check whether this offer has any tokens that have not been withdrawn.
+
+this.removeWithdrawnTokens();
+return this.offeredTokens.size() > 0;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Offer-countOfferedValues.1" name="countOfferedValues" visibility="public" method="Semantics-Activities-IntermediateActivities-Offer-countOfferedValues">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-countOfferedValues.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens.1" name="getOfferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens.1-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-Offer-getOfferedTokens.1-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Offer-removeOfferedValues.1" name="removeOfferedValues" visibility="public" method="Semantics-Activities-IntermediateActivities-Offer-removeOfferedValues">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-removeOfferedValues.1-count" name="count" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Offer-removeWithdrawnTokens.1" name="removeWithdrawnTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-Offer-removeWithdrawnTokens"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-Offer-hasTokens.1" name="hasTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-Offer-hasTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-Offer-hasTokens.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken" name="ObjectToken">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ObjectToken">
+ <body>An object token represents the passing of data along an object flow edge.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-_generalization.0" general="Semantics-Activities-IntermediateActivities-Token"/>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value" aggregation="composite" association="Semantics-Activities-IntermediateActivities-A_value_objectToken">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-value-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ObjectToken-value">
+ <body>The value carried by this token. A token may have no value, in which case it is a &quot;null token&quot;.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-value-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-equals" name="equals" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectToken-equals.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-equals-other" name="other" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ <language>Java</language>
+ <body>// Test if this object token is the same as the other token.
+
+return this == other;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-copy" name="copy" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectToken-copy.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ <language>Java</language>
+ <body>// Return a new object token with the same value as this token.
+// [Note: the holder of the copy is not set.]
+
+ObjectToken copy = new ObjectToken();
+copy.value = this.value;
+
+return copy;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-isControl" name="isControl" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectToken-isControl.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-isControl-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return false for an object token.
+
+return false;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-getValue" name="getValue" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectToken-getValue.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-getValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-getValue-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the value of this object token.
+
+return this.value;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-equals.1" name="equals" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectToken-equals">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-equals.1-other" name="other" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-copy.1" name="copy" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectToken-copy">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-isControl.1" name="isControl" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectToken-isControl">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-isControl.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-getValue.1" name="getValue" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectToken-getValue">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-getValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectToken-getValue.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation" name="ObjectNodeActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ObjectNodeActivation">
+ <body>An object node activation is an activity node activation for a node that is an object node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-offeredTokenCount" name="offeredTokenCount" visibility="public">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-offeredTokenCount-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-offeredTokenCount">
+ <body>The number of held tokens that have already been offered.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-run" name="run" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-run.1">
+ <language>Java</language>
+ <body>// Initialize the offered token count to zero.
+
+super.run();
+this.offeredTokenCount = 0;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers" name="sendOffers" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If the set of tokens to be sent is empty, then offer a null token instead.
+// Otherwise, offer the given tokens as usual.
+
+if (tokens.size() == 0) {
+ ObjectToken token = new ObjectToken();
+ token.holder = this
+ tokens.addValue(token);
+}
+
+super.sendOffers(tokens);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-terminate.1">
+ <language>Java</language>
+ <body>// Remove any offered tokens and terminate.
+
+this.clearTokens();
+super.terminate();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-addToken" name="addToken" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-addToken.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-addToken-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ <language>Java</language>
+ <body>// Transfer the given token to be held by this node only if it is a non-null object token.
+// If it is a control token or a null token, consume it without holding it.
+
+if (token.getValue() == null) {
+ token.withdraw();
+} else {
+ super.addToken(token);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken" name="removeToken" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ <language>Java</language>
+ <body>// Remove the given token, if it is held by this node activation.
+
+int i = super.removeToken(token);
+if (i > 0 &amp; i &lt;= this.offeredTokenCount) {
+ this.offeredTokenCount = this.offeredTokenCount - 1;
+}
+
+return i;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-clearTokens" name="clearTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-clearTokens.1">
+ <language>Java</language>
+ <body>// Remove all held tokens.
+
+super.clearTokens();
+this.offeredTokenCount = 0;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countOfferedValues" name="countOfferedValues" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countOfferedValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countOfferedValues-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Count the total number of non-null object tokens being offered to this node activation.
+
+int totalValueCount = 0;
+int i = 1;
+while (i &lt;= this.incomingEdges.size()) {
+ totalValueCount = totalValueCount + this.incomingEdges.getValue(i-1).countOfferedValues();
+ i = i + 1;
+}
+
+return totalValueCount;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendUnofferedTokens" name="sendUnofferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendUnofferedTokens.1">
+ <language>Java</language>
+ <body>// Send offers over all outgoing edges, if there are any tokens to be offered.
+
+TokenList tokens = this.getUnofferedTokens();
+this.offeredTokenCount = this.offeredTokenCount + tokens.size();
+
+this.sendOffers(tokens);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countUnofferedTokens" name="countUnofferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countUnofferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countUnofferedTokens-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the number of unoffered tokens that are to be offered next.
+// (By default, this is all unoffered tokens.)
+
+if (this.heldTokens.size() == 0) {
+ this.offeredTokenCount = 0;
+}
+
+return this.heldTokens.size() - this.offeredTokenCount;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens" name="getUnofferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the next set of unoffered tokens to be offered and return it.
+// [Note: This effectively treats all object flows as if they have weight=*, rather than the weight=1 default in the current superstructure semantics.]
+
+TokenList tokens = new TokenList();
+
+int i = 1;
+while (i &lt;= this.countUnofferedTokens()) {
+ tokens.addValue(this.heldTokens.getValue(this.offeredTokenCount + i - 1));
+ i = i + 1;
+}
+
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens" name="takeUnofferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take the next set of unoffered tokens to be offered from this node activation and return them.
+
+TokenList tokens = this.getUnofferedTokens();
+for (int i = 0; i &lt; tokens.size(); i++) {
+ Token token = tokens.getValue(i);
+ token.withdraw();
+}
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-run.1" name="run" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-run"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers.1" name="sendOffers" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers.1-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers.1-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendOffers.1-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-terminate"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-addToken.1" name="addToken" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-addToken">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-addToken.1-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken.1" name="removeToken" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-removeToken.1-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-clearTokens.1" name="clearTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-clearTokens"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countOfferedValues.1" name="countOfferedValues" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countOfferedValues">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countOfferedValues.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendUnofferedTokens.1" name="sendUnofferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-sendUnofferedTokens"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countUnofferedTokens.1" name="countUnofferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countUnofferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-countUnofferedTokens.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens.1" name="getUnofferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-getUnofferedTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens.1" name="takeUnofferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens.1-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ObjectNodeActivation-takeUnofferedTokens.1-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-MergeNodeActivation" name="MergeNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-MergeNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-MergeNodeActivation">
+ <body>A merge node activation is a control node activation for a node that is a merge node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-MergeNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-MergeNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ControlNodeActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation" name="JoinNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-JoinNodeActivation">
+ <body>A join node activation is a control node activation for a node that is a join node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ControlNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-JoinNodeActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation-isReady-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check that all incoming edges have sources that are offering tokens.
+
+boolean ready = true;
+int i = 1;
+while (ready &amp; i &lt;=this.incomingEdges.size()) {
+ ready = this.incomingEdges.getValue(i-1).hasOffer();
+ i = i + 1;
+}
+
+return ready;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Activities-IntermediateActivities-JoinNodeActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-JoinNodeActivation-isReady.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken" name="ForkedToken">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ForkedToken">
+ <body>A forked token is a proxy for a token that has been offered through a fork node. If the token is accepted through the fork node, then the original token is withdrawn from its holder, but the forked token remains held by the fork node activation until all outstanding offers on all outgoing edges are accepted.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-_generalization.0" general="Semantics-Activities-IntermediateActivities-Token"/>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-baseToken" name="baseToken" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" association="Semantics-Activities-IntermediateActivities-A_baseToken_forkedToken"/>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-remainingOffersCount" name="remainingOffersCount" visibility="public">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-remainingOffersCount-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ForkedToken-remainingOffersCount">
+ <body>The remaining number of outstanding offers for this token on outgoing edges of the fork node.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-baseTokenIsWithdrawn" name="baseTokenIsWithdrawn" visibility="public">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-baseTokenIsWithdrawn-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ForkedToken-baseTokenIsWithdrawn">
+ <body>Indicates whether withdraw() has been called on the base token.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-isControl" name="isControl" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ForkedToken-isControl.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-isControl-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Test if the base token is a control token.
+
+return this.baseToken.isControl();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-withdraw" name="withdraw" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ForkedToken-withdraw.1">
+ <language>Java</language>
+ <body>// If the base token is not withdrawn, then withdraw it.
+// Decrement the remaining offers count.
+// When the remaining number of offers is zero, then remove this token from its holder.
+
+if (!this.baseTokenIsWithdrawn &amp; !this.baseToken.isWithdrawn()) {
+ this.baseToken.withdraw();
+
+ // NOTE: This keeps a base token that is a forked token from being
+ // withdrawn more than once, since withdrawing a forked token may
+ // not actually remove it from its fork node holder.
+ this.baseTokenIsWithdrawn = true;
+}
+
+if (this.remainingOffersCount > 0) {
+ this.remainingOffersCount = this.remainingOffersCount - 1;
+}
+
+if (this.remainingOffersCount == 0) {
+ super.withdraw();
+}</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-copy" name="copy" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ForkedToken-copy.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ <language>Java</language>
+ <body>// Return a copy of the base token.
+
+return this.baseToken.copy();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-equals" name="equals" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ForkedToken-equals.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-equals-otherToken" name="otherToken" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ <language>Java</language>
+ <body>// Test if this token is equal to another token.
+
+return this == otherToken;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-getValue" name="getValue" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ForkedToken-getValue.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-getValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-getValue-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the value of the base token.
+
+return this.baseToken.getValue();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-isControl.1" name="isControl" visibility="public" method="Semantics-Activities-IntermediateActivities-ForkedToken-isControl">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-isControl.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-withdraw.1" name="withdraw" visibility="public" method="Semantics-Activities-IntermediateActivities-ForkedToken-withdraw"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-copy.1" name="copy" visibility="public" method="Semantics-Activities-IntermediateActivities-ForkedToken-copy">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-equals.1" name="equals" visibility="public" method="Semantics-Activities-IntermediateActivities-ForkedToken-equals">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-equals.1-otherToken" name="otherToken" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-getValue.1" name="getValue" visibility="public" method="Semantics-Activities-IntermediateActivities-ForkedToken-getValue">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-getValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ForkedToken-getValue.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation" name="ForkNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ForkNodeActivation">
+ <body>A fork node activation is a control node activation for a node that is a fork node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ControlNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Create forked tokens for all incoming tokens and offer them on all outgoing edges.
+
+if (this.node == null) {
+ Debug.println(&quot;[fire] Anonymous fork node.&quot;);
+} else {
+ Debug.println(&quot;[fire] Fork node &quot; + this.node.name + &quot;...&quot;);
+}
+
+ActivityEdgeInstanceList outgoingEdges = this.outgoingEdges;
+int outgoingEdgeCount = outgoingEdges.size();
+
+TokenList forkedTokens = new TokenList();
+for (int i = 0; i &lt; incomingTokens.size(); i++) {
+ Token token = incomingTokens.getValue(i);
+ ForkedToken forkedToken = new ForkedToken();
+ forkedToken.baseToken = token;
+ forkedToken.remainingOffersCount = outgoingEdgeCount;
+ forkedToken.baseTokenIsWithdrawn = false;
+ forkedTokens.addValue(forkedToken);
+}
+
+this.addTokens(forkedTokens);
+
+this.sendOffers(forkedTokens);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ForkNodeActivation-terminate.1">
+ <language>Java</language>
+ <body>// Remove any offered tokens and terminate.
+
+this.clearTokens();
+super.terminate();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ForkNodeActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Activities-IntermediateActivities-ForkNodeActivation-terminate"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation" name="InitialNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-InitialNodeActivation">
+ <body>An initial node activation is a control node activation for a node that is an initial node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ControlNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Create a single token and send offers for it.
+
+TokenList tokens = new TokenList();
+tokens.addValue(new ControlToken());
+this.addTokens(tokens);
+
+this.sendOffers(tokens);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-InitialNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation" name="DecisionNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-_ownedComment.0">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ControlNodeActivation"/>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-decisionInputExecution" name="decisionInputExecution" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" aggregation="composite" association="Semantics-Activities-IntermediateActivities-A_decisionInputExecution_decisionNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-decisionInputExecution-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-decisionInputExecution">
+ <body>The current execution of the decision input behavior (if any).</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-decisionInputExecution-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the decision values and test them on each guard.
+// Forward the offer over the edges for which the test succeeds.
+
+Debug.println(&quot;[fire] Decision node &quot; + this.node.name + &quot;...&quot;);
+
+//TokenList incomingTokens = this.takeOfferedTokens();
+TokenList removedControlTokens = this.removeJoinedControlTokens(incomingTokens);
+ValueList decisionValues = this.getDecisionValues(incomingTokens);
+
+ActivityEdgeInstanceList outgoingEdges = this.outgoingEdges;
+for (int i = 0; i &lt; outgoingEdges.size(); i++) {
+ ActivityEdgeInstance edgeInstance = outgoingEdges.getValue(i);
+ ValueSpecification guard = edgeInstance.edge.guard;
+
+ TokenList offeredTokens = new TokenList();
+ for (int j = 0; j &lt; incomingTokens.size(); j++) {
+ Token incomingToken = incomingTokens.getValue(j);
+ Value decisionValue = decisionValues.getValue(j);
+ if (this.test(guard, decisionValue)) {
+ offeredTokens.addValue(incomingToken);
+ }
+ }
+
+ if (offeredTokens.size() > 0) {
+ for (int j = 0; j &lt; removedControlTokens.size(); j++) {
+ Token removedControlToken = removedControlTokens.getValue(j);
+ offeredTokens.addValue(removedControlToken);
+ }
+ edgeInstance.sendOffer(offeredTokens);
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues" name="getDecisionValues" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If there is neither a decision input flow nor a decision input behavior, then return the set of values from the incoming tokens.
+// [In this case, the single incoming edge must be an object flow.]
+// If there is a decision input flow, but no decision input behavior, then return a list of the decision input values equal in size to the number of incoming tokens.
+// If there is both a decision input flow and a decision input behavior, then execute the decision input behavior once for each incoming token and return the set of resulting values.
+// If the primary incoming edge is an object flow, then the value on each object token is passed to the decision input behavior, along with the decision input flow value, if any.
+// If the primary incoming edge is a control flow, then the decision input behavior only receives the decision input flow, if any.
+
+
+Value decisionInputValue = this.getDecisionInputFlowValue();
+
+ValueList decisionValues = new ValueList();
+for (int i = 0; i &lt; incomingTokens.size(); i++) {
+ Token incomingToken = incomingTokens.getValue(i);
+ Value value = this.executeDecisionInputBehavior(incomingToken.getValue(), decisionInputValue);
+ decisionValues.addValue(value);
+}
+
+// Debug.println(&quot;[getDecisionValues] &quot; + decisionValues.size() + &quot; decision value(s):&quot;);
+for (int i = 0; i &lt; decisionValues.size(); i++) {
+ Value decisionValue = decisionValues.getValue(i);
+ Debug.println(&quot;[getDecisionValues] decisionValues[&quot; + i + &quot;] = &quot; + decisionValue);
+}
+
+return decisionValues;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior" name="executeDecisionInputBehavior" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior-inputValue" name="inputValue" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior-inputValue-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior-decisionInputValue" name="decisionInputValue" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior-decisionInputValue-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Create the decision input execution from the decision input behavior.
+// If the behavior has input parameter(s), set the input parameter(s) of the execution to the given value(s).
+// Execute the decision input execution and then remove it.
+// Return the value of the output parameter of the execution.
+// If there is no decision input behavior, the decision input value is returned, if one is given, otherwise the input value is used as the decision value.
+
+Debug.println(&quot;[executeDecisionBehavior] inputValue = &quot; + inputValue);
+
+Behavior decisionInputBehavior = ((DecisionNode)(this.node)).decisionInput;
+
+Value decisionInputResult = null;
+
+if (decisionInputBehavior == null) {
+
+ if (decisionInputValue != null) {
+ decisionInputResult = decisionInputValue;
+ } else {
+ decisionInputResult = inputValue;
+ }
+
+} else {
+
+ this.decisionInputExecution = this.getExecutionLocus().factory.createExecution(decisionInputBehavior, this.getExecutionContext());
+
+ int i = 1;
+ int j = 0;
+ while ((j == 0 | (j == 1 &amp; decisionInputValue != null)) &amp; i &lt;= decisionInputBehavior.ownedParameter.size()) {
+ Parameter parameter = decisionInputBehavior.ownedParameter.getValue(i-1);
+ if (parameter.direction.equals(ParameterDirectionKind.in) |
+ parameter.direction.equals(ParameterDirectionKind.inout)) {
+ ParameterValue inputParameterValue = new ParameterValue();
+ inputParameterValue.parameter = parameter;
+
+ j = j +1;
+ if (j == 1 &amp;&amp; inputValue != null) {
+ inputParameterValue.values.addValue(inputValue);
+ } else {
+ inputParameterValue.values.addValue(decisionInputValue);
+ }
+
+ this.decisionInputExecution.setParameterValue(inputParameterValue);
+
+ }
+ i = i + 1;
+ }
+
+ this.decisionInputExecution.execute();
+
+ ParameterValueList outputParameterValues = this.decisionInputExecution.getOutputParameterValues();
+ decisionInputExecution.destroy();
+
+ decisionInputResult = outputParameterValues.getValue(0).values.getValue(0);
+
+}
+
+return decisionInputResult;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-terminate.1">
+ <language>Java</language>
+ <body>// Terminate the decision input execution, if any, and then terminate this activation.
+
+if (this.decisionInputExecution != null) {
+ this.decisionInputExecution.terminate();
+}
+
+super.terminate();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-isReady-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check that all incoming edges have sources that are offering tokens.
+// [This should be at most two incoming edges, if there is a decision input flow.]
+
+int i = 1;
+boolean ready = true;
+while (ready &amp; i &lt;= this.incomingEdges.size()) {
+ ready = this.incomingEdges.getValue(i-1).hasOffer();
+ i = i + 1;
+}
+
+return ready;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens" name="takeOfferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get tokens from the incoming edge that is not the decision input flow.
+
+ObjectFlow decisionInputFlow = ((DecisionNode)(this.node)).decisionInputFlow;
+
+TokenList allTokens = new TokenList();
+ActivityEdgeInstanceList incomingEdges = this.incomingEdges;
+for (int i = 0; i &lt; incomingEdges.size(); i++) {
+ ActivityEdgeInstance edgeInstance = incomingEdges.getValue(i);
+ if (edgeInstance.edge != decisionInputFlow) {
+ TokenList tokens = edgeInstance.takeOfferedTokens();
+ for (int j = 0; j &lt; tokens.size(); j++) {
+ allTokens.addValue(tokens.getValue(j));
+ }
+ }
+}
+
+return allTokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue" name="getDecisionInputFlowValue" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take the next token available on the decision input flow, if any, and return its value.
+
+ActivityEdgeInstance decisionInputFlowInstance = this.getDecisionInputFlowInstance();
+
+Value value = null;
+if (decisionInputFlowInstance != null) {
+ TokenList tokens = decisionInputFlowInstance.takeOfferedTokens();
+ if (tokens.size() > 0) {
+ value = tokens.getValue(0).getValue();
+ }
+}
+
+return value;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance" name="getDecisionInputFlowInstance" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the activity edge instance for the decision input flow, if any.
+
+ActivityEdge decisionInputFlow = ((DecisionNode)(this.node)).decisionInputFlow;
+
+ActivityEdgeInstance edgeInstance = null;
+if (decisionInputFlow != null) {
+ int i = 1;
+ while (edgeInstance == null &amp; i &lt;=this.incomingEdges.size()) {
+ ActivityEdgeInstance incomingEdge = this.incomingEdges.getValue(i-1);
+ if (incomingEdge.edge == decisionInputFlow) {
+ edgeInstance = incomingEdge;
+ }
+ i = i + 1;
+ }
+}
+
+return edgeInstance;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test" name="test" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test-guard" name="guard" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if the given value matches the guard. If there is no guard, return true.
+
+boolean guardResult = true;
+if (guard != null) {
+ Value guardValue = this.getExecutionLocus().executor.evaluate(guard);
+ guardResult = guardValue.equals(value);
+}
+
+return guardResult;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens" name="removeJoinedControlTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If the primary incoming edge is an object flow, then remove any control tokens from the incoming tokens and return them.
+// [Control tokens may effectively be offered on an object flow outgoing from a join node that has both control and object flows incoming.]
+
+TokenList removedControlTokens = new TokenList();
+
+if (this.hasObjectFlowInput()) {
+ int i = 1;
+ while (i &lt;= incomingTokens.size()) {
+ Token token = incomingTokens.getValue(i-1);
+ if (token.isControl()) {
+ removedControlTokens.addValue(token);
+ incomingTokens.removeValue(i-1);
+ i = i - 1;
+ }
+ i = i + 1;
+ }
+}
+
+return removedControlTokens;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-hasObjectFlowInput" name="hasObjectFlowInput" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-hasObjectFlowInput.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-hasObjectFlowInput-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check that the primary incoming edge is an object flow.
+
+ActivityEdge decisionInputFlow = ((DecisionNode)(this.node)).decisionInputFlow;
+
+boolean isObjectFlow = false;
+int i = 1;
+while (!isObjectFlow &amp; i &lt;= this.incomingEdges.size()) {
+ ActivityEdge edge = this.incomingEdges.getValue(i-1).edge;
+ isObjectFlow = edge != decisionInputFlow &amp; edge instanceof ObjectFlow;
+ i = i + 1;
+}
+
+return isObjectFlow;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1" name="getDecisionValues" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionValues.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior.1" name="executeDecisionInputBehavior" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior.1-inputValue" name="inputValue" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior.1-inputValue-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior.1-decisionInputValue" name="decisionInputValue" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-executeDecisionInputBehavior.1-decisionInputValue-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-terminate"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-isReady.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens.1" name="takeOfferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-takeOfferedTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue.1" name="getDecisionInputFlowValue" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowValue.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance.1" name="getDecisionInputFlowInstance" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-getDecisionInputFlowInstance.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test.1" name="test" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test.1-guard" name="guard" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-test.1-value" name="value" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1" name="removeJoinedControlTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-removeJoinedControlTokens.1-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-hasObjectFlowInput.1" name="hasObjectFlowInput" visibility="public" method="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-hasObjectFlowInput">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-DecisionNodeActivation-hasObjectFlowInput.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ControlToken" name="ControlToken">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ControlToken">
+ <body>A control token represents the passing of control along a control flow edge.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-_generalization.0" general="Semantics-Activities-IntermediateActivities-Token"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-equals" name="equals" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ControlToken-equals.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-equals-other" name="other" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ <language>Java</language>
+ <body>// Return true if the other token is a control token, because control tokens are interchangable.
+
+return other instanceof ControlToken;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-copy" name="copy" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ControlToken-copy.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ <language>Java</language>
+ <body>// Return a new control token.
+
+return new ControlToken();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-isControl" name="isControl" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ControlToken-isControl.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-isControl-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return true for a control token.
+
+return true;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-getValue" name="getValue" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ControlToken-getValue.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-getValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-getValue-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Control tokens do not have values.
+
+return null;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-equals.1" name="equals" visibility="public" method="Semantics-Activities-IntermediateActivities-ControlToken-equals">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-equals.1-other" name="other" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-copy.1" name="copy" visibility="public" method="Semantics-Activities-IntermediateActivities-ControlToken-copy">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-isControl.1" name="isControl" visibility="public" method="Semantics-Activities-IntermediateActivities-ControlToken-isControl">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-isControl.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-getValue.1" name="getValue" visibility="public" method="Semantics-Activities-IntermediateActivities-ControlToken-getValue">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-getValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ControlToken-getValue.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation" name="ControlNodeActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ControlNodeActivation">
+ <body>A control node activation is an activity node activation for a node that is a control node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// By default, offer all tokens on all outgoing edges.
+
+if (this.node != null) {
+ Debug.println(&quot;[fire] Control node &quot; + this.node.name + &quot;...&quot;);
+}
+
+this.sendOffers(incomingTokens);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ControlNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" name="ActivityEdgeInstance">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance">
+ <body>An activity edge instance is a connection between activity node activations corresponding to an edge between the corresponding nodes of those activations</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-edge" name="edge" visibility="public" association="Semantics-Activities-IntermediateActivities-A_edge_activityEdgeInstance">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-edge-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-edge">
+ <body>The activity edge of which this is an instance.&#xD;
+[This is optional to allow for an implicit fork node execution to be connected to its action execution by an edge instance which does not have a corresponding node in the model.]</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityEdge"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-edge-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-group" name="group" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup" association="Semantics-Activities-IntermediateActivities-A_edgeInstances_group">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-group-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-group">
+ <body>The activity group that contains this activity edge instance. </body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-source" name="source" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" association="Semantics-Activities-IntermediateActivities-A_source_outgoingEdges">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-source-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-source">
+ <body>The source of this activity edge instance.&#xD;
+The node of the source must be the same as the source of the edge of this edge instance.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-target" name="target" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" association="Semantics-Activities-IntermediateActivities-A_incomingEdges_target">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-target-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-target">
+ <body>The target of this activity edge instance.&#xD;
+The node of the target must be the same as the target of the edge of this edge instance.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-offers" name="offers" visibility="public" type="Semantics-Activities-IntermediateActivities-Offer" association="Semantics-Activities-IntermediateActivities-A_offers_activityEdgeInstance">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-offers-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-offers-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer" name="sendOffer" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Send an offer from the source to the target.
+// Keep the offered tokens until taken by the target.
+// (Note that any one edge should only be handling either all object tokens or all control tokens.)
+
+Offer offer = new Offer();
+
+for (int i = 0; i &lt; tokens.size(); i++) {
+ Token token = tokens.getValue(i);
+ // Debug.println(&quot;[sendOffer] token value = &quot; + token.getValue());
+ offer.offeredTokens.addValue(token);
+}
+
+this.offers.addValue(offer);
+
+this.target.receiveOffer();
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-countOfferedValues" name="countOfferedValues" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-countOfferedValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-countOfferedValues-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the number of values being offered in object tokens.
+
+int count = 0;
+OfferList offers = this.offers;
+for (int i = 0; i &lt; offers.size(); i++) {
+ count = count + offers.getValue(i).countOfferedValues();
+}
+
+return count;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens" name="takeOfferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take all the offered tokens and return them.
+
+TokenList tokens = new TokenList();
+
+while (this.offers.size() > 0) {
+ TokenList offeredTokens = this.offers.getValue(0).getOfferedTokens();
+ for (int i = 0; i &lt; offeredTokens.size(); i++) {
+ tokens.addValue(offeredTokens.getValue(i));
+ }
+ this.offers.removeValue(0);
+}
+
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens1" name="takeOfferedTokens1" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.2">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens1-maxCount" name="maxCount" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take all the offered tokens, up to the given maximum count of non-null object tokens, and return them.
+
+TokenList tokens = new TokenList();
+int remainingCount = maxCount;
+
+while (this.offers.size() > 0 &amp; remainingCount > 0) {
+ Offer offer = this.offers.getValue(0);
+ TokenList offeredTokens = offer.getOfferedTokens();
+ int count = offer.countOfferedValues();
+ if (count &lt;= remainingCount) {
+ for (int i = 0; i &lt; offeredTokens.size(); i++) {
+ tokens.addValue(offeredTokens.getValue(i));
+ }
+ remainingCount = remainingCount - count;
+ this.offers.removeValue(0);
+ } else {
+ for (int i = 0; i &lt; remainingCount; i++) {
+ Token token = offeredTokens.getValue(i);
+ if (token.getValue() != null) {
+ tokens.addValue(token);
+ }
+ }
+ offer.removeOfferedValues(remainingCount);
+ remainingCount = 0;
+ }
+}
+
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens" name="getOfferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the offered tokens (after which the tokens will still be offered).
+
+TokenList tokens = new TokenList();
+OfferList offers = this.offers;
+
+for (int i = 0; i &lt; offers.size(); i++) {
+ TokenList offeredTokens = offers.getValue(i).getOfferedTokens();
+ for (int j = 0; j &lt; offeredTokens.size(); j++) {
+ tokens.addValue(offeredTokens.getValue(j));
+ }
+}
+
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-hasOffer" name="hasOffer" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-hasOffer.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-hasOffer-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return true if there are any pending offers.
+
+boolean hasTokens = false;
+int i = 1;
+while (!hasTokens &amp; i &lt;= this.offers.size()) {
+ hasTokens = this.offers.getValue(i-1).hasTokens();
+ i = i + 1;
+}
+
+return hasTokens;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer.1" name="sendOffer" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer.1-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer.1-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-sendOffer.1-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-countOfferedValues.1" name="countOfferedValues" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-countOfferedValues">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-countOfferedValues.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.1" name="takeOfferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.2" name="takeOfferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.2-maxCount" name="maxCount" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.2-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.2-Parameter1-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-takeOfferedTokens.2-Parameter1-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens.1" name="getOfferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-getOfferedTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-hasOffer.1" name="hasOffer" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-hasOffer">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-hasOffer.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution" name="ActivityExecution">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityExecution">
+ <body>An activity execution is used to execute a specific activity. The type of the activity execution must be an activity.&#xD;
+When executed, the activity execution creates activity edge instances for all activity edges, activity node activations for all activity nodes and makes offers to all nodes with no incoming edges.&#xD;
+Execution terminates when either all node activations are complete, or an activity final node is executed.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-_generalization.0" general="Semantics-CommonBehaviors-BasicBehaviors-Execution"/>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-activationGroup" name="activationGroup" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup" aggregation="composite" association="Semantics-Activities-IntermediateActivities-A_activationGroup_activityExecution">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-activationGroup-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityExecution-activationGroup">
+ <body>The group of activations of the activity nodes of the activity.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-execute" name="execute" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityExecution-execute.1">
+ <language>Java</language>
+ <body>// Execute the activity for this execution by creating an activity node activation group and activating all the activity nodes in the activity.
+// When this is complete, copy the values on the tokens offered by output parameter nodes to the corresponding output parameters.
+
+Activity activity = (Activity)(this.getTypes().getValue(0));
+
+Debug.println(&quot;[execute] Activity &quot; + activity.name + &quot;...&quot;);
+// Debug.println(&quot;[execute] context = &quot; + this.context.objectId());
+Debug.println(&quot;[event] Execute activity=&quot; + activity.name);
+
+this.activationGroup = new ActivityNodeActivationGroup();
+this.activationGroup.activityExecution = this;
+this.activationGroup.activate(activity.node, activity.edge);
+
+// Debug.println(&quot;[execute] Getting output parameter node activations...&quot;);
+
+ActivityParameterNodeActivationList outputActivations = this.activationGroup.getOutputParameterNodeActivations();
+
+// Debug.println(&quot;[execute] There are &quot; + outputActivations.size() + &quot; output parameter node activations.&quot;);
+
+for (int i = 0; i &lt; outputActivations.size(); i++) {
+ ActivityParameterNodeActivation outputActivation = outputActivations.getValue(i);
+
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = ((ActivityParameterNode)(outputActivation.node)).parameter;
+
+ TokenList tokens = outputActivation.getTokens();
+ for (int j = 0; j &lt; tokens.size(); j++) {
+ Token token = tokens.getValue(j);
+ Value value = ((ObjectToken)token).value;
+ if (value != null) {
+ parameterValue.values.addValue(value);
+ Debug.println(&quot;[event] Output activity=&quot;+ activity.name + &quot; parameter=&quot; + parameterValue.parameter.name + &quot; value=&quot; + value);
+ }
+ }
+
+ this.setParameterValue(parameterValue);
+}
+
+Debug.println(&quot;[execute] Activity &quot; + activity.name + &quot; completed.&quot;);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-copy" name="copy" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityExecution-copy.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new activity execution that is a copy of this execution.
+// [Note: This currently just returns a non-executing execution for the same activity as this execution.]
+
+return super.copy();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-new_" name="new_" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityExecution-new_.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new activity execution with empty properties.
+
+return new ActivityExecution();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-terminate" name="terminate" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityExecution-terminate.1">
+ <language>Java</language>
+ <body>// Terminate all node activations (which will ultimately result in the activity execution completing).
+
+this.activationGroup.terminateAll();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-execute.1" name="execute" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityExecution-execute"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-copy.1" name="copy" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityExecution-copy">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-new_.1" name="new_" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityExecution-new_">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityExecution-terminate.1" name="terminate" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityExecution-terminate"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation" name="ActivityFinalNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation">
+ <body>An activity final node activation is a control node activation for a node that is an activity final node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ControlNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Terminate the activity execution or structured node activation
+// containing this activation.
+
+Debug.println(&quot;[fire] Activity final node &quot; + this.node.name + &quot;...&quot;);
+
+if (incomingTokens.size() > 0 | this.incomingEdges.size() == 0) {
+ if (this.group.activityExecution != null) {
+ this.group.activityExecution.terminate();
+ } else if (this.group.containingNodeActivation != null) {
+ this.group.containingNodeActivation.terminateAll();
+ } else if (this.group instanceof ExpansionActivationGroup){
+ ((ExpansionActivationGroup)this.group).regionActivation.terminate();
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityFinalNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" name="ActivityNodeActivation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivation">
+ <body>An activity node activation is used to define the behavior of an activity node in the context of a containing activity or structured activity node.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-_ownedComment.1">
+ <body>import java.util.Iterator;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-_generalization.0" general="Semantics-Loci-LociL1-SemanticVisitor"/>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-group" name="group" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup" association="Semantics-Activities-IntermediateActivities-A_nodeActivations_group">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-group-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-group">
+ <body>The group that contains this activity node activation.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-node" name="node" visibility="public" association="Semantics-Activities-IntermediateActivities-A_node_activityNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-node-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-node">
+ <body>The activity node being activated by this activity node activation. The node must be owned by the activity (type) of the activity execution of this node activation.&#xD;
+[This is optional, to allow for fork node edge queues and implicit fork and join node activations for actions to not have nodes in the model.]</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-node-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-incomingEdges" name="incomingEdges" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" association="Semantics-Activities-IntermediateActivities-A_incomingEdges_target">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-incomingEdges-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-incomingEdges">
+ <body>The set of activity edge instances for the incoming edges of the node.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-incomingEdges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-incomingEdges-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-outgoingEdges" name="outgoingEdges" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" association="Semantics-Activities-IntermediateActivities-A_source_outgoingEdges">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-outgoingEdges-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-outgoingEdges">
+ <body>The set of activity edge instances for the outgoing edges of the node.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-outgoingEdges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-outgoingEdges-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-running" name="running" visibility="public">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-running-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-running">
+ <body>If true, this node activation is enabled for execution once all its other prerequesites are satisfied.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-heldTokens" name="heldTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" aggregation="composite" association="Semantics-Activities-IntermediateActivities-A_heldTokens_holder">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-heldTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-heldTokens-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-run" name="run" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-run.1">
+ <language>Java</language>
+ <body>// Run the activation of this node.
+
+if (this.node != null) {
+ Debug.println(&quot;[run] node = &quot; + this.node.name);
+} else {
+ Debug.println(&quot;[run] Anonymous activation of type &quot; + this.getClass().getName());
+}
+
+this.running = true;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-receiveOffer" name="receiveOffer" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-receiveOffer.1">
+ <language>Java</language>
+ <body>// Receive an offer from an incoming edge.
+// Check if all prerequisites have been satisfied. If so, fire.
+
+if (this.node != null) {
+ Debug.println(&quot;[receiveOffer] node = &quot; + this.node.name);
+}
+
+_beginIsolation();
+
+ boolean ready = this.isReady();
+
+ TokenList tokens = new TokenList();
+ if (ready) {
+ Debug.println(&quot;[receiveOffer] Firing.&quot;);
+ tokens = this.takeOfferedTokens();
+ }
+
+_endIsolation();
+
+if (ready) {
+ this.fire(tokens);
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens" name="takeOfferedTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get tokens from all incoming edges.
+
+TokenList allTokens = new TokenList();
+ActivityEdgeInstanceList incomingEdges = this.incomingEdges;
+for (int i = 0; i &lt; incomingEdges.size(); i++) {
+ ActivityEdgeInstance incomingEdge = incomingEdges.getValue(i);
+ TokenList tokens = incomingEdge.takeOfferedTokens();
+ for (int j = 0; j &lt; tokens.size(); j ++) {
+ Token token = tokens.getValue(j);
+ allTokens.addValue(token);
+ }
+}
+
+return allTokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers" name="sendOffers" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Send offers for the given set of tokens over all outgoing edges (if there are any tokens actually being offered).
+
+if (tokens.size()>0) {
+
+ // *** Send all outgoing offers concurrently. ***
+ ActivityEdgeInstanceList outgoingEdges = this.outgoingEdges;
+ for (Iterator i = outgoingEdges.iterator(); i.hasNext();) {
+ ActivityEdgeInstance outgoingEdge = (ActivityEdgeInstance)i.next();
+ // Debug.println(&quot;[sendOffers] Sending offer to &quot; + outgoingEdge.target.node.name + &quot;.&quot;);
+ outgoingEdge.sendOffer(tokens);
+ }
+
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-terminate.1">
+ <language>Java</language>
+ <body>// Terminate the activation of this node.
+
+if (this.running) {
+ if (this.node != null) {
+ Debug.println(&quot;[terminate] node = &quot; + this.node.name);
+ } else {
+ Debug.println(&quot;[terminate] Anonymous activation of type &quot; + this.getClass().getName());
+ }
+}
+
+this.running = false;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isReady-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check if all the prerequisites for this node have been satisfied.
+// By default, check that this node is running.
+
+return this.isRunning();
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isRunning" name="isRunning" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isRunning.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isRunning-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Test whether this node activation is running.
+
+return this.running;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addOutgoingEdge" name="addOutgoingEdge" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addOutgoingEdge.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addOutgoingEdge-edge" name="edge" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <language>Java</language>
+ <body>// Add an activity edge instance as an outgoing edge of this activity node activation.
+
+edge.source = this;
+this.outgoingEdges.addValue(edge);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addIncomingEdge" name="addIncomingEdge" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addIncomingEdge.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addIncomingEdge-edge" name="edge" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <language>Java</language>
+ <body>// Add an activity edge instance as an incoming edge of this activity node activation.
+
+edge.target = this;
+this.incomingEdges.addValue(edge);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createNodeActivations" name="createNodeActivations" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createNodeActivations.1">
+ <language>Java</language>
+ <body>// Create node activations for any subnodes of the node for this activation.
+// For most kinds of nodes, this does nothing.
+
+return;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createEdgeInstances" name="createEdgeInstances" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createEdgeInstances.1">
+ <language>Java</language>
+ <body>// Create edge instances for any edge instances owned by the node for this activation.
+// For most kinds of nodes, this does nothing.
+
+return;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor" name="isSourceFor" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor-edgeInstance" name="edgeInstance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <language>Java</language>
+ <body>// Check if this node activation is the effective source for the given edge instance.
+
+return edgeInstance.source == this;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getActivityExecution" name="getActivityExecution" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getActivityExecution.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getActivityExecution-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityExecution" direction="return"/>
+ <language>Java</language>
+ <body>// Return the activity execution that contains this activity node activation, directly or indirectly.
+
+return this.group.getActivityExecution();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionContext" name="getExecutionContext" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionContext.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionContext-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Object" direction="return"/>
+ <language>Java</language>
+ <body>// Get the context object for the containing activity execution.
+
+return this.getActivityExecution().context;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionLocus" name="getExecutionLocus" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionLocus.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionLocus-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-Locus" direction="return"/>
+ <language>Java</language>
+ <body>// Get the locus of the containing activity execution.
+
+return this.getActivityExecution().locus;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation" name="getNodeActivation" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the activity node activation corresponding to the given activity node, in the context of this activity node activation.
+// By default, return this activity node activation, if it is for the given node, otherwise return nothing.
+
+ActivityNodeActivation activation = null;
+if (node == this.node) {
+ activation = this;
+}
+
+return activation;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addToken" name="addToken" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addToken.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addToken-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ <language>Java</language>
+ <body>// Transfer the given token to be held by this node.
+
+if (this.node == null) {
+ Debug.println(&quot;[addToken] ...&quot;);
+} else {
+ Debug.println(&quot;[addToken] node = &quot; + this.node.name);
+}
+
+Token transferredToken = token.transfer(this);
+// Debug.println(&quot;[addToken] Adding token with value = &quot; + transferredToken.getValue());
+this.heldTokens.addValue(transferredToken);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken" name="removeToken" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ <language>Java</language>
+ <body>// Remove the given token, if it is held by this node activation.
+// Return the position (counting from 1) of the removed token (0 if there is none removed).
+
+boolean notFound = true;
+int i = 1;
+while (notFound &amp; i &lt;= this.heldTokens.size()) {
+ if (this.heldTokens.getValue(i-1) == token) {
+ if (this.node == null) {
+ Debug.println(&quot;[removeToken] ...&quot;);
+ } else {
+ Debug.println(&quot;[removeToken] node = &quot; + this.node.name);
+ }
+ this.heldTokens.remove(i-1);
+ notFound = false;
+ }
+ i = i + 1;
+}
+
+if (notFound) {
+ i = 0;
+} else {
+ i = i - 1;
+}
+
+return i ;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens" name="addTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Transfer the given tokens to be the held tokens for this node.
+
+// if (this.node == null) {
+// Debug.println(&quot;[addTokens] ...&quot;);
+// } else {
+// Debug.println(&quot;[addTokens] node = &quot; + this.node.name);
+// }
+
+for (int i = 0; i &lt; tokens.size(); i++) {
+ Token token = tokens.getValue(i);
+ this.addToken(token);
+}</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens" name="takeTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take the tokens held by this node activation.
+
+TokenList tokens = this.getTokens();
+this.clearTokens();
+
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-clearTokens" name="clearTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-clearTokens.1">
+ <language>Java</language>
+ <body>// Remove all held tokens.
+
+while (this.heldTokens.size() > 0) {
+ this.heldTokens.getValue(0).withdraw();
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens" name="getTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the tokens held by this node activation.
+
+// Debug.println(&quot;[getTokens] node = &quot; + this.node.name);
+
+TokenList tokens = new TokenList();
+TokenList heldTokens = this.heldTokens;
+for (int i = 0; i &lt; heldTokens.size(); i++) {
+ Token heldToken = heldTokens.getValue(i);
+ // Debug.println(&quot;[getTokens] token value = &quot; + heldTokens.getValue());
+ tokens.addValue(heldToken);
+}
+
+return tokens;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-suspend" name="suspend" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-suspend.1">
+ <language>Java</language>
+ <body>// Suspend this activation within the activation group that contains it.
+
+this.group.suspend(this);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-resume" name="resume" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-resume.1">
+ <language>Java</language>
+ <body>// Resume this activation within the activation group that contains it.
+
+this.group.resume(this);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-run.1" name="run" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-run"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-receiveOffer.1" name="receiveOffer" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-receiveOffer"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens.1" name="takeOfferedTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeOfferedTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-fire" name="fire" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-fire-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-fire">
+ <body>Carry out the main behavior of this activity node.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers.1" name="sendOffers" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers.1-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers.1-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-sendOffers.1-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-terminate"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isReady.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isRunning.1" name="isRunning" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isRunning">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isRunning.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addOutgoingEdge.1" name="addOutgoingEdge" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addOutgoingEdge">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addOutgoingEdge.1-edge" name="edge" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addIncomingEdge.1" name="addIncomingEdge" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addIncomingEdge">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addIncomingEdge.1-edge" name="edge" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createNodeActivations.1" name="createNodeActivations" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createNodeActivations"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createEdgeInstances.1" name="createEdgeInstances" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-createEdgeInstances"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor.1" name="isSourceFor" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-isSourceFor.1-edgeInstance" name="edgeInstance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getActivityExecution.1" name="getActivityExecution" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getActivityExecution">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getActivityExecution.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityExecution" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionContext.1" name="getExecutionContext" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionContext">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionContext.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Object" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionLocus.1" name="getExecutionLocus" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionLocus">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getExecutionLocus.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-Locus" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation.1" name="getNodeActivation" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getNodeActivation.1-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addToken.1" name="addToken" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addToken">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addToken.1-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken.1" name="removeToken" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-removeToken.1-token" name="token" visibility="public" type="Semantics-Activities-IntermediateActivities-Token"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens.1" name="addTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens.1-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens.1-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-addTokens.1-tokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens.1" name="takeTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-takeTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-clearTokens.1" name="clearTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-clearTokens"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens.1" name="getTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-getTokens.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-suspend.1" name="suspend" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-suspend"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-resume.1" name="resume" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-resume"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup" name="ActivityNodeActivationGroup">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup">
+ <body>An activity node group is a group of nodes that are activated together, either directly in the context of an activity execution, or in the context of </body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-_ownedComment.1">
+ <body>import java.util.Iterator;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-edgeInstances" name="edgeInstances" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" aggregation="composite" association="Semantics-Activities-IntermediateActivities-A_edgeInstances_group">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-edgeInstances-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-edgeInstances">
+ <body>The set of activity edge instances for this group. &#xD;
+</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-edgeInstances-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-edgeInstances-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-nodeActivations" name="nodeActivations" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" aggregation="composite" association="Semantics-Activities-IntermediateActivities-A_nodeActivations_group">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-nodeActivations-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-nodeActivations">
+ <body>The set of activity node executions for this group. &#xD;
+</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-nodeActivations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-nodeActivations-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activityExecution" name="activityExecution" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityExecution" association="Semantics-Activities-IntermediateActivities-A_activationGroup_activityExecution">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activityExecution-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activityExecution">
+ <body>The activity execution to which this group belongs.&#xD;
+(This will be empty if the group is for a structured activity node activation.)</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activityExecution-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-containingNodeActivation" name="containingNodeActivation" visibility="public" type="Semantics-Activities-CompleteStructuredActivities-StructuredActivityNodeActivation" association="Semantics-Activities-CompleteStructuredActivities-A_activationGroup_containingNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-containingNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-containingNodeActivation">
+ <body>The structured activity node activation to which this group belongs.&#xD;
+(This will be empty if the group is for an activity execution.)</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-containingNodeActivation-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspendedActivations" name="suspendedActivations" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" association="Semantics-Activities-IntermediateActivities-_packagedElement.32">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspendedActivations-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspendedActivations">
+ <body>Activity node activations in this activation group that are suspended waiting for an event occurrence. If an activation group has a containing node activation and any suspended activations, then the containing node activation will also be suspended.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspendedActivations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspendedActivations-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run" name="run" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run-activations" name="activations" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run-activations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run-activations-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Run the given node activations and then (concurrently) send an offer to all activations for nodes with no incoming edges within the given set.
+
+for (int i = 0; i &lt; activations.size(); i++) {
+ ActivityNodeActivation activation = activations.getValue(i);
+ activation.run();
+}
+
+Debug.println(&quot;[run] Checking for enabled nodes...&quot;);
+
+ActivityNodeActivationList enabledActivations = new ActivityNodeActivationList();
+
+for (int i = 0; i &lt; activations.size(); i++) {
+ ActivityNodeActivation activation = activations.getValue(i);
+
+ Debug.println(&quot;[run] Checking node &quot; + activation.node.name + &quot;...&quot;);
+
+ if (activation instanceof ActionActivation |
+ activation instanceof ControlNodeActivation |
+ activation instanceof ActivityParameterNodeActivation) {
+
+ boolean isEnabled = this.checkIncomingEdges(activation.incomingEdges, activations);
+
+ // For an action activation, also consider incoming edges to input pins
+ if (isEnabled &amp; activation instanceof ActionActivation) {
+ InputPinList inputPins = ((Action)activation.node).input;
+ int j = 1;
+ while (j &lt;= inputPins.size() &amp; isEnabled) {
+ InputPin inputPin = inputPins.getValue(j-1);
+ ActivityEdgeInstanceList inputEdges = ((ActionActivation)activation).getPinActivation(inputPin).incomingEdges;
+ isEnabled = this.checkIncomingEdges(inputEdges, activations);
+ j = j + 1;
+ }
+ }
+
+ if (isEnabled) {
+ Debug.println(&quot;[run] Node &quot; + activation.node.name + &quot; is enabled.&quot;);
+ enabledActivations.addValue(activation);
+ }
+ }
+}
+
+// Debug.println(&quot;[run] &quot; + enabledActivations.size() + &quot; node(s) are enabled.&quot;);
+
+// *** Send offers to all enabled nodes concurrently. ***
+for (Iterator i = enabledActivations.iterator(); i.hasNext();) {
+ ActivityNodeActivation activation = (ActivityNodeActivation)i.next();
+ Debug.println(&quot;[run] Sending offer to node &quot; + activation.node.name + &quot;.&quot;);
+ activation.receiveOffer();
+}</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges" name="checkIncomingEdges" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges-incomingEdges" name="incomingEdges" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges-incomingEdges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges-incomingEdges-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges-activations" name="activations" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges-activations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges-activations-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check if any incoming edges have a source in a given set of activations.
+
+int j = 1;
+boolean notFound = true;
+
+while (j &lt;= incomingEdges.size() &amp; notFound) {
+ int k = 1;
+ while (k &lt;= activations.size() &amp; notFound) {
+ if (activations.getValue(k-1).isSourceFor(incomingEdges.getValue(j-1))) {
+ notFound = false;
+ }
+ k = k + 1;
+ }
+ j = j + 1;
+}
+
+return notFound;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes" name="runNodes" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Run the node activations associated with the given nodes in this activation group.
+
+ActivityNodeActivationList nodeActivations = new ActivityNodeActivationList();
+
+for (int i = 0; i &lt; nodes.size(); i++) {
+ ActivityNode node = nodes.getValue(i);
+ ActivityNodeActivation nodeActivation = this.getNodeActivation(node);
+ if (nodeActivation != null) {
+ nodeActivations.addValue(nodeActivation);
+ }
+}
+
+this.run(nodeActivations);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate" name="activate" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate-edges" name="edges" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityEdge"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate-edges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate-edges-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Activate and run the given set of nodes with the given set of edges, within this activation group.
+
+this.createNodeActivations(nodes);
+this.createEdgeInstances(edges);
+this.run(this.nodeActivations);
+
+// Debug.println(&quot;[activate] Exiting.&quot;);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-terminateAll" name="terminateAll" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-terminateAll.1">
+ <language>Java</language>
+ <body>// Terminate all node activations in the group.
+
+Debug.println(&quot;[terminateAll] Terminating activation group for &quot; +
+ (this.activityExecution != null? &quot;activity &quot; + this.activityExecution.getTypes().getValue(0).name:
+ this.containingNodeActivation != null? &quot;node &quot; + this.containingNodeActivation.node.name:
+ &quot;expansion region&quot;) + &quot;.&quot;);
+
+ActivityNodeActivationList nodeActivations = this.nodeActivations;
+for (int i = 0; i &lt; nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations.getValue(i);
+ nodeActivation.terminate();
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations" name="createNodeActivations" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Add activity node activations for the given set of nodes to this group and create edge instances between them.
+
+for (int i = 0; i &lt; nodes.size(); i++) {
+ ActivityNode node = nodes.getValue(i);
+
+ Debug.println(&quot;[createNodeActivations] Creating a node activation for &quot; + node.name + &quot;...&quot;);
+ this.createNodeActivation(node);
+
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation" name="createNodeActivation" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return"/>
+ <language>Java</language>
+ <body>// Create an activity node activation for a given activity node in this activity node activation group.
+
+ActivityNodeActivation activation = (ActivityNodeActivation)(this.getActivityExecution().locus.factory.instantiateVisitor(node));
+activation.node = node;
+activation.running = false;
+
+this.addNodeActivation(activation);
+
+activation.createNodeActivations();
+
+return activation;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addNodeActivation" name="addNodeActivation" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addNodeActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addNodeActivation-activation" name="activation" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ <language>Java</language>
+ <body>// Add the given node activation to this group.
+
+activation.group = this;
+this.nodeActivations.addValue(activation);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation" name="getNodeActivation" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the node activation (if any) in this group,
+// or any nested group, corresponding to the given activity node.
+// If this is a group for a structured activity node activation,
+// also include the pin activations for that node activation.
+
+ActivityNodeActivation activation = null;
+
+if (this.containingNodeActivation != null &amp;&amp; node instanceof Pin) {
+ activation = this.containingNodeActivation.getPinActivation((Pin)node);
+}
+
+if (activation == null) {
+ int i = 1;
+ while (activation == null &amp; i &lt;= this.nodeActivations.size()) {
+ activation = this.nodeActivations.getValue(i-1).getNodeActivation(node);
+ i = i + 1;
+ }
+}
+
+return activation;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances" name="createEdgeInstances" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances-edges" name="edges" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityEdge"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances-edges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances-edges-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Create instance edges for the given activity edges, as well as for edge instances within any nodes activated in this group.
+
+for (int i = 0; i &lt; edges.size(); i++) {
+ ActivityEdge edge = edges.getValue(i);
+
+ Debug.println(&quot;[createEdgeInstances] Creating an edge instance from &quot; + edge.source.name + &quot; to &quot; + edge.target.name + &quot;.&quot;);
+
+ ActivityEdgeInstance edgeInstance = new ActivityEdgeInstance();
+ edgeInstance.edge = edge;
+
+ this.addEdgeInstance(edgeInstance);
+ this.getNodeActivation(edge.source).addOutgoingEdge(edgeInstance);
+ this.getNodeActivation(edge.target).addIncomingEdge(edgeInstance);
+
+ // Debug.println(&quot;[createEdgeInstances] Edge instance created...&quot;);
+}
+
+ActivityNodeActivationList nodeActivations = this.nodeActivations;
+for (int i = 0; i &lt; nodeActivations.size(); i++) {
+ ActivityNodeActivation nodeActivation = nodeActivations.getValue(i);
+ nodeActivation.createEdgeInstances();
+}
+
+// Debug.println(&quot;[createEdgeInstances] Done creating edge instances.&quot;);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addEdgeInstance" name="addEdgeInstance" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addEdgeInstance.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addEdgeInstance-instance" name="instance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <language>Java</language>
+ <body>// Add the given edge instance to this group.
+
+instance.group = this;
+this.edgeInstances.addValue(instance);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getActivityExecution" name="getActivityExecution" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getActivityExecution.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getActivityExecution-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityExecution" direction="return"/>
+ <language>Java</language>
+ <body>// Return the activity execution to which this group belongs, directly or indirectly.
+
+ActivityExecution activityExecution = this.activityExecution;
+if (activityExecution == null) {
+ activityExecution = this.containingNodeActivation.group.getActivityExecution();
+}
+
+// Debug.println(&quot;[getActivityExecution] activityExecution = &quot; + activityExecution);
+
+return activityExecution;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations" name="getOutputParameterNodeActivations" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the set of all activations in this group of activity parameter nodes for output (inout, out and return) parameters.
+
+ActivityParameterNodeActivationList parameterNodeActivations = new ActivityParameterNodeActivationList();
+ActivityNodeActivationList nodeActivations = this.nodeActivations;
+for (int i = 0; i &lt; nodeActivations.size(); i++) {
+ ActivityNodeActivation activation = nodeActivations.getValue(i);
+ if (activation instanceof ActivityParameterNodeActivation) {
+ ParameterDirectionKind direction = ((ActivityParameterNode)(activation.node)).parameter.direction;
+ if (activation.incomingEdges.size() > 0) {
+ parameterNodeActivations.addValue((ActivityParameterNodeActivation)activation);
+ }
+ }
+}
+
+return parameterNodeActivations;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-hasSourceFor" name="hasSourceFor" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-hasSourceFor.1">
+ <language>Java</language>
+ <body>// Returns true if this activation group has a node activation
+// corresponding to the source of the given edge instance.
+
+boolean hasSource = false;
+ActivityNodeActivationList activations = this.nodeActivations;
+int i = 1;
+while (!hasSource &amp; i &lt;= activations.size()) {
+ hasSource = activations.getValue(i-1).isSourceFor(edgeInstance);
+ i = i + 1;
+}
+return hasSource;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-isSuspended" name="isSuspended" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-isSuspended.1">
+ <language>Java</language>
+ <body>// Check if this activitation group has any suspended activations and is,
+// therefore, itself suspended.
+
+return this.suspendedActivations.size() > 0;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspend" name="suspend" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspend.1">
+ <language>Java</language>
+ <body>// Suspend the given activation in this activation group. If this is
+// the only suspended activation, and the activation group has a
+// containing node activation, then suspend that containing activation.
+
+if (!this.isSuspended()) {
+ StructuredActivityNodeActivation containingNodeActivation = this.containingNodeActivation;
+ if (containingNodeActivation != null) {
+ containingNodeActivation.suspend();
+ }
+}
+this.suspendedActivations.addValue(activation);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-resume" name="resume" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-resume.1">
+ <language>Java</language>
+ <body>// Resume the given activation by removing it from the suspended
+// activation list for this activation group. If this is the last
+// suspended activation, and the activation group has a containing
+// node activation, then resume that containing activation.
+
+boolean found = false;
+int i = 1;
+while (!found &amp; i &lt;= this.suspendedActivations.size()) {
+ if (this.suspendedActivations.get(i-1) == activation) {
+ this.suspendedActivations.removeValue(i-1);
+ found = true;
+ }
+ i = i + 1;
+}
+if (!this.isSuspended()) {
+ StructuredActivityNodeActivation containingNodeActivation = this.containingNodeActivation;
+ if (containingNodeActivation != null) {
+ containingNodeActivation.resume();
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run.1" name="run" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run.1-activations" name="activations" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run.1-activations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-run.1-activations-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1" name="checkIncomingEdges" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1-incomingEdges" name="incomingEdges" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1-incomingEdges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1-incomingEdges-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1-activations" name="activations" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1-activations-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1-activations-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-checkIncomingEdges.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes.1" name="runNodes" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes.1-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes.1-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-runNodes.1-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1" name="activate" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1-edges" name="edges" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityEdge"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1-edges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activate.1-edges-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-terminateAll.1" name="terminateAll" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-terminateAll"/>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations.1" name="createNodeActivations" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations.1-nodes" name="nodes" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations.1-nodes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivations.1-nodes-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation.1" name="createNodeActivation" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation.1-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createNodeActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addNodeActivation.1" name="addNodeActivation" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addNodeActivation">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addNodeActivation.1-activation" name="activation" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation.1" name="getNodeActivation" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getNodeActivation.1-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances.1" name="createEdgeInstances" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances.1-edges" name="edges" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityEdge"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances.1-edges-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-createEdgeInstances.1-edges-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addEdgeInstance.1" name="addEdgeInstance" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addEdgeInstance">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-addEdgeInstance.1-instance" name="instance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getActivityExecution.1" name="getActivityExecution" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getActivityExecution">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getActivityExecution.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityExecution" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations.1" name="getOutputParameterNodeActivations" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-getOutputParameterNodeActivations.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-hasSourceFor.1" name="hasSourceFor" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-hasSourceFor">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-hasSourceFor.1-edgeInstance" name="edgeInstance" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance"/>
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-hasSourceFor.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-isSuspended.1" name="isSuspended" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-isSuspended">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-isSuspended.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspend.1" name="suspend" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspend">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspend.1-activation" name="activation" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-resume.1" name="resume" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-resume">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-resume.1-activation" name="activation" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation" name="ActivityParameterNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-_ownedComment.0" annotatedElement="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation">
+ <body>An activity parameter node activation is an object node activation for a node that is an activity parameter node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ObjectNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If there are no incoming edges, this is an activation of an input activity parameter node.
+// Get the values from the input parameter indicated by the activity parameter node and offer those values as object tokens.
+
+if (this.node.incoming.size() == 0) {
+ Debug.println(&quot;[fire] Input activity parameter node &quot; + this.node.name + &quot;...&quot;);
+ Parameter parameter = ((ActivityParameterNode)(this.node)).parameter;
+ ParameterValue parameterValue = this.getActivityExecution().getParameterValue(parameter);
+ // Debug.println(&quot;[fire] parameter = &quot; + parameter.name);
+ if (parameterValue != null) {
+ Debug.println(&quot;[fire] Parameter has &quot; + parameterValue.values.size() + &quot; value(s).&quot;);
+ TokenList tokens = new TokenList();
+ ValueList values = parameterValue.values;
+ for (int i = 0; i &lt; values.size(); i++) {
+ Value value = values.getValue(i);
+ ObjectToken token = new ObjectToken();
+ token.value = value;
+ this.addToken(token);
+ }
+ this.sendUnofferedTokens();
+ }
+}
+
+// If there are one or more incoming edges, this is an activation of an output activity parameter node.
+// Take the tokens offered on incoming edges and add them to the set of tokens being offered.
+// [Note that an output activity parameter node may fire multiple times, accumulating tokens offered to it.]
+
+else {
+ Debug.println(&quot;[fire] Output activity parameter node &quot; + this.node.name + &quot;...&quot;);
+ this.addTokens(incomingTokens);
+}
+
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-clearTokens" name="clearTokens" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-clearTokens.1">
+ <language>Java</language>
+ <body>// Clear all held tokens only if this is an input parameter node.
+
+if (this.node.incoming.size() == 0) {
+ super.clearTokens();
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-clearTokens.1" name="clearTokens" visibility="public" method="Semantics-Activities-IntermediateActivities-ActivityParameterNodeActivation-clearTokens"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_nodeActivations_group" name="A_nodeActivations_group" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-group Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-nodeActivations"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_edgeInstances_group" name="A_edgeInstances_group" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-group Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-edgeInstances"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_heldTokens_holder" name="A_heldTokens_holder" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-Token-holder Semantics-Activities-IntermediateActivities-ActivityNodeActivation-heldTokens"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_node_activityNodeActivation" name="A_node_activityNodeActivation" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-A_node_activityNodeActivation-_ownedEnd.0 Semantics-Activities-IntermediateActivities-ActivityNodeActivation-node">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-A_node_activityNodeActivation-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" association="Semantics-Activities-IntermediateActivities-A_node_activityNodeActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-A_node_activityNodeActivation-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-A_node_activityNodeActivation-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_incomingEdges_target" name="A_incomingEdges_target" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-target Semantics-Activities-IntermediateActivities-ActivityNodeActivation-incomingEdges"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_activationGroup_activityExecution" name="A_activationGroup_activityExecution" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-activityExecution Semantics-Activities-IntermediateActivities-ActivityExecution-activationGroup"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_edge_activityEdgeInstance" name="A_edge_activityEdgeInstance" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-A_edge_activityEdgeInstance-_ownedEnd.0 Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-edge">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-A_edge_activityEdgeInstance-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" association="Semantics-Activities-IntermediateActivities-A_edge_activityEdgeInstance">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-A_edge_activityEdgeInstance-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-A_edge_activityEdgeInstance-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_source_outgoingEdges" name="A_source_outgoingEdges" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-ActivityNodeActivation-outgoingEdges Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-source"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_offers_activityEdgeInstance" name="A_offers_activityEdgeInstance" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-A_offers_activityEdgeInstance-_ownedEnd.0 Semantics-Activities-IntermediateActivities-ActivityEdgeInstance-offers">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-A_offers_activityEdgeInstance-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-ActivityEdgeInstance" association="Semantics-Activities-IntermediateActivities-A_offers_activityEdgeInstance">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-A_offers_activityEdgeInstance-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_decisionInputExecution_decisionNodeActivation" name="A_decisionInputExecution_decisionNodeActivation" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-A_decisionInputExecution_decisionNodeActivation-_ownedEnd.0 Semantics-Activities-IntermediateActivities-DecisionNodeActivation-decisionInputExecution">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-A_decisionInputExecution_decisionNodeActivation-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-DecisionNodeActivation" association="Semantics-Activities-IntermediateActivities-A_decisionInputExecution_decisionNodeActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_baseToken_forkedToken" name="A_baseToken_forkedToken" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-A_baseToken_forkedToken-_ownedEnd.0 Semantics-Activities-IntermediateActivities-ForkedToken-baseToken">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-A_baseToken_forkedToken-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-ForkedToken" association="Semantics-Activities-IntermediateActivities-A_baseToken_forkedToken">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-A_baseToken_forkedToken-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-A_baseToken_forkedToken-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_value_objectToken" name="A_value_objectToken" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-A_value_objectToken-_ownedEnd.0 Semantics-Activities-IntermediateActivities-ObjectToken-value">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-A_value_objectToken-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-ObjectToken" association="Semantics-Activities-IntermediateActivities-A_value_objectToken"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-A_offeredTokens_offer" name="A_offeredTokens_offer" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-A_offeredTokens_offer-_ownedEnd.0 Semantics-Activities-IntermediateActivities-Offer-offeredTokens">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-A_offeredTokens_offer-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-Offer" association="Semantics-Activities-IntermediateActivities-A_offeredTokens_offer">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-A_offeredTokens_offer-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation" name="FlowFinalNodeActivation">
+ <generalization xmi:id="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ControlNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-fire.1">
+ <language>Java</language>
+ <body>// Consume all incoming tokens.
+
+Debug.println(&quot;[fire] Flow final node &quot; + this.node.name + &quot;...&quot;);
+
+for (int i = 0; i &lt; incomingTokens.size(); i++) {
+ Token token = incomingTokens.getValue(i);
+ token.withdraw();
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-IntermediateActivities-FlowFinalNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-IntermediateActivities-_packagedElement.32" visibility="private" memberEnd="Semantics-Activities-IntermediateActivities-_packagedElement.32-_ownedEnd.0 Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup-suspendedActivations">
+ <ownedEnd xmi:id="Semantics-Activities-IntermediateActivities-_packagedElement.32-_ownedEnd.0" visibility="private" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup" association="Semantics-Activities-IntermediateActivities-_packagedElement.32">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-IntermediateActivities-_packagedElement.32-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Activities-ExtraStructuredActivities" name="ExtraStructuredActivities">
+ <packageImport xmi:id="Semantics-Activities-ExtraStructuredActivities-_packageImport.0">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Activities-ExtraStructuredActivities"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Activities-ExtraStructuredActivities-_packageImport.1" importedPackage="Semantics-Activities-CompleteStructuredActivities"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup" name="ExpansionActivationGroup">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup">
+ <body>An expansion activation group is an activity node activation group used for activating nodes inside an expansion region.&#xD;
+It functions just like a normal activation group, except it has output pin activations corresponding to the input pins and the expansion nodes of the expansion region.&#xD;
+Instances of edges from nodes inside the expansion region that connect to region input pins, input expansion nodes or output expansion nodes are redirected to connect to the corresponding &quot;region input&quot;, &quot;group input&quot; or &quot;group output&quot; pin, respectively.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Activities.ExtraStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.CommonBehaviors.Communications.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-_generalization.0" general="Semantics-Activities-IntermediateActivities-ActivityNodeActivationGroup"/>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionInputs" name="regionInputs" visibility="public" type="Semantics-Actions-BasicActions-OutputPinActivation" aggregation="composite" association="Semantics-Activities-ExtraStructuredActivities-A_regionInputs_expansionActivationGroup">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionInputs-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionInputs">
+ <body>Output pin activations corresponding, in order, to the input pins of the expansion region of this activation group.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionInputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionInputs-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupInputs" name="groupInputs" visibility="public" type="Semantics-Actions-BasicActions-OutputPinActivation" aggregation="composite" association="Semantics-Activities-ExtraStructuredActivities-A_groupInputs_expansionActivationGroup">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupInputs-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupInputs">
+ <body>Output pin activations corresponding, in order, to the input expansion nodes of the expansion region of this activation group.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupInputs-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionActivation" name="regionActivation" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation" association="Semantics-Activities-ExtraStructuredActivities-A_activationGroups_regionActivation">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionActivation-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionActivation">
+ <body>The expansion region activation this activation group is for.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupOutputs" name="groupOutputs" visibility="public" type="Semantics-Actions-BasicActions-OutputPinActivation" aggregation="composite" association="Semantics-Activities-ExtraStructuredActivities-A_groupOutputs_expansionActivationGroup">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupOutputs-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupOutputs">
+ <body>Output pin activations corresponding, in order, to the output expansion nodes of the expansion region of this activation group.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupOutputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupOutputs-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-index" name="index" visibility="public">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-index-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-index">
+ <body>The index (starting at 1) of this activation group in the list held by the expansion region activation.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation" name="getNodeActivation" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If the given node is an input pin of the expansion region, then return the corresponding region-input output-pin activation.
+// If the given node is an input expansion node of the expansion region, then return the corresponding group-input output-pin activation.
+// If the given node is an output expansion node of the expansion region, then return the corresponding group-output output-pin activation.
+// Otherwise return the node activation from the activation group, as usual.
+
+ExpansionRegion region = (ExpansionRegion)(this.regionActivation.node);
+
+InputPinList inputs = region.input;
+ActivityNodeActivation activation = null;
+
+int i = 1;
+while (activation == null &amp; i &lt;= region.input.size()) {
+ if (node == region.input.getValue(i-1)) {
+ activation = this.regionInputs.getValue(i-1);
+ }
+ i = i + 1;
+}
+
+int j = 1;
+while (activation == null &amp; j &lt;= region.inputElement.size()) {
+ if (node == region.inputElement.getValue(j - 1)) {
+ activation = this.groupInputs.getValue(j - 1);
+ }
+ j = j + 1;
+}
+
+int k = 1;
+while (activation == null &amp; k &lt;= region.outputElement.size()) {
+ if (node == region.outputElement.getValue(k - 1)) {
+ activation = this.groupOutputs.getValue(k - 1);
+ }
+ k = k + 1;
+}
+
+if (activation == null) {
+ activation = super.getNodeActivation(node);
+}
+
+return activation;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getActivityExecution" name="getActivityExecution" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getActivityExecution.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getActivityExecution-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityExecution" direction="return"/>
+ <language>Java</language>
+ <body>// Get the activity execution that contains the expansion region activation for this activation group.
+
+return this.regionActivation.getActivityExecution();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-suspend" name="suspend" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-suspend.1">
+ <language>Java</language>
+ <body>// Suspend the given activation in this activation group. If this is
+// the only suspended activation, then suspend the associated region
+// activation.
+
+if (!this.isSuspended()) {
+ this.regionActivation.suspend();
+}
+super.suspend(activation);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-resume" name="resume" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-resume.1">
+ <language>Java</language>
+ <body>// Resume the given activation in this activation group. If this is the
+// last suspended activation, then resume the associated region
+// activation.
+
+super.resume(activation);
+if (!this.isSuspended()) {
+ this.regionActivation.resume(this);
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation.1" name="getNodeActivation" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getNodeActivation.1-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getActivityExecution.1" name="getActivityExecution" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getActivityExecution">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-getActivityExecution.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityExecution" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-suspend.1" name="suspend" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-suspend">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-suspend.1-activation" name="activation" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-resume.1" name="resume" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-resume">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-resume.1-activation" name="activation" visibility="public" type="Semantics-Activities-IntermediateActivities-ActivityNodeActivation"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation" name="ExpansionNodeActivation">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-_ownedComment.0">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Activities.ExtraStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.CommonBehaviors.Communications.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-_generalization.0" general="Semantics-Activities-IntermediateActivities-ObjectNodeActivation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire" name="fire" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take tokens from all incoming edges.
+
+Debug.println(&quot;[fire] Expansion node &quot; + this.node.name + &quot;...&quot;);
+
+this.addTokens(incomingTokens);
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-receiveOffer" name="receiveOffer" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-receiveOffer.1">
+ <language>Java</language>
+ <body>// Forward the offer on to the expansion region.
+
+this.getExpansionRegionActivation().receiveOffer();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-isReady" name="isReady" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-isReady.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-isReady-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// An expansion node is always fired by its expansion region.
+
+return false;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-getExpansionRegionActivation" name="getExpansionRegionActivation" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-getExpansionRegionActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-getExpansionRegionActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation" direction="return"/>
+ <language>Java</language>
+ <body>// Return the expansion region activation corresponding to this expansion node, in the context of the activity node activation group this expansion node activation is in.
+
+ExpansionNode node = (ExpansionNode)(this.node);
+
+ExpansionRegion region = node.regionAsInput;
+if (region == null) {
+ region = node.regionAsOutput;
+}
+
+return (ExpansionRegionActivation)(this.group.getNodeActivation(region));
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire.1" name="fire" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire.1-incomingTokens" name="incomingTokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire.1-incomingTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-fire.1-incomingTokens-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-receiveOffer.1" name="receiveOffer" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-receiveOffer"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-isReady.1" name="isReady" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-isReady">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-isReady.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-getExpansionRegionActivation.1" name="getExpansionRegionActivation" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-getExpansionRegionActivation">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation-getExpansionRegionActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation" name="ExpansionRegionActivation">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation">
+ <body>An expansion region activation is an action activation for a node that is an expansion region.&#xD;
+[Note that even though an expansion region is a structured activity node, an expansion region activation is not a structured activity activation because of the special nature of expansion region behavior.]</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-_ownedComment.1">
+ <body>import java.util.Iterator;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Activities.ExtraStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.CommonBehaviors.Communications.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-_generalization.0" general="Semantics-Actions-BasicActions-ActionActivation"/>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-activationGroups" name="activationGroups" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup" aggregation="composite" association="Semantics-Activities-ExtraStructuredActivities-A_activationGroups_regionActivation">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-activationGroups-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-activationGroups">
+ <body>The set of expansion activation groups for this expansion region activation. One activation group is created corresponding to each token held by the first input expansion node activation for the expansion region.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-activationGroups-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-activationGroups-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputTokens" name="inputTokens" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-TokenSet" aggregation="composite" association="Semantics-Activities-ExtraStructuredActivities-A_inputTokens_expansionRegionActivation">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputTokens-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputTokens">
+ <body>The tokens taken from each of the input pin activations for this expansion region activation. These are preserved for initializing the region inputs of each of the activation groups.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputTokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputTokens-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputExpansionTokens" name="inputExpansionTokens" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-TokenSet" aggregation="composite" association="Semantics-Activities-ExtraStructuredActivities-A_inputExpansionTokens_expansionRegionActivation">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputExpansionTokens-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputExpansionTokens">
+ <body>The tokens taken from each of the input expansion node activations for this expansion region activation. These are preserved for initializing the group input of each of the activation groups.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputExpansionTokens-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-next" name="next" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-next-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens" name="takeOfferedTokens" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Take the tokens from the input pin and input expansion node activations and save them.
+
+super.takeOfferedTokens();
+
+ExpansionRegion region = (ExpansionRegion)(this.node);
+InputPinList inputPins = region.input;
+ExpansionNodeList inputElements = region.inputElement;
+
+this.inputTokens.clear();
+this.inputExpansionTokens.clear();
+
+for (int i = 0; i &lt; inputPins.size(); i++) {
+ InputPin inputPin = inputPins.getValue(i);
+ TokenSet tokenSet = new TokenSet();
+ tokenSet.tokens = this.getPinActivation(inputPin).takeTokens();
+ this.inputTokens.addValue(tokenSet);
+}
+
+int n = this.numberOfValues();
+
+for (int i = 0; i &lt; inputElements.size(); i++) {
+ ExpansionNode inputElement = inputElements.getValue(i);
+ ExpansionNodeActivation expansionNodeActivation = this.getExpansionNodeActivation(inputElement);
+ expansionNodeActivation.fire(expansionNodeActivation.takeOfferedTokens());
+ TokenList tokens = expansionNodeActivation.takeTokens();
+ TokenSet tokenSet = new TokenSet();
+ int j = 1;
+ while (j &lt;= n) {
+ tokenSet.tokens.add(tokens.getValue(j-1));
+ j = j + 1;
+ }
+ this.inputExpansionTokens.addValue(tokenSet);
+}
+
+return new TokenList();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doAction" name="doAction" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doAction.1">
+ <language>Java</language>
+ <body>// If the expansion region has mustIsolate=true, then carry out its behavior with isolation.
+// Otherwise just activate it normally.
+
+if (((StructuredActivityNode)(this.node)).mustIsolate) {
+ _beginIsolation();
+ this.doStructuredActivity();
+ _endIsolation();
+} else {
+ this.doStructuredActivity();
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doStructuredActivity" name="doStructuredActivity" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doStructuredActivity.1">
+ <language>Java</language>
+ <body>// Create a number of expansion region activation groups equal to the number of values expanded in the region,
+// setting the region inputs and group inputs for each group.
+// Run the body of the region in each group, either iteratively or in parallel.
+// Add the outputs of each activation group to the corresonding output expansion node activations.
+
+ExpansionRegion region = (ExpansionRegion)this.node;
+InputPinList inputPins = region.input;
+ExpansionNodeList inputElements = region.inputElement;
+ExpansionNodeList outputElements = region.outputElement;
+
+this.activationGroups.clear();
+int n = this.inputExpansionTokens.getValue(0).tokens.size();
+int k = 1;
+while (k &lt;= n) {
+ ExpansionActivationGroup activationGroup = new ExpansionActivationGroup();
+ activationGroup.regionActivation = this;
+ activationGroup.index = k;
+
+ int j = 1;
+ while (j &lt;= inputPins.size()) {
+ OutputPinActivation regionInput = new OutputPinActivation();
+ regionInput.run();
+ activationGroup.regionInputs.addValue(regionInput);
+ j = j + 1;
+ }
+
+ j = 1;
+ while (j &lt;= inputElements.size()) {
+ OutputPinActivation groupInput = new OutputPinActivation();
+ groupInput.run();
+ activationGroup.groupInputs.addValue(groupInput);
+ j = j + 1;
+ }
+
+ j = 1;
+ while (j &lt;= outputElements.size()) {
+ OutputPinActivation groupOutput = new OutputPinActivation();
+ groupOutput.run();
+ activationGroup.groupOutputs.addValue(new OutputPinActivation());
+ j = j + 1;
+ }
+
+ activationGroup.createNodeActivations(region.node);
+ activationGroup.createEdgeInstances(region.edge);
+ this.activationGroups.addValue(activationGroup);
+
+ k = k + 1;
+}
+
+ExpansionActivationGroupList activationGroups = this.activationGroups;
+
+if (region.mode == ExpansionKind.iterative) {
+ Debug.println(&quot;[doStructuredActivity] Expansion mode = iterative&quot;);
+ this.next = 1;
+ this.runIterative();
+}
+else if (region.mode == ExpansionKind.parallel) {
+ Debug.println(&quot;[doStructuredActivity] Expansion mode = parallel&quot;);
+ this.runParallel();
+}
+
+this.doOutput();
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminate" name="terminate" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminate.1">
+ <language>Java</language>
+ <body>// Terminate the execution of all contained node activations (which completes the performance of the expansion region activation).
+
+ExpansionActivationGroupList activationGroups = this.activationGroups;
+for (int i = 0; i &lt; activationGroups.size(); i++) {
+ ExpansionActivationGroup activationGroup = this.activationGroups.getValue(i);
+
+ OutputPinActivationList groupOutputs = activationGroup.groupOutputs;
+
+ _beginIsolation();
+ for (int j = 0; j &lt; groupOutputs.size(); j++) {
+ OutputPinActivation groupOutput = groupOutputs.getValue(j);
+ groupOutput.fire(groupOutput.takeOfferedTokens());
+ }
+ activationGroup.terminateAll();
+ _endIsolation();
+}
+
+super.terminate();</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-sendOffers" name="sendOffers" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-sendOffers.1">
+ <language>Java</language>
+ <body>// Fire all output expansion nodes and send offers on all outgoing control flows.
+
+ExpansionRegion region = (ExpansionRegion)(this.node);
+
+// *** Send offers from all output expansion nodes concurrently. ***
+ExpansionNodeList outputElements = region.outputElement;
+for (Iterator i = outputElements.iterator(); i.hasNext();) {
+ ExpansionNode outputElement = (ExpansionNode)i.next();
+ this.getExpansionNodeActivation(outputElement).sendUnofferedTokens();
+}
+
+// Send offers on all outgoing control flows.
+super.sendOffers();
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runGroup" name="runGroup" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runGroup.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runGroup-activationGroup" name="activationGroup" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup"/>
+ <language>Java</language>
+ <body>// Set up the inputs for the group with the given index, run the group and then fire the group outputs.
+
+if (this.isRunning()) {
+ Debug.println(&quot;[runGroup] groupInput[0] = &quot; + this.inputExpansionTokens.getValue(0).tokens.getValue(activationGroup.index-1).getValue());
+
+ TokenSetList inputTokens = this.inputTokens;
+ for (int j = 0; j &lt; inputTokens.size(); j++) {
+ TokenSet tokenSet = inputTokens.getValue(j);
+ OutputPinActivation regionInput = activationGroup.regionInputs.getValue(j);
+ regionInput.clearTokens();
+ regionInput.addTokens(tokenSet.tokens);
+ regionInput.sendUnofferedTokens();
+ }
+
+ TokenSetList inputExpansionTokens = this.inputExpansionTokens;
+ for (int j = 0; j &lt; inputExpansionTokens.size(); j++) {
+ TokenSet tokenSet = inputExpansionTokens.getValue(j);
+ OutputPinActivation groupInput = activationGroup.groupInputs.getValue(j);
+ groupInput.clearTokens();
+ if (tokenSet.tokens.size() >= activationGroup.index) {
+ groupInput.addToken(tokenSet.tokens.getValue(activationGroup.index - 1));
+ }
+ groupInput.sendUnofferedTokens();
+ }
+
+ activationGroup.run(activationGroup.nodeActivations);
+
+ this.terminateGroup(activationGroup);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation" name="getExpansionNodeActivation" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-ExtraStructuredActivities-ExpansionNode"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the expansion node activation corresponding to the given expansion node, in the context of the activity node activation group this expansion region activation is in.
+// [Note: Expansion regions do not own their expansion nodes. Instead, they are own as object nodes by the enclosing activity or group.
+// Therefore, they will already be activated along with their expansion region.]
+
+return (ExpansionNodeActivation)(this.group.getNodeActivation(node));
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-numberOfValues" name="numberOfValues" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-numberOfValues.1">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-numberOfValues-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the number of values to be acted on by the expansion region of
+// this activation, which is the minimum of the number of values offered
+// to each of the input expansion nodes of the activation.
+
+ExpansionRegion region = (ExpansionRegion) (this.node);
+ExpansionNodeList inputElements = region.inputElement;
+
+int n = this.getExpansionNodeActivation(inputElements.getValue(0))
+ .countOfferedValues();
+int i = 2;
+while (i &lt;= inputElements.size()) {
+ int count = this.getExpansionNodeActivation(
+ inputElements.getValue(i - 1)).countOfferedValues();
+ if (count &lt; n) {
+ n = count;
+ }
+ i = i + 1;
+}
+
+return n;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runIterative" name="runIterative" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runIterative.1">
+ <language>Java</language>
+ <body>// Run the body of the region iteratively, either until all activation
+// groups have run or until the region is suspended.
+
+ExpansionActivationGroupList activationGroups = this.activationGroups;
+
+while (this.next &lt;= activationGroups.size() &amp; !this.isSuspended()) {
+ ExpansionActivationGroup activationGroup = activationGroups
+ .getValue(this.next-1);
+ this.runGroup(activationGroup);
+ this.next = this.next + 1;
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runParallel" name="runParallel" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runParallel.1">
+ <language>Java</language>
+ <body>// Run the body of the region concurrently.
+
+ExpansionActivationGroupList activationGroups = this.activationGroups;
+
+// *** Activate all groups concurrently. ***
+for (Iterator i = activationGroups.iterator(); i.hasNext();) {
+ ExpansionActivationGroup activationGroup = (ExpansionActivationGroup) i
+ .next();
+ this.runGroup(activationGroup);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doOutput" name="doOutput" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doOutput.1">
+ <language>Java</language>
+ <body>// Place tokens on the output expansion nodes.
+
+ExpansionRegion region = (ExpansionRegion) this.node;
+ExpansionNodeList outputElements = region.outputElement;
+
+Debug.println(&quot;[doOutput] Expansion region &quot; + region.name + &quot; is &quot; +
+ (this.isSuspended()? &quot;suspended.&quot;: &quot;completed.&quot;));
+
+if (!this.isSuspended()) {
+ for (int i = 0; i &lt; activationGroups.size(); i++) {
+ ExpansionActivationGroup activationGroup = activationGroups
+ .getValue(i);
+ OutputPinActivationList groupOutputs = activationGroup.groupOutputs;
+ for (int j = 0; j &lt; groupOutputs.size(); j++) {
+ OutputPinActivation groupOutput = groupOutputs.getValue(j);
+ ExpansionNode outputElement = outputElements.getValue(j);
+ this.getExpansionNodeActivation(outputElement).addTokens(
+ groupOutput.takeTokens());
+ }
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminateGroup" name="terminateGroup" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminateGroup.1">
+ <language>Java</language>
+ <body>// Terminate the given activation group, after preserving any group outputs.
+if (this.isRunning() &amp; !this.isSuspended()) {
+ OutputPinActivationList groupOutputs = activationGroup.groupOutputs;
+ for (int i = 0; i &lt; groupOutputs.size(); i++) {
+ OutputPinActivation groupOutput = groupOutputs.getValue(i);
+ groupOutput.fire(groupOutput.takeOfferedTokens());
+ }
+
+ activationGroup.terminateAll();
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-isSuspended" name="isSuspended" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-isSuspended.1">
+ <language>Java</language>
+ <body>// Check if the activation group for this node is suspended.
+
+boolean suspended = false;
+int i = 1;
+while (i &lt;= this.activationGroups.size() &amp; !suspended) {
+ ActivityNodeActivationGroup group = this.activationGroups.get(i-1);
+ suspended = group.isSuspended();
+ i = i + 1;
+}
+
+return suspended;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-resume" name="resume" isReentrant="false" specification="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-resume.1">
+ <language>Java</language>
+ <body>// Resume an expansion region after the suspension of the given
+// activation group. If the region is iterative, then continue with the
+// iteration. If the region is parallel, and there are no more suspended
+// activation groups, then generate the expansion node output.
+
+ExpansionRegion region = (ExpansionRegion) this.node;
+
+this.resume();
+this.terminateGroup(activationGroup);
+if (region.mode == ExpansionKind.iterative) {
+ this.runIterative();
+}
+
+this.doOutput();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens.1" name="takeOfferedTokens" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens.1-OwnedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-takeOfferedTokens.1-OwnedParameter-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doAction.1" name="doAction" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doAction"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doStructuredActivity.1" name="doStructuredActivity" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doStructuredActivity"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runIterative.1" name="runIterative" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runIterative"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runParallel.1" name="runParallel" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runParallel"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doOutput.1" name="doOutput" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-doOutput"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminate.1" name="terminate" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminate"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-sendOffers.1" name="sendOffers" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-sendOffers"/>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runGroup.1" name="runGroup" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runGroup">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-runGroup.1-activationGroup" name="activationGroup" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminateGroup.1" name="terminateGroup" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminateGroup">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-terminateGroup.1-activationGroup" name="activationGroup" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation.1" name="getExpansionNodeActivation" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionNodeActivation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-getExpansionNodeActivation.1-node" name="node" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Activities-ExtraStructuredActivities-ExpansionNode"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-numberOfValues.1" name="numberOfValues" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-numberOfValues">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-numberOfValues.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-isSuspended.1" name="isSuspended" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-isSuspended">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-isSuspended.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-resume.1" name="resume" visibility="public" method="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-resume">
+ <ownedParameter xmi:id="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-resume.1-activationGroup" name="activationGroup" visibility="public" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_activationGroups_regionActivation" name="A_activationGroups_regionActivation" visibility="private" memberEnd="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionActivation Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-activationGroups"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_regionInputs_expansionActivationGroup" name="A_regionInputs_expansionActivationGroup" visibility="private" memberEnd="Semantics-Activities-ExtraStructuredActivities-A_regionInputs_expansionActivationGroup-_ownedEnd.0 Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-regionInputs">
+ <ownedEnd xmi:id="Semantics-Activities-ExtraStructuredActivities-A_regionInputs_expansionActivationGroup-_ownedEnd.0" visibility="private" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup" association="Semantics-Activities-ExtraStructuredActivities-A_regionInputs_expansionActivationGroup">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_regionInputs_expansionActivationGroup-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_groupInputs_expansionActivationGroup" name="A_groupInputs_expansionActivationGroup" visibility="private" memberEnd="Semantics-Activities-ExtraStructuredActivities-A_groupInputs_expansionActivationGroup-_ownedEnd.0 Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupInputs">
+ <ownedEnd xmi:id="Semantics-Activities-ExtraStructuredActivities-A_groupInputs_expansionActivationGroup-_ownedEnd.0" visibility="private" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup" association="Semantics-Activities-ExtraStructuredActivities-A_groupInputs_expansionActivationGroup">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_groupInputs_expansionActivationGroup-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_groupOutputs_expansionActivationGroup" name="A_groupOutputs_expansionActivationGroup" visibility="private" memberEnd="Semantics-Activities-ExtraStructuredActivities-A_groupOutputs_expansionActivationGroup-_ownedEnd.0 Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup-groupOutputs">
+ <ownedEnd xmi:id="Semantics-Activities-ExtraStructuredActivities-A_groupOutputs_expansionActivationGroup-_ownedEnd.0" visibility="private" type="Semantics-Activities-ExtraStructuredActivities-ExpansionActivationGroup" association="Semantics-Activities-ExtraStructuredActivities-A_groupOutputs_expansionActivationGroup">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_groupOutputs_expansionActivationGroup-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Activities-ExtraStructuredActivities-TokenSet" name="TokenSet">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-TokenSet-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-TokenSet">
+ <body>A set of tokens taken from an input pin activation or input expansion node activation for an expansion region.</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Activities-ExtraStructuredActivities-TokenSet-tokens" name="tokens" visibility="public" type="Semantics-Activities-IntermediateActivities-Token" association="Semantics-Activities-ExtraStructuredActivities-A_tokens_tokenSet">
+ <ownedComment xmi:id="Semantics-Activities-ExtraStructuredActivities-TokenSet-tokens-_ownedComment.0" annotatedElement="Semantics-Activities-ExtraStructuredActivities-TokenSet-tokens">
+ <body>The set of tokens in this input set.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-TokenSet-tokens-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-TokenSet-tokens-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_inputTokens_expansionRegionActivation" name="A_inputTokens_expansionRegionActivation" visibility="private" memberEnd="Semantics-Activities-ExtraStructuredActivities-A_inputTokens_expansionRegionActivation-_ownedEnd.0 Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputTokens">
+ <ownedEnd xmi:id="Semantics-Activities-ExtraStructuredActivities-A_inputTokens_expansionRegionActivation-_ownedEnd.0" visibility="private" type="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation" association="Semantics-Activities-ExtraStructuredActivities-A_inputTokens_expansionRegionActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_inputExpansionTokens_expansionRegionActivation" name="A_inputExpansionTokens_expansionRegionActivation" visibility="private" memberEnd="Semantics-Activities-ExtraStructuredActivities-A_inputExpansionTokens_expansionRegionActivation-_ownedEnd.0 Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation-inputExpansionTokens">
+ <ownedEnd xmi:id="Semantics-Activities-ExtraStructuredActivities-A_inputExpansionTokens_expansionRegionActivation-_ownedEnd.0" visibility="private" type="Semantics-Activities-ExtraStructuredActivities-ExpansionRegionActivation" association="Semantics-Activities-ExtraStructuredActivities-A_inputExpansionTokens_expansionRegionActivation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_tokens_tokenSet" name="A_tokens_tokenSet" visibility="private" memberEnd="Semantics-Activities-ExtraStructuredActivities-A_tokens_tokenSet-_ownedEnd.0 Semantics-Activities-ExtraStructuredActivities-TokenSet-tokens">
+ <ownedEnd xmi:id="Semantics-Activities-ExtraStructuredActivities-A_tokens_tokenSet-_ownedEnd.0" visibility="private" type="Semantics-Activities-ExtraStructuredActivities-TokenSet" association="Semantics-Activities-ExtraStructuredActivities-A_tokens_tokenSet">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_tokens_tokenSet-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Activities-ExtraStructuredActivities-A_tokens_tokenSet-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Classes" name="Classes">
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Classes-Kernel" name="Kernel">
+ <packageImport xmi:id="Semantics-Classes-Kernel-_packageImport.0" importedPackage="Semantics-CommonBehaviors-Communications"/>
+ <packageImport xmi:id="Semantics-Classes-Kernel-_packageImport.1" importedPackage="Semantics-Loci-LociL1"/>
+ <packageImport xmi:id="Semantics-Classes-Kernel-_packageImport.2">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Classes-Kernel"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Classes-Kernel-_packageImport.3" importedPackage="Semantics-CommonBehaviors-BasicBehaviors"/>
+ <packageImport xmi:id="Semantics-Classes-Kernel-_packageImport.4">
+ <importedPackage href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-StructuredValue" name="StructuredValue" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-StructuredValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-StructuredValue">
+ <body>A structured value is a Value whose type has structural features: a data type (but not a primitive type or enumeration), a class or an association.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-StructuredValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-StructuredValue-_generalization.0" general="Semantics-Classes-Kernel-Value"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-StructuredValue-specify" name="specify" isReentrant="false" specification="Semantics-Classes-Kernel-StructuredValue-specify.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-specify-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return an instance value that specifies this structured value.
+
+// Debug.println(&quot;[specify] StructuredValue...&quot;);
+
+InstanceValue instanceValue = new InstanceValue();
+InstanceSpecification instance = new InstanceSpecification();
+
+instanceValue.type = null;
+instanceValue.instance = instance;
+
+instance.classifier = this.getTypes();
+
+FeatureValueList featureValues = this.getFeatureValues();
+// Debug.println(&quot;[specify] &quot; + featureValues.size() + &quot; feature(s).&quot;);
+
+for (int i = 0; i &lt; featureValues.size(); i++) {
+ FeatureValue featureValue = featureValues.getValue(i);
+
+ Slot slot = new Slot();
+ slot.definingFeature = featureValue.feature;
+
+ // Debug.println(&quot;[specify] feature = &quot; + featureValue.feature.name + &quot;, &quot; + featureValue.values.size() + &quot; value(s).&quot;);
+
+ ValueList values = featureValue.values;
+ for (int j = 0; j &lt; values.size(); j++) {
+ Value value = values.getValue(j);
+ // Debug.println(&quot;[specify] value = &quot; + value);
+ slot.value.addValue(value.specify());
+ }
+
+ instance.slot.addValue(slot);
+}
+
+return instanceValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-StructuredValue-createFeatureValues" name="createFeatureValues" isReentrant="false" specification="Semantics-Classes-Kernel-StructuredValue-createFeatureValues.1">
+ <language>Java</language>
+ <body>// Create empty feature values for all structural features, direct and inherited, of the types of this structured value.
+
+ClassifierList types = this.getTypes();
+
+for (int i = 0; i &lt; types.size(); i++) {
+ Classifier type = types.getValue(i);
+ NamedElementList members = type.member;
+
+ for (int j = 0; j &lt; members.size(); j++) {
+ NamedElement member = members.getValue(j);
+ if (member instanceof StructuralFeature) {
+ this.setFeatureValue((StructuralFeature)member, new ValueList(), 0);
+ }
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StructuredValue-specify.1" name="specify" visibility="public" method="Semantics-Classes-Kernel-StructuredValue-specify">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-specify.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValue" name="getFeatureValue" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-StructuredValue-getFeatureValue">
+ <body>Get the feature value associated with the given feature. &#xD;
+The given feature must be a structural feature of the type of the structured value.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValue-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue" name="setFeatureValue" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-StructuredValue-setFeatureValue">
+ <body>Set the value(s) and, optionally, the position index associated with the given feature. &#xD;
+The given feature must be a structural feature of the type of the structured value.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue-values-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue-position" name="position" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-StructuredValue-setFeatureValue-position-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValues" name="getFeatureValues" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValues-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-StructuredValue-getFeatureValues">
+ <body>Return the feature values associated with this structural value.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValues-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValues-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-StructuredValue-getFeatureValues-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StructuredValue-createFeatureValues.1" name="createFeatureValues" visibility="public" method="Semantics-Classes-Kernel-StructuredValue-createFeatureValues"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue" name="UnlimitedNaturalValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-UnlimitedNaturalValue">
+ <body>An unlimited natural value is a primitive value whose type is UnlimitedNatural.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-_generalization.0" general="Semantics-Classes-Kernel-PrimitiveValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-value" name="value" visibility="public">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-value-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-UnlimitedNaturalValue-value">
+ <body>The actual unlimited natural value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-specify" name="specify" isReentrant="false" specification="Semantics-Classes-Kernel-UnlimitedNaturalValue-specify.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-specify-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return a literal unlimited natural with the value of this unlimited natural value.
+
+LiteralUnlimitedNatural literal = new LiteralUnlimitedNatural();
+
+literal.type = this.type;
+literal.value = this.value;
+
+return literal;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this unlimited natural value is equal to the otherValue.
+// To be equal, the otherValue must have the same value as this unlimited natural value.
+
+boolean isEqual = false;
+if (otherValue instanceof UnlimitedNaturalValue) {
+ isEqual = ((UnlimitedNaturalValue)otherValue).value == this.value;
+}
+
+return isEqual;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-UnlimitedNaturalValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new unlimited natural value with the same value as this value.
+
+UnlimitedNaturalValue newValue = (UnlimitedNaturalValue)(super.copy());
+
+newValue.value = this.value;
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-UnlimitedNaturalValue-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new unlimited natural value with no value.
+
+return new UnlimitedNaturalValue();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-UnlimitedNaturalValue-toString.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>String stringValue = &quot;*&quot;;
+
+if (this.value.naturalValue >= 0) {
+ IntegerValue integerValue = new IntegerValue();
+ integerValue.value = this.value.naturalValue;
+ stringValue = integerValue.toString();
+}
+
+return stringValue;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-specify.1" name="specify" visibility="public" method="Semantics-Classes-Kernel-UnlimitedNaturalValue-specify">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-specify.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-UnlimitedNaturalValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-UnlimitedNaturalValue-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-UnlimitedNaturalValue-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-UnlimitedNaturalValue-toString.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-Value" name="Value" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Value-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Value">
+ <body>A value is an instance of one or more classifiers, which are its types. A value is always representable using a value specification.&#xD;
+&#xD;
+[Note: Value specializes SemanticVisitor to allow the Execution subclass to be a semantic visitor, without requiring multiple generalization of Execution.]</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Value-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-Value-_generalization.0" general="Semantics-Loci-LociL1-SemanticVisitor"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Value-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-Value-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this value is equal to otherValue. To be equal, this value must have the same type as otherValue.
+// This operation must be overridden in Value subclasses to check for equality of properties defined in those subclasses.
+
+ClassifierList myTypes = this.getTypes();
+ClassifierList otherTypes = otherValue.getTypes();
+
+boolean isEqual = true;
+
+// Debug.println(&quot;[equals] Value...&quot;);
+// Debug.println(&quot;[equals] this has &quot; + myTypes.size() + &quot;types, other has &quot; + otherTypes.size() + &quot;.&quot;);
+if (myTypes.size() != otherTypes.size()) {
+ isEqual = false;
+
+} else {
+ // Debug.println(&quot;[equals] &quot; + myTypes.size() + &quot; type(s).&quot;);
+
+ int i = 1;
+ while (isEqual &amp; i &lt;= myTypes.size()) {
+
+ // Debug.println(&quot;[equals] this type = &quot; + myTypes.getValue(i-1).name);
+
+ boolean matched = false;
+ int j = 1;
+ while (!matched &amp; j &lt;= otherTypes.size()) {
+ // Debug.println(&quot;[equals] other type = &quot; + otherTypes.getValue(j-1).name);
+ matched = (otherTypes.getValue(j-1) == myTypes.getValue(i-1));
+ j = j + 1;
+ }
+
+ isEqual = matched;
+ i = i + 1;
+ }
+}
+
+return isEqual;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Value-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-Value-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new value that is equal to this value.
+// By default, this operation simply creates a new value with empty properties.
+// It must be overridden in each Value subclass to do the superclass copy and then appropriately set properties defined in the subclass.
+
+return this.new_();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Value-hasType" name="hasType" isReentrant="false" specification="Semantics-Classes-Kernel-Value-hasType.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-hasType-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-hasType-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check if this object has the given classifier as a type.
+
+ClassifierList types = this.getTypes();
+
+boolean found = false;
+int i = 1;
+while (!found &amp; i &lt;= types.size()) {
+ found = (types.getValue(i-1) == type);
+ i = i + 1;
+}
+
+return found;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Value-objectId" name="objectId" isReentrant="false" specification="Semantics-Classes-Kernel-Value-objectId.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-objectId-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return an identifier for this object.
+// [Non-normative.]
+
+return super.toString();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-specify" name="specify" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Value-specify-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Value-specify">
+ <body>Return a value specification whose evaluation gives a value equal to this value.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-specify-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-Value-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-Value-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-new_" name="new_" visibility="protected" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Value-new_-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Value-new_">
+ <body>Create a new value of the same Value subclass as this value, with all properties empty (even if this violates multiplicity constraints). &#xD;
+This operation must be defined in each concrete Value subclass to create an instance of that subclass.&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-getTypes" name="getTypes" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Value-getTypes-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Value-getTypes">
+ <body>Gets all the classifiers under which this value is currently classifier.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Value-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Value-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-hasType.1" name="hasType" visibility="public" method="Semantics-Classes-Kernel-Value-hasType">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-hasType.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-hasType.1-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-toString" name="toString" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Value-toString-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Value-toString">
+ <body>Return a string representation of this value.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Value-objectId.1" name="objectId" visibility="public" method="Semantics-Classes-Kernel-Value-objectId">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Value-objectId.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-StringValue" name="StringValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-StringValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-StringValue">
+ <body>A string value is a primitive value whose type is String.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-StringValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-StringValue-_generalization.0" general="Semantics-Classes-Kernel-PrimitiveValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-StringValue-value" name="value" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-StringValue-specify" name="specify" isReentrant="false" specification="Semantics-Classes-Kernel-StringValue-specify.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-specify-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return a literal string with the value of this string value.
+
+LiteralString literal = new LiteralString();
+
+literal.type = this.type;
+literal.value = this.value;
+
+return literal;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-StringValue-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-StringValue-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this string value is equal to the otherValue.
+// To be equal, the otherValue must have the same value as this string value.
+
+boolean isEqual = false;
+if (otherValue instanceof StringValue) {
+ isEqual = ((StringValue)otherValue).value.equals(this.value);
+}
+
+return isEqual;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-StringValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-StringValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new string value with the same value as this string value.
+
+StringValue newValue = (StringValue)(super.copy());
+
+newValue.value = this.value;
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-StringValue-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-StringValue-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new string value with no value.
+
+return new StringValue();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-StringValue-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-StringValue-toString.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>return value;</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StringValue-specify.1" name="specify" visibility="public" method="Semantics-Classes-Kernel-StringValue-specify">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-specify.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StringValue-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-StringValue-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StringValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-StringValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StringValue-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-StringValue-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-StringValue-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-StringValue-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-StringValue-toString.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-Reference" name="Reference">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Reference-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Reference">
+ <body>A reference is an access path to a specific object. There may be multiple references to the same object.&#xD;
+As a structured value, the reference acts just the same as its referent in terms of type, features, operations, etc.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Reference-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-Reference-_generalization.0" general="Semantics-Classes-Kernel-StructuredValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-Reference-referent" name="referent" visibility="public" type="Semantics-Classes-Kernel-Object" association="Semantics-Classes-Kernel-A_reference_reference"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-startBehavior" name="startBehavior" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-startBehavior.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-startBehavior-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-startBehavior-classifier-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-startBehavior-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-startBehavior-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-startBehavior-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Asynchronously start the behavior of the given classifier for the referent object.
+
+this.referent.startBehavior(classifier, inputs);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-dispatch" name="dispatch" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-dispatch.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-dispatch-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-dispatch-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Dispatch the given operation to the referent object.
+
+return this.referent.dispatch(operation);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-send" name="send" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-send.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-send-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <language>Java</language>
+ <body>// Send the given signal instance to the referent object.
+
+this.referent.send(signalInstance);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-destroy" name="destroy" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-destroy.1">
+ <language>Java</language>
+ <body>// Destroy the referent.
+
+this.referent.destroy();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this reference is equal to the otherValue.
+// To be equal, the otherValue must also be a reference, with the same referent as this reference.
+
+boolean isEqual = false;
+if (otherValue instanceof Reference) {
+ isEqual = (((Reference)otherValue).referent == this.referent);
+}
+
+return isEqual;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new reference with the same referent as this reference.
+
+Reference newValue = (Reference)(super.copy());
+
+newValue.referent = this.referent;
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new reference with no referent.
+
+return new Reference();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-getTypes" name="getTypes" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-getTypes.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the types of the referent object.
+
+return this.referent.getTypes();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValue" name="getFeatureValue" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-getFeatureValue.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValue-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the feature value associated with the given feature in the referent object.
+
+return this.referent.getFeatureValue(feature);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue" name="setFeatureValue" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-setFeatureValue.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue-values-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue-position" name="position" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue-position-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Set the values associated with the given feature in the referent object.
+
+this.referent.setFeatureValue(feature, values, position);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues" name="getFeatureValues" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-getFeatureValues.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the feature values of the referent.
+
+return this.referent.getFeatureValues();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Reference-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-Reference-toString.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>return &quot;Reference to &quot; + this.referent.toString();
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-startBehavior.1" name="startBehavior" visibility="public" method="Semantics-Classes-Kernel-Reference-startBehavior">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-startBehavior.1-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-startBehavior.1-classifier-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-startBehavior.1-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-startBehavior.1-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-startBehavior.1-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-dispatch.1" name="dispatch" visibility="public" method="Semantics-Classes-Kernel-Reference-dispatch">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-dispatch.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-dispatch.1-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-send.1" name="send" visibility="public" method="Semantics-Classes-Kernel-Reference-send">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-send.1-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-destroy.1" name="destroy" visibility="public" method="Semantics-Classes-Kernel-Reference-destroy"/>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-Reference-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-Reference-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-Reference-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-getTypes.1" name="getTypes" visibility="public" method="Semantics-Classes-Kernel-Reference-getTypes">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getTypes.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-getTypes.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-getTypes.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValue.1" name="getFeatureValue" visibility="public" method="Semantics-Classes-Kernel-Reference-getFeatureValue">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValue.1-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue.1" name="setFeatureValue" visibility="public" method="Semantics-Classes-Kernel-Reference-setFeatureValue">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue.1-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue.1-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue.1-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue.1-values-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue.1-position" name="position" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-setFeatureValue.1-position-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues.1" name="getFeatureValues" visibility="public" method="Semantics-Classes-Kernel-Reference-getFeatureValues">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Reference-getFeatureValues.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Reference-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-Reference-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Reference-toString.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-PrimitiveValue" name="PrimitiveValue" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-PrimitiveValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-PrimitiveValue">
+ <body>A primitive value is a value whose (single) type is a primitive type.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-PrimitiveValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-PrimitiveValue-_generalization.0" general="Semantics-Classes-Kernel-Value"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-PrimitiveValue-type" name="type" visibility="public" association="Semantics-Classes-Kernel-A_type_primitiveValue">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-PrimitiveValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-PrimitiveValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-PrimitiveValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new value that is equal to this primitive value.
+
+PrimitiveValue newValue = (PrimitiveValue)(super.copy());
+
+newValue.type = this.type;
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes" name="getTypes" isReentrant="false" specification="Semantics-Classes-Kernel-PrimitiveValue-getTypes.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the single primitive type of this value.
+
+ClassifierList types = new ClassifierList();
+types.addValue(this.type);
+return types;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-PrimitiveValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-PrimitiveValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-PrimitiveValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes.1" name="getTypes" visibility="public" method="Semantics-Classes-Kernel-PrimitiveValue-getTypes">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-PrimitiveValue-getTypes.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-Object" name="Object">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Object-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Object">
+ <body>An object is an extensional value that may have multiple types, all of which must be classes. (Note that a destroyed object has no types.)&#xD;
+An object has a unique identity. Usually, references to objects are manipulated, rather than the objects themselves, and there may be multiple references to the same object.&#xD;
+If an object is active, it has an object activation that handle the execution of its classifier behavior(s).</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Object-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.CommonBehaviors.Communications.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-Object-_generalization.0" general="Semantics-Classes-Kernel-ExtensionalValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-Object-types" name="types" visibility="public" association="Semantics-Classes-Kernel-A_types_object">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Object-types-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Object-types">
+ <body>The classes under which this object is currently classified. (A destroyed object has no types.)</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-types-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Object-types-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-Object-objectActivation" name="objectActivation" visibility="public" type="Semantics-CommonBehaviors-Communications-ObjectActivation" aggregation="composite" association="Semantics-Classes-Kernel-A_objectActivation_object">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Object-objectActivation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Object-objectActivation">
+ <body>The object activation handling the active behavior of this object.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-objectActivation-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-startBehavior" name="startBehavior" isReentrant="false" specification="Semantics-Classes-Kernel-Object-startBehavior.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-startBehavior-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-startBehavior-classifier-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-startBehavior-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-startBehavior-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Object-startBehavior-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Create an object activation for this object (if one does not already exist) and start its behavior(s).
+
+// Debug.println(&quot;[startBehavior] On object...&quot;);
+
+if (this.objectActivation == null) {
+ this.objectActivation = new ObjectActivation();
+ this.objectActivation.object = this;
+}
+
+// Debug.println(&quot;[startBehavior] objectActivation = &quot; + objectActivation);
+
+this.objectActivation.startBehavior(classifier, inputs);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-dispatch" name="dispatch" isReentrant="false" specification="Semantics-Classes-Kernel-Object-dispatch.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-dispatch-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-dispatch-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Dispatch the given operation to a method execution, using a dispatch strategy.
+
+return ((DispatchStrategy)this.locus.factory.getStrategy(&quot;dispatch&quot;)).dispatch(this, operation);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-send" name="send" isReentrant="false" specification="Semantics-Classes-Kernel-Object-send.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-send-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <language>Java</language>
+ <body>// If the object is active, add the given signal instance to the event pool and signal that a new signal instance has arrived.
+
+if (this.objectActivation != null) {
+ this.objectActivation.send(signalInstance);
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-destroy" name="destroy" isReentrant="false" specification="Semantics-Classes-Kernel-Object-destroy.1">
+ <language>Java</language>
+ <body>// Stop the object activation (if any), clear all types and destroy the object as an extensional value.
+
+Debug.println(&quot;[destroy] object = &quot; + this.objectId());
+
+if (this.objectActivation != null) {
+ this.objectActivation.stop();
+ this.objectActivation = null;
+}
+
+this.types.clear();
+super.destroy();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-register" name="register" isReentrant="false" specification="Semantics-Classes-Kernel-Object-register.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-register-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ <language>Java</language>
+ <body>// Register the given accept event accepter to wait for a dispatched signal event.
+
+if (this.objectActivation != null) {
+ this.objectActivation.register(accepter);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-unregister" name="unregister" isReentrant="false" specification="Semantics-Classes-Kernel-Object-unregister.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-unregister-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ <language>Java</language>
+ <body>// Remove the given event accepter for the list of waiting event accepters.
+
+if (this.objectActivation != null) {
+ this.objectActivation.unregister(accepter);
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-Object-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new object that is a copy of this object at the same locus as this object.
+// However, the new object will NOT have any object activation (i.e, its classifier behaviors will not be started).
+
+Object_ newObject = (Object_)(super.copy());
+
+ClassList types = this.types;
+for (int i = 0; i &lt; types.size(); i++) {
+ Class type = types.getValue(i);
+ newObject.types.addValue(type);
+}
+
+return newObject;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-Object-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new object with no type, feature values or locus.
+
+return new Object_();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Object-getTypes" name="getTypes" isReentrant="false" specification="Semantics-Classes-Kernel-Object-getTypes.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Object-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the types of this object.
+
+ClassifierList types = new ClassifierList();
+ClassList myTypes = this.types;
+for (int i = 0; i &lt; myTypes.size(); i++) {
+ Class type = myTypes.getValue(i);
+ types.addValue(type);
+}
+
+return types;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-startBehavior.1" name="startBehavior" visibility="public" method="Semantics-Classes-Kernel-Object-startBehavior">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-startBehavior.1-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-startBehavior.1-classifier-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-startBehavior.1-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-startBehavior.1-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Object-startBehavior.1-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-dispatch.1" name="dispatch" visibility="public" method="Semantics-Classes-Kernel-Object-dispatch">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-dispatch.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-dispatch.1-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-send.1" name="send" visibility="public" method="Semantics-Classes-Kernel-Object-send">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-send.1-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-destroy.1" name="destroy" visibility="public" method="Semantics-Classes-Kernel-Object-destroy"/>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-register.1" name="register" visibility="public" method="Semantics-Classes-Kernel-Object-register">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-register.1-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-unregister.1" name="unregister" visibility="public" method="Semantics-Classes-Kernel-Object-unregister">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-unregister.1-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-Object-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-Object-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Object-getTypes.1" name="getTypes" visibility="public" method="Semantics-Classes-Kernel-Object-getTypes">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Object-getTypes.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Object-getTypes.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Object-getTypes.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation" name="LiteralBooleanEvaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-LiteralBooleanEvaluation">
+ <body>A boolean evaluation is an evaluation whose specification is a literal boolean.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-_generalization.0" general="Semantics-Classes-Kernel-LiteralEvaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Evaluate a literal boolean, producing a boolean value.
+
+LiteralBoolean literal = (LiteralBoolean)specification;
+BooleanValue booleanValue = new BooleanValue();
+booleanValue.type = this.getType(&quot;Boolean&quot;);
+booleanValue.value = literal.value;
+
+return booleanValue;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate.1" name="evaluate" visibility="public" method="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralBooleanEvaluation-evaluate.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-LiteralEvaluation" name="LiteralEvaluation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-LiteralEvaluation">
+ <body>A literal evaluation is an evaluation whose specification is a Literal Specification.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-_generalization.0" general="Semantics-Classes-Kernel-Evaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-getType" name="getType" isReentrant="false" specification="Semantics-Classes-Kernel-LiteralEvaluation-getType.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-getType-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-getType-builtInTypeName" name="builtInTypeName" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the type of the specification. If that is null, then use the built-in type of the given name.
+
+PrimitiveType type = (PrimitiveType)(this.specification.type);
+
+if (type == null) {
+ type = this.locus.factory.getBuiltInType(builtInTypeName);
+}
+
+return type;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-getType.1" name="getType" visibility="public" method="Semantics-Classes-Kernel-LiteralEvaluation-getType">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-getType.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralEvaluation-getType.1-builtInTypeName" name="builtInTypeName" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation" name="LiteralIntegerEvaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-LiteralIntegerEvaluation">
+ <body>A literal integer evaluation is an evaluation whose specification is a literal integer.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-_generalization.0" general="Semantics-Classes-Kernel-LiteralEvaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Evaluate a literal integer, producing an integer value.
+
+LiteralInteger literal = (LiteralInteger)specification;
+IntegerValue integerValue = new IntegerValue();
+integerValue.type = this.getType(&quot;Integer&quot;);
+integerValue.value = literal.value;
+
+return integerValue;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate.1" name="evaluate" visibility="public" method="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralIntegerEvaluation-evaluate.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation" name="LiteralNullEvaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-LiteralNullEvaluation">
+ <body>A literal null evaluation is an evaluation whose specification is a literal null.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-_generalization.0" general="Semantics-Classes-Kernel-LiteralEvaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Evaluate a literal null, returning nothing (since a null represents an &quot;absence of any value&quot;).
+
+return null;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate.1" name="evaluate" visibility="public" method="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralNullEvaluation-evaluate.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation" name="LiteralStringEvaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-LiteralStringEvaluation">
+ <body>A literal string evaluation is an evaluation whose specification is a literal string.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-_generalization.0" general="Semantics-Classes-Kernel-LiteralEvaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Evaluate a literal string, producing a string value.
+
+LiteralString literal = (LiteralString)specification;
+StringValue stringValue = new StringValue();
+stringValue.type = this.getType(&quot;String&quot;);
+stringValue.value = literal.value;
+
+return stringValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate.1" name="evaluate" visibility="public" method="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralStringEvaluation-evaluate.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation" name="LiteralUnlimitedNaturalEvaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation">
+ <body>A literal unlimited natural evaluation is an evaluation whose specification is a literal unlimited natural.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-_generalization.0" general="Semantics-Classes-Kernel-LiteralEvaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Evaluate a literal unlimited natural producing an unlimited natural value.
+
+LiteralUnlimitedNatural literal = (LiteralUnlimitedNatural)specification;
+UnlimitedNaturalValue unlimitedNaturalValue = new UnlimitedNaturalValue();
+unlimitedNaturalValue.type = this.getType(&quot;UnlimitedNatural&quot;);
+unlimitedNaturalValue.value = literal.value;
+
+return unlimitedNaturalValue;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate.1" name="evaluate" visibility="public" method="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralUnlimitedNaturalEvaluation-evaluate.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-Link" name="Link">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Link-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Link">
+ <body>A link is an extensional value whose (single) type is an association. (However, if the link has been destroyed, then it has no type.)&#xD;
+A link must at have most one feature value for each structural feature owned by its type.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Link-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-Link-_generalization.0" general="Semantics-Classes-Kernel-ExtensionalValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-Link-type" name="type" visibility="public" association="Semantics-Classes-Kernel-A_type_Link">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Link-type-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Link-type">
+ <body>The type of this link.</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Association"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Link-type-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Link-destroy" name="destroy" isReentrant="false" specification="Semantics-Classes-Kernel-Link-destroy.1">
+ <language>Java</language>
+ <body>// Remove the type of this link and destroy it.
+// Shift the positions of the feature values of any remaining links in
+// the extent of the same association, for ends that are ordered.
+
+Debug.println(&quot;[destroy] link = &quot; + this.objectId());
+
+PropertyList ends = this.type.memberEnd;
+ExtensionalValueList extent = this.locus.getExtent(this.type);
+
+for (int i = 0; i &lt; extent.size(); i++) {
+ ExtensionalValue otherLink = extent.getValue(i);
+ for (int j=0; j &lt; ends.size(); j++) {
+ Property end = ends.getValue(j);
+ if (end.multiplicityElement.isOrdered) {
+ FeatureValue featureValue = otherLink.getFeatureValue(end);
+ if (this.getFeatureValue(end).position &lt; featureValue.position) {
+ featureValue.position = featureValue.position - 1;
+ }
+ }
+ }
+}
+
+this.type = null;
+super.destroy();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Link-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-Link-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new link with the same type, locus and feature values as this link.
+
+Link newValue = (Link)(super.copy());
+
+newValue.type = this.type;
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Link-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-Link-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new link with no type or properies.
+
+return new Link();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Link-getTypes" name="getTypes" isReentrant="false" specification="Semantics-Classes-Kernel-Link-getTypes.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Link-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Link-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the single type of this link (if any).
+
+ClassifierList types = null;
+
+if (this.type == null) {
+ types = new ClassifierList();
+} else {
+ types = new ClassifierList();
+ types.addValue(this.type);
+}
+
+return types;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Link-isMatchingLink" name="isMatchingLink" isReentrant="false" specification="Semantics-Classes-Kernel-Link-isMatchingLink.1">
+ <language>Java</language>
+ <body>// Test whether the given link matches the values of this link on all
+// ends other than the given end.
+
+PropertyList ends = this.type.memberEnd;
+
+boolean matches = true;
+int i = 1;
+while (matches &amp; i &lt;= ends.size()) {
+ Property otherEnd = ends.getValue(i - 1);
+ if (otherEnd != end &amp;
+ !this.getFeatureValue(otherEnd).values.getValue(0).equals(
+ link.getFeatureValue(otherEnd).values.getValue(0))) {
+ matches = false;
+ }
+ i = i + 1;
+}
+
+return matches;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Link-getOtherFeatureValues" name="getOtherFeatureValues" isReentrant="false" specification="Semantics-Classes-Kernel-Link-getOtherFeatureValues.1">
+ <language>Java</language>
+ <body>// Return all feature values for the given end of links in the given
+// extent whose other ends match this link.
+
+FeatureValueList featureValues = new FeatureValueList();
+for (int i = 0; i &lt; extent.size(); i++) {
+ ExtensionalValue link = extent.getValue(i);
+ if (link != this) {
+ if (isMatchingLink(link, end)) {
+ featureValues.addValue(link.getFeatureValue(end));
+ }
+ }
+}
+return featureValues;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-Link-addTo" name="addTo" isReentrant="false" specification="Semantics-Classes-Kernel-Link-addTo.1">
+ <language>Java</language>
+ <body>// Add this link to the extent of its association at the given locus.
+// Shift the positions of ends of other links, as appropriate, for ends
+// that are ordered.
+
+Debug.println(&quot;[addTo] link = &quot; + this.objectId());
+
+PropertyList ends = this.type.memberEnd;
+ExtensionalValueList extent = locus.getExtent(this.type);
+
+for (int i = 0; i &lt; ends.size(); i++) {
+ Property end = ends.getValue(i);
+ if (end.multiplicityElement.isOrdered) {
+ FeatureValue featureValue = this.getFeatureValue(end);
+ FeatureValueList otherFeatureValues =
+ this.getOtherFeatureValues(extent, end);
+ int n = otherFeatureValues.size();
+ if (featureValue.position &lt; 0 | featureValue.position > n) {
+ featureValue.position = n + 1;
+ } else {
+ if (featureValue.position == 0) {
+ featureValue.position = 1;
+ }
+ for (int j = 0; j &lt; otherFeatureValues.size(); j++) {
+ FeatureValue otherFeatureValue = otherFeatureValues.getValue(j);
+ if (featureValue.position &lt;= otherFeatureValue.position) {
+ otherFeatureValue.position = otherFeatureValue.position + 1;
+ }
+ }
+ }
+ }
+}
+
+locus.add(this);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Link-destroy.1" name="destroy" visibility="public" method="Semantics-Classes-Kernel-Link-destroy"/>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Link-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-Link-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Link-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-Link-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Link-getTypes.1" name="getTypes" visibility="public" method="Semantics-Classes-Kernel-Link-getTypes">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-getTypes.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Link-getTypes.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Link-getTypes.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Link-isMatchingLink.1" name="isMatchingLink" visibility="public" method="Semantics-Classes-Kernel-Link-isMatchingLink">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-isMatchingLink.1-link" name="link" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-isMatchingLink.1-end" name="end" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Property"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-isMatchingLink.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Link-getOtherFeatureValues.1" name="getOtherFeatureValues" visibility="public" method="Semantics-Classes-Kernel-Link-getOtherFeatureValues">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-getOtherFeatureValues.1-extent" name="extent" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Link-getOtherFeatureValues.1-extent-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-Link-getOtherFeatureValues.1-extent-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-getOtherFeatureValues.1-end" name="end" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Property"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Link-addTo.1" name="addTo" visibility="public" method="Semantics-Classes-Kernel-Link-addTo">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Link-addTo.1-locus" name="locus" visibility="public" type="Semantics-Loci-LociL1-Locus"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation" name="InstanceValueEvaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-InstanceValueEvaluation">
+ <body>An instance value evaluation is an evaluation whose specification is an instance value. </body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-_generalization.0" general="Semantics-Classes-Kernel-Evaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// If the instance specification is for an enumeration, then return the identified enumeration literal.
+// If the instance specification is for a data type (but not a primitive value or an enumeration), then create a data value of the given data type.
+// If the instance specification is for an object, then create an object at the current locus with the specified types.
+// Set each feature of the created value to the result of evaluating the value specifications for the specified slot for the feature.
+
+// Debug.println(&quot;[evaluate] InstanceValueEvaluation...&quot;);
+
+InstanceSpecification instance = ((InstanceValue)this.specification).instance;
+ClassifierList types = instance.classifier;
+Classifier myType = types.getValue(0);
+
+Debug.println(&quot;[evaluate] type = &quot; + myType.name);
+
+Value value;
+if (instance instanceof EnumerationLiteral) {
+ // Debug.println(&quot;[evaluate] Type is an enumeration.&quot;);
+ EnumerationValue enumerationValue = new EnumerationValue();
+ enumerationValue.type = (Enumeration)myType;
+ enumerationValue.literal = (EnumerationLiteral)instance;
+ value = enumerationValue;
+}
+else {
+ StructuredValue structuredValue = null;
+
+ if (myType instanceof DataType) {
+ // Debug.println(&quot;[evaluate] Type is a data type.&quot;);
+ DataValue dataValue = new DataValue();
+ dataValue.type = (DataType)myType;
+ structuredValue = dataValue;
+ }
+ else {
+ Object_ object = null;
+ if (myType instanceof Behavior) {
+ // Debug.println(&quot;[evaluate] Type is a behavior.&quot;);
+ object = this.locus.factory.createExecution((Behavior)myType, null);
+ }
+ else {
+ // Debug.println(&quot;[evaluate] Type is a class.&quot;);
+ object = new Object_();
+ for (int i = 0; i &lt; types.size(); i++) {
+ Classifier type = types.getValue(i);
+ object.types.addValue((Class)type);
+ }
+ }
+
+ this.locus.add(object);
+
+ Reference reference = new Reference();
+ reference.referent = object;
+ structuredValue = reference;
+ }
+
+ structuredValue.createFeatureValues();
+
+ // Debug.println(&quot;[evaluate] &quot; + instance.slot.size() + &quot; slot(s).&quot;);
+
+ SlotList instanceSlots = instance.slot;
+ for (int i = 0; i &lt; instanceSlots.size(); i++) {
+ Slot slot = instanceSlots.getValue(i);
+ ValueList values = new ValueList();
+
+ // Debug.println(&quot;[evaluate] feature = &quot; + slot.definingFeature.name + &quot;, &quot; + slot.value.size() + &quot; value(s).&quot;);
+ ValueSpecificationList slotValues = slot.value;
+ for (int j = 0; j &lt; slotValues.size(); j++) {
+ ValueSpecification slotValue = slotValues.getValue(j);
+ // Debug.println(&quot;[evaluate] Value = &quot; + slotValue.getClass().getName());
+ values.addValue(this.locus.executor.evaluate(slotValue));
+ }
+ structuredValue.setFeatureValue(slot.definingFeature, values, 0);
+ }
+
+ value = structuredValue;
+}
+
+return value;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate.1" name="evaluate" visibility="public" method="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-InstanceValueEvaluation-evaluate.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-IntegerValue" name="IntegerValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-IntegerValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-IntegerValue">
+ <body>An integer value is a primitive value whose type is Integer.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-IntegerValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-IntegerValue-_generalization.0" general="Semantics-Classes-Kernel-PrimitiveValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-IntegerValue-value" name="value" visibility="public">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-IntegerValue-value-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-IntegerValue-value">
+ <body>The actual Integer value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-IntegerValue-specify" name="specify" isReentrant="false" specification="Semantics-Classes-Kernel-IntegerValue-specify.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-specify-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return a literal integer with the value of this integer value.
+
+LiteralInteger literal = new LiteralInteger();
+
+literal.type = this.type;
+literal.value = this.value;
+
+return literal;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-IntegerValue-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-IntegerValue-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this integer value is equal to the otherValue.
+// To be equal, the otherValue must have the same value as this integer value.
+
+boolean isEqual = false;
+if (otherValue instanceof IntegerValue) {
+ isEqual = ((IntegerValue)otherValue).value == this.value;
+}
+
+return isEqual;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-IntegerValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-IntegerValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new integer value with the same value as this integer value.
+
+IntegerValue newValue = (IntegerValue)(super.copy());
+
+newValue.value = this.value;
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-IntegerValue-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-IntegerValue-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new integer value with no value.
+
+return new IntegerValue();</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-IntegerValue-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-IntegerValue-toString.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>String stringValue = &quot;&quot;;
+
+if (this.value == 0) {
+ stringValue = &quot;0&quot;;
+} else {
+ int positiveValue = this.value;
+
+ if (positiveValue &lt; 0) {
+ positiveValue = -positiveValue;
+ }
+
+ do {
+ int digit = positiveValue % 10;
+
+ if (digit == 0) {
+ stringValue = &quot;0&quot; + stringValue;
+ } else if (digit == 1) {
+ stringValue = &quot;1&quot; + stringValue;
+ } else if (digit == 2) {
+ stringValue = &quot;2&quot; + stringValue;
+ } else if (digit == 3) {
+ stringValue = &quot;3&quot; + stringValue;
+ } else if (digit == 4) {
+ stringValue = &quot;4&quot; + stringValue;
+ } else if (digit == 5) {
+ stringValue = &quot;5&quot; + stringValue;
+ } else if (digit == 6) {
+ stringValue = &quot;6&quot; + stringValue;
+ } else if (digit == 7) {
+ stringValue = &quot;7&quot; + stringValue;
+ } else if (digit == 8) {
+ stringValue = &quot;8&quot; + stringValue;
+ } else if (digit == 9) {
+ stringValue = &quot;9&quot; + stringValue;
+ }
+
+ positiveValue = positiveValue / 10;
+ } while (positiveValue > 0);
+
+ if (this.value &lt; 0) {
+ stringValue = &quot;-&quot; + stringValue;
+ }
+}
+
+return stringValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-IntegerValue-specify.1" name="specify" visibility="public" method="Semantics-Classes-Kernel-IntegerValue-specify">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-specify.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-IntegerValue-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-IntegerValue-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-IntegerValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-IntegerValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-IntegerValue-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-IntegerValue-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-IntegerValue-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-IntegerValue-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-IntegerValue-toString.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-FeatureValue" name="FeatureValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-FeatureValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-FeatureValue">
+ <body>A feature value gives the value(s) that a single structural feature has in a specific structured value.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-FeatureValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-FeatureValue-feature" name="feature" visibility="public" association="Semantics-Classes-Kernel-A_feature_featureValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-FeatureValue-feature-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-FeatureValue-feature">
+ <body>The structural feature being given value(s).</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-FeatureValue-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value" isOrdered="true" isUnique="false" aggregation="composite" association="Semantics-Classes-Kernel-A_values_featureValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-FeatureValue-values-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-FeatureValue-values">
+ <body>The values of for the feature. Zero or more values are possible, as constrained by the multiplicity of the feature.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-FeatureValue-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-FeatureValue-values-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-FeatureValue-position" name="position" visibility="public">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-FeatureValue-position-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-FeatureValue-position">
+ <body>The position of this feature value in a set of ordered values for a feature of an association.&#xD;
+[This is only relevant if the feature value is for a link and the feature is ordered.]</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-FeatureValue-position-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-FeatureValue-hasEqualValues" name="hasEqualValues" isReentrant="false" specification="Semantics-Classes-Kernel-FeatureValue-hasEqualValues.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-FeatureValue-hasEqualValues-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-FeatureValue-hasEqualValues-other" name="other" visibility="public" type="Semantics-Classes-Kernel-FeatureValue"/>
+ <language>Java</language>
+ <body>// Determine if this feature value has an equal set of values as another feature value.
+// If the feature is ordered, then the values also have to be in the same order.
+
+boolean equal = true;
+
+if (this.values.size() != other.values.size()) {
+ equal = false;
+
+} else {
+
+ // Debug.println(&quot;[hasEqualValues] feature = &quot; + this.feature.name + &quot;, &quot; + this.values.size() + &quot; value(s).&quot;);
+
+ if (this.feature.multiplicityElement.isOrdered) {
+ int i = 1;
+ while (equal &amp; i &lt;= this.values.size()) {
+ equal = this.values.getValue(i-1).equals(other.values.getValue(i-1));
+ i = i + 1;
+ }
+
+ } else {
+ // Note: otherFeatureValues is used here solely as a holder for a copy of the list of other values,
+ // since the Java to UML mapping conventions do not allow &quot;remove&quot; on a local list variable.
+ FeatureValue otherFeatureValues = new FeatureValue();
+ ValueList values = other.values;
+ for (int i=0; i &lt; values.size(); i++) {
+ Value value = values.getValue(i);
+ otherFeatureValues.values.addValue(value);
+ }
+
+ int i = 1;
+ while (equal &amp; i &lt;= this.values.size()) {
+ // Debug.println(&quot;[hasEqualValues] This value [&quot; + (i-1) + &quot;] = &quot; + this.values.getValue(i-1));
+
+ boolean matched = false;
+ int j = 1;
+ while (!matched &amp; j &lt;= otherFeatureValues.values.size()) {
+ if (this.values.getValue(i-1).equals(otherFeatureValues.values.getValue(j-1))) {
+ // Debug.println(&quot;[hasEqualValues] Other value [&quot; + (j-1) + &quot;] = &quot; + otherFeatureValues.values.getValue(j-1));
+ matched = true;
+ otherFeatureValues.values.remove(j-1);
+ }
+ j = j + 1;
+ }
+
+ equal = matched;
+ i = i + 1;
+ }
+ }
+}
+
+return equal;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-FeatureValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-FeatureValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-FeatureValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return"/>
+ <language>Java</language>
+ <body>// Create a copy of this feature value.
+
+FeatureValue newValue = new FeatureValue();
+
+newValue.feature = this.feature;
+newValue.position = this.position;
+
+ValueList values = this.values;
+for (int i = 0; i &lt; values.size(); i ++) {
+ Value value = values.getValue(i);
+ newValue.values.addValue(value.copy());
+}
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-FeatureValue-hasEqualValues.1" name="hasEqualValues" visibility="public" method="Semantics-Classes-Kernel-FeatureValue-hasEqualValues">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-FeatureValue-hasEqualValues.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-FeatureValue-hasEqualValues.1-other" name="other" visibility="public" type="Semantics-Classes-Kernel-FeatureValue"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-FeatureValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-FeatureValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-FeatureValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-ExtensionalValue" name="ExtensionalValue" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-ExtensionalValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-ExtensionalValue">
+ <body>An extensional value is a data value that is part of the extent of some classifier at a specific locus.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-ExtensionalValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-ExtensionalValue-_generalization.0" general="Semantics-Classes-Kernel-CompoundValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-ExtensionalValue-locus" name="locus" visibility="public" type="Semantics-Loci-LociL1-Locus" association="Semantics-Classes-Kernel-A_locus_extensionalValues">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-ExtensionalValue-locus-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-ExtensionalValue-locus">
+ <body>The locus of the extent of which this value is a member. (If the value has been destroyed, it has no locus.)</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-ExtensionalValue-locus-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-ExtensionalValue-destroy" name="destroy" isReentrant="false" specification="Semantics-Classes-Kernel-ExtensionalValue-destroy.1">
+ <language>Java</language>
+ <body>// Remove this value from its locus (if it has not already been destroyed).
+
+if (this.locus != null) {
+ this.locus.remove(this);
+}</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-ExtensionalValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-ExtensionalValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-ExtensionalValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new extensional value with the same feature values at the same locus as this one.
+
+ExtensionalValue newValue = (ExtensionalValue)(super.copy());
+
+if (this.locus != null) {
+ this.locus.add(newValue);
+}
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-ExtensionalValue-destroy.1" name="destroy" visibility="public" method="Semantics-Classes-Kernel-ExtensionalValue-destroy"/>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-ExtensionalValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-ExtensionalValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-ExtensionalValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-Evaluation" name="Evaluation" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Evaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Evaluation">
+ <body>An evaluation is used to evaluate a value specification to produce a value.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Evaluation-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-Evaluation-_generalization.0" general="Semantics-Loci-LociL1-SemanticVisitor"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-Evaluation-specification" name="specification" visibility="public" association="Semantics-Classes-Kernel-A_specification_evaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Evaluation-specification-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Evaluation-specification">
+ <body>The value specification to be evaluated.</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-Evaluation-locus" name="locus" visibility="public" type="Semantics-Loci-LociL1-Locus" association="Semantics-Classes-Kernel-A_locus_evaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Evaluation-locus-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Evaluation-locus">
+ <body>The locus at which this evaluation is taking place.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-Evaluation-evaluate" name="evaluate" visibility="public" isAbstract="true" isQuery="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-Evaluation-evaluate-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-Evaluation-evaluate">
+ <body>Evaluate the specification, returning the resulting value.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-Evaluation-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-Evaluation-evaluate-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-EnumerationValue" name="EnumerationValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-EnumerationValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-EnumerationValue">
+ <body>An enumeration value is a value whose (single) type is an enumeration. &#xD;
+It's literal must be an owned literal of it's type.&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-EnumerationValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-EnumerationValue-_generalization.0" general="Semantics-Classes-Kernel-Value"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-EnumerationValue-literal" name="literal" visibility="public" association="Semantics-Classes-Kernel-A_literal_enumerationValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-EnumerationValue-literal-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-EnumerationValue-literal">
+ <body>The literal value of this enumeration value.</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-EnumerationLiteral"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-EnumerationValue-type" name="type" visibility="public" association="Semantics-Classes-Kernel-A_type_enumerationValue">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Enumeration"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-EnumerationValue-specify" name="specify" isReentrant="false" specification="Semantics-Classes-Kernel-EnumerationValue-specify.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-specify-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return an instance value with literal as the instance.
+
+InstanceValue instanceValue = new InstanceValue();
+InstanceSpecification instance = new InstanceSpecification();
+
+instanceValue.type = this.type;
+instanceValue.instance = this.literal;
+
+return instanceValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-EnumerationValue-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-EnumerationValue-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this enumeration value is equal to the otherValue.
+// To be equal, the otherValue must also be an enumeration value with the same literal as this enumeration value.
+
+boolean isEqual = false;
+if (otherValue instanceof EnumerationValue) {
+ isEqual = ((EnumerationValue)otherValue).literal == this.literal;
+}
+
+return isEqual;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-EnumerationValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-EnumerationValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new enumeration value with the same literal as this enumeration value.
+
+EnumerationValue newValue = (EnumerationValue)(super.copy());
+
+newValue.type = this.type;
+newValue.literal = this.literal;
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-EnumerationValue-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-EnumerationValue-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new enumeration value with no literal.
+
+return new EnumerationValue();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes" name="getTypes" isReentrant="false" specification="Semantics-Classes-Kernel-EnumerationValue-getTypes.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the single type of this enumeration value.
+
+ClassifierList types = new ClassifierList();
+types.addValue(this.type);
+
+return types;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-EnumerationValue-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-EnumerationValue-toString.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>return literal.name;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-EnumerationValue-specify.1" name="specify" visibility="public" method="Semantics-Classes-Kernel-EnumerationValue-specify">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-specify.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-EnumerationValue-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-EnumerationValue-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-EnumerationValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-EnumerationValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-EnumerationValue-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-EnumerationValue-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes.1" name="getTypes" visibility="public" method="Semantics-Classes-Kernel-EnumerationValue-getTypes">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-EnumerationValue-getTypes.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-EnumerationValue-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-EnumerationValue-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-EnumerationValue-toString.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-DataValue" name="DataValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-DataValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-DataValue">
+ <body>A data value is a compund value whose (single) type is a data type other than a primitive type or an enumeration.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-DataValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-DataValue-_generalization.0" general="Semantics-Classes-Kernel-CompoundValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-DataValue-type" name="type" visibility="public" association="Semantics-Classes-Kernel-A_type_dataValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-DataValue-type-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-DataValue-type">
+ <body>The type of this data value. This must not be a primitive or an enumeration.</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-DataType"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-DataValue-getTypes" name="getTypes" isReentrant="false" specification="Semantics-Classes-Kernel-DataValue-getTypes.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DataValue-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-DataValue-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-DataValue-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the single type of this data value.
+
+ClassifierList types = new ClassifierList();
+types.addValue(this.type);
+
+return types;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-DataValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-DataValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DataValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new data value with the same type and feature values as this data value.
+
+DataValue newValue = (DataValue)(super.copy());
+
+newValue.type = this.type;
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-DataValue-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-DataValue-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DataValue-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new data value with no type or feature values.
+
+return new DataValue();</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-DataValue-getTypes.1" name="getTypes" visibility="public" method="Semantics-Classes-Kernel-DataValue-getTypes">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DataValue-getTypes.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-DataValue-getTypes.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-DataValue-getTypes.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-DataValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-DataValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DataValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-DataValue-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-DataValue-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DataValue-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-CompoundValue" name="CompoundValue" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-CompoundValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-CompoundValue">
+ <body>A compound value is a structured value with by-value semantics. Values are associated with each structural feature specified by the type(s) of the compound value.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-CompoundValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-CompoundValue-_generalization.0" general="Semantics-Classes-Kernel-StructuredValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-CompoundValue-featureValues" name="featureValues" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" aggregation="composite" association="Semantics-Classes-Kernel-A_featureValues_compoundValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-CompoundValue-featureValues-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-CompoundValue-featureValues-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-CompoundValue-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-CompoundValue-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this data value is equal to the otherValue.
+// To be equal, the otherValue must also be a compund value with the same types and equal values for each feature.
+
+// Debug.println(&quot;[equals] othervalue instanceof CompoundValue = &quot; + (otherValue instanceof CompoundValue));
+// Debug.println(&quot;[equals] super.equals(otherValue) = &quot; + super.equals(otherValue));
+
+boolean isEqual = otherValue instanceof CompoundValue;
+
+ if (isEqual) {
+
+ CompoundValue otherCompoundValue = (CompoundValue)otherValue;
+ // Debug.println(&quot;[equals] &quot; + this.featureValues.size() + &quot; feature(s).&quot;);
+
+ isEqual = super.equals(otherValue) &amp; otherCompoundValue.featureValues.size() == this.featureValues.size();
+
+ int i = 1;
+ while (isEqual &amp; i &lt;= this.featureValues.size()) {
+ FeatureValue thisFeatureValue = this.featureValues.getValue(i-1);
+
+ boolean matched = false;
+ int j = 1;
+ while (!matched &amp; j &lt;= otherCompoundValue.featureValues.size()) {
+ FeatureValue otherFeatureValue = otherCompoundValue.featureValues.getValue(j-1);
+ if (thisFeatureValue.feature == otherFeatureValue.feature) {
+ matched = thisFeatureValue.hasEqualValues(otherFeatureValue);
+ }
+ j = j + 1;
+ }
+
+ isEqual = matched;
+ i = i + 1;
+ }
+}
+
+return isEqual;</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-CompoundValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-CompoundValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new data value with the same featureValues as this data value.
+
+CompoundValue newValue = (CompoundValue)(super.copy());
+
+FeatureValueList featureValues = this.featureValues;
+for (int i = 0; i &lt; featureValues.size(); i++) {
+ FeatureValue featureValue = featureValues.getValue(i);
+ newValue.featureValues.addValue(featureValue.copy());
+}
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValue" name="getFeatureValue" isReentrant="false" specification="Semantics-Classes-Kernel-CompoundValue-getFeatureValue.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValue-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the value(s) of the member of featureValues for the given feature.
+
+FeatureValue featureValue = null;
+int i = 1;
+while (featureValue == null &amp; i &lt;= this.featureValues.size()) {
+ if (this.featureValues.getValue(i-1).feature == feature) {
+ featureValue = this.featureValues.getValue(i-1);
+ }
+ i = i + 1;
+}
+
+return featureValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue" name="setFeatureValue" isReentrant="false" specification="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue-values-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue-position" name="position" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue-position-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Set the value(s) of the member of featureValues for the given feature.
+
+FeatureValue featureValue = this.getFeatureValue(feature);
+
+if (featureValue == null) {
+ featureValue = new FeatureValue();
+ this.featureValues.addValue(featureValue);
+}
+
+featureValue.feature = feature;
+featureValue.values = values;
+featureValue.position = position;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues" name="getFeatureValues" isReentrant="false" specification="Semantics-Classes-Kernel-CompoundValue-getFeatureValues.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the feature values for this compound value.
+
+return this.featureValues;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-CompoundValue-removeFeatureValues" name="removeFeatureValues" isReentrant="false" specification="Semantics-Classes-Kernel-CompoundValue-removeFeatureValues.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-removeFeatureValues-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Remove all feature values for features whose type is the given classifier.
+
+int i = 1;
+while (i &lt;= this.featureValues.size()) {
+ if (this.featureValues.getValue(i-1).feature.typedElement.type == classifier) {
+ this.featureValues.remove(i-1);
+ }
+ else {
+ i = i + 1;
+ }
+}
+ </body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-CompoundValue-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-CompoundValue-toString.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>String buffer = &quot;(&quot; + this.objectId() + &quot;:&quot;;
+
+ClassifierList types = this.getTypes();
+
+int i = 1;
+while (i &lt;= types.size()) {
+ buffer = buffer +&quot; &quot; + types.getValue(i-1).name;
+ i = i + 1;
+}
+
+int k = 1;
+while (k &lt;= this.featureValues.size()) {
+ FeatureValue featureValue = this.featureValues.getValue(k-1);
+ buffer = buffer + &quot;\n\t\t&quot; + featureValue.feature.name + &quot;[&quot; + featureValue.position + &quot;] =&quot;;
+
+ int j = 1;
+ while (j &lt;= featureValue.values.size()) {
+ buffer = buffer + &quot; &quot; + featureValue.values.getValue(j-1).toString();
+ j = j + 1;
+ }
+
+ k = k + 1;
+}
+
+return buffer + &quot;)&quot;;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-CompoundValue-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-CompoundValue-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-CompoundValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-CompoundValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValue.1" name="getFeatureValue" visibility="public" method="Semantics-Classes-Kernel-CompoundValue-getFeatureValue">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValue.1-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1" name="setFeatureValue" visibility="public" method="Semantics-Classes-Kernel-CompoundValue-setFeatureValue">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1-feature" name="feature" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-StructuralFeature"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1-values-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1-position" name="position" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-CompoundValue-setFeatureValue.1-position-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues.1" name="getFeatureValues" visibility="public" method="Semantics-Classes-Kernel-CompoundValue-getFeatureValues">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-FeatureValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-CompoundValue-getFeatureValues.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-CompoundValue-removeFeatureValues.1" name="removeFeatureValues" visibility="public" method="Semantics-Classes-Kernel-CompoundValue-removeFeatureValues">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-removeFeatureValues.1-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-CompoundValue-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-CompoundValue-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-CompoundValue-toString.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-BooleanValue" name="BooleanValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-BooleanValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-BooleanValue">
+ <body>A boolean value is a primitive value whose type is Boolean.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-BooleanValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-BooleanValue-_generalization.0" general="Semantics-Classes-Kernel-PrimitiveValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-BooleanValue-value" name="value" visibility="public">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-BooleanValue-value-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-BooleanValue-value">
+ <body>The actual Boolean value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-BooleanValue-specify" name="specify" isReentrant="false" specification="Semantics-Classes-Kernel-BooleanValue-specify.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-specify-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return a literal boolean with the value of this boolean value.
+
+LiteralBoolean literal = new LiteralBoolean();
+
+literal.type = this.type;
+literal.value = this.value;
+
+return literal;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-BooleanValue-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-BooleanValue-equals.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-equals-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-equals-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <language>Java</language>
+ <body>// Test if this boolean value is equal to the otherValue.
+// To be equal, the otherValue must have the same value as this boolean value.
+
+boolean isEqual = false;
+if (otherValue instanceof BooleanValue) {
+ isEqual = ((BooleanValue)otherValue).value == this.value;
+}
+
+return isEqual;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-BooleanValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-BooleanValue-copy.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new boolean value with the same value as this boolean value.
+
+BooleanValue newValue = (BooleanValue)(super.copy());
+
+newValue.value = this.value;
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-BooleanValue-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-BooleanValue-new_.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Return a new boolean value with no value.
+
+return new BooleanValue();</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-BooleanValue-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-BooleanValue-toString.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-toString-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>String stringValue = &quot;false&quot;;
+
+if (this.value) {
+ stringValue = &quot;true&quot;;
+}
+
+return stringValue;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-BooleanValue-specify.1" name="specify" visibility="public" method="Semantics-Classes-Kernel-BooleanValue-specify">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-specify.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-BooleanValue-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-BooleanValue-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-equals.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-BooleanValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-BooleanValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-BooleanValue-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-BooleanValue-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-BooleanValue-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-BooleanValue-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-BooleanValue-toString.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_featureValues_compoundValue" name="A_featureValues_compoundValue" visibility="private" memberEnd="Semantics-Classes-Kernel-A_featureValues_compoundValue-_ownedEnd.0 Semantics-Classes-Kernel-CompoundValue-featureValues">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_featureValues_compoundValue-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-CompoundValue" association="Semantics-Classes-Kernel-A_featureValues_compoundValue"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_type_dataValue" name="A_type_dataValue" visibility="private" memberEnd="Semantics-Classes-Kernel-A_type_dataValue-_ownedEnd.0 Semantics-Classes-Kernel-DataValue-type">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_type_dataValue-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-DataValue" association="Semantics-Classes-Kernel-A_type_dataValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_type_dataValue-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_type_dataValue-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_type_enumerationValue" name="A_type_enumerationValue" visibility="private" memberEnd="Semantics-Classes-Kernel-A_type_enumerationValue-_ownedEnd.0 Semantics-Classes-Kernel-EnumerationValue-type">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_type_enumerationValue-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-EnumerationValue" association="Semantics-Classes-Kernel-A_type_enumerationValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_type_enumerationValue-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_type_enumerationValue-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_literal_enumerationValue" name="A_literal_enumerationValue" visibility="private" memberEnd="Semantics-Classes-Kernel-A_literal_enumerationValue-_ownedEnd.0 Semantics-Classes-Kernel-EnumerationValue-literal">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_literal_enumerationValue-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-EnumerationValue" association="Semantics-Classes-Kernel-A_literal_enumerationValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_literal_enumerationValue-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_literal_enumerationValue-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_specification_evaluation" name="A_specification_evaluation" visibility="private" memberEnd="Semantics-Classes-Kernel-A_specification_evaluation-_ownedEnd.0 Semantics-Classes-Kernel-Evaluation-specification">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_specification_evaluation-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-Evaluation" association="Semantics-Classes-Kernel-A_specification_evaluation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_specification_evaluation-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_specification_evaluation-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_locus_evaluation" name="A_locus_evaluation" visibility="private" memberEnd="Semantics-Classes-Kernel-A_locus_evaluation-_ownedEnd.0 Semantics-Classes-Kernel-Evaluation-locus">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_locus_evaluation-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-Evaluation" association="Semantics-Classes-Kernel-A_locus_evaluation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_locus_evaluation-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_locus_evaluation-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_locus_extensionalValues" name="A_locus_extensionalValues" visibility="private" memberEnd="Semantics-Loci-LociL1-Locus-extensionalValues Semantics-Classes-Kernel-ExtensionalValue-locus"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_values_featureValue" name="A_values_featureValue" visibility="private" memberEnd="Semantics-Classes-Kernel-A_values_featureValue-_ownedEnd.0 Semantics-Classes-Kernel-FeatureValue-values">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_values_featureValue-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-FeatureValue" association="Semantics-Classes-Kernel-A_values_featureValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_values_featureValue-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_feature_featureValue" name="A_feature_featureValue" visibility="private" memberEnd="Semantics-Classes-Kernel-A_feature_featureValue-_ownedEnd.0 Semantics-Classes-Kernel-FeatureValue-feature">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_feature_featureValue-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-FeatureValue" association="Semantics-Classes-Kernel-A_feature_featureValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_feature_featureValue-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_feature_featureValue-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_type_Link" name="A_type_Link" visibility="private" memberEnd="Semantics-Classes-Kernel-A_type_Link-_ownedEnd.0 Semantics-Classes-Kernel-Link-type">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_type_Link-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-Link" association="Semantics-Classes-Kernel-A_type_Link">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_type_Link-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_type_Link-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_objectActivation_object" name="A_objectActivation_object" visibility="private" memberEnd="Semantics-CommonBehaviors-Communications-ObjectActivation-object Semantics-Classes-Kernel-Object-objectActivation"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_types_object" name="A_types_object" visibility="private" memberEnd="Semantics-Classes-Kernel-A_types_object-_ownedEnd.0 Semantics-Classes-Kernel-Object-types">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_types_object-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-Object" association="Semantics-Classes-Kernel-A_types_object">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_types_object-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_types_object-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_type_primitiveValue" name="A_type_primitiveValue" visibility="private" memberEnd="Semantics-Classes-Kernel-A_type_primitiveValue-_ownedEnd.0 Semantics-Classes-Kernel-PrimitiveValue-type">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_type_primitiveValue-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-PrimitiveValue" association="Semantics-Classes-Kernel-A_type_primitiveValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_type_primitiveValue-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_type_primitiveValue-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Classes-Kernel-A_reference_reference" name="A_reference_reference" visibility="private" memberEnd="Semantics-Classes-Kernel-A_reference_reference-_ownedEnd.0 Semantics-Classes-Kernel-Reference-referent">
+ <ownedEnd xmi:id="Semantics-Classes-Kernel-A_reference_reference-_ownedEnd.0" visibility="private" type="Semantics-Classes-Kernel-Reference" association="Semantics-Classes-Kernel-A_reference_reference">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-A_reference_reference-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Classes-Kernel-A_reference_reference-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-DispatchStrategy" name="DispatchStrategy" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-DispatchStrategy-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-DispatchStrategy">
+ <body>A dispatch strategy is a semantic strategy for the polymorphic dispatching of an operation to an execution of a method for that operation.</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-DispatchStrategy-_generalization.0" general="Semantics-Loci-LociL1-SemanticStrategy"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getName" name="getName" isReentrant="false" specification="Semantics-Classes-Kernel-DispatchStrategy-getName.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getName-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Dispatch strategies are always named &quot;dispatch&quot;.
+
+return &quot;dispatch&quot;;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch" name="dispatch" isReentrant="false" specification="Semantics-Classes-Kernel-DispatchStrategy-dispatch.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch-object" name="object" visibility="public" type="Semantics-Classes-Kernel-Object"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <language>Java</language>
+ <body>// Get the behavior for the given operation as determined by the type(s) of the given object, compile the behavior at the locus of the object, and return the resulting execution object.
+
+return object.locus.factory.createExecution(this.getMethod(object,operation), object);</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getName.1" name="getName" visibility="public" method="Semantics-Classes-Kernel-DispatchStrategy-getName">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getName.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch.1" name="dispatch" visibility="public" method="Semantics-Classes-Kernel-DispatchStrategy-dispatch">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch.1-object" name="object" visibility="public" type="Semantics-Classes-Kernel-Object"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch.1-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-dispatch.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getMethod" name="getMethod" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getMethod-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-DispatchStrategy-getMethod">
+ <body>// Get the method that corresponds to the given operation for the given object.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getMethod-object" name="object" visibility="public" type="Semantics-Classes-Kernel-Object"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getMethod-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-DispatchStrategy-getMethod-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy" name="RedefinitionBasedDispatchStrategy">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy">
+ <body>A redefinition-based dispatch strategy is one that requires:&#xD;
+- each non-abstract operation to have exactly one method &#xD;
+- an overriding subclass operation to explicitly redefine the overridden superclass operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.CommonBehaviors.Communications.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-_generalization.0" general="Semantics-Classes-Kernel-DispatchStrategy"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod" name="getMethod" isReentrant="false" specification="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod-object" name="object" visibility="public" type="Semantics-Classes-Kernel-Object"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the method that corresponds to the given operation for the given object.
+// [If there is more than one type with a method for the operation, then the first one is arbitrarily chosen.]
+
+Behavior method = null;
+int i = 1;
+while (method == null &amp; i &lt;= object.types.size()) {
+ Class type = object.types.getValue(i-1);
+ NamedElementList members = type.member;
+ int j = 1;
+ while (method == null &amp; j &lt;= members.size()) {
+ NamedElement member = members.getValue(j-1);
+ if (member instanceof Operation) {
+ Operation memberOperation = (Operation)member;
+ if (this.operationsMatch(memberOperation, operation)) {
+ method = memberOperation.method.getValue(0);
+ }
+ }
+ j = j + 1;
+ }
+ i = i + 1;
+}
+
+return method;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch" name="operationsMatch" isReentrant="false" specification="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch.1">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch-ownedOperation" name="ownedOperation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch-baseOperation" name="baseOperation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Check if the owned operation is equal to or a redefinition (directly or indirectly) of the base operation.
+
+boolean matches = false;
+if (ownedOperation == baseOperation) {
+ matches = true;
+} else {
+ int i = 1;
+ while (!matches &amp; i &lt;= ownedOperation.redefinedOperation.size()) {
+ matches = this.operationsMatch(ownedOperation.redefinedOperation.getValue(i-1), baseOperation);
+ i = i + 1;
+ }
+}
+
+return matches;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod.1" name="getMethod" visibility="public" method="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod.1-object" name="object" visibility="public" type="Semantics-Classes-Kernel-Object"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-getMethod.1-operation" name="operation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch.1" name="operationsMatch" visibility="public" method="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch.1-ownedOperation" name="ownedOperation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RedefinitionBasedDispatchStrategy-operationsMatch.1-baseOperation" name="baseOperation" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Operation"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-LiteralRealEvaluation" name="LiteralRealEvaluation">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-LiteralRealEvaluation-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-LiteralRealEvaluation">
+ <body>A literal real evaluation is an evaluation whose specification is a literal real.</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-LiteralRealEvaluation-_generalization.0" general="Semantics-Classes-Kernel-LiteralEvaluation"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-LiteralRealEvaluation-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Classes-Kernel-LiteralRealEvaluation-evaluate.1">
+ <language>Java</language>
+ <body>// Evaluate a real integer, producing a real value.
+
+LiteralReal literal = (LiteralReal)specification;
+RealValue realValue = new RealValue();
+realValue.type = this.getType(&quot;Real&quot;);
+realValue.value = literal.value;
+return realValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-LiteralRealEvaluation-evaluate.1" name="evaluate" visibility="public" method="Semantics-Classes-Kernel-LiteralRealEvaluation-evaluate">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-LiteralRealEvaluation-evaluate.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Classes-Kernel-LiteralRealEvaluation-evaluate.1-Parameter1-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Classes-Kernel-RealValue" name="RealValue">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-RealValue-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-RealValue">
+ <body>A real value is a primitive value whose type is Real.</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Classes-Kernel-RealValue-_generalization.0" general="Semantics-Classes-Kernel-PrimitiveValue"/>
+ <ownedAttribute xmi:id="Semantics-Classes-Kernel-RealValue-value" name="value" visibility="public">
+ <ownedComment xmi:id="Semantics-Classes-Kernel-RealValue-value-_ownedComment.0" annotatedElement="Semantics-Classes-Kernel-RealValue-value">
+ <body>The actual Real value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-RealValue-copy" name="copy" isReentrant="false" specification="Semantics-Classes-Kernel-RealValue-copy.1">
+ <language>Java</language>
+ <body>// Create a new real value with the same value as this real value.
+
+RealValue newValue = (RealValue)(super.copy());
+
+newValue.value = this.value;
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-RealValue-equals" name="equals" isReentrant="false" specification="Semantics-Classes-Kernel-RealValue-equals.1">
+ <language>Java</language>
+ <body>// Test if this real value is equal to the otherValue.?
+// To be equal, the otherValue must have the same value as this real value.
+
+boolean isEqual = false;
+if (otherValue instanceof RealValue) {
+ isEqual = ((RealValue)otherValue).value == this.value;
+}
+
+return isEqual;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-RealValue-new_" name="new_" isReentrant="false" specification="Semantics-Classes-Kernel-RealValue-new_.1">
+ <language>Java</language>
+ <body>// Test if this real value is equal to the otherValue.

+// To be equal, the otherValue must have the same value as this real value.
+
+boolean isEqual = false;
+if (otherValue instanceof RealValue) {
+ isEqual = ((RealValue)otherValue).value == this.value;
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-RealValue-specify" name="specify" isReentrant="false" specification="Semantics-Classes-Kernel-RealValue-specify.1">
+ <language>Java</language>
+ <body>// Return a literal real with the value of this real value.
+
+LiteralReal literal = new LiteralReal();
+
+literal.type = this.type;
+literal.value = this.value;
+
+return literal;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Classes-Kernel-RealValue-toString" name="toString" isReentrant="false" specification="Semantics-Classes-Kernel-RealValue-toString.1">
+ <language>Java</language>
+ <body>String stringValue = &quot;&quot;;
+
+if (this.value == 0) {
+ stringValue = &quot;0&quot;;
+} else {
+ float positiveValue = this.value;
+
+ if (positiveValue &lt; 0) {
+ positiveValue = -positiveValue;
+ }
+
+ int exponent = 0;
+
+ if (postiveValue &lt; .1) {
+ while (positiveValue &lt; .1) {
+ positiveValue = positiveValue * 10;
+ exponent = exponent - 1;
+ }
+ else if (positiveValue > 1) {
+ while (positiveValue > 1) {
+ positiveValue = positiveValue / 10;
+ exponent = exponent + 1;
+ }
+ }
+
+ // This gives 10 significant digits in the mantissa.
+ for (int i=0; i&lt;10; i++) {
+ positiveValue = positiveValue * 10;
+ }
+
+ IntegerValue integerValue = new IntegerValue();
+ integerValue.value = (int)positiveValue;
+ stringValue = “0.” + integerValue.toString();
+ integerValue.value = exponent;
+ stringValue = stringValue + “E” + integerValue.toString;
+
+ if (this.value &lt; 0) {
+ stringValue = &quot;-&quot; + stringValue;
+ }
+}
+
+return stringValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-RealValue-specify.1" name="specify" visibility="public" method="Semantics-Classes-Kernel-RealValue-specify">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RealValue-specify.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-RealValue-equals.1" name="equals" visibility="public" method="Semantics-Classes-Kernel-RealValue-equals">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RealValue-equals.1-otherValue" name="otherValue" visibility="public" type="Semantics-Classes-Kernel-Value"/>
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RealValue-equals.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-RealValue-copy.1" name="copy" visibility="public" method="Semantics-Classes-Kernel-RealValue-copy">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RealValue-copy.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-RealValue-new_.1" name="new_" visibility="protected" method="Semantics-Classes-Kernel-RealValue-new_">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RealValue-new_.1-Parameter1" name="Parameter1" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Classes-Kernel-RealValue-toString.1" name="toString" visibility="public" method="Semantics-Classes-Kernel-RealValue-toString">
+ <ownedParameter xmi:id="Semantics-Classes-Kernel-RealValue-toString.1-Parameter1" name="Parameter1" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-CommonBehaviors" name="CommonBehaviors">
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-CommonBehaviors-BasicBehaviors" name="BasicBehaviors">
+ <packageImport xmi:id="Semantics-CommonBehaviors-BasicBehaviors-_packageImport.0" importedPackage="Semantics-Classes-Kernel"/>
+ <packageImport xmi:id="Semantics-CommonBehaviors-BasicBehaviors-_packageImport.1">
+ <importedPackage href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" name="ParameterValue">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <body>A parameter value gives the value(s) for a specific parameter.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-parameter" name="parameter" visibility="public" association="Semantics-CommonBehaviors-BasicBehaviors-A_parameter_parameterValue">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Parameter"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-values" name="values" visibility="public" type="Semantics-Classes-Kernel-Value" aggregation="composite" association="Semantics-CommonBehaviors-BasicBehaviors-A_values_parameterValue">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-values-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-values">
+ <body>The values of for the parameter. Zero or more values are possible, as constrained by the multiplicity of the parameter.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-values-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-values-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-copy" name="copy" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-copy.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new parameter value for the same parameter as this parameter value, but with copies of the values of this parameter value.
+
+ParameterValue newValue = new ParameterValue();
+
+newValue.parameter = this.parameter;
+
+ValueList values = this.values;
+for (int i = 0; i &lt; values.size(); i++) {
+ Value value = values.getValue(i);
+ newValue.values.addValue(value.copy());
+}
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-copy.1" name="copy" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-copy">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution" name="OpaqueBehaviorExecution" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution">
+ <body>An opaque execution is an execution for an opaque behavior. &#xD;
+Opaque behaviors are used to define primitive behaviors.&#xD;
+The actual definition of the primitive behavior should be given in a concrete subclass of OpaqueBehaviorExecution.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-_generalization.0" general="Semantics-CommonBehaviors-BasicBehaviors-Execution"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-execute" name="execute" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-execute.1">
+ <language>Java</language>
+ <body>// Execute the body of the opaque behavior.
+
+Debug.println(&quot;[execute] Opaque behavior &quot; + this.getBehavior().name + &quot;...&quot;);
+
+ParameterList parameters = this.getBehavior().ownedParameter;
+
+ParameterValueList inputs = new ParameterValueList();
+ParameterValueList outputs = new ParameterValueList();
+
+for (int i = 0; i &lt; parameters.size(); i++) {
+ Parameter parameter = parameters.getValue(i);
+
+ if ((parameter.direction == ParameterDirectionKind.in) |
+ (parameter.direction == ParameterDirectionKind.inout)) {
+ inputs.addValue(this.getParameterValue(parameter));
+ }
+
+ if ((parameter.direction == ParameterDirectionKind.inout) |
+ (parameter.direction == ParameterDirectionKind.out) |
+ (parameter.direction == ParameterDirectionKind.return_)) {
+ ParameterValue parameterValue = new ParameterValue();
+ parameterValue.parameter = parameter;
+ this.setParameterValue(parameterValue);
+ outputs.addValue(parameterValue);
+ }
+}
+
+this.doBody(inputs, outputs);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-execute.1" name="execute" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-execute"/>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody" name="doBody" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody">
+ <body>The actual definition of the behavior of an Opaque Behavior should be given in a concrete subclass that defines this operation.&#xD;
+The values of the inputParameters are set when the operation is called.&#xD;
+The values of the outputParmeters should be set during the execution of the operation.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody-inputParameters" name="inputParameters" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody-inputParameters-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody-inputParameters-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody-outputParameters" name="outputParameters" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody-outputParameters-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution-doBody-outputParameters-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution" name="Execution" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-Execution">
+ <body>An execution is used to execute a specific behavior. Since a behavior is a kind of class, an execution is an object with the behavior as its type.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-_generalization.0" general="Semantics-Classes-Kernel-Object"/>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-context" name="context" visibility="public" type="Semantics-Classes-Kernel-Object" association="Semantics-CommonBehaviors-BasicBehaviors-A_context_execution">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-context-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-Execution-context">
+ <body>The object that provides the context for this execution. &#xD;
+The type of the context of the execution must be the context of the type (behavior) of the execution.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-parameterValues" name="parameterValues" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" aggregation="composite" association="Semantics-CommonBehaviors-BasicBehaviors-A_parameterValues_execution">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-parameterValues-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-Execution-parameterValues">
+ <body>The parameterValues for this execution. All parameterValues must have a parameter that is a parameter of the type of this execution.&#xD;
+The values of all input (in and in-out) parameters must be set before the execution is executed.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-parameterValues-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-parameterValues-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-terminate" name="terminate" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-Execution-terminate.1">
+ <language>Java</language>
+ <body>// Terminate an ongoing execution. By default, do nothing.
+
+return;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-copy" name="copy" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-Execution-copy.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new execution that has the same behavior and parameterValues as this execution.
+
+// Debug.println(&quot;[Copy] execution = &quot; + this);
+
+Execution newValue = (Execution)(super.copy());
+
+newValue.context = this.context;
+
+ParameterValueList parameterValues = this.parameterValues;
+for (int i = 0; i &lt; parameterValues.size(); i++) {
+ ParameterValue parameterValue = parameterValues.getValue(i);
+ newValue.parameterValues.addValue(parameterValue.copy());
+}
+
+// Debug.println(&quot;[Copy] Done.&quot;);
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-setParameterValue" name="setParameterValue" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-Execution-setParameterValue.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-setParameterValue-parameterValue" name="parameterValue" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue"/>
+ <language>Java</language>
+ <body>// Set the given parameter value for this execution.
+// If a parameter value already existed for the parameter of the given parameter value, then replace its value.
+
+// Debug.println(&quot;[setParameterValue] parameter = &quot; + parameterValue.parameter.name + &quot; with &quot; + parameterValue.values.size() + &quot; values&quot;);
+
+ParameterValue existingParameterValue = this.getParameterValue(parameterValue.parameter);
+
+if (existingParameterValue == null) {
+ this.parameterValues.addValue(parameterValue);
+}
+else {
+ existingParameterValue.values = parameterValue.values;
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue" name="getParameterValue" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue-parameter" name="parameter" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Parameter"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the parameter value of this execution corresponding to the given parameter (if any).
+
+ParameterValue parameterValue = null;
+int i = 1;
+while (parameterValue == null &amp; i &lt;= this.parameterValues.size()) {
+ if (this.parameterValues.getValue(i-1).parameter == parameter) {
+ parameterValue = this.parameterValues.getValue(i-1);
+ }
+ i = i + 1;
+}
+
+return parameterValue;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues" name="getOutputParameterValues" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the parameter values for output (in-out, out and return) parameters.
+
+ParameterValueList outputs = new ParameterValueList();
+ParameterValueList parameterValues = this.parameterValues;
+for (int i = 0; i &lt; parameterValues.size(); i++) {
+ ParameterValue parameterValue = parameterValues.getValue(i);
+ Parameter parameter = parameterValue.parameter;
+ if ((parameter.direction == ParameterDirectionKind.inout) |
+ (parameter.direction == ParameterDirectionKind.out) |
+ (parameter.direction == ParameterDirectionKind.return_)) {
+ outputs.addValue(parameterValue);
+ }
+}
+
+return outputs;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getBehavior" name="getBehavior" isReentrant="false" specification="Semantics-CommonBehaviors-BasicBehaviors-Execution-getBehavior.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getBehavior-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the behavior that is the type of this execution.
+
+return (Behavior)(this.getTypes().getValue(0));</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-execute" name="execute" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-execute-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-Execution-execute">
+ <body>Execute the behavior given by the type of this execution. &#xD;
+The parameterValues for any input (in or in-out) parameters of the behavior should be set before the execution.&#xD;
+The parameteValues for any output (in-out, out or return) parameters of the behavior will be set by the execution.&#xD;
+</body>
+ </ownedComment>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-terminate.1" name="terminate" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-Execution-terminate"/>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-copy.1" name="copy" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-Execution-copy">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-new_" name="new_" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-new_-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-BasicBehaviors-Execution-new_">
+ <body>Create a new execution with no behavior or parameterValues.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-setParameterValue.1" name="setParameterValue" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-Execution-setParameterValue">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-setParameterValue.1-parameterValue" name="parameterValue" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue.1" name="getParameterValue" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" direction="return"/>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getParameterValue.1-parameter" name="parameter" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Parameter"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues.1" name="getOutputParameterValues" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getOutputParameterValues.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getBehavior.1" name="getBehavior" visibility="public" method="Semantics-CommonBehaviors-BasicBehaviors-Execution-getBehavior">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-BasicBehaviors-Execution-getBehavior.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_context_execution" name="A_context_execution" visibility="private" memberEnd="Semantics-CommonBehaviors-BasicBehaviors-A_context_execution-_ownedEnd.0 Semantics-CommonBehaviors-BasicBehaviors-Execution-context">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_context_execution-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" association="Semantics-CommonBehaviors-BasicBehaviors-A_context_execution">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_context_execution-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_context_execution-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_parameterValues_execution" name="A_parameterValues_execution" visibility="private" memberEnd="Semantics-CommonBehaviors-BasicBehaviors-A_parameterValues_execution-_ownedEnd.0 Semantics-CommonBehaviors-BasicBehaviors-Execution-parameterValues">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_parameterValues_execution-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" association="Semantics-CommonBehaviors-BasicBehaviors-A_parameterValues_execution"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_parameter_parameterValue" name="A_parameter_parameterValue" visibility="private" memberEnd="Semantics-CommonBehaviors-BasicBehaviors-A_parameter_parameterValue-_ownedEnd.0 Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-parameter">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_parameter_parameterValue-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" association="Semantics-CommonBehaviors-BasicBehaviors-A_parameter_parameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_parameter_parameterValue-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_parameter_parameterValue-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_values_parameterValue" name="A_values_parameterValue" visibility="private" memberEnd="Semantics-CommonBehaviors-BasicBehaviors-A_values_parameterValue-_ownedEnd.0 Semantics-CommonBehaviors-BasicBehaviors-ParameterValue-values">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_values_parameterValue-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" association="Semantics-CommonBehaviors-BasicBehaviors-A_values_parameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-BasicBehaviors-A_values_parameterValue-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-CommonBehaviors-Communications" name="Communications">
+ <packageImport xmi:id="Semantics-CommonBehaviors-Communications-_packageImport.0" importedPackage="Semantics-CommonBehaviors-BasicBehaviors"/>
+ <packageImport xmi:id="Semantics-CommonBehaviors-Communications-_packageImport.1">
+ <importedPackage href="fUML_Syntax.uml#Syntax-CommonBehaviors-Communications"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter" name="EventAccepter" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-EventAccepter">
+ <body>An event accepter handles signal reception events.&#xD;
+This is an abstract class intended to provide a common interface for different kinds of event accepters.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-accept" name="accept" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-accept-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-EventAccepter-accept">
+ <body>Accept a signal occurance for the given signal instance.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-accept-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-match" name="match" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-match-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-EventAccepter-match">
+ <body>Determine if the given signal instance matches a trigger of this event accepter.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-match-signalInstance" name="signalInstance" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance"/>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-EventAccepter-match-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution" name="ClassifierBehaviorExecution" classifierBehavior="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity" isActive="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution">
+ <body>A classifier behavior execution executes the classifier behavior from a specific active class. </body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execution" name="execution" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" association="Semantics-CommonBehaviors-Communications-A_execution_classifierBehaviorExecution">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execution-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execution">
+ <body>The execution of the associated classifier behavior for a certain object.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-classifier" name="classifier" visibility="public" association="Semantics-CommonBehaviors-Communications-A_classifier_classifierBehaviorExecution">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-classifier-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-classifier">
+ <body>The classifier whose behavior is being executed. (This must be an active class.)</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-objectActivation" name="objectActivation" visibility="public" type="Semantics-CommonBehaviors-Communications-ObjectActivation" association="Semantics-CommonBehaviors-Communications-A_classifierBehaviorExecutions_objectActivation">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-objectActivation-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-objectActivation">
+ <body>The object activation that owns this classifier behavior execution.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-objectActivation-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity" name="ClassifierBehaviorExecutionActivity" isReentrant="false">
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-OwnedBehaviorActivity1" name="OwnedBehaviorActivity1" isReentrant="false"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.0" visibility="public" source="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_node.3" target="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-ReadSelf">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.0-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.0-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.1" visibility="public" source="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Call20execute" target="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_node.1">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.1-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.1-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.2" visibility="public" source="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-ReadSelf-_result" target="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Read20execution-_object">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.2-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.2-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.3" visibility="public" source="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Read20execution-_result" target="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Call20execute-_target">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.3-_guard">
+ <language>Java</language>
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.3-_weight" value="1"/>
+ </edge>
+ <node xmi:type="uml:CallOperationAction" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Call20execute" name="Call execute" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.1" operation="Semantics-CommonBehaviors-BasicBehaviors-Execution-execute">
+ <target xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Call20execute-_target" visibility="public" incoming="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.3" type="Semantics-CommonBehaviors-BasicBehaviors-Execution">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Call20execute-_target-_upperBound" value="1024"/>
+ </target>
+ </node>
+ <node xmi:type="uml:ActivityFinalNode" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_node.1" visibility="public" incoming="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.1"/>
+ <node xmi:type="uml:ReadSelfAction" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-ReadSelf" name="ReadSelf" visibility="public" incoming="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.0">
+ <result xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-ReadSelf-_result" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.2" type="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution"/>
+ </node>
+ <node xmi:type="uml:InitialNode" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_node.3" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.0"/>
+ <node xmi:type="uml:ReadStructuralFeatureAction" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Read20execution" name="Read execution" visibility="public" structuralFeature="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execution">
+ <object xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Read20execution-_object" visibility="public" incoming="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.2">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Read20execution-_object-_upperBound" value="1"/>
+ </object>
+ <result xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Read20execution-_result" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-_edge.3">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-ClassifierBehaviorExecutionActivity-Read20execution-_result-_upperBound" value="1"/>
+ </result>
+ </node>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute" name="execute" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Set the classifier for this classifier behavior execution to the given class.
+// If the given class is a behavior, set the execution to be the object of the object activation of the classifier behavior execution.
+// Otherwise the class must be an active class, so get an execution object for the classifier behavior for the class.
+// Set the input parameters for the execution to the given values.
+// Then start the active behavior of this ClassifierBehaviorExecution object, which will execute the execution object on a separate thread of control.
+
+// Debug.println(&quot;[execute] Executing behavior for &quot; + classifier.name + &quot;...&quot;);
+
+this.classifier = classifier;
+Object_ object = this.objectActivation.object;
+
+if (classifier instanceof Behavior) {
+ this.execution = (Execution)object;
+} else {
+ this.execution = object.locus.factory.createExecution(classifier.classifierBehavior, object);
+}
+
+if (inputs != null) {
+ for (int i = 0; i &lt; inputs.size(); i++) {
+ ParameterValue input = inputs.getValue(i);
+ this.execution.setParameterValue(input);
+ }
+}
+
+_startObjectBehavior();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-terminate" name="terminate" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-terminate.1">
+ <language>Java</language>
+ <body>// Terminate the associated execution.
+// If the execution is not itself the object of the object activation, then destroy it.
+
+//Debug.println(&quot;[terminate] Terminating behavior for &quot; + classifier.name + &quot;...&quot;);
+
+this.execution.terminate();
+
+if (this.execution != this.objectActivation.object) {
+ this.execution.destroy();
+}
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute.1" name="execute" visibility="public" method="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute.1-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute.1-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute.1-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execute.1-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-terminate.1" name="terminate" visibility="public" method="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-terminate"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Signal" xmi:id="Semantics-CommonBehaviors-Communications-ArrivalSignal" name="ArrivalSignal" visibility="private"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance" name="SignalInstance">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-_ownedComment.0">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-_generalization.0" general="Semantics-Classes-Kernel-CompoundValue"/>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-type" name="type" visibility="public" association="Semantics-CommonBehaviors-Communications-A_type_signalInstance">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-Communications-Signal"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes" name="getTypes" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the single type of this signal instance.
+
+ClassifierList types = new ClassifierList();
+
+types.addValue(this.type);
+
+return types;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-new_" name="new_" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-SignalInstance-new_.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-new_-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new signal instance with no type or feature values.
+
+return new SignalInstance();</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-copy" name="copy" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-SignalInstance-copy.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-copy-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <language>Java</language>
+ <body>// Create a new signal instance with the same type and feature values as this signal instance.
+
+SignalInstance newValue = (SignalInstance)(super.copy());
+
+newValue.type = this.type;
+
+return newValue;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes.1" name="getTypes" visibility="public" method="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-getTypes.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-new_.1" name="new_" visibility="public" method="Semantics-CommonBehaviors-Communications-SignalInstance-new_">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-new_.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-copy.1" name="copy" visibility="public" method="Semantics-CommonBehaviors-Communications-SignalInstance-copy">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-SignalInstance-copy.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation" name="ObjectActivation" classifierBehavior="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop" isActive="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ObjectActivation">
+ <body>An object activation handles the active behavior of an active object.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-_ownedComment.1">
+ <body>import java.util.Iterator;&#xD;
+&#xD;
+import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Syntax.CommonBehaviors.Communications.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+import fUML.Semantics.Loci.LociL1.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-classifierBehaviorExecutions" name="classifierBehaviorExecutions" visibility="public" type="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution" aggregation="composite" association="Semantics-CommonBehaviors-Communications-A_classifierBehaviorExecutions_objectActivation">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-classifierBehaviorExecutions-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ObjectActivation-classifierBehaviorExecutions">
+ <body>The executing classifier behaviors for this object activation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-classifierBehaviorExecutions-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-classifierBehaviorExecutions-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-waitingEventAccepters" name="waitingEventAccepters" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter" association="Semantics-CommonBehaviors-Communications-A_waitingEventAcceptors_objectActivation">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-waitingEventAccepters-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ObjectActivation-waitingEventAccepters">
+ <body>The set of event accepters waiting for signals to be received by the object of this object activation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-waitingEventAccepters-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-waitingEventAccepters-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-eventPool" name="eventPool" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance" isOrdered="true" aggregation="composite" association="Semantics-CommonBehaviors-Communications-A_eventPool_objectActivation">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-eventPool-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ObjectActivation-eventPool">
+ <body>The pool of signals sent to the object of this object activation, pending dispatching as events.&#xD;
+(All the data values in the pool must be signal instances -- that is, they must have a single type that is a signal.)</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-eventPool-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-eventPool-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-object" name="object" visibility="public" type="Semantics-Classes-Kernel-Object" association="Semantics-Classes-Kernel-A_objectActivation_object">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-object-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-ObjectActivation-object">
+ <body>The object whose active behavior is being handled by this active object.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop" name="EventDispatchLoop" isReentrant="false">
+ <edge xmi:type="uml:ControlFlow" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.0" visibility="public" source="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Call20dispatchNextEvent" target="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_node.4">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.0-_guard"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.0-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ObjectFlow" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.1" visibility="public" source="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-ReadSelf-_result" target="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Call20dispatchNextEvent-_target">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.1-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.1-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.2" visibility="public" source="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Accept20ArrivalSignal" target="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-ReadSelf">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.2-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.2-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.3" visibility="public" source="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_node.0" target="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_node.4">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.3-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.3-_weight" value="1"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.4" visibility="public" source="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_node.4" target="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Accept20ArrivalSignal">
+ <guard xmi:type="uml:OpaqueExpression" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.4-_guard">
+ <body></body>
+ </guard>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.4-_weight" value="1"/>
+ </edge>
+ <node xmi:type="uml:InitialNode" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_node.0" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.3"/>
+ <node xmi:type="uml:CallOperationAction" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Call20dispatchNextEvent" name="Call dispatchNextEvent" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.0" operation="Semantics-CommonBehaviors-Communications-ObjectActivation-dispatchNextEvent.1">
+ <target xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Call20dispatchNextEvent-_target" visibility="public" incoming="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.1" type="Semantics-CommonBehaviors-Communications-ObjectActivation">
+ <upperBound xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Call20dispatchNextEvent-_target-_upperBound" value="1024"/>
+ </target>
+ </node>
+ <node xmi:type="uml:ReadSelfAction" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-ReadSelf" name="ReadSelf" visibility="public" incoming="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.2">
+ <result xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-ReadSelf-_result" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.1" type="Semantics-CommonBehaviors-Communications-ObjectActivation"/>
+ </node>
+ <node xmi:type="uml:AcceptEventAction" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Accept20ArrivalSignal" name="Accept ArrivalSignal" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.2" incoming="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.4">
+ <trigger xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-Accept20ArrivalSignal-_trigger.0" visibility="public" event="Semantics-CommonBehaviors-Communications-ArrivalSignalEvent"/>
+ </node>
+ <node xmi:type="uml:MergeNode" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_node.4" visibility="public" outgoing="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.4" incoming="Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.3 Semantics-CommonBehaviors-Communications-ObjectActivation-EventDispatchLoop-_edge.0"/>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-stop" name="stop" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-ObjectActivation-stop.1">
+ <language>Java</language>
+ <body>// Stop this object activation by terminating all classifier behavior executions.
+
+ClassifierBehaviorExecutionList classifierBehaviorExecutions = this.classifierBehaviorExecutions;
+for (int i = 0; i &lt; classifierBehaviorExecutions.size(); i++) {
+ ClassifierBehaviorExecution classifierBehaviorExecution = classifierBehaviorExecutions.getValue(i);
+ classifierBehaviorExecution.terminate();
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-register" name="register" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-ObjectActivation-register.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-register-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ <language>Java</language>
+ <body>// Register the given event accepter to wait for a dispatched signal event.
+
+Debug.println(&quot;[register] object = &quot; + this.object);
+Debug.println(&quot;[register] accepter = &quot; + accepter);
+
+this.waitingEventAccepters.addValue(accepter);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-unregister" name="unregister" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-ObjectActivation-unregister.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-unregister-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ <language>Java</language>
+ <body>// Remove the given event accepter for the list of waiting event accepters.
+
+Debug.println(&quot;[unregister] object = &quot; + this.object);
+Debug.println(&quot;[unregister] accepter = &quot; + accepter);
+
+boolean notFound = true;
+int i = 1;
+while (notFound &amp; i &lt;= this.waitingEventAccepters.size()) {
+ if (this.waitingEventAccepters.getValue(i-1) == accepter) {
+ this.waitingEventAccepters.remove(i-1);
+ notFound = false;
+ }
+ i = i + 1;
+}
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-dispatchNextEvent" name="dispatchNextEvent" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-ObjectActivation-dispatchNextEvent.1">
+ <language>Java</language>
+ <body>// Get the next signal instance out of the event pool.
+// If there is one or more waiting event accepters with triggers that match the signal instance, then dispatch it to exactly one of those waiting accepters.
+
+if (this.eventPool.size() > 0) {
+ SignalInstance signalInstance = this.getNextEvent();
+
+ Debug.println(&quot;[dispatchNextEvent] signalInstance = &quot; + signalInstance);
+
+ intList matchingEventAccepterIndexes = new intList();
+ EventAccepterList waitingEventAccepters = this.waitingEventAccepters;
+ for (int i = 0; i &lt; waitingEventAccepters.size(); i++) {
+ EventAccepter eventAccepter = waitingEventAccepters.getValue(i);
+ if (eventAccepter.match(signalInstance)) {
+ matchingEventAccepterIndexes.addValue(i);
+ }
+ }
+
+ if (matchingEventAccepterIndexes.size() > 0) {
+ // *** Choose one matching event accepter non-deterministically. ***
+ int j = ((ChoiceStrategy)this.object.locus.factory.getStrategy(&quot;choice&quot;)).choose(matchingEventAccepterIndexes.size());
+ EventAccepter selectedEventAccepter = this.waitingEventAccepters.getValue(matchingEventAccepterIndexes.getValue(j-1));
+ this.waitingEventAccepters.removeValue(j-1);
+ selectedEventAccepter.accept(signalInstance);
+ }
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-getNextEvent" name="getNextEvent" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-ObjectActivation-getNextEvent.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-getNextEvent-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance" direction="return"/>
+ <language>Java</language>
+ <body>// Get the next event from the event pool, using a get next event strategy.
+
+return ((GetNextEventStrategy)this.object.locus.factory.getStrategy(&quot;getNextEvent&quot;)).getNextEvent(this);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-stop.1" name="stop" visibility="public" method="Semantics-CommonBehaviors-Communications-ObjectActivation-stop"/>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-register.1" name="register" visibility="public" method="Semantics-CommonBehaviors-Communications-ObjectActivation-register">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-register.1-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-unregister.1" name="unregister" visibility="public" method="Semantics-CommonBehaviors-Communications-ObjectActivation-unregister">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-unregister.1-accepter" name="accepter" visibility="public" type="Semantics-CommonBehaviors-Communications-EventAccepter"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-dispatchNextEvent.1" name="dispatchNextEvent" visibility="public" method="Semantics-CommonBehaviors-Communications-ObjectActivation-dispatchNextEvent"/>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-getNextEvent.1" name="getNextEvent" visibility="public" method="Semantics-CommonBehaviors-Communications-ObjectActivation-getNextEvent">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-getNextEvent.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance" direction="return"/>
+ </ownedOperation>
+ <ownedReception xmi:id="Semantics-CommonBehaviors-Communications-ObjectActivation-_ownedReception.0" visibility="public" signal="Semantics-CommonBehaviors-Communications-ArrivalSignal"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-Communications-A_classifierBehaviorExecutions_objectActivation" name="A_classifierBehaviorExecutions_objectActivation" visibility="private" memberEnd="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-objectActivation Semantics-CommonBehaviors-Communications-ObjectActivation-classifierBehaviorExecutions"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-Communications-A_waitingEventAcceptors_objectActivation" name="A_waitingEventAcceptors_objectActivation" visibility="private" memberEnd="Semantics-CommonBehaviors-Communications-A_waitingEventAcceptors_objectActivation-_ownedEnd.0 Semantics-CommonBehaviors-Communications-ObjectActivation-waitingEventAccepters">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-Communications-A_waitingEventAcceptors_objectActivation-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-Communications-ObjectActivation" association="Semantics-CommonBehaviors-Communications-A_waitingEventAcceptors_objectActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-A_waitingEventAcceptors_objectActivation-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-Communications-A_eventPool_objectActivation" name="A_eventPool_objectActivation" visibility="private" memberEnd="Semantics-CommonBehaviors-Communications-A_eventPool_objectActivation-_ownedEnd.0 Semantics-CommonBehaviors-Communications-ObjectActivation-eventPool">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-Communications-A_eventPool_objectActivation-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-Communications-ObjectActivation" association="Semantics-CommonBehaviors-Communications-A_eventPool_objectActivation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-A_eventPool_objectActivation-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-Communications-A_type_signalInstance" name="A_type_signalInstance" visibility="private" memberEnd="Semantics-CommonBehaviors-Communications-A_type_signalInstance-_ownedEnd.0 Semantics-CommonBehaviors-Communications-SignalInstance-type">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-Communications-A_type_signalInstance-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-Communications-SignalInstance" association="Semantics-CommonBehaviors-Communications-A_type_signalInstance">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-A_type_signalInstance-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-A_type_signalInstance-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-Communications-A_classifier_classifierBehaviorExecution" name="A_classifier_classifierBehaviorExecution" visibility="private" memberEnd="Semantics-CommonBehaviors-Communications-A_classifier_classifierBehaviorExecution-_ownedEnd.0 Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-classifier">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-Communications-A_classifier_classifierBehaviorExecution-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution" association="Semantics-CommonBehaviors-Communications-A_classifier_classifierBehaviorExecution">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-A_classifier_classifierBehaviorExecution-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-CommonBehaviors-Communications-A_classifier_classifierBehaviorExecution-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-CommonBehaviors-Communications-A_execution_classifierBehaviorExecution" name="A_execution_classifierBehaviorExecution" visibility="private" memberEnd="Semantics-CommonBehaviors-Communications-A_execution_classifierBehaviorExecution-_ownedEnd.0 Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution-execution">
+ <ownedEnd xmi:id="Semantics-CommonBehaviors-Communications-A_execution_classifierBehaviorExecution-_ownedEnd.0" visibility="private" type="Semantics-CommonBehaviors-Communications-ClassifierBehaviorExecution" association="Semantics-CommonBehaviors-Communications-A_execution_classifierBehaviorExecution">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-CommonBehaviors-Communications-A_execution_classifierBehaviorExecution-_ownedEnd.0-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:SignalEvent" xmi:id="Semantics-CommonBehaviors-Communications-ArrivalSignalEvent" name="ArrivalSignalEvent" signal="Semantics-CommonBehaviors-Communications-ArrivalSignal"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy" name="GetNextEventStrategy" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-GetNextEventStrategy">
+ <body>A get next event strategy is a semantic strategy that determines the order in which signal instances are retrieved from the event pool of an object activation.</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-_generalization.0" general="Semantics-Loci-LociL1-SemanticStrategy"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getName" name="getName" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getName.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getName-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get next event strategies are always named &quot;getNextEvent&quot;.
+
+return &quot;getNextEvent&quot;;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getName.1" name="getName" visibility="public" method="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getName">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getName.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getNextEvent" name="getNextEvent" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getNextEvent-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getNextEvent">
+ <body>Get the next event from the event pool of the given object activation. The event is removed from the pool.&#xD;
+</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getNextEvent-objectActivation" name="objectActivation" visibility="public" type="Semantics-CommonBehaviors-Communications-ObjectActivation"/>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-GetNextEventStrategy-getNextEvent-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy" name="FIFOGetNextEventStrategy">
+ <ownedComment xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-_ownedComment.0" annotatedElement="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy">
+ <body>A FIFO get next event strategy gets events in first-in first-out order.</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-_generalization.0" general="Semantics-CommonBehaviors-Communications-GetNextEventStrategy"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent" name="getNextEvent" isReentrant="false" specification="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent.1">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent-objectActivation" name="objectActivation" visibility="public" type="Semantics-CommonBehaviors-Communications-ObjectActivation"/>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance" direction="return"/>
+ <language>Java</language>
+ <body>// Get the first event from the given event pool. The event is removed from the pool.
+
+SignalInstance signalInstance = objectActivation.eventPool.getValue(0);
+objectActivation.eventPool.removeValue(0);
+return signalInstance;</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent.1" name="getNextEvent" visibility="public" method="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent">
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent.1-objectActivation" name="objectActivation" visibility="public" type="Semantics-CommonBehaviors-Communications-ObjectActivation"/>
+ <ownedParameter xmi:id="Semantics-CommonBehaviors-Communications-FIFOGetNextEventStrategy-getNextEvent.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-CommonBehaviors-Communications-SignalInstance" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Loci" name="Loci">
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Loci-LociL1" name="LociL1">
+ <packageImport xmi:id="Semantics-Loci-LociL1-_packageImport.0">
+ <importedPackage href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Loci-LociL1-_packageImport.1">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Classes-Kernel"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Loci-LociL1-_packageImport.2" importedPackage="Semantics-Classes-Kernel"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-ChoiceStrategy" name="ChoiceStrategy" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ChoiceStrategy">
+ <body>A choice strategy is used to represent the behavior of making an arbitrary non-deterministic choice.&#xD;
+A valid execution may use ANY choice strategy for choosing one element from a given set.</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-_generalization.0" general="Semantics-Loci-LociL1-SemanticStrategy"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-getName" name="getName" isReentrant="false" specification="Semantics-Loci-LociL1-ChoiceStrategy-getName.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-getName-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// The name of a choice strategy is always &quot;choice&quot;.
+
+return &quot;choice&quot;;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-getName.1" name="getName" visibility="public" method="Semantics-Loci-LociL1-ChoiceStrategy-getName">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-getName.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-choose" name="choose" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-choose-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ChoiceStrategy-choose">
+ <body>Choose an integer from 1 to the given size.&#xD;
+[The size must be greater than 0.]</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-choose-size" name="size" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ChoiceStrategy-choose-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-ExecutionFactory" name="ExecutionFactory" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactory-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory">
+ <body> An execution factory is used to create objects that represent the execution of a behavior, the evaluation of a value specification or the activation of an activity node.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactory-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-ExecutionFactory-locus" name="locus" visibility="public" type="Semantics-Loci-LociL1-Locus" association="Semantics-Loci-LociL1-A_factory_locus">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactory-locus-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory-locus">
+ <body>The locus at which this factory resides.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-locus-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-ExecutionFactory-primitiveBehaviorPrototypes" name="primitiveBehaviorPrototypes" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution" association="Semantics-Loci-LociL1-A_primitiveBehaviorPrototypes_executionFactory">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactory-primitiveBehaviorPrototypes-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory-primitiveBehaviorPrototypes">
+ <body>The set of opaque behavior executions to be used to execute the primitive behaviors known to the factory.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-primitiveBehaviorPrototypes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-primitiveBehaviorPrototypes-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-ExecutionFactory-builtInTypes" name="builtInTypes" visibility="public" association="Semantics-Loci-LociL1-A_builtInTypes_executionFactory">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactory-builtInTypes-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory-builtInTypes">
+ <body>The set of primitive types that have corresponding literal value specifications.&#xD;
+Must include Integer, Boolean, String and UnlimitedNatural.</body>
+ </ownedComment>
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-builtInTypes-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-builtInTypes-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-ExecutionFactory-strategies" name="strategies" visibility="public" type="Semantics-Loci-LociL1-SemanticStrategy" association="Semantics-Loci-LociL1-A_strategies_executionFactory">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactory-strategies-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory-strategies">
+ <body>The set of semantic strategies currently registered with this execution factory.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-strategies-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-strategies-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution" name="createExecution" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-createExecution.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution-behavior" name="behavior" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution-context" name="context" visibility="public" type="Semantics-Classes-Kernel-Object">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution-context-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Create an execution object for a given behavior.
+// The execution will take place at the locus of the factory in the given context.
+// If the context is empty, the execution is assumed to provide its own context.
+
+Execution execution;
+
+if (behavior instanceof OpaqueBehavior) {
+ execution = this.instantiateOpaqueBehaviorExecution((OpaqueBehavior)behavior);
+}
+else {
+ execution = (Execution)this.instantiateVisitor(behavior);
+ execution.types.addValue(behavior);
+ execution.createFeatureValues();
+}
+
+this.locus.add(execution);
+
+if (context == null) {
+ execution.context = execution;
+}
+else {
+ execution.context = context;
+}
+
+return execution;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation" name="createEvaluation" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Evaluation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation-specification" name="specification" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Create an evaluation object for a given value specification.
+// The evaluation will take place at the locus of the factory.
+
+Evaluation evaluation = (Evaluation)this.instantiateVisitor(specification);
+
+evaluation.specification = specification;
+evaluation.locus = this.locus;
+
+return evaluation;
+
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution" name="instantiateOpaqueBehaviorExecution" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution-behavior" name="behavior" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return a copy of the prototype for the primitive behavior execution of the given opaque behavior.
+
+OpaqueBehaviorExecution execution = null;
+int i = 1;
+while (execution == null &amp; i &lt;= this.primitiveBehaviorPrototypes.size()) {
+ // Debug.println(&quot;[instantiateOpaqueExecution] Checking &quot; + this.primitiveBehaviorPrototypes.getValue(i).objectId() + &quot;...&quot;);
+ OpaqueBehaviorExecution prototype = this.primitiveBehaviorPrototypes.getValue(i-1);
+ if (prototype.getBehavior() == behavior) {
+ execution = (OpaqueBehaviorExecution)(prototype.copy());
+ }
+ i = i + 1;
+}
+
+if (execution == null) {
+ Debug.println(&quot;[instantiateOpaqueExecution] No prototype execution found for &quot; + behavior.name + &quot;.&quot;);
+}
+
+return execution;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addPrimitiveBehaviorPrototype" name="addPrimitiveBehaviorPrototype" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-addPrimitiveBehaviorPrototype.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addPrimitiveBehaviorPrototype-execution" name="execution" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution"/>
+ <language>Java</language>
+ <body>// Add an opaque behavior execution to use as a prototype for instantiating the corresponding primitive opaque behavior.
+// Precondition: No primitive behavior prototype for the type of the given execution should already exist.
+
+this.primitiveBehaviorPrototypes.addValue(execution);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addBuiltInType" name="addBuiltInType" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-addBuiltInType.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addBuiltInType-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Add the given primitive type as a built-in type.
+// Precondition: No built-in type with the same name should already exist.
+
+this.builtInTypes.addValue(type);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType" name="getBuiltInType" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType-name" name="name" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the built-in type with the given name.
+
+PrimitiveType type = null;
+int i = 1;
+while (type == null &amp; i &lt;= this.builtInTypes.size()) {
+ PrimitiveType primitiveType = this.builtInTypes.getValue(i-1);
+ if (primitiveType.name.equals(name)) {
+ type = primitiveType;
+ }
+ i = i + 1;
+}
+
+return type;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-setStrategy" name="setStrategy" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-setStrategy.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-setStrategy-strategy" name="strategy" visibility="public" type="Semantics-Loci-LociL1-SemanticStrategy"/>
+ <language>Java</language>
+ <body>// Set the strategy for a semantic variation point. Any existing strategy for the same SVP is replaced.
+
+int i = this.getStrategyIndex(strategy.getName());
+
+if (i &lt;= this.strategies.size()) {
+ this.strategies.removeValue(i-1);
+}
+
+this.strategies.addValue(strategy);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy" name="getStrategy" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-getStrategy.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy-name" name="name" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Loci-LociL1-SemanticStrategy" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy-OwnedParameter-_lowerValue"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the strategy with the given name.
+
+int i = this.getStrategyIndex(name);
+
+SemanticStrategy strategy = null;
+if (i &lt;= this.strategies.size()) {
+ strategy = this.strategies.getValue(i-1);
+}
+
+return strategy;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex" name="getStrategyIndex" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex-name" name="name" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Get the index of the strategy with the given name.
+// If there is no such strategy, return the size of the strategies list.
+
+SemanticStrategyList strategies = this.strategies;
+
+int i = 1;
+boolean unmatched = true;
+while (unmatched &amp; (i &lt;= strategies.size())) {
+ if (strategies.getValue(i-1).getName().equals(name)) {
+ unmatched = false;
+ } else {
+ i = i + 1;
+ }
+}
+
+return i;
+
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution.1" name="createExecution" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-createExecution">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-Execution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution.1-behavior" name="behavior" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution.1-context" name="context" visibility="public" type="Semantics-Classes-Kernel-Object">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createExecution.1-context-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation.1" name="createEvaluation" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Evaluation" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-createEvaluation.1-specification" name="specification" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateVisitor" name="instantiateVisitor" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateVisitor-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory-instantiateVisitor">
+ <body>Instantiate a visitor object for the given element.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateVisitor-element" name="element" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Element"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateVisitor-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-SemanticVisitor" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution.1" name="instantiateOpaqueBehaviorExecution" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-instantiateOpaqueBehaviorExecution.1-behavior" name="behavior" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addPrimitiveBehaviorPrototype.1" name="addPrimitiveBehaviorPrototype" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-addPrimitiveBehaviorPrototype">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addPrimitiveBehaviorPrototype.1-execution" name="execution" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-OpaqueBehaviorExecution"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addBuiltInType.1" name="addBuiltInType" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-addBuiltInType">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-addBuiltInType.1-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType.1" name="getBuiltInType" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-PrimitiveType"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType.1-ReturnResult-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getBuiltInType.1-name" name="name" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-setStrategy.1" name="setStrategy" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-setStrategy">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-setStrategy.1-strategy" name="strategy" visibility="public" type="Semantics-Loci-LociL1-SemanticStrategy"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy.1" name="getStrategy" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-getStrategy">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy.1-name" name="name" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy.1-OwnedParameter" name="OwnedParameter" visibility="public" type="Semantics-Loci-LociL1-SemanticStrategy" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategy.1-OwnedParameter-_lowerValue"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex.1" name="getStrategyIndex" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex.1-name" name="name" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactory-getStrategyIndex.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-Executor" name="Executor">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Executor-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-Executor">
+ <body>An executor is used to execute behaviors and evaluation value specifications.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Executor-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-Executor-locus" name="locus" visibility="public" type="Semantics-Loci-LociL1-Locus" association="Semantics-Loci-LociL1-A_executor_locus">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Executor-locus-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-Executor-locus">
+ <body>The locus at which this executor resides.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-locus-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Executor-execute" name="execute" isReentrant="false" specification="Semantics-Loci-LociL1-Executor-execute.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute-behavior" name="behavior" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute-context" name="context" visibility="public" type="Semantics-Classes-Kernel-Object">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-execute-context-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-execute-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Executor-execute-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-execute-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Executor-execute-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Execute the given behavior with the given input values in the given context, producing the given output values.
+// There must be one input parameter value for each input (in or in-out) parameter of the behavior.
+// The returned values include one parameter value for each output (in-out, out or return) parameter of the behavior.
+// The execution instance is destroyed at completion.
+
+Execution execution = this.locus.factory.createExecution(behavior, context);
+
+for (int i = 0; i &lt; inputs.size(); i++) {
+ execution.setParameterValue(inputs.getValue(i));
+}
+
+execution.execute();
+ParameterValueList outputValues = execution.getOutputParameterValues();
+execution.destroy();
+
+return outputValues;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Executor-evaluate" name="evaluate" isReentrant="false" specification="Semantics-Loci-LociL1-Executor-evaluate.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-evaluate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-evaluate-specification" name="specification" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Evaluate the given value specification, returning the specified value.
+
+// Debug.println(&quot;[evaluate] Start...&quot;);
+return this.locus.factory.createEvaluation(specification).evaluate();
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Executor-start" name="start" isReentrant="false" specification="Semantics-Loci-LociL1-Executor-start.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-start-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Reference" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-start-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-start-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-start-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Executor-start-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Instantiate the given class and start any behavior of the resulting object.
+// (The behavior of an object includes any classifier behaviors for an active object or the class of the object itself, if that is a behavior.)
+
+Debug.println(&quot;[start] Starting &quot; + type.name + &quot;...&quot;);
+
+Object_ object = this.locus.instantiate(type);
+
+Debug.println(&quot;[start] Object = &quot; + object);
+object.startBehavior(type, inputs);
+
+Reference reference = new Reference();
+reference.referent = object;
+
+return reference;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Executor-execute.1" name="execute" visibility="public" method="Semantics-Loci-LociL1-Executor-execute">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute.1-behavior" name="behavior" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute.1-context" name="context" visibility="public" type="Semantics-Classes-Kernel-Object">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-execute.1-context-_lowerValue"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute.1-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" isOrdered="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-execute.1-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Executor-execute.1-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-execute.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue" isOrdered="true" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-execute.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Executor-execute.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Executor-evaluate.1" name="evaluate" visibility="public" method="Semantics-Loci-LociL1-Executor-evaluate">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-evaluate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Value" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-evaluate.1-specification" name="specification" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-ValueSpecification"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Executor-start.1" name="start" visibility="public" method="Semantics-Loci-LociL1-Executor-start">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-start.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Reference" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-start.1-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Executor-start.1-inputs" name="inputs" visibility="public" type="Semantics-CommonBehaviors-BasicBehaviors-ParameterValue">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Executor-start.1-inputs-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Executor-start.1-inputs-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy" name="FirstChoiceStrategy">
+ <generalization xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy-_generalization.0" general="Semantics-Loci-LociL1-ChoiceStrategy"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy-choose" name="choose" isReentrant="false" specification="Semantics-Loci-LociL1-FirstChoiceStrategy-choose.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy-choose-size" name="size" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy-choose-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Always choose one.
+
+return 1;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy-choose.1" name="choose" visibility="public" method="Semantics-Loci-LociL1-FirstChoiceStrategy-choose">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy-choose.1-size" name="size" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-FirstChoiceStrategy-choose.1-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-Locus" name="Locus">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Locus-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-Locus">
+ <body>A locus is a place at which extensional values (objects or links) can exist. The extent of a class or association is the set of objects or links of that type that exist at a certain locus.&#xD;
+A locus also has an executor and a factory associated with it, used to execute behaviors as a result of requests dispatched to objects at the locus.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Locus-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+import fUML.Syntax.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+import fUML.Semantics.CommonBehaviors.BasicBehaviors.*;&#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-Locus-executor" name="executor" visibility="public" type="Semantics-Loci-LociL1-Executor" aggregation="composite" association="Semantics-Loci-LociL1-A_executor_locus">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Locus-executor-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-Locus-executor">
+ <body>The executor to be used at this locus.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Locus-executor-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-Locus-factory" name="factory" visibility="public" type="Semantics-Loci-LociL1-ExecutionFactory" aggregation="composite" association="Semantics-Loci-LociL1-A_factory_locus">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Locus-factory-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-Locus-factory">
+ <body>The factory to be used at this locus.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Locus-factory-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Semantics-Loci-LociL1-Locus-extensionalValues" name="extensionalValues" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue" aggregation="composite" association="Semantics-Classes-Kernel-A_locus_extensionalValues">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-Locus-extensionalValues-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-Locus-extensionalValues">
+ <body>The set of values that are members of classifier extents at this locus.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Locus-extensionalValues-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Locus-extensionalValues-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Locus-setExecutor" name="setExecutor" isReentrant="false" specification="Semantics-Loci-LociL1-Locus-setExecutor.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-setExecutor-executor" name="executor" visibility="public" type="Semantics-Loci-LociL1-Executor"/>
+ <language>Java</language>
+ <body>// Set the executor for this locus.
+
+this.executor = executor;
+this.executor.locus = this;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Locus-setFactory" name="setFactory" isReentrant="false" specification="Semantics-Loci-LociL1-Locus-setFactory.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-setFactory-factory" name="factory" visibility="public" type="Semantics-Loci-LociL1-ExecutionFactory"/>
+ <language>Java</language>
+ <body>// Set the factory for this locus.
+
+this.factory = factory;
+this.factory.locus = this;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Locus-getExtent" name="getExtent" isReentrant="false" specification="Semantics-Loci-LociL1-Locus-getExtent.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-getExtent-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-getExtent-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Locus-getExtent-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Locus-getExtent-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Return the set of extensional values at this locus which have the given classifier as a type.
+
+ExtensionalValueList extent = new ExtensionalValueList();
+
+ExtensionalValueList extensionalValues = this.extensionalValues;
+for (int i = 0; i &lt; extensionalValues.size(); i++) {
+ ExtensionalValue value = extensionalValues.getValue(i);
+ ClassifierList types = value.getTypes();
+
+ boolean conforms = false;
+ int j = 1;
+ while (!conforms &amp; j &lt;= types.size()) {
+ conforms = this.conforms(types.getValue(j-1), classifier);
+ j = j + 1;
+ }
+
+ if (conforms) {
+ extent.addValue(value);
+ }
+}
+
+return extent;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Locus-add" name="add" isReentrant="false" specification="Semantics-Loci-LociL1-Locus-add.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-add-value" name="value" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue"/>
+ <language>Java</language>
+ <body>// Add the given extensional value to this locus
+
+value.locus = this;
+this.extensionalValues.addValue(value);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Locus-remove" name="remove" isReentrant="false" specification="Semantics-Loci-LociL1-Locus-remove.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-remove-value" name="value" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue"/>
+ <language>Java</language>
+ <body>// Remove the given extensional value from this locus.
+
+value.locus = null;
+
+boolean notFound = true;
+int i = 1;
+while (notFound &amp; i &lt;= this.extensionalValues.size()) {
+ if (this.extensionalValues.getValue(i-1) == value) {
+ this.extensionalValues.remove(i-1);
+ notFound = false;
+ }
+ i = i + 1;
+}
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Locus-instantiate" name="instantiate" isReentrant="false" specification="Semantics-Loci-LociL1-Locus-instantiate.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-instantiate-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Object" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-instantiate-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Instantiate the given class at this locus.
+
+Object_ object = null;
+
+if (type instanceof Behavior) {
+ object = this.factory.createExecution((Behavior)type, null);
+}
+else {
+ object = new Object_();
+
+ object.types.addValue(type);
+ object.createFeatureValues();
+ this.add(object);
+}
+
+return object;
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-Locus-conforms" name="conforms" isReentrant="false" specification="Semantics-Loci-LociL1-Locus-conforms.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-conforms-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-conforms-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-conforms-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <language>Java</language>
+ <body>// Test if a type conforms to a given classifier, that is, the type is equal to or a descendant of the classifier.
+
+boolean doesConform = false;
+
+if (type == classifier) {
+ doesConform = true;
+} else {
+ int i = 1;
+ while (!doesConform &amp; i &lt;= type.general.size()) {
+ doesConform = this.conforms(type.general.getValue(i-1), classifier);
+ i = i + 1;
+ }
+}
+
+return doesConform;
+
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Locus-setExecutor.1" name="setExecutor" visibility="public" method="Semantics-Loci-LociL1-Locus-setExecutor">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-setExecutor.1-executor" name="executor" visibility="public" type="Semantics-Loci-LociL1-Executor"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Locus-setFactory.1" name="setFactory" visibility="public" method="Semantics-Loci-LociL1-Locus-setFactory">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-setFactory.1-factory" name="factory" visibility="public" type="Semantics-Loci-LociL1-ExecutionFactory"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Locus-getExtent.1" name="getExtent" visibility="public" method="Semantics-Loci-LociL1-Locus-getExtent">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-getExtent.1-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-getExtent.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-Locus-getExtent.1-ReturnResult-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-Locus-getExtent.1-ReturnResult-_upperValue" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Locus-add.1" name="add" visibility="public" method="Semantics-Loci-LociL1-Locus-add">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-add.1-value" name="value" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Locus-remove.1" name="remove" visibility="public" method="Semantics-Loci-LociL1-Locus-remove">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-remove.1-value" name="value" visibility="public" type="Semantics-Classes-Kernel-ExtensionalValue"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Locus-instantiate.1" name="instantiate" visibility="public" method="Semantics-Loci-LociL1-Locus-instantiate">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-instantiate.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Classes-Kernel-Object" direction="return"/>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-instantiate.1-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Class"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-Locus-conforms.1" name="conforms" visibility="public" method="Semantics-Loci-LociL1-Locus-conforms">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-conforms.1-ReturnResult" name="ReturnResult" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-conforms.1-type" name="type" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-Locus-conforms.1-classifier" name="classifier" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Classifier"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-SemanticStrategy" name="SemanticStrategy" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-SemanticStrategy-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-SemanticStrategy">
+ <body>The common base class for semantic strategy classes. A semantic strategy class specifies the behavior to be used at a specific semantic variatio point.</body>
+ </ownedComment>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-SemanticStrategy-getName" name="getName" visibility="public" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-SemanticStrategy-getName-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-SemanticStrategy-getName">
+ <body>Return the name of this strategy, as defined for the semantic variation point to which the strategy applies.</body>
+ </ownedComment>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-SemanticStrategy-getName-OwnedParameter" name="OwnedParameter" visibility="public" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-SemanticVisitor" name="SemanticVisitor" isAbstract="true">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-SemanticVisitor-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-SemanticVisitor">
+ <body>The common base class for semantic visitor classes.</body>
+ </ownedComment>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-SemanticVisitor-_endIsolation" name="_endIsolation" isReentrant="false" specification="Semantics-Loci-LociL1-SemanticVisitor-_endIsolation.1">
+ <language>Java</language>
+ <body>Debug.println(&quot;[_endIsolation] End isolation.&quot;);
+</body>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-SemanticVisitor-_beginIsolation" name="_beginIsolation" isReentrant="false" specification="Semantics-Loci-LociL1-SemanticVisitor-_beginIsolation.1">
+ <language>Java</language>
+ <body>Debug.println(&quot;[_beginIsolation] Begin isolation.&quot;);
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-SemanticVisitor-_endIsolation.1" name="_endIsolation" visibility="public" isStatic="true" method="Semantics-Loci-LociL1-SemanticVisitor-_endIsolation"/>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-SemanticVisitor-_beginIsolation.1" name="_beginIsolation" visibility="public" isStatic="true" method="Semantics-Loci-LociL1-SemanticVisitor-_beginIsolation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1" name="ExecutionFactoryL1">
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory">
+ <body> An execution factory is used to create objects that represent the execution of a behavior, the evaluation of a value specification or the activation of an activity node. This class only handles elements available at Conformance Level 1.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Classes.Kernel.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Classes.Kernel.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-_generalization.0" general="Semantics-Loci-LociL1-ExecutionFactory"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor" name="instantiateVisitor" isReentrant="false" specification="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor-element" name="element" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Element"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-SemanticVisitor" direction="return"/>
+ <language>Java</language>
+ <body>// Instantiate a visitor object for the given element (at Conformance Level 1)
+
+SemanticVisitor visitor = null;
+
+if (element instanceof LiteralBoolean) {
+ visitor = new LiteralBooleanEvaluation();
+}
+
+else if (element instanceof fUML.Syntax.Classes.Kernel.LiteralString) {
+ visitor = new LiteralStringEvaluation();
+}
+
+else if (element instanceof fUML.Syntax.Classes.Kernel.LiteralNull) {
+ visitor = new LiteralNullEvaluation();
+}
+
+else if (element instanceof fUML.Syntax.Classes.Kernel.InstanceValue) {
+ visitor = new InstanceValueEvaluation();
+}
+
+else if (element instanceof fUML.Syntax.Classes.Kernel.LiteralUnlimitedNatural) {
+ visitor = new LiteralUnlimitedNaturalEvaluation();
+}
+
+else if (element instanceof fUML.Syntax.Classes.Kernel.LiteralInteger) {
+ visitor = new LiteralIntegerEvaluation();
+}
+
+else if (element instanceof LiteralReal) {
+ visitor = new LiteralRealEvaluation();
+}
+
+return visitor;
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor.1" name="instantiateVisitor" visibility="public" method="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor">
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor.1-element" name="element" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Element"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL1-ExecutionFactoryL1-instantiateVisitor.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-SemanticVisitor" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Loci-LociL1-A_executor_locus" name="A_executor_locus" visibility="private" memberEnd="Semantics-Loci-LociL1-Executor-locus Semantics-Loci-LociL1-Locus-executor"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Loci-LociL1-A_factory_locus" name="A_factory_locus" visibility="private" memberEnd="Semantics-Loci-LociL1-ExecutionFactory-locus Semantics-Loci-LociL1-Locus-factory"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Loci-LociL1-A_builtInTypes_executionFactory" name="A_builtInTypes_executionFactory" visibility="private" memberEnd="Semantics-Loci-LociL1-A_builtInTypes_executionFactory-_ownedEnd.0 Semantics-Loci-LociL1-ExecutionFactory-builtInTypes">
+ <ownedEnd xmi:id="Semantics-Loci-LociL1-A_builtInTypes_executionFactory-_ownedEnd.0" visibility="private" type="Semantics-Loci-LociL1-ExecutionFactory" association="Semantics-Loci-LociL1-A_builtInTypes_executionFactory">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-A_builtInTypes_executionFactory-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-A_builtInTypes_executionFactory-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Loci-LociL1-A_strategies_executionFactory" name="A_strategies_executionFactory" visibility="private" memberEnd="Semantics-Loci-LociL1-A_strategies_executionFactory-_ownedEnd.0 Semantics-Loci-LociL1-ExecutionFactory-strategies">
+ <ownedEnd xmi:id="Semantics-Loci-LociL1-A_strategies_executionFactory-_ownedEnd.0" visibility="private" type="Semantics-Loci-LociL1-ExecutionFactory" association="Semantics-Loci-LociL1-A_strategies_executionFactory"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Semantics-Loci-LociL1-A_primitiveBehaviorPrototypes_executionFactory" name="A_primitiveBehaviorPrototypes_executionFactory" visibility="private" memberEnd="Semantics-Loci-LociL1-A_primitiveBehaviorPrototypes_executionFactory-_ownedEnd.0 Semantics-Loci-LociL1-ExecutionFactory-primitiveBehaviorPrototypes">
+ <ownedEnd xmi:id="Semantics-Loci-LociL1-A_primitiveBehaviorPrototypes_executionFactory-_ownedEnd.0" visibility="private" type="Semantics-Loci-LociL1-ExecutionFactory" association="Semantics-Loci-LociL1-A_primitiveBehaviorPrototypes_executionFactory">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Semantics-Loci-LociL1-A_primitiveBehaviorPrototypes_executionFactory-_ownedEnd.0-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Semantics-Loci-LociL1-A_primitiveBehaviorPrototypes_executionFactory-_ownedEnd.0-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Loci-LociL2" name="LociL2">
+ <packageImport xmi:id="Semantics-Loci-LociL2-_packageImport.0" importedPackage="Semantics-Loci-LociL1"/>
+ <packageImport xmi:id="Semantics-Loci-LociL2-_packageImport.1" importedPackage="Semantics-Actions-BasicActions"/>
+ <packageImport xmi:id="Semantics-Loci-LociL2-_packageImport.2" importedPackage="Semantics-Actions-IntermediateActions"/>
+ <packageImport xmi:id="Semantics-Loci-LociL2-_packageImport.3" importedPackage="Semantics-Activities-IntermediateActivities"/>
+ <packageImport xmi:id="Semantics-Loci-LociL2-_packageImport.4">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Actions-BasicActions"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Loci-LociL2-_packageImport.5">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Actions-IntermediateActions"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Loci-LociL2-_packageImport.6">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Activities-IntermediateActivities"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2" name="ExecutionFactoryL2">
+ <ownedComment xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory">
+ <body> An execution factory is used to create objects that represent the execution of a behavior, the evaluation of a value specification or the activation of an activity node. This class only handles elements available at Conformance Level 2.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Activities.IntermediateActivities.*;&#xD;
+import fUML.Syntax.Actions.BasicActions.*;&#xD;
+import fUML.Syntax.Actions.IntermediateActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Activities.IntermediateActivities.*;&#xD;
+import fUML.Semantics.Actions.BasicActions.*;&#xD;
+import fUML.Semantics.Actions.IntermediateActions.*;&#xD;
+import fUML.Semantics.Loci.LociL1.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-_generalization.0" general="Semantics-Loci-LociL1-ExecutionFactoryL1"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor" name="instantiateVisitor" isReentrant="false" specification="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor-element" name="element" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Element"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-SemanticVisitor" direction="return"/>
+ <language>Java</language>
+ <body>// Instantiate a visitor object for the given element (at Conformance Level 2)
+
+SemanticVisitor visitor = null;
+
+if (element instanceof Activity) {
+ visitor = new ActivityExecution();
+}
+
+else if (element instanceof ActivityParameterNode) {
+ visitor = new ActivityParameterNodeActivation();
+}
+
+else if (element instanceof InitialNode) {
+ visitor = new InitialNodeActivation();
+}
+
+else if (element instanceof ActivityFinalNode) {
+ visitor = new ActivityFinalNodeActivation();
+}
+
+else if (element instanceof FlowFinalNode) {
+ visitor = new FlowFinalNodeActivation();
+}
+
+else if (element instanceof JoinNode) {
+ visitor = new JoinNodeActivation();
+}
+
+else if (element instanceof MergeNode) {
+ visitor = new MergeNodeActivation();
+}
+
+else if (element instanceof ForkNode) {
+ visitor = new ForkNodeActivation();
+}
+
+else if (element instanceof DecisionNode) {
+ visitor = new DecisionNodeActivation();
+}
+
+else if (element instanceof InputPin) {
+ visitor = new InputPinActivation();
+}
+
+else if (element instanceof OutputPin) {
+ visitor = new OutputPinActivation();
+}
+
+else if (element instanceof CallBehaviorAction) {
+ visitor = new CallBehaviorActionActivation();
+}
+
+else if (element instanceof CallOperationAction) {
+ visitor = new CallOperationActionActivation();
+}
+
+else if (element instanceof SendSignalAction) {
+ visitor = new SendSignalActionActivation();
+}
+
+else if (element instanceof ReadSelfAction) {
+ visitor = new ReadSelfActionActivation();
+}
+
+else if (element instanceof TestIdentityAction) {
+ visitor = new TestIdentityActionActivation();
+}
+
+else if (element instanceof ValueSpecificationAction) {
+ visitor = new ValueSpecificationActionActivation();
+}
+
+else if (element instanceof CreateObjectAction) {
+ visitor = new CreateObjectActionActivation();
+}
+
+else if (element instanceof DestroyObjectAction) {
+ visitor = new DestroyObjectActionActivation();
+}
+
+else if (element instanceof ReadStructuralFeatureAction) {
+ visitor = new ReadStructuralFeatureActionActivation();
+}
+
+else if (element instanceof ClearStructuralFeatureAction) {
+ visitor = new ClearStructuralFeatureActionActivation();
+}
+
+else if (element instanceof AddStructuralFeatureValueAction) {
+ visitor = new AddStructuralFeatureValueActionActivation();
+}
+
+else if (element instanceof RemoveStructuralFeatureValueAction) {
+ visitor = new RemoveStructuralFeatureValueActionActivation();
+}
+
+else if (element instanceof ReadLinkAction) {
+ visitor = new ReadLinkActionActivation();
+}
+
+else if (element instanceof ClearAssociationAction) {
+ visitor = new ClearAssociationActionActivation();
+}
+
+else if (element instanceof CreateLinkAction) {
+ visitor = new CreateLinkActionActivation();
+}
+
+else if (element instanceof DestroyLinkAction) {
+ visitor = new DestroyLinkActionActivation();
+}
+
+else {
+ visitor = super.instantiateVisitor(element);
+}
+
+return visitor;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor.1" name="instantiateVisitor" visibility="public" method="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor">
+ <ownedParameter xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor.1-element" name="element" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Element"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL2-ExecutionFactoryL2-instantiateVisitor.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-SemanticVisitor" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-Loci-LociL3" name="LociL3">
+ <packageImport xmi:id="Semantics-Loci-LociL3-_packageImport.0" importedPackage="Semantics-Loci-LociL2"/>
+ <packageImport xmi:id="Semantics-Loci-LociL3-_packageImport.1" importedPackage="Semantics-Actions-CompleteActions"/>
+ <packageImport xmi:id="Semantics-Loci-LociL3-_packageImport.2" importedPackage="Semantics-Activities-CompleteStructuredActivities"/>
+ <packageImport xmi:id="Semantics-Loci-LociL3-_packageImport.3" importedPackage="Semantics-Activities-ExtraStructuredActivities"/>
+ <packageImport xmi:id="Semantics-Loci-LociL3-_packageImport.4">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Actions-CompleteActions"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Loci-LociL3-_packageImport.5">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Activities-CompleteStructuredActivities"/>
+ </packageImport>
+ <packageImport xmi:id="Semantics-Loci-LociL3-_packageImport.6">
+ <importedPackage href="fUML_Syntax.uml#Syntax-Activities-ExtraStructuredActivities"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3" name="ExecutionFactoryL3">
+ <ownedComment xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-_ownedComment.0" annotatedElement="Semantics-Loci-LociL1-ExecutionFactory">
+ <body> An execution factory is used to create objects that represent the execution of a behavior, the evaluation of a value specification or the activation of an activity node. This class only handles elements available at Conformance Level 3.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-_ownedComment.1">
+ <body>import fUML.Syntax.*;&#xD;
+import fUML.Syntax.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Syntax.Activities.ExtraStructuredActivities.*;&#xD;
+import fUML.Syntax.Actions.CompleteActions.*;&#xD;
+&#xD;
+import fUML.Semantics.*;&#xD;
+import fUML.Semantics.Activities.CompleteStructuredActivities.*;&#xD;
+import fUML.Semantics.Activities.ExtraStructuredActivities.*;&#xD;
+import fUML.Semantics.Actions.CompleteActions.*;&#xD;
+import fUML.Semantics.Loci.LociL1.*;&#xD;
+import fUML.Semantics.Loci.LociL2.*;&#xD;
+</body>
+ </ownedComment>
+ <generalization xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-_generalization.0" general="Semantics-Loci-LociL2-ExecutionFactoryL2"/>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor" name="instantiateVisitor" isReentrant="false" specification="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor.1">
+ <ownedParameter xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor-element" name="element" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Element"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-SemanticVisitor" direction="return"/>
+ <language>Java</language>
+ <body>// Instantiate a visitor object for the given element (at Conformance Level 3)
+
+SemanticVisitor visitor = null;
+
+if (element instanceof ConditionalNode) {
+ visitor = new ConditionalNodeActivation();
+}
+
+else if (element instanceof LoopNode) {
+ visitor = new LoopNodeActivation();
+}
+
+else if (element instanceof ExpansionRegion) {
+ visitor = new ExpansionRegionActivation();
+}
+
+// Note: Since ConditionalNode, LoopNode and ExpansionRegion are subclasses of
+// StructuredActivityNode, element must be tested against the three subclasses before
+// the superclass
+else if (element instanceof StructuredActivityNode) {
+ visitor = new StructuredActivityNodeActivation();
+}
+
+else if (element instanceof ExpansionNode) {
+ visitor = new ExpansionNodeActivation();
+}
+
+else if (element instanceof ReadExtentAction) {
+ visitor = new ReadExtentActionActivation();
+}
+
+else if (element instanceof ReadIsClassifiedObjectAction) {
+ visitor = new ReadIsClassifiedObjectActionActivation();
+}
+
+else if (element instanceof ReclassifyObjectAction) {
+ visitor = new ReclassifyObjectActionActivation();
+}
+
+else if (element instanceof StartObjectBehaviorAction) {
+ visitor = new StartObjectBehaviorActionActivation();
+}
+
+else if (element instanceof StartClassifierBehaviorAction) {
+ visitor = new StartClassifierBehaviorActionActivation();
+}
+
+else if (element instanceof AcceptEventAction) {
+ visitor = new AcceptEventActionActivation();
+}
+
+else if (element instanceof ReduceAction) {
+ visitor = new ReduceActionActivation();
+}
+
+else {
+ visitor = super.instantiateVisitor(element);
+}
+
+return visitor;
+
+</body>
+ </ownedBehavior>
+ <ownedOperation xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor.1" name="instantiateVisitor" visibility="public" method="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor">
+ <ownedParameter xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor.1-element" name="element" visibility="public">
+ <type xmi:type="uml:Class" href="fUML_Syntax.uml#Syntax-Classes-Kernel-Element"/>
+ </ownedParameter>
+ <ownedParameter xmi:id="Semantics-Loci-LociL3-ExecutionFactoryL3-instantiateVisitor.1-ReturnResult" name="ReturnResult" visibility="public" type="Semantics-Loci-LociL1-SemanticVisitor" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-L1" name="L1">
+ <packageMerge xmi:id="Semantics-L1-_packageMerge.0" mergedPackage="Semantics-Classes-Kernel"/>
+ <packageMerge xmi:id="Semantics-L1-_packageMerge.1" mergedPackage="Semantics-CommonBehaviors-BasicBehaviors"/>
+ <packageMerge xmi:id="Semantics-L1-_packageMerge.2" mergedPackage="Semantics-CommonBehaviors-Communications"/>
+ <packageMerge xmi:id="Semantics-L1-_packageMerge.3" mergedPackage="Semantics-Loci-LociL1"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-L2" name="L2">
+ <packageMerge xmi:id="Semantics-L2-_packageMerge.0" mergedPackage="Semantics-L1"/>
+ <packageMerge xmi:id="Semantics-L2-_packageMerge.1" mergedPackage="Semantics-Activities-IntermediateActivities"/>
+ <packageMerge xmi:id="Semantics-L2-_packageMerge.2" mergedPackage="Semantics-Actions-BasicActions"/>
+ <packageMerge xmi:id="Semantics-L2-_packageMerge.3" mergedPackage="Semantics-Actions-IntermediateActions"/>
+ <packageMerge xmi:id="Semantics-L2-_packageMerge.4" mergedPackage="Semantics-Loci-LociL2"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Semantics-L3" name="L3">
+ <packageMerge xmi:id="Semantics-L3-_packageMerge.0" mergedPackage="Semantics-L2"/>
+ <packageMerge xmi:id="Semantics-L3-_packageMerge.1" mergedPackage="Semantics-Activities-CompleteStructuredActivities"/>
+ <packageMerge xmi:id="Semantics-L3-_packageMerge.2" mergedPackage="Semantics-Actions-CompleteActions"/>
+ <packageMerge xmi:id="Semantics-L3-_packageMerge.3" mergedPackage="Semantics-Activities-ExtraStructuredActivities"/>
+ <packageMerge xmi:id="Semantics-L3-_packageMerge.4" mergedPackage="Semantics-Loci-LociL3"/>
+ </packagedElement>
+ </packagedElement>
+</uml:Model>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Syntax.uml b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Syntax.uml
new file mode 100644
index 00000000000..d84b8989932
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/model/fUML_Syntax.uml
@@ -0,0 +1,2916 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_0" name="fUML">
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax" name="Syntax">
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-CommonBehaviors" name="CommonBehaviors">
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-CommonBehaviors-BasicBehaviors" name="BasicBehaviors">
+ <packageImport xmi:id="Syntax-CommonBehaviors-BasicBehaviors-_packageImport.0" importedPackage="Syntax-Classes-Kernel"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior" name="OpaqueBehavior">
+ <ownedRule xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_empty_body_and_language" name="fUML_empty_body_and_language" constrainedElement="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_empty_body_and_language-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_empty_body_and_language">
+ <body>body and language must be empty</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_empty_body_and_language-_specification">
+ <language>OCL</language>
+ <body>self.language->isEmpty() and self.body->isEmpty()</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_inactive" name="fUML_inactive" constrainedElement="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_inactive-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_inactive">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>An opaque behavior cannot be active.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-fUML_inactive-_specification">
+ <language>OCL</language>
+ <body>not self.isActive</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-_generalization.0" general="Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-body" name="body" visibility="public" isOrdered="true" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-body-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-body-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-language" name="language" visibility="public" isOrdered="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-language-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior-language-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-CallConcurrencyKind" name="CallConcurrencyKind">
+ <ownedLiteral xmi:id="Syntax-CommonBehaviors-BasicBehaviors-CallConcurrencyKind-sequential" name="sequential"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-FunctionBehavior" name="FunctionBehavior">
+ <generalization xmi:id="Syntax-CommonBehaviors-BasicBehaviors-FunctionBehavior-_generalization.0" general="Syntax-CommonBehaviors-BasicBehaviors-OpaqueBehavior"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier" name="BehavioredClassifier" isAbstract="true">
+ <ownedRule xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-fUML_allowed_owned_behaviors" name="fUML_allowed_owned_behaviors" constrainedElement="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-fUML_allowed_owned_behaviors-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-fUML_allowed_owned_behaviors">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>An owned behavior must be either the classifier behavior of or the method for an operation of its behaviored classifier.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-fUML_allowed_owned_behaviors-_specification">
+ <language>OCL</language>
+ <body>self.ownedBehavior->forAll(b:Behavior|b = self.classifierBehavior xor self.allFeatures()->includes(b.specification))</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-_generalization.0" general="Syntax-Classes-Kernel-Classifier"/>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-ownedBehavior" name="ownedBehavior" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember" association="Syntax-CommonBehaviors-BasicBehaviors-A_behavioredClassifier_ownedBehavior">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-ownedBehavior-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-ownedBehavior">
+ <body>References behavior specifications owned by a classifier.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-ownedBehavior-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-ownedBehavior-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-classifierBehavior" name="classifierBehavior" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" subsettedProperty="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-ownedBehavior" association="Syntax-CommonBehaviors-BasicBehaviors-A_classifierBehavior_behavioredClassifier">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-classifierBehavior-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-classifierBehavior">
+ <body>A behavior specification that specifies the behavior of the classifier itself.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-classifierBehavior-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior" name="Behavior" isAbstract="true">
+ <ownedRule xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-fUML_reentrant_behavior" name="fUML_reentrant_behavior" constrainedElement="Syntax-CommonBehaviors-BasicBehaviors-Behavior">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-fUML_reentrant_behavior-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-Behavior-fUML_reentrant_behavior">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>In this specification, an fUML instance model must have Behavior.isReentrant &lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-fUML_reentrant_behavior-_specification">
+ <language>OCL</language>
+ <body>self.isReentrant</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-_generalization.0" general="Syntax-Classes-Kernel-Class"/>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-isReentrant" name="isReentrant" visibility="public">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-isReentrant-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-Behavior-isReentrant">
+ <body>Tells whether the behavior can be invoked while it is still executing from a previous invocation.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-isReentrant-_defaultValue" value="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-specification" name="specification" visibility="public" type="Syntax-Classes-Kernel-BehavioralFeature" association="Syntax-Classes-Kernel-A_method_specification">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-specification-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-Behavior-specification">
+ <body>Designates a behavioral feature that the behavior implements. The behavioral feature must be owned by the classifier that owns the behavior or be inherited by it. The parameters of the behavioral feature and the implementing behavior must match. If a behavior does not have a specification, it is directly associated with a classifier (i.e., it is the behavior of the classifier as a whole).</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-specification-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-ownedParameter" name="ownedParameter" visibility="public" type="Syntax-Classes-Kernel-Parameter" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember" association="Syntax-CommonBehaviors-BasicBehaviors-A_behavior_ownedParameter">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-ownedParameter-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-Behavior-ownedParameter">
+ <body>References a list of parameters to the behavior which describes the order and type of arguments that can be given when the behavior is invoked and of the values which will be returned when the behavior completes its execution.
+
+</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-ownedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-ownedParameter-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-context" name="context" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier" isReadOnly="true" isDerived="true" association="Syntax-CommonBehaviors-BasicBehaviors-A_context_behavior">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-context-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-BasicBehaviors-Behavior-context">
+ <body>The classifier that is the context for the execution of the behavior. If the behavior is owned by a BehavioredClassifier, that classifier is the context. Otherwise, the context is the first BehavioredClassifier reached by following the chain of owner relationships. For example, following this algorithm, the context of an entry action in a state machine is the classifier that owns the state machine. The features of the context classifier as well as the elements visible to the context classifier are visible to the behavior.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-Behavior-context-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_context_behavior" name="A_context_behavior" visibility="private" memberEnd="Syntax-CommonBehaviors-BasicBehaviors-A_context_behavior-behavior Syntax-CommonBehaviors-BasicBehaviors-Behavior-context">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_context_behavior-behavior" name="behavior" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" association="Syntax-CommonBehaviors-BasicBehaviors-A_context_behavior">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_context_behavior-behavior-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_context_behavior-behavior-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_behavior_ownedParameter" name="A_behavior_ownedParameter" visibility="private" memberEnd="Syntax-CommonBehaviors-BasicBehaviors-Behavior-ownedParameter Syntax-CommonBehaviors-BasicBehaviors-A_behavior_ownedParameter-behavior">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_behavior_ownedParameter-behavior" name="behavior" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-CommonBehaviors-BasicBehaviors-A_behavior_ownedParameter">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_behavior_ownedParameter-behavior-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_behavioredClassifier_ownedBehavior" name="A_behavioredClassifier_ownedBehavior" visibility="private" memberEnd="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-ownedBehavior Syntax-CommonBehaviors-BasicBehaviors-A_behavioredClassifier_ownedBehavior-behavioredClassifier">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_behavioredClassifier_ownedBehavior-behavioredClassifier" name="behavioredClassifier" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-CommonBehaviors-BasicBehaviors-A_behavioredClassifier_ownedBehavior">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_behavioredClassifier_ownedBehavior-behavioredClassifier-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_classifierBehavior_behavioredClassifier" name="A_classifierBehavior_behavioredClassifier" visibility="private" memberEnd="Syntax-CommonBehaviors-BasicBehaviors-A_classifierBehavior_behavioredClassifier-behavioredClassifier Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier-classifierBehavior">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_classifierBehavior_behavioredClassifier-behavioredClassifier" name="behavioredClassifier" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier" redefinedProperty="Syntax-CommonBehaviors-BasicBehaviors-A_behavioredClassifier_ownedBehavior-behavioredClassifier" association="Syntax-CommonBehaviors-BasicBehaviors-A_classifierBehavior_behavioredClassifier">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-BasicBehaviors-A_classifierBehavior_behavioredClassifier-behavioredClassifier-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-CommonBehaviors-Communications" name="Communications">
+ <packageImport xmi:id="Syntax-CommonBehaviors-Communications-_packageImport.0" importedPackage="Syntax-CommonBehaviors-BasicBehaviors"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-Communications-Trigger" name="Trigger">
+ <generalization xmi:id="Syntax-CommonBehaviors-Communications-Trigger-_generalization.0" general="Syntax-Classes-Kernel-NamedElement"/>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-Communications-Trigger-event" name="event" visibility="public" type="Syntax-CommonBehaviors-Communications-Event" association="Syntax-CommonBehaviors-Communications-A_event_trigger">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-Communications-Trigger-event-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-Communications-Trigger-event">
+ <body>The event that causes the trigger.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-Communications-Signal" name="Signal">
+ <generalization xmi:id="Syntax-CommonBehaviors-Communications-Signal-_generalization.0" general="Syntax-Classes-Kernel-Classifier"/>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-Communications-Signal-ownedAttribute" name="ownedAttribute" visibility="public" type="Syntax-Classes-Kernel-Property" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember Syntax-Classes-Kernel-Classifier-attribute" association="Syntax-CommonBehaviors-Communications-A_ownedAttribute_owningSignal">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-Communications-Signal-ownedAttribute-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-Communications-Signal-ownedAttribute">
+ <body>The attributes owned by the signal.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-Communications-Signal-ownedAttribute-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-Communications-Signal-ownedAttribute-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-Communications-SignalEvent" name="SignalEvent">
+ <generalization xmi:id="Syntax-CommonBehaviors-Communications-SignalEvent-_generalization.0" general="Syntax-CommonBehaviors-Communications-MessageEvent"/>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-Communications-SignalEvent-signal" name="signal" visibility="public" type="Syntax-CommonBehaviors-Communications-Signal" association="Syntax-CommonBehaviors-Communications-A_signal_signalEvent">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-Communications-SignalEvent-signal-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-Communications-SignalEvent-signal">
+ <body>The specific signal that is associated with this event.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-Communications-Reception" name="Reception">
+ <ownedRule xmi:id="Syntax-CommonBehaviors-Communications-Reception-no_method" name="no_method" constrainedElement="Syntax-CommonBehaviors-Communications-Reception">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-Communications-Reception-no_method-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-Communications-Reception-no_method">
+ <body>A reception must not have an associated method.&amp;nbsp;</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-CommonBehaviors-Communications-Reception-no_method-_specification">
+ <language>OCL</language>
+ <body>self.method->isEmpty()</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-CommonBehaviors-Communications-Reception-not_abstract" name="not_abstract" constrainedElement="Syntax-CommonBehaviors-Communications-Reception">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-Communications-Reception-not_abstract-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-Communications-Reception Syntax-CommonBehaviors-Communications-Reception-not_abstract">
+ <body>A reception may not be abstract.</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-CommonBehaviors-Communications-Reception-not_abstract-_specification">
+ <language>OCL</language>
+ <body>not self.isAbstract</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-CommonBehaviors-Communications-Reception-_generalization.0" general="Syntax-Classes-Kernel-BehavioralFeature"/>
+ <ownedAttribute xmi:id="Syntax-CommonBehaviors-Communications-Reception-signal" name="signal" visibility="public" type="Syntax-CommonBehaviors-Communications-Signal" association="Syntax-CommonBehaviors-Communications-A_reception_signal">
+ <ownedComment xmi:id="Syntax-CommonBehaviors-Communications-Reception-signal-_ownedComment.0" annotatedElement="Syntax-CommonBehaviors-Communications-Reception-signal">
+ <body>The signal that this reception handles.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-Communications-MessageEvent" name="MessageEvent" isAbstract="true">
+ <generalization xmi:id="Syntax-CommonBehaviors-Communications-MessageEvent-_generalization.0" general="Syntax-CommonBehaviors-Communications-Event"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-CommonBehaviors-Communications-Event" name="Event" isAbstract="true">
+ <generalization xmi:id="Syntax-CommonBehaviors-Communications-Event-_generalization.0" general="Syntax-Classes-Kernel-PackageableElement"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-Communications-A_reception_signal" name="A_reception_signal" visibility="private" memberEnd="Syntax-CommonBehaviors-Communications-Reception-signal Syntax-CommonBehaviors-Communications-A_reception_signal-reception">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-Communications-A_reception_signal-reception" name="reception" visibility="public" type="Syntax-CommonBehaviors-Communications-Reception" association="Syntax-CommonBehaviors-Communications-A_reception_signal">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-Communications-A_reception_signal-reception-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-Communications-A_reception_signal-reception-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-Communications-A_signal_signalEvent" name="A_signal_signalEvent" visibility="private" memberEnd="Syntax-CommonBehaviors-Communications-A_signal_signalEvent-signalEvent Syntax-CommonBehaviors-Communications-SignalEvent-signal">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-Communications-A_signal_signalEvent-signalEvent" name="signalEvent" visibility="public" type="Syntax-CommonBehaviors-Communications-SignalEvent" association="Syntax-CommonBehaviors-Communications-A_signal_signalEvent">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-Communications-A_signal_signalEvent-signalEvent-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-CommonBehaviors-Communications-A_signal_signalEvent-signalEvent-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-Communications-A_ownedAttribute_owningSignal" name="A_ownedAttribute_owningSignal" visibility="private" memberEnd="Syntax-CommonBehaviors-Communications-A_ownedAttribute_owningSignal-owningSignal Syntax-CommonBehaviors-Communications-Signal-ownedAttribute">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-Communications-A_ownedAttribute_owningSignal-owningSignal" name="owningSignal" visibility="public" type="Syntax-CommonBehaviors-Communications-Signal" subsettedProperty="Syntax-Classes-Kernel-A_attribute_classifier-classifier Syntax-Classes-Kernel-Feature-featuringClassifier Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-CommonBehaviors-Communications-A_ownedAttribute_owningSignal">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-CommonBehaviors-Communications-A_ownedAttribute_owningSignal-owningSignal-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-CommonBehaviors-Communications-A_event_trigger" name="A_event_trigger" visibility="private" memberEnd="Syntax-CommonBehaviors-Communications-A_event_trigger-trigger Syntax-CommonBehaviors-Communications-Trigger-event">
+ <ownedEnd xmi:id="Syntax-CommonBehaviors-Communications-A_event_trigger-trigger" name="trigger" visibility="public" type="Syntax-CommonBehaviors-Communications-Trigger" association="Syntax-CommonBehaviors-Communications-A_event_trigger"/>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Classes" name="Classes">
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Classes-Kernel" name="Kernel">
+ <packageImport xmi:id="Syntax-Classes-Kernel-_packageImport.0" importedPackage="Syntax-CommonBehaviors-BasicBehaviors"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-ValueSpecification" name="ValueSpecification" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-ValueSpecification-_generalization.0" general="Syntax-Classes-Kernel-TypedElement"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-StructuralFeature" name="StructuralFeature" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-StructuralFeature-_generalization.0" general="Syntax-Classes-Kernel-Feature"/>
+ <generalization xmi:id="Syntax-Classes-Kernel-StructuralFeature-_generalization.1" general="Syntax-Classes-Kernel-TypedElement"/>
+ <generalization xmi:id="Syntax-Classes-Kernel-StructuralFeature-_generalization.2" general="Syntax-Classes-Kernel-MultiplicityElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-StructuralFeature-isReadOnly" name="isReadOnly" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-StructuralFeature-isReadOnly-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-StructuralFeature-isReadOnly">
+ <body>States whether the feature's value may be modified by a client.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-StructuralFeature-isReadOnly-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-RedefinableElement" name="RedefinableElement" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-RedefinableElement-_generalization.0" general="Syntax-Classes-Kernel-NamedElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-RedefinableElement-isLeaf" name="isLeaf" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-RedefinableElement-isLeaf-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-RedefinableElement-isLeaf">
+ <body>Indicates whether it is possible to further specialize a RedefinableElement. If the value is true, then it is not possible to further specialize the RedefinableElement.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-RedefinableElement-isLeaf-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinedElement" name="redefinedElement" visibility="public" type="Syntax-Classes-Kernel-RedefinableElement" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="Syntax-Classes-Kernel-A_redefinedElement_redefinableElement">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinedElement-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-RedefinableElement-redefinedElement">
+ <body>The redefinable element that is being redefined by this element.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinedElement-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinedElement-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinitionContext" name="redefinitionContext" visibility="public" type="Syntax-Classes-Kernel-Classifier" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinitionContext-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-RedefinableElement-redefinitionContext">
+ <body>References the contexts that this element may be redefined from.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinitionContext-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-RedefinableElement-redefinitionContext-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-BehavioralFeature" name="BehavioralFeature" isAbstract="true">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-BehavioralFeature-sequentiality" name="sequentiality" constrainedElement="Syntax-Classes-Kernel-BehavioralFeature">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-BehavioralFeature-sequentiality-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-BehavioralFeature-sequentiality">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16674&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>concurrency must be sequential&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-BehavioralFeature-sequentiality-_specification">
+ <language>OCL</language>
+ <body>self.concurrency = CallConcurrencyKind::sequential</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-BehavioralFeature-_generalization.0" general="Syntax-Classes-Kernel-Feature"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter" name="ownedParameter" visibility="public" type="Syntax-Classes-Kernel-Parameter" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember" association="Syntax-Classes-Kernel-A_ownedParameter_ownerFormalParam">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter">
+ <body>Specifies the ordered set of formal parameters of this BehavioralFeature.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter">
+ <body>Specifies the ordered set of formal parameters owned by this BehavioralFeature. The parameter direction can be 'in', 'inout', 'out', pr 'return' to specify input, output, or return parameters.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-BehavioralFeature-isAbstract" name="isAbstract" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-BehavioralFeature-isAbstract-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-BehavioralFeature-isAbstract">
+ <body>If true, then the behavioral feature does not have an implementation, and one must be supplied by a more specific element. If false, the behavioral feature must have an implementation in the classifier or one must be inherited from a more general element.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-BehavioralFeature-isAbstract-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-BehavioralFeature-method" name="method" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" association="Syntax-Classes-Kernel-A_method_specification">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-BehavioralFeature-method-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-BehavioralFeature-method">
+ <body>A behavioral description that implements the behavioral feature. There may be at most one behavior for a particular pairing of a classifier (as owner of the behavior) and a behavioral feature (as specification of the behavior).</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-BehavioralFeature-method-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-BehavioralFeature-method-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-BehavioralFeature-concurrency" name="concurrency" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-CallConcurrencyKind">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-BehavioralFeature-concurrency-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-BehavioralFeature-concurrency">
+ <body>Specifies the semantics of concurrent calls to the same passive instance (i.e., an instance originating from a class with isActive being false). Active instances control access to their own behavioral features.</body>
+ </ownedComment>
+ <defaultValue xmi:type="uml:InstanceValue" xmi:id="Syntax-Classes-Kernel-BehavioralFeature-concurrency-sequential" name="sequential" type="Syntax-CommonBehaviors-BasicBehaviors-CallConcurrencyKind" instance="Syntax-CommonBehaviors-BasicBehaviors-CallConcurrencyKind-sequential"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-InstanceSpecification" name="InstanceSpecification">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-InstanceSpecification-possible_classifiers" name="possible_classifiers" constrainedElement="Syntax-Classes-Kernel-InstanceSpecification">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-InstanceSpecification-possible_classifiers-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-InstanceSpecification-possible_classifiers">
+ <body>Either all the classifiers are classes, or there is one classifier that is a data type</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-InstanceSpecification-possible_classifiers-_specification">
+ <language>OCL</language>
+ <body>self.classifier->forAll(oclIsKindOf(Class)) or
+self.classifier->size() = 1 and self.classifier->forAll(oclIsKindOf(DataType))
+</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-InstanceSpecification-_generalization.0" general="Syntax-Classes-Kernel-NamedElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-InstanceSpecification-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Classes-Kernel-A_classifier_instanceSpecification">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-InstanceSpecification-classifier-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-InstanceSpecification-classifier">
+ <body>The classifier or classifiers of the represented instance. If multiple classifiers are specified, the instance is classified by all of them.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-InstanceSpecification-classifier-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-InstanceSpecification-classifier-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-InstanceSpecification-slot" name="slot" visibility="public" type="Syntax-Classes-Kernel-Slot" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_slot_owningInstance">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-InstanceSpecification-slot-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-InstanceSpecification-slot">
+ <body>A slot giving the value or values of a structural feature of the instance. An instance specification can have one slot per structural feature of its classifiers, including inherited features. It is not necessary to model a slot for each structural feature, in which case the instance specification is a partial description.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-InstanceSpecification-slot-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-InstanceSpecification-slot-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-InstanceValue" name="InstanceValue">
+ <generalization xmi:id="Syntax-Classes-Kernel-InstanceValue-_generalization.0" general="Syntax-Classes-Kernel-ValueSpecification"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-InstanceValue-instance" name="instance" visibility="public" type="Syntax-Classes-Kernel-InstanceSpecification" association="Syntax-Classes-Kernel-A_instance_instanceValue">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-InstanceValue-instance-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-InstanceValue-instance">
+ <body>The instance that is the specified value.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-LiteralBoolean" name="LiteralBoolean">
+ <generalization xmi:id="Syntax-Classes-Kernel-LiteralBoolean-_generalization.0" general="Syntax-Classes-Kernel-LiteralSpecification"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-LiteralBoolean-value" name="value" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-LiteralBoolean-value-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-LiteralBoolean-value">
+ <body>The specified Boolean value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-LiteralBoolean-value-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-LiteralInteger" name="LiteralInteger">
+ <generalization xmi:id="Syntax-Classes-Kernel-LiteralInteger-_generalization.0" general="Syntax-Classes-Kernel-LiteralSpecification"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-LiteralInteger-value" name="value" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-LiteralInteger-value-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-LiteralInteger-value">
+ <body>The specified Integer value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <defaultValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-LiteralInteger-value-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-LiteralNull" name="LiteralNull">
+ <generalization xmi:id="Syntax-Classes-Kernel-LiteralNull-_generalization.0" general="Syntax-Classes-Kernel-LiteralSpecification"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-LiteralSpecification" name="LiteralSpecification" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-LiteralSpecification-_generalization.0" general="Syntax-Classes-Kernel-ValueSpecification"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-LiteralString" name="LiteralString">
+ <generalization xmi:id="Syntax-Classes-Kernel-LiteralString-_generalization.0" general="Syntax-Classes-Kernel-LiteralSpecification"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-LiteralString-value" name="value" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-LiteralString-value-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-LiteralString-value">
+ <body>The specified String value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-LiteralString-value-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-LiteralUnlimitedNatural" name="LiteralUnlimitedNatural">
+ <generalization xmi:id="Syntax-Classes-Kernel-LiteralUnlimitedNatural-_generalization.0" general="Syntax-Classes-Kernel-LiteralSpecification"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-LiteralUnlimitedNatural-value" name="value" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-LiteralUnlimitedNatural-value-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-LiteralUnlimitedNatural-value">
+ <body>The specified UnlimitedNatural value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-LiteralUnlimitedNatural-value-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <body>new UnlimitedNatural(0)</body>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-MultiplicityElement" name="MultiplicityElement">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-MultiplicityElement-required_lower_and_upper_for_fUML" name="required_lower_and_upper_for_fUML" constrainedElement="Syntax-Classes-Kernel-MultiplicityElement">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-required_lower_and_upper_for_fUML-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-required_lower_and_upper_for_fUML">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16674&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>upperValue must be a LiteralUnlimitedNatural and lowerValue must be a LiteralInteger. Both are required.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-required_lower_and_upper_for_fUML-_specification">
+ <language>OCL</language>
+ <body>self.upperValue->notEmpty() and
+self.upperValue->asSequence()->first().oclIsKindOf(LiteralUnlimitedNatural) and
+self.lowerValue->notEmpty() and
+self.lowerValue->asSequence()->first().oclIsKindOf(LiteralInteger) </body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-MultiplicityElement-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-MultiplicityElement-isOrdered" name="isOrdered" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-isOrdered-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-isOrdered">
+ <body>For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered..</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-isOrdered-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-isOrdered">
+ <body>For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-isOrdered-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-MultiplicityElement-isUnique" name="isUnique" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-isUnique-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-isUnique">
+ <body>For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-isUnique-_defaultValue" value="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upper" name="upper" visibility="public" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upper-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-upper">
+ <body>Specifies the upper bound of the multiplicity interval.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upper-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-upper">
+ <body>Specifies the upper bound of the multiplicity interval, if it is expressed as an unlimited natural.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upper-_lowerValue"/>
+ <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upper-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <body>new UnlimitedNatural(1)</body>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lower" name="lower" visibility="public" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lower-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-lower">
+ <body>Specifies the lower bound of the multiplicity interval.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lower-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-lower">
+ <body>Specifies the lower bound of the multiplicity interval, if it is expressed as an integer.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lower-_lowerValue"/>
+ <defaultValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lower-_defaultValue" value="1">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upperValue" name="upperValue" visibility="public" type="Syntax-Classes-Kernel-ValueSpecification" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_upperValue_owningUpper">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upperValue-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-upperValue">
+ <body>The specification of the upper bound for this multiplicity.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-upperValue-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lowerValue" name="lowerValue" visibility="public" type="Syntax-Classes-Kernel-ValueSpecification" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_lowerValue_owningLower">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lowerValue-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-MultiplicityElement-lowerValue">
+ <body>The specification of the lower bound for this multiplicity.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-MultiplicityElement-lowerValue-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-NamedElement" name="NamedElement" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-NamedElement-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-NamedElement-name" name="name" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-NamedElement-name-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-NamedElement-name">
+ <body>The name of the NamedElement.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-NamedElement-name-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-NamedElement-visibility" name="visibility" visibility="public" type="Syntax-Classes-Kernel-VisibilityKind">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-NamedElement-visibility-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-NamedElement-visibility">
+ <body>Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-NamedElement-visibility-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-NamedElement-qualifiedName" name="qualifiedName" visibility="public" isReadOnly="true" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-NamedElement-qualifiedName-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-NamedElement-qualifiedName">
+ <body>A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-NamedElement-qualifiedName-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-NamedElement-namespace" name="namespace" visibility="public" type="Syntax-Classes-Kernel-Namespace" isReadOnly="true" isDerived="true" isDerivedUnion="true" subsettedProperty="Syntax-Classes-Kernel-Element-owner Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace" association="Syntax-Classes-Kernel-A_ownedMember_namespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-NamedElement-namespace-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Namespace" name="Namespace" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-Namespace-_generalization.0" general="Syntax-Classes-Kernel-NamedElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Namespace-member" name="member" visibility="public" type="Syntax-Classes-Kernel-NamedElement" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="Syntax-Classes-Kernel-A_member_memberNamespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Namespace-member-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Namespace-member-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Namespace-ownedMember" name="ownedMember" visibility="public" type="Syntax-Classes-Kernel-NamedElement" isReadOnly="true" aggregation="composite" isDerived="true" isDerivedUnion="true" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement Syntax-Classes-Kernel-Namespace-member" association="Syntax-Classes-Kernel-A_ownedMember_namespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Namespace-ownedMember-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Namespace-ownedMember-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Namespace-elementImport" name="elementImport" visibility="public" type="Syntax-Classes-Kernel-ElementImport" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_elementImport_importingNamespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Namespace-elementImport-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Namespace-elementImport-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Namespace-packageImport" name="packageImport" visibility="public" type="Syntax-Classes-Kernel-PackageImport" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_packageImport_importingNamespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Namespace-packageImport-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Namespace-packageImport-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Namespace-importedMember" name="importedMember" visibility="public" type="Syntax-Classes-Kernel-PackageableElement" isReadOnly="true" isDerived="true" subsettedProperty="Syntax-Classes-Kernel-Namespace-member" association="Syntax-Classes-Kernel-A_importedMember_namespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Namespace-importedMember-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Namespace-importedMember-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Operation" name="Operation">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Operation-zero_or_one_method" name="zero_or_one_method" constrainedElement="Syntax-Classes-Kernel-Operation">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-zero_or_one_method-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-zero_or_one_method">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>If an operation is abstract it must have no method. Otherwise it must have exactly one method.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Operation-zero_or_one_method-_specification">
+ <language>OCL</language>
+ <body>(self.isAbstract and self.method->isEmpty()) xor (not self.isAbstract and self.method->size() = 1)</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-Operation-_generalization.0" general="Syntax-Classes-Kernel-BehavioralFeature"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-isQuery" name="isQuery" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-isQuery-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-isQuery">
+ <body>Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false).</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Operation-isQuery-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-isOrdered" name="isOrdered" visibility="public" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-isOrdered-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-isOrdered">
+ <body>Redefines the corresponding property from Basic to derive this information from the return result for this Operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-isOrdered-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Operation-isOrdered">
+ <body>Specifies whether the return parameter is ordered or not, if present.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Operation-isOrdered-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-isUnique" name="isUnique" visibility="public" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-isUnique-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-isUnique">
+ <body>Redefines the corresponding property from Basic to derive this information from the return result for this Operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-isUnique-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Operation-isUnique">
+ <body>Specifies whether the return parameter is unique or not, if present.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Operation-isUnique-_defaultValue" value="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-lower" name="lower" visibility="public" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-lower-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-lower">
+ <body>Redefines the corresponding property from Basic to derive this information from the return result for this Operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-lower-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Operation-lower">
+ <body>Specifies the lower multiplicity of the return parameter, if present.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Operation-lower-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-upper" name="upper" visibility="public" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-upper-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-upper">
+ <body>Redefines the corresponding property from Basic to derive this information from the return result for this Operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-upper-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Operation-upper">
+ <body>Specifies the upper multiplicity of the return parameter, if present.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Operation-upper-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-class" name="class" visibility="public" type="Syntax-Classes-Kernel-Class" subsettedProperty="Syntax-Classes-Kernel-Feature-featuringClassifier Syntax-Classes-Kernel-RedefinableElement-redefinitionContext Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-Classes-Kernel-A_ownedOperation_class">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-class-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-class">
+ <body>The class that owns the operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-class-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Operation-class">
+ <body>The class that owns this operation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Operation-class-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-redefinedOperation" name="redefinedOperation" visibility="public" type="Syntax-Classes-Kernel-Operation" subsettedProperty="Syntax-Classes-Kernel-RedefinableElement-redefinedElement" association="Syntax-Classes-Kernel-A_redefinedOperation_operation">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-redefinedOperation-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-redefinedOperation">
+ <body>References the Operations that are redefined by this Operation.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Operation-redefinedOperation-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Operation-redefinedOperation-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-type" name="type" visibility="public" type="Syntax-Classes-Kernel-Type" isReadOnly="true" isDerived="true" association="Syntax-Classes-Kernel-A_type_operation">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-type-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Operation-type">
+ <body>Redefines the corresponding property from Basic to derive this information from the return result for this Operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Operation-type-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Operation-type">
+ <body>Specifies the return result of the operation, if present.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Operation-type-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Operation-ownedParameter" name="ownedParameter" visibility="public" type="Syntax-Classes-Kernel-Parameter" isOrdered="true" aggregation="composite" redefinedProperty="Syntax-Classes-Kernel-BehavioralFeature-ownedParameter" association="Syntax-Classes-Kernel-A_ownedParameter_operation">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Operation-ownedParameter-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Operation-ownedParameter-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Package" name="Package">
+ <generalization xmi:id="Syntax-Classes-Kernel-Package-_generalization.0" general="Syntax-Classes-Kernel-Namespace"/>
+ <generalization xmi:id="Syntax-Classes-Kernel-Package-_generalization.1" general="Syntax-Classes-Kernel-PackageableElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Package-packagedElement" name="packagedElement" visibility="public" type="Syntax-Classes-Kernel-PackageableElement" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember" association="Syntax-Classes-Kernel-A_packageElement_owningPackage">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Package-packagedElement-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Package-packagedElement-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Package-ownedType" name="ownedType" visibility="public" type="Syntax-Classes-Kernel-Type" aggregation="composite" isDerived="true" subsettedProperty="Syntax-Classes-Kernel-Package-packagedElement" association="Syntax-Classes-Kernel-A_type_package">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Package-ownedType-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Package-ownedType-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Package-nestedPackage" name="nestedPackage" visibility="public" type="Syntax-Classes-Kernel-Package" aggregation="composite" isDerived="true" subsettedProperty="Syntax-Classes-Kernel-Package-packagedElement" association="Syntax-Classes-Kernel-A_nestedPackage_nestingPackage">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Package-nestedPackage-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Package-nestedPackage-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Package-nestingPackage" name="nestingPackage" visibility="public" type="Syntax-Classes-Kernel-Package" subsettedProperty="Syntax-Classes-Kernel-A_packageElement_owningPackage-owningPackage" association="Syntax-Classes-Kernel-A_nestedPackage_nestingPackage">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Package-nestingPackage-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Package-URI" name="URI" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Package-URI-_lowerValue"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="Syntax-Classes-Kernel-Package-addNestedPackage" name="addNestedPackage" isReentrant="false">
+ <ownedParameter xmi:id="Syntax-Classes-Kernel-Package-addNestedPackage-nestedPackage" name="nestedPackage" visibility="public" type="Syntax-Classes-Kernel-Package" effect="create"/>
+ <language>Java</language>
+ <body>super.addOwnedMember(nestedPackage);
+this.nestedPackage.add(nestedPackage);
+nestedPackage.nestingPackage = this;
+</body>
+ </ownedBehavior>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-PackageableElement" name="PackageableElement" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-PackageableElement-_generalization.0" general="Syntax-Classes-Kernel-NamedElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-PackageableElement-visibility" name="visibility" visibility="public" type="Syntax-Classes-Kernel-VisibilityKind" redefinedProperty="Syntax-Classes-Kernel-NamedElement-visibility">
+ <defaultValue xmi:type="uml:InstanceValue" xmi:id="Syntax-Classes-Kernel-PackageableElement-visibility-public" name="public" type="Syntax-Classes-Kernel-VisibilityKind" instance="Syntax-Classes-Kernel-VisibilityKind-public"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Parameter" name="Parameter">
+ <generalization xmi:id="Syntax-Classes-Kernel-Parameter-_generalization.0" general="Syntax-Classes-Kernel-TypedElement"/>
+ <generalization xmi:id="Syntax-Classes-Kernel-Parameter-_generalization.1" general="Syntax-Classes-Kernel-MultiplicityElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Parameter-direction" name="direction" visibility="public" type="Syntax-Classes-Kernel-ParameterDirectionKind">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Parameter-direction-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Parameter-direction">
+ <body>Indicates whether a parameter is being sent into or out of a behavioral element.</body>
+ </ownedComment>
+ <defaultValue xmi:type="uml:InstanceValue" xmi:id="Syntax-Classes-Kernel-Parameter-direction-in" name="in" type="Syntax-Classes-Kernel-ParameterDirectionKind" instance="Syntax-Classes-Kernel-ParameterDirectionKind-in"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Parameter-operation" name="operation" visibility="public" type="Syntax-Classes-Kernel-Operation" subsettedProperty="Syntax-Classes-Kernel-A_ownedParameter_ownerFormalParam-ownerFormalParam" association="Syntax-Classes-Kernel-A_ownedParameter_operation">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Parameter-operation-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Parameter-operation">
+ <body>References the Operation for which this is a formal parameter.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Parameter-operation-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Parameter-operation">
+ <body>References the Operation owning this parameter.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Parameter-operation-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-PrimitiveType" name="PrimitiveType">
+ <generalization xmi:id="Syntax-Classes-Kernel-PrimitiveType-_generalization.0" general="Syntax-Classes-Kernel-DataType"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Property" name="Property">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Property-no_derivation" name="no_derivation" constrainedElement="Syntax-Classes-Kernel-Property">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-no_derivation-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-no_derivation">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>isDerived and isDerivedUnion must be false&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Property-no_derivation-_specification">
+ <language>OCL</language>
+ <body>not self.isDerived and not self.isDerivedUnion</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-Property-_generalization.0" general="Syntax-Classes-Kernel-StructuralFeature"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-isDerived" name="isDerived" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-isDerived-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-isDerived">
+ <body>If isDerived is true, the value of the attribute is derived from information elsewhere.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-isDerived-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Property-isDerived">
+ <body>Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Property-isDerived-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-isReadOnly" name="isReadOnly" visibility="public" redefinedProperty="Syntax-Classes-Kernel-StructuralFeature-isReadOnly">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-isReadOnly-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-isReadOnly">
+ <body>This redefines the corresponding attribute in Basic::Property and Abstractions::StructuralFeature.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-isReadOnly-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Property-isReadOnly">
+ <body>If true, the attribute may only be read, and not written.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Property-isReadOnly-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-isDerivedUnion" name="isDerivedUnion" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-isDerivedUnion-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-isDerivedUnion">
+ <body>Specifies whether the property is derived as the union of all of the properties that are constrained to subset it.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Property-isDerivedUnion-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-aggregation" name="aggregation" visibility="public" type="Syntax-Classes-Kernel-AggregationKind">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-aggregation-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-aggregation">
+ <body>Specifies the kind of aggregation that applies to the Property.</body>
+ </ownedComment>
+ <defaultValue xmi:type="uml:InstanceValue" xmi:id="Syntax-Classes-Kernel-Property-aggregation-none" name="none" type="Syntax-Classes-Kernel-AggregationKind" instance="Syntax-Classes-Kernel-AggregationKind-none"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-isComposite" name="isComposite" visibility="public" isDerived="true">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-isComposite-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-isComposite">
+ <body>If isComposite is true, the object containing the attribute is a container for the object or value contained in the attribute.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-isComposite-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Property-isComposite">
+ <body>This is a derived value, indicating whether the aggregation of the Property is composite or not.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Property-isComposite-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-owningAssociation" name="owningAssociation" visibility="public" type="Syntax-Classes-Kernel-Association" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace Syntax-Classes-Kernel-Feature-featuringClassifier Syntax-Classes-Kernel-Property-association" association="Syntax-Classes-Kernel-A_ownedEnd_owningAssociation">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-owningAssociation-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-owningAssociation">
+ <body>References the owning association of this property, if any.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-owningAssociation-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Property-owningAssociation">
+ <body>References the owning association of this property.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Property-owningAssociation-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-datatype" name="datatype" visibility="public" type="Syntax-Classes-Kernel-DataType" subsettedProperty="Syntax-Classes-Kernel-A_attribute_classifier-classifier Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-Classes-Kernel-A_ownedAttribute_datatype">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-datatype-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-datatype">
+ <body>The DataType that owns this Operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-datatype-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Property-datatype">
+ <body>The DataType that owns this Property.
+
+</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Property-datatype-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-association" name="association" visibility="public" type="Syntax-Classes-Kernel-Association" subsettedProperty="Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace" association="Syntax-Classes-Kernel-A_memberEnd_association">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Property-association-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Property-association">
+ <body>References the association of which this property is a member, if any.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Property-association-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-class" name="class" visibility="public" type="Syntax-Classes-Kernel-Class" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace Syntax-Classes-Kernel-A_general_classifier-classifier" association="Syntax-Classes-Kernel-A_ownedAttribute_class">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Property-class-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-opposite" name="opposite" visibility="public" type="Syntax-Classes-Kernel-Property" isDerived="true" association="Syntax-Classes-Kernel-A_opposite_property">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Property-opposite-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Property-isID" name="isID" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Property-isID-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Slot" name="Slot">
+ <generalization xmi:id="Syntax-Classes-Kernel-Slot-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Slot-owningInstance" name="owningInstance" visibility="public" type="Syntax-Classes-Kernel-InstanceSpecification" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Classes-Kernel-A_slot_owningInstance">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Slot-owningInstance-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Slot-owningInstance">
+ <body>The instance specification that owns this slot.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Slot-definingFeature" name="definingFeature" visibility="public" type="Syntax-Classes-Kernel-StructuralFeature" association="Syntax-Classes-Kernel-A_definingFeature_slot">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Slot-definingFeature-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Slot-definingFeature">
+ <body>The structural feature that specifies the values that may be held by the slot.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Slot-value" name="value" visibility="public" type="Syntax-Classes-Kernel-ValueSpecification" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_value_owningSlot">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Slot-value-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Slot-value">
+ <body>The value or values corresponding to the defining feature for the owning instance specification.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Slot-value-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Slot-value-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Type" name="Type" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-Type-_generalization.0" general="Syntax-Classes-Kernel-PackageableElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Type-package" name="package" visibility="public" type="Syntax-Classes-Kernel-Package" subsettedProperty="Syntax-Classes-Kernel-A_packageElement_owningPackage-owningPackage" association="Syntax-Classes-Kernel-A_type_package">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Type-package-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-TypedElement" name="TypedElement">
+ <generalization xmi:id="Syntax-Classes-Kernel-TypedElement-_generalization.0" general="Syntax-Classes-Kernel-NamedElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-TypedElement-type" name="type" visibility="public" type="Syntax-Classes-Kernel-Type" association="Syntax-Classes-Kernel-A_type_typedElement">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-TypedElement-type-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-TypedElement-type">
+ <body>Redefines the corresponding property from Basic to derive this information from the return result for this Operation.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-TypedElement-type-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-TypedElement-type">
+ <body>The type of the TypedElement.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-TypedElement-type-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="Syntax-Classes-Kernel-AggregationKind" name="AggregationKind">
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-AggregationKind-none" name="none">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-AggregationKind-none-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-AggregationKind-none">
+ <body>Indicates that the property has no aggregation.</body>
+ </ownedComment>
+ </ownedLiteral>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-AggregationKind-shared" name="shared">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-AggregationKind-shared-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-AggregationKind-shared">
+ <body>Indicates that the property has a shared aggregation.</body>
+ </ownedComment>
+ </ownedLiteral>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-AggregationKind-composite" name="composite">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-AggregationKind-composite-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-AggregationKind-composite">
+ <body>Indicates that the property is aggregated compositely, i.e., the composite object has responsibility for the existence and storage of the composed objects (parts).</body>
+ </ownedComment>
+ </ownedLiteral>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind" name="ParameterDirectionKind">
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-in" name="in">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-in-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-ParameterDirectionKind-in">
+ <body>Indicates that parameter values are passed into the behavioral element by the caller.</body>
+ </ownedComment>
+ </ownedLiteral>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-inout" name="inout">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-inout-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-ParameterDirectionKind-inout">
+ <body>Indicates that parameter values are passed into a behavioral element by the caller and then back out to the caller from the behavioral element.</body>
+ </ownedComment>
+ </ownedLiteral>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-out" name="out">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-out-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-ParameterDirectionKind-out">
+ <body>Indicates that parameter values are passed from a behavioral element out to the caller.</body>
+ </ownedComment>
+ </ownedLiteral>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-return" name="return">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-return-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-ParameterDirectionKind-return">
+ <body>Indicates that parameter values are passed as return values from a behavioral element back to the caller.</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-ParameterDirectionKind-return-_specification"/>
+ </ownedLiteral>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="Syntax-Classes-Kernel-VisibilityKind" name="VisibilityKind">
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-VisibilityKind-public" name="public"/>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-VisibilityKind-private" name="private"/>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-VisibilityKind-protected" name="protected"/>
+ <ownedLiteral xmi:id="Syntax-Classes-Kernel-VisibilityKind-package" name="package"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Class" name="Class">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Class-active_class_classifier_behavior" name="active_class_classifier_behavior" constrainedElement="Syntax-Classes-Kernel-Class">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Class-active_class_classifier_behavior-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Class-active_class_classifier_behavior">
+ <body>Only active classes may have classifier behaviors.</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Class-active_class_classifier_behavior-_specification">
+ <language>OCL</language>
+ <body>self.classifierBehavior->notEmpty() implies self.isActive
+</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Class-active_class_specialization" name="active_class_specialization" constrainedElement="Syntax-Classes-Kernel-Class">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Class-active_class_specialization-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Class Syntax-Classes-Kernel-Class-active_class_specialization">
+ <body>Only an active class may specialize an active class.</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Class-active_class_specialization-_specification">
+ <language>OCL</language>
+ <body>self.parents()->exist(isActive) implies self.isActive</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Class-abstract_class" name="abstract_class" constrainedElement="Syntax-Classes-Kernel-Class">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Class-abstract_class-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Class Syntax-Classes-Kernel-Class-abstract_class">
+ <body>Only an abstract class may have abstract behavioral features.</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Class-abstract_class-_specification">
+ <language>OCL</language>
+ <body>self.member->select(oclIsKindOf(BehavioralFeature))->exists(isAbstract) implies self.isAbstract</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-Class-_generalization.0" general="Syntax-CommonBehaviors-BasicBehaviors-BehavioredClassifier"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Class-ownedOperation" name="ownedOperation" visibility="public" type="Syntax-Classes-Kernel-Operation" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement-redefinableElement Syntax-Classes-Kernel-Classifier-feature" association="Syntax-Classes-Kernel-A_ownedOperation_class">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Class-ownedOperation-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Class-ownedOperation">
+ <body>The operations owned by the class.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Class-ownedOperation-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Class-ownedOperation-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Class-isActive" name="isActive" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Class-isActive-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Class-isActive">
+ <body>Determines whether an object specified by this class is active or not. If true, then the owning class is referred to as an active class. If false, then such a class is referred to as a passive class.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Class-isActive-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Class-ownedReception" name="ownedReception" visibility="public" type="Syntax-CommonBehaviors-Communications-Reception" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Classifier-feature Syntax-Classes-Kernel-Namespace-ownedMember" association="Syntax-Classes-Kernel-A_ownedReception_class">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Class-ownedReception-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Class-ownedReception">
+ <body>Receptions that objects of this class are willing to accept.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Class-ownedReception-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Class-ownedReception-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Class-ownedAttribute" name="ownedAttribute" visibility="public" type="Syntax-Classes-Kernel-Property" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember Syntax-Classes-Kernel-Classifier-attribute" association="Syntax-Classes-Kernel-A_ownedAttribute_class">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Class-ownedAttribute-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Class-ownedAttribute-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Class-nestedClassifier" name="nestedClassifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember" association="Syntax-Classes-Kernel-A_nestedClassifier_class">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Class-nestedClassifier-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Class-nestedClassifier-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Class-isID" name="isID" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Class-isID-_defaultValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Class-superClass" name="superClass" visibility="public" type="Syntax-Classes-Kernel-Class" isDerived="true" redefinedProperty="Syntax-Classes-Kernel-Classifier-general" association="Syntax-Classes-Kernel-A_superClass_class">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Class-superClass-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Class-superClass">
+ <body>This gives the superclasses of a class.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Class-superClass-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Class-superClass-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Classifier" name="Classifier" isAbstract="true">
+ <generalization xmi:id="Syntax-Classes-Kernel-Classifier-_generalization.0" general="Syntax-Classes-Kernel-Type"/>
+ <generalization xmi:id="Syntax-Classes-Kernel-Classifier-_generalization.1" general="Syntax-Classes-Kernel-Namespace"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Classifier-isAbstract" name="isAbstract" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Classifier-isAbstract-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Classifier-isAbstract">
+ <body>If true, the Classifier does not provide a complete declaration and can typically not be instantiated. An abstract classifier is intended to be used by other classifiers e.g. as the target of general metarelationships or generalization relationships.
+
+</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Classifier-isAbstract-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Classifier-generalization" name="generalization" visibility="public" type="Syntax-Classes-Kernel-Generalization" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_generalization_specific">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Classifier-generalization-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Classifier-generalization">
+ <body>Specifies the Generalization relationships for this Classifier. These Generalizations navigaten to more general classifiers in the generalization hierarchy.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Classifier-generalization-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Classifier-generalization-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Classifier-feature" name="feature" visibility="public" type="Syntax-Classes-Kernel-Feature" isReadOnly="true" isDerived="true" isDerivedUnion="true" subsettedProperty="Syntax-Classes-Kernel-Namespace-member" association="Syntax-Classes-Kernel-A_feature_featuringClassifier">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Classifier-feature-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Classifier-feature">
+ <body>Redefines the corresponding association in Abstractions. Note that there may be members of the Classifier that are of the type Feature but are not included in this association, e.g. inherited features.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Classifier-feature-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Classifier-feature">
+ <body>Specifies each feature defined in the classifier.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Classifier-feature-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Classifier-feature-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Classifier-inheritedMember" name="inheritedMember" visibility="public" type="Syntax-Classes-Kernel-NamedElement" isReadOnly="true" isDerived="true" subsettedProperty="Syntax-Classes-Kernel-Namespace-member" association="Syntax-Classes-Kernel-A_inheritedMember_classifier">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Classifier-inheritedMember-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Classifier-inheritedMember">
+ <body>Specifies all elements inherited by this classifier from the general classifiers.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Classifier-inheritedMember-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Classifier-inheritedMember-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Classifier-attribute" name="attribute" visibility="public" type="Syntax-Classes-Kernel-Property" isReadOnly="true" isDerived="true" isDerivedUnion="true" subsettedProperty="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement-redefinableElement Syntax-Classes-Kernel-Classifier-feature" association="Syntax-Classes-Kernel-A_attribute_classifier">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Classifier-attribute-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Classifier-attribute">
+ <body>Refers to all of the Properties that are direct (i.e. not inherited or import fUML.Syntax.d) attributes of the classifier.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Classifier-attribute-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Classifier-attribute-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Classifier-general" name="general" visibility="public" type="Syntax-Classes-Kernel-Classifier" isDerived="true" association="Syntax-Classes-Kernel-A_general_classifier">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Classifier-general-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Classifier-general-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Classifier-isFinalSpecialization" name="isFinalSpecialization" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Classifier-isFinalSpecialization-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-DataType" name="DataType">
+ <generalization xmi:id="Syntax-Classes-Kernel-DataType-_generalization.0" general="Syntax-Classes-Kernel-Classifier"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-DataType-ownedAttribute" name="ownedAttribute" visibility="public" type="Syntax-Classes-Kernel-Property" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember Syntax-Classes-Kernel-Classifier-attribute" association="Syntax-Classes-Kernel-A_ownedAttribute_datatype">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-DataType-ownedAttribute-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-DataType-ownedAttribute">
+ <body>The Attributes owned by the DataType.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-DataType-ownedAttribute-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-DataType-ownedAttribute-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Element" name="Element" isAbstract="true">
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Element-ownedElement" name="ownedElement" visibility="public" type="Syntax-Classes-Kernel-Element" isReadOnly="true" aggregation="composite" isDerived="true" isDerivedUnion="true" association="Syntax-Classes-Kernel-A_ownedElement_owner">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Element-ownedElement-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Element-ownedElement">
+ <body>The Elements owned by this element.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Element-ownedElement-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Element-ownedElement-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Element-owner" name="owner" visibility="public" type="Syntax-Classes-Kernel-Element" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="Syntax-Classes-Kernel-A_ownedElement_owner">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Element-owner-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Element-owner">
+ <body>The Element that owns this element.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Element-owner-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Element-ownedComment" name="ownedComment" visibility="public" type="Syntax-Classes-Kernel-Comment" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_ownedComment_owningElement">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Element-ownedComment-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Element-ownedComment-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Enumeration" name="Enumeration">
+ <generalization xmi:id="Syntax-Classes-Kernel-Enumeration-_generalization.0" general="Syntax-Classes-Kernel-DataType"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Enumeration-ownedLiteral" name="ownedLiteral" visibility="public" type="Syntax-Classes-Kernel-EnumerationLiteral" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Namespace-ownedMember" association="Syntax-Classes-Kernel-A_ownedLiteral_enumeration">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Enumeration-ownedLiteral-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Enumeration-ownedLiteral">
+ <body>The ordered collection of literals for the enumeration.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Enumeration-ownedLiteral-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Enumeration-ownedLiteral">
+ <body>The ordered set of literals for this Enumeration.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Enumeration-ownedLiteral-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Enumeration-ownedLiteral-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-EnumerationLiteral" name="EnumerationLiteral">
+ <generalization xmi:id="Syntax-Classes-Kernel-EnumerationLiteral-_generalization.0" general="Syntax-Classes-Kernel-InstanceSpecification"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-EnumerationLiteral-enumeration" name="enumeration" visibility="public" type="Syntax-Classes-Kernel-Enumeration" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-Classes-Kernel-A_ownedLiteral_enumeration">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-EnumerationLiteral-enumeration-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-EnumerationLiteral-enumeration">
+ <body>The enumeration that this literal belongs to.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-EnumerationLiteral-enumeration-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-EnumerationLiteral-enumeration">
+ <body>The Enumeration that this EnumerationLiteral is a member of.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-EnumerationLiteral-enumeration-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-EnumerationLiteral-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Enumeration" isDerived="true" redefinedProperty="Syntax-Classes-Kernel-InstanceSpecification-classifier" association="Syntax-Classes-Kernel-A_classifier_enumerationLiteral"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Feature" name="Feature" isAbstract="true">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Feature-non_static" name="non_static" constrainedElement="Syntax-Classes-Kernel-Feature">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Feature-non_static-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Feature-non_static">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16674&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>isStatic must be false&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Feature-non_static-_specification">
+ <language>OCL</language>
+ <body>not self.isStatic</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-Feature-_generalization.0" general="Syntax-Classes-Kernel-RedefinableElement"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Feature-isStatic" name="isStatic" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Feature-isStatic-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Feature-isStatic">
+ <body>Specifies whether this feature characterizes individual instances classified by the classifier (false) or the classifier itself (true).</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Feature-isStatic-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Feature-featuringClassifier" name="featuringClassifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" isReadOnly="true" isDerived="true" isDerivedUnion="true" subsettedProperty="Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace" association="Syntax-Classes-Kernel-A_feature_featuringClassifier">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Feature-featuringClassifier-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Feature-featuringClassifier">
+ <body>Redefines the corresponding association in Abstractions.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Feature-featuringClassifier-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Feature-featuringClassifier">
+ <body>The Classifiers that have this Feature as a feature.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Feature-featuringClassifier-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Feature-featuringClassifier-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Generalization" name="Generalization">
+ <generalization xmi:id="Syntax-Classes-Kernel-Generalization-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Generalization-isSubstitutable" name="isSubstitutable" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Generalization-isSubstitutable-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Generalization-isSubstitutable">
+ <body>Indicates whether the specific classifier can be used wherever the general classifier can be used. If true, the execution traces of the specific classifier will be a superset of the execution traces of the general classifier.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Generalization-isSubstitutable-_lowerValue"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Generalization-isSubstitutable-_defaultValue" value="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Generalization-specific" name="specific" visibility="public" type="Syntax-Classes-Kernel-Classifier" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Classes-Kernel-A_generalization_specific">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Generalization-specific-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Generalization-specific">
+ <body>References the specializing classifier in the Generalization relationship.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Generalization-general" name="general" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Classes-Kernel-A_general_generalization">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Generalization-general-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Generalization-general">
+ <body>References the general classifier in the Generalization relationship.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Association" name="Association">
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Association-owns_memberEnds" name="owns_memberEnds" constrainedElement="Syntax-Classes-Kernel-Association">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-owns_memberEnds-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Association-owns_memberEnds">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>An association must own all its memberEnds.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Association-owns_memberEnds-_specification">
+ <language>OCL</language>
+ <body>self.memberEnd->symmetricDifference(self.ownedEnd)->isEmpty()</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Classes-Kernel-Association-no_derivation" name="no_derivation" constrainedElement="Syntax-Classes-Kernel-Association">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-no_derivation-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Association-no_derivation">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>isDerived must be false&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Classes-Kernel-Association-no_derivation-_specification">
+ <language>OCL</language>
+ <body>not self.isDerived</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Classes-Kernel-Association-_generalization.0" general="Syntax-Classes-Kernel-Classifier"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Association-isDerived" name="isDerived" visibility="public">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-isDerived-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Association-isDerived">
+ <body>Specifies whether the association is derived from other model elements such as other associations or constraints.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Classes-Kernel-Association-isDerived-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Association-ownedEnd" name="ownedEnd" visibility="public" type="Syntax-Classes-Kernel-Property" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Classifier-feature Syntax-Classes-Kernel-Namespace-ownedMember Syntax-Classes-Kernel-Association-memberEnd" association="Syntax-Classes-Kernel-A_ownedEnd_owningAssociation">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-ownedEnd-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Association-ownedEnd">
+ <body>The ends that are owned by the association itself. This is an ordered association.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-ownedEnd-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Association-ownedEnd">
+ <body>The ends that are owned by the association itself.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Association-ownedEnd-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Association-ownedEnd-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Association-endType" name="endType" visibility="public" type="Syntax-Classes-Kernel-Type" isOrdered="true" isReadOnly="true" isDerived="true" association="Syntax-Classes-Kernel-A_endType_association">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-endType-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Association-endType">
+ <body>References the classifiers that are used as types of the ends of the association.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Association-endType-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Association-memberEnd" name="memberEnd" visibility="public" type="Syntax-Classes-Kernel-Property" isOrdered="true" subsettedProperty="Syntax-Classes-Kernel-Namespace-member" association="Syntax-Classes-Kernel-A_memberEnd_association">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-memberEnd-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Association-memberEnd">
+ <body>Each end represents participation of instances of the classifier connected to the end in links of the association. This is an ordered association.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-memberEnd-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-Association-memberEnd">
+ <body>Each end represents participation of instances of the classifier connected to the end in links of the association.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Association-memberEnd-_lowerValue" value="2"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Association-memberEnd-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Association-navigableOwnedEnd" name="navigableOwnedEnd" visibility="public" type="Syntax-Classes-Kernel-Property" subsettedProperty="Syntax-Classes-Kernel-Association-ownedEnd" association="Syntax-Classes-Kernel-A_navigableOwnedEnd_association">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-Association-navigableOwnedEnd-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-Association-navigableOwnedEnd">
+ <body>The navigable ends that are owned by the association itself.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Association-navigableOwnedEnd-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Association-navigableOwnedEnd-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_navigableOwnedEnd_association" name="A_navigableOwnedEnd_association" visibility="private" memberEnd="Syntax-Classes-Kernel-A_navigableOwnedEnd_association-association Syntax-Classes-Kernel-Association-navigableOwnedEnd">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_navigableOwnedEnd_association-association" name="association" visibility="public" type="Syntax-Classes-Kernel-Association" subsettedProperty="Syntax-Classes-Kernel-Property-owningAssociation" association="Syntax-Classes-Kernel-A_navigableOwnedEnd_association">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_navigableOwnedEnd_association-association-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_endType_association" name="A_endType_association" visibility="private" memberEnd="Syntax-Classes-Kernel-A_endType_association-association Syntax-Classes-Kernel-Association-endType">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_endType_association-association" name="association" visibility="public" type="Syntax-Classes-Kernel-Association" association="Syntax-Classes-Kernel-A_endType_association">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_endType_association-association-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_endType_association-association-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_memberEnd_association" name="A_memberEnd_association" visibility="private" memberEnd="Syntax-Classes-Kernel-Property-association Syntax-Classes-Kernel-Association-memberEnd"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedEnd_owningAssociation" name="A_ownedEnd_owningAssociation" visibility="private" memberEnd="Syntax-Classes-Kernel-Property-owningAssociation Syntax-Classes-Kernel-Association-ownedEnd"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_general_generalization" name="A_general_generalization" visibility="private" memberEnd="Syntax-Classes-Kernel-A_general_generalization-generalization Syntax-Classes-Kernel-Generalization-general">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_general_generalization-generalization" name="generalization" visibility="public" type="Syntax-Classes-Kernel-Generalization" association="Syntax-Classes-Kernel-A_general_generalization">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_general_generalization-generalization-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_general_generalization-generalization-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_feature_featuringClassifier" name="A_feature_featuringClassifier" visibility="private" memberEnd="Syntax-Classes-Kernel-Feature-featuringClassifier Syntax-Classes-Kernel-Classifier-feature"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedLiteral_enumeration" name="A_ownedLiteral_enumeration" visibility="private" memberEnd="Syntax-Classes-Kernel-EnumerationLiteral-enumeration Syntax-Classes-Kernel-Enumeration-ownedLiteral"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedElement_owner" name="A_ownedElement_owner" visibility="private" memberEnd="Syntax-Classes-Kernel-Element-owner Syntax-Classes-Kernel-Element-ownedElement"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_attribute_classifier" name="A_attribute_classifier" visibility="private" memberEnd="Syntax-Classes-Kernel-A_attribute_classifier-classifier Syntax-Classes-Kernel-Classifier-attribute">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_attribute_classifier-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" subsettedProperty="Syntax-Classes-Kernel-Feature-featuringClassifier Syntax-Classes-Kernel-RedefinableElement-redefinitionContext" association="Syntax-Classes-Kernel-A_attribute_classifier">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_attribute_classifier-classifier-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_generalization_specific" name="A_generalization_specific" visibility="private" memberEnd="Syntax-Classes-Kernel-Generalization-specific Syntax-Classes-Kernel-Classifier-generalization"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_general_classifier" name="A_general_classifier" visibility="private" memberEnd="Syntax-Classes-Kernel-A_general_classifier-classifier Syntax-Classes-Kernel-Classifier-general">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_general_classifier-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Classes-Kernel-A_general_classifier">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-A_general_classifier-classifier-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-A_general_classifier-classifier">
+ <body>References the general classifier in the Generalization relationship.</body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Classes-Kernel-A_general_classifier-classifier-_ownedComment.1" annotatedElement="Syntax-Classes-Kernel-A_general_classifier-classifier">
+ <body>Specifies the general Classifiers for this Classifier.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_general_classifier-classifier-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_general_classifier-classifier-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_inheritedMember_classifier" name="A_inheritedMember_classifier" visibility="private" memberEnd="Syntax-Classes-Kernel-A_inheritedMember_classifier-classifier Syntax-Classes-Kernel-Classifier-inheritedMember">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_inheritedMember_classifier-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" subsettedProperty="Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace" association="Syntax-Classes-Kernel-A_inheritedMember_classifier">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_inheritedMember_classifier-classifier-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_inheritedMember_classifier-classifier-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedAttribute_class" name="A_ownedAttribute_class" visibility="private" memberEnd="Syntax-Classes-Kernel-Property-class Syntax-Classes-Kernel-Class-ownedAttribute"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedReception_class" name="A_ownedReception_class" visibility="private" memberEnd="Syntax-Classes-Kernel-A_ownedReception_class-class Syntax-Classes-Kernel-Class-ownedReception">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_ownedReception_class-class" name="class" visibility="public" type="Syntax-Classes-Kernel-Class" subsettedProperty="Syntax-Classes-Kernel-Feature-featuringClassifier Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace" association="Syntax-Classes-Kernel-A_ownedReception_class">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_ownedReception_class-class-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_superClass_class" name="A_superClass_class" visibility="private" memberEnd="Syntax-Classes-Kernel-A_superClass_class-class Syntax-Classes-Kernel-Class-superClass">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_superClass_class-class" name="class" visibility="public" type="Syntax-Classes-Kernel-Class" subsettedProperty="Syntax-Classes-Kernel-A_general_classifier-classifier" association="Syntax-Classes-Kernel-A_superClass_class">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_superClass_class-class-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_superClass_class-class-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_type_typedElement" name="A_type_typedElement" visibility="private" memberEnd="Syntax-Classes-Kernel-A_type_typedElement-typedElement Syntax-Classes-Kernel-TypedElement-type">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_type_typedElement-typedElement" name="typedElement" visibility="public" type="Syntax-Classes-Kernel-TypedElement" association="Syntax-Classes-Kernel-A_type_typedElement">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_type_typedElement-typedElement-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_type_typedElement-typedElement-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_value_owningSlot" name="A_value_owningSlot" visibility="private" memberEnd="Syntax-Classes-Kernel-A_value_owningSlot-owningSlot Syntax-Classes-Kernel-Slot-value">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_value_owningSlot-owningSlot" name="owningSlot" visibility="public" type="Syntax-Classes-Kernel-Slot" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Classes-Kernel-A_value_owningSlot">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_value_owningSlot-owningSlot-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_definingFeature_slot" name="A_definingFeature_slot" visibility="private" memberEnd="Syntax-Classes-Kernel-A_definingFeature_slot-slot Syntax-Classes-Kernel-Slot-definingFeature">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_definingFeature_slot-slot" name="slot" visibility="public" type="Syntax-Classes-Kernel-Slot" association="Syntax-Classes-Kernel-A_definingFeature_slot">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_definingFeature_slot-slot-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_definingFeature_slot-slot-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_opposite_property" name="A_opposite_property" visibility="private" memberEnd="Syntax-Classes-Kernel-A_opposite_property-property Syntax-Classes-Kernel-Property-opposite">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_opposite_property-property" name="property" visibility="public" type="Syntax-Classes-Kernel-Property" association="Syntax-Classes-Kernel-A_opposite_property">
+ <ownedComment xmi:id="Syntax-Classes-Kernel-A_opposite_property-property-_ownedComment.0" annotatedElement="Syntax-Classes-Kernel-A_opposite_property-property">
+ <body>In the case where the property is one navigable end of a binary association with both ends navigable, this gives the other end.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_opposite_property-property-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedAttribute_datatype" name="A_ownedAttribute_datatype" visibility="private" memberEnd="Syntax-Classes-Kernel-Property-datatype Syntax-Classes-Kernel-DataType-ownedAttribute"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedParameter_operation" name="A_ownedParameter_operation" visibility="private" memberEnd="Syntax-Classes-Kernel-Parameter-operation Syntax-Classes-Kernel-Operation-ownedParameter"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_packageElement_owningPackage" name="A_packageElement_owningPackage" visibility="private" memberEnd="Syntax-Classes-Kernel-A_packageElement_owningPackage-owningPackage Syntax-Classes-Kernel-Package-packagedElement">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_packageElement_owningPackage-owningPackage" name="owningPackage" visibility="public" type="Syntax-Classes-Kernel-Package" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-Classes-Kernel-A_packageElement_owningPackage">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_packageElement_owningPackage-owningPackage-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedOperation_class" name="A_ownedOperation_class" visibility="private" memberEnd="Syntax-Classes-Kernel-Operation-class Syntax-Classes-Kernel-Class-ownedOperation"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_redefinedOperation_operation" name="A_redefinedOperation_operation" visibility="private" memberEnd="Syntax-Classes-Kernel-A_redefinedOperation_operation-operation Syntax-Classes-Kernel-Operation-redefinedOperation">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_redefinedOperation_operation-operation" name="operation" visibility="public" type="Syntax-Classes-Kernel-Operation" subsettedProperty="Syntax-Classes-Kernel-A_redefinedElement_redefinableElement-redefinableElement" association="Syntax-Classes-Kernel-A_redefinedOperation_operation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_type_operation" name="A_type_operation" visibility="private" memberEnd="Syntax-Classes-Kernel-A_type_operation-operation Syntax-Classes-Kernel-Operation-type">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_type_operation-operation" name="operation" visibility="public" type="Syntax-Classes-Kernel-Operation" association="Syntax-Classes-Kernel-A_type_operation"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_member_memberNamespace" name="A_member_memberNamespace" visibility="private" memberEnd="Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace Syntax-Classes-Kernel-Namespace-member">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace" name="memberNamespace" visibility="public" type="Syntax-Classes-Kernel-Namespace" association="Syntax-Classes-Kernel-A_member_memberNamespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedMember_namespace" name="A_ownedMember_namespace" visibility="private" isDerived="true" memberEnd="Syntax-Classes-Kernel-NamedElement-namespace Syntax-Classes-Kernel-Namespace-ownedMember"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_lowerValue_owningLower" name="A_lowerValue_owningLower" visibility="private" memberEnd="Syntax-Classes-Kernel-A_lowerValue_owningLower-owningLower Syntax-Classes-Kernel-MultiplicityElement-lowerValue">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_lowerValue_owningLower-owningLower" name="owningLower" visibility="public" type="Syntax-Classes-Kernel-MultiplicityElement" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Classes-Kernel-A_lowerValue_owningLower">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_lowerValue_owningLower-owningLower-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_upperValue_owningUpper" name="A_upperValue_owningUpper" visibility="private" memberEnd="Syntax-Classes-Kernel-A_upperValue_owningUpper-owningUpper Syntax-Classes-Kernel-MultiplicityElement-upperValue">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_upperValue_owningUpper-owningUpper" name="owningUpper" visibility="public" type="Syntax-Classes-Kernel-MultiplicityElement" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Classes-Kernel-A_upperValue_owningUpper">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_upperValue_owningUpper-owningUpper-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_instance_instanceValue" name="A_instance_instanceValue" visibility="private" memberEnd="Syntax-Classes-Kernel-A_instance_instanceValue-instanceValue Syntax-Classes-Kernel-InstanceValue-instance">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_instance_instanceValue-instanceValue" name="instanceValue" visibility="public" type="Syntax-Classes-Kernel-InstanceValue" association="Syntax-Classes-Kernel-A_instance_instanceValue"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_slot_owningInstance" name="A_slot_owningInstance" visibility="private" memberEnd="Syntax-Classes-Kernel-Slot-owningInstance Syntax-Classes-Kernel-InstanceSpecification-slot"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_classifier_instanceSpecification" name="A_classifier_instanceSpecification" visibility="private" memberEnd="Syntax-Classes-Kernel-A_classifier_instanceSpecification-instanceSpecification Syntax-Classes-Kernel-InstanceSpecification-classifier">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_classifier_instanceSpecification-instanceSpecification" name="instanceSpecification" visibility="public" type="Syntax-Classes-Kernel-InstanceSpecification" association="Syntax-Classes-Kernel-A_classifier_instanceSpecification"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_method_specification" name="A_method_specification" visibility="private" memberEnd="Syntax-CommonBehaviors-BasicBehaviors-Behavior-specification Syntax-Classes-Kernel-BehavioralFeature-method"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedParameter_ownerFormalParam" name="A_ownedParameter_ownerFormalParam" visibility="private" memberEnd="Syntax-Classes-Kernel-A_ownedParameter_ownerFormalParam-ownerFormalParam Syntax-Classes-Kernel-BehavioralFeature-ownedParameter">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_ownedParameter_ownerFormalParam-ownerFormalParam" name="ownerFormalParam" visibility="public" type="Syntax-Classes-Kernel-BehavioralFeature" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-Classes-Kernel-A_ownedParameter_ownerFormalParam">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_ownedParameter_ownerFormalParam-ownerFormalParam-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement" name="A_redefinitionContext_redefinableElement" visibility="private" memberEnd="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement-redefinableElement Syntax-Classes-Kernel-RedefinableElement-redefinitionContext">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement-redefinableElement" name="redefinableElement" visibility="public" type="Syntax-Classes-Kernel-RedefinableElement" association="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement-redefinableElement-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_redefinitionContext_redefinableElement-redefinableElement-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_redefinedElement_redefinableElement" name="A_redefinedElement_redefinableElement" visibility="private" memberEnd="Syntax-Classes-Kernel-A_redefinedElement_redefinableElement-redefinableElement Syntax-Classes-Kernel-RedefinableElement-redefinedElement">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_redefinedElement_redefinableElement-redefinableElement" name="redefinableElement" visibility="public" type="Syntax-Classes-Kernel-RedefinableElement" association="Syntax-Classes-Kernel-A_redefinedElement_redefinableElement">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_redefinedElement_redefinableElement-redefinableElement-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-Comment" name="Comment">
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Comment-annotatedElement" name="annotatedElement" visibility="public" type="Syntax-Classes-Kernel-Element" association="Syntax-Classes-Kernel-A_annotatedElement_comment">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Comment-annotatedElement-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-Comment-annotatedElement-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-Comment-body" name="body" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-Comment-body-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_ownedComment_owningElement" name="A_ownedComment_owningElement" visibility="private" memberEnd="Syntax-Classes-Kernel-A_ownedComment_owningElement-owningElement Syntax-Classes-Kernel-Element-ownedComment">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_ownedComment_owningElement-owningElement" name="owningElement" visibility="public" type="Syntax-Classes-Kernel-Element" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Classes-Kernel-A_ownedComment_owningElement">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_ownedComment_owningElement-owningElement-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_annotatedElement_comment" name="A_annotatedElement_comment" visibility="private" memberEnd="Syntax-Classes-Kernel-A_annotatedElement_comment-comment Syntax-Classes-Kernel-Comment-annotatedElement">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_annotatedElement_comment-comment" name="comment" visibility="public" type="Syntax-Classes-Kernel-Comment" association="Syntax-Classes-Kernel-A_annotatedElement_comment">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_annotatedElement_comment-comment-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_annotatedElement_comment-comment-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-ElementImport" name="ElementImport">
+ <generalization xmi:id="Syntax-Classes-Kernel-ElementImport-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-ElementImport-visibility" name="visibility" visibility="public" type="Syntax-Classes-Kernel-VisibilityKind"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-ElementImport-alias" name="alias" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-ElementImport-alias-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-ElementImport-importedElement" name="importedElement" visibility="public" type="Syntax-Classes-Kernel-PackageableElement" association="Syntax-Classes-Kernel-A_importedElement_elementImport"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-ElementImport-importingNamespace" name="importingNamespace" visibility="public" type="Syntax-Classes-Kernel-Namespace" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Classes-Kernel-A_elementImport_importingNamespace"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_elementImport_importingNamespace" name="A_elementImport_importingNamespace" visibility="private" memberEnd="Syntax-Classes-Kernel-ElementImport-importingNamespace Syntax-Classes-Kernel-Namespace-elementImport"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_importedElement_elementImport" name="A_importedElement_elementImport" visibility="private" memberEnd="Syntax-Classes-Kernel-A_importedElement_elementImport-elementImport Syntax-Classes-Kernel-ElementImport-importedElement">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_importedElement_elementImport-elementImport" name="elementImport" visibility="public" type="Syntax-Classes-Kernel-ElementImport" association="Syntax-Classes-Kernel-A_importedElement_elementImport">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_importedElement_elementImport-elementImport-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_importedElement_elementImport-elementImport-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-PackageImport" name="PackageImport">
+ <generalization xmi:id="Syntax-Classes-Kernel-PackageImport-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-PackageImport-visibility" name="visibility" visibility="public" type="Syntax-Classes-Kernel-VisibilityKind"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-PackageImport-importingNamespace" name="importingNamespace" visibility="public" type="Syntax-Classes-Kernel-Namespace" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Classes-Kernel-A_packageImport_importingNamespace"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-PackageImport-importedPackage" name="importedPackage" visibility="public" type="Syntax-Classes-Kernel-Package" association="Syntax-Classes-Kernel-A_importedPackage_packageImport"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_packageImport_importingNamespace" name="A_packageImport_importingNamespace" visibility="private" memberEnd="Syntax-Classes-Kernel-PackageImport-importingNamespace Syntax-Classes-Kernel-Namespace-packageImport"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_importedPackage_packageImport" name="A_importedPackage_packageImport" visibility="private" memberEnd="Syntax-Classes-Kernel-A_importedPackage_packageImport-packageImport Syntax-Classes-Kernel-PackageImport-importedPackage">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_importedPackage_packageImport-packageImport" name="packageImport" visibility="public" type="Syntax-Classes-Kernel-PackageImport" association="Syntax-Classes-Kernel-A_importedPackage_packageImport">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_importedPackage_packageImport-packageImport-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_importedPackage_packageImport-packageImport-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_nestedClassifier_class" name="A_nestedClassifier_class" visibility="private" memberEnd="Syntax-Classes-Kernel-A_nestedClassifier_class-class Syntax-Classes-Kernel-Class-nestedClassifier">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_nestedClassifier_class-class" name="class" visibility="public" type="Syntax-Classes-Kernel-Class" subsettedProperty="Syntax-Classes-Kernel-NamedElement-namespace" association="Syntax-Classes-Kernel-A_nestedClassifier_class">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_nestedClassifier_class-class-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_type_package" name="A_type_package" visibility="private" memberEnd="Syntax-Classes-Kernel-Type-package Syntax-Classes-Kernel-Package-ownedType"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_nestedPackage_nestingPackage" name="A_nestedPackage_nestingPackage" visibility="private" memberEnd="Syntax-Classes-Kernel-Package-nestingPackage Syntax-Classes-Kernel-Package-nestedPackage"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_importedMember_namespace" name="A_importedMember_namespace" visibility="private" memberEnd="Syntax-Classes-Kernel-A_importedMember_namespace-namespace Syntax-Classes-Kernel-Namespace-importedMember">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_importedMember_namespace-namespace" name="namespace" visibility="public" type="Syntax-Classes-Kernel-Namespace" subsettedProperty="Syntax-Classes-Kernel-A_member_memberNamespace-memberNamespace" association="Syntax-Classes-Kernel-A_importedMember_namespace">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_importedMember_namespace-namespace-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_importedMember_namespace-namespace-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Classes-Kernel-LiteralReal" name="LiteralReal">
+ <generalization xmi:id="Syntax-Classes-Kernel-LiteralReal-_generalization.0" general="Syntax-Classes-Kernel-LiteralSpecification"/>
+ <ownedAttribute xmi:id="Syntax-Classes-Kernel-LiteralReal-value" name="value" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Classes-Kernel-A_classifier_enumerationLiteral" name="A_classifier_enumerationLiteral" visibility="private" memberEnd="Syntax-Classes-Kernel-A_classifier_enumerationLiteral-enumerationLiteral Syntax-Classes-Kernel-EnumerationLiteral-classifier">
+ <ownedEnd xmi:id="Syntax-Classes-Kernel-A_classifier_enumerationLiteral-enumerationLiteral" name="enumerationLiteral" visibility="public" type="Syntax-Classes-Kernel-EnumerationLiteral" redefinedProperty="Syntax-Classes-Kernel-A_classifier_instanceSpecification-instanceSpecification" association="Syntax-Classes-Kernel-A_classifier_enumerationLiteral">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Classes-Kernel-A_classifier_enumerationLiteral-enumerationLiteral-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Classes-Kernel-A_classifier_enumerationLiteral-enumerationLiteral-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Activities" name="Activities">
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Activities-IntermediateActivities" name="IntermediateActivities">
+ <packageImport xmi:id="Syntax-Activities-IntermediateActivities-_packageImport.0" importedPackage="Syntax-CommonBehaviors-BasicBehaviors"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ObjectFlow" name="ObjectFlow">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ObjectFlow-_generalization.0" general="Syntax-Activities-IntermediateActivities-ActivityEdge"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ObjectNode" name="ObjectNode" isAbstract="true">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ObjectNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ObjectNode-_generalization.1" general="Syntax-Classes-Kernel-TypedElement"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-MergeNode" name="MergeNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-MergeNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ControlNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-JoinNode" name="JoinNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-JoinNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ControlNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-InitialNode" name="InitialNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-InitialNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ControlNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-FinalNode" name="FinalNode" isAbstract="true">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-FinalNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ControlNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ForkNode" name="ForkNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ForkNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ControlNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ControlFlow" name="ControlFlow">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ControlFlow-_generalization.0" general="Syntax-Activities-IntermediateActivities-ActivityEdge"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ControlNode" name="ControlNode" isAbstract="true">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ControlNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-DecisionNode" name="DecisionNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-DecisionNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ControlNode"/>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-DecisionNode-decisionInput" name="decisionInput" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" association="Syntax-Activities-IntermediateActivities-A_decisionInput_decisionNode">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-DecisionNode-decisionInput-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-DecisionNode-decisionInput">
+ <body>Provides input to guard specifications on edges outgoing from the decision node.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-DecisionNode-decisionInput-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-DecisionNode-decisionInputFlow" name="decisionInputFlow" visibility="public" type="Syntax-Activities-IntermediateActivities-ObjectFlow" association="Syntax-Activities-IntermediateActivities-A_decisionNode_decisionInputFlow">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-DecisionNode-decisionInputFlow-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ActivityFinalNode" name="ActivityFinalNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ActivityFinalNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-FinalNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode" name="ActivityNode" isAbstract="true">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-_generalization.0" general="Syntax-Classes-Kernel-RedefinableElement"/>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-inStructuredNode" name="inStructuredNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Activities-CompleteStructuredActivities-A_node_inStructuredNode">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-inStructuredNode-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityNode-inStructuredNode">
+ <body>Structured activity node containing the node.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-inStructuredNode-_lowerValue"/>
+ <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-inStructuredNode-_defaultValue">
+ <language>Java</language>
+ <body>this.inStructuredNode = inStructuredNode;
+</body>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-activity" name="activity" visibility="public" type="Syntax-Activities-IntermediateActivities-Activity" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Activities-IntermediateActivities-A_node_activity">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-activity-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityNode-activity">
+ <body>Activity containing the node.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-activity-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-outgoing" name="outgoing" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityEdge" association="Syntax-Activities-IntermediateActivities-A_outgoing_source_node">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-outgoing-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityNode-outgoing">
+ <body>Edges that have the node as source.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-outgoing-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-outgoing-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-incoming" name="incoming" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityEdge" association="Syntax-Activities-IntermediateActivities-A_incoming_target_node">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-incoming-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityNode-incoming">
+ <body>Edges that have the node as target.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-incoming-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-IntermediateActivities-ActivityNode-incoming-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ActivityParameterNode" name="ActivityParameterNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ActivityParameterNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ObjectNode"/>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityParameterNode-parameter" name="parameter" visibility="public" type="Syntax-Classes-Kernel-Parameter" association="Syntax-Activities-IntermediateActivities-A_parameter_activityParameterNode">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityParameterNode-parameter-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityParameterNode-parameter">
+ <body>The parameter the object node will be accepting or providing values for.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge" name="ActivityEdge" isAbstract="true">
+ <ownedRule xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-fUML_allowed_guards" name="fUML_allowed_guards" constrainedElement="Syntax-Activities-IntermediateActivities-ActivityEdge">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-fUML_allowed_guards-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityEdge-fUML_allowed_guards">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>A guard is only allowed if the source of the edge is a DecisionNode.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-fUML_allowed_guards-_specification">
+ <language>OCL</language>
+ <body>self.guard->notEmpty() implies self.source.oclIsKindOf(DecisionNode)</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-_generalization.0" general="Syntax-Classes-Kernel-RedefinableElement"/>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-activity" name="activity" visibility="public" type="Syntax-Activities-IntermediateActivities-Activity" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Activities-IntermediateActivities-A_activity_edge">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-activity-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityEdge-activity">
+ <body>Activity containing the edge.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-activity-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-source" name="source" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityNode" association="Syntax-Activities-IntermediateActivities-A_outgoing_source_node">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-source-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityEdge-source">
+ <body>Node from which tokens are taken when they traverse the edge.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-target" name="target" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityNode" association="Syntax-Activities-IntermediateActivities-A_incoming_target_node">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-target-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityEdge-target">
+ <body>Node to which tokens are put when they traverse the edge.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-guard" name="guard" visibility="public" type="Syntax-Classes-Kernel-ValueSpecification" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Activities-IntermediateActivities-A_activityEdge_guard">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-guard-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityEdge-guard">
+ <body>Specification evaluated at runtime to determine if the edge can be traversed.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-guard-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-inStructuredNode" name="inStructuredNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Activities-CompleteStructuredActivities-A_edge_inStructuredNode">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-inStructuredNode-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-ActivityEdge-inStructuredNode">
+ <body>Structured activity node containing the edge.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-ActivityEdge-inStructuredNode-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-Activity" name="Activity">
+ <ownedRule xmi:id="Syntax-Activities-IntermediateActivities-Activity-fUML_no_classifier_behavior" name="fUML_no_classifier_behavior" constrainedElement="Syntax-Activities-IntermediateActivities-Activity">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-Activity-fUML_no_classifier_behavior-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-Activity-fUML_no_classifier_behavior">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16674&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>An activity may be active, but cannot have a classifier behavior.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Activities-IntermediateActivities-Activity-fUML_no_classifier_behavior-_specification">
+ <language>OCL</language>
+ <body>self.classifierBehavior->isEmpty()</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-Activity-_generalization.0" general="Syntax-CommonBehaviors-BasicBehaviors-Behavior"/>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-Activity-structuredNode" name="structuredNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode" isReadOnly="true" aggregation="composite" isDerived="true" subsettedProperty="Syntax-Activities-IntermediateActivities-Activity-node" association="Syntax-Activities-CompleteStructuredActivities-A_activity_structuredNode">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-Activity-structuredNode-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-Activity-structuredNode">
+ <body>Top-level structured nodes in the activity.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-Activity-structuredNode-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-IntermediateActivities-Activity-structuredNode-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-Activity-node" name="node" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityNode" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Activities-IntermediateActivities-A_node_activity">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-Activity-node-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-Activity-node">
+ <body>Nodes coordinated by the activity.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-Activity-node-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-IntermediateActivities-Activity-node-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-Activity-isReadOnly" name="isReadOnly" visibility="public">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-Activity-isReadOnly-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-Activity-isReadOnly">
+ <body>If true, this activity must not make any changes to variables outside the activity or to objects. (This is an assertion, not an executable property. It may be used by an execution engine to optimize model execution. If the assertion is violated by the action, then the model is ill-formed.) The default is false (an activity may make nonlocal changes).</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Activities-IntermediateActivities-Activity-isReadOnly-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-IntermediateActivities-Activity-edge" name="edge" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityEdge" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Activities-IntermediateActivities-A_activity_edge">
+ <ownedComment xmi:id="Syntax-Activities-IntermediateActivities-Activity-edge-_ownedComment.0" annotatedElement="Syntax-Activities-IntermediateActivities-Activity-edge">
+ <body>Edges expressing flow between nodes of the activity.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-Activity-edge-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-IntermediateActivities-Activity-edge-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_activity_edge" name="A_activity_edge" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-Activity-edge Syntax-Activities-IntermediateActivities-ActivityEdge-activity"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_activityEdge_guard" name="A_activityEdge_guard" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-ActivityEdge-guard Syntax-Activities-IntermediateActivities-A_activityEdge_guard-activityEdge">
+ <ownedEnd xmi:id="Syntax-Activities-IntermediateActivities-A_activityEdge_guard-activityEdge" name="activityEdge" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityEdge" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Activities-IntermediateActivities-A_activityEdge_guard"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_parameter_activityParameterNode" name="A_parameter_activityParameterNode" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-A_parameter_activityParameterNode-activityParameterNode Syntax-Activities-IntermediateActivities-ActivityParameterNode-parameter">
+ <ownedEnd xmi:id="Syntax-Activities-IntermediateActivities-A_parameter_activityParameterNode-activityParameterNode" name="activityParameterNode" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityParameterNode" association="Syntax-Activities-IntermediateActivities-A_parameter_activityParameterNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_outgoing_source_node" name="A_outgoing_source_node" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-ActivityEdge-source Syntax-Activities-IntermediateActivities-ActivityNode-outgoing"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_node_activity" name="A_node_activity" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-ActivityNode-activity Syntax-Activities-IntermediateActivities-Activity-node"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_incoming_target_node" name="A_incoming_target_node" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-ActivityNode-incoming Syntax-Activities-IntermediateActivities-ActivityEdge-target"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_decisionNode_decisionInputFlow" name="A_decisionNode_decisionInputFlow" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-DecisionNode-decisionInputFlow Syntax-Activities-IntermediateActivities-A_decisionNode_decisionInputFlow-decisionNode">
+ <ownedEnd xmi:id="Syntax-Activities-IntermediateActivities-A_decisionNode_decisionInputFlow-decisionNode" name="decisionNode" visibility="public" type="Syntax-Activities-IntermediateActivities-DecisionNode" association="Syntax-Activities-IntermediateActivities-A_decisionNode_decisionInputFlow">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-A_decisionNode_decisionInputFlow-decisionNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-IntermediateActivities-A_decisionInput_decisionNode" name="A_decisionInput_decisionNode" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-A_decisionInput_decisionNode-decisionNode Syntax-Activities-IntermediateActivities-DecisionNode-decisionInput">
+ <ownedEnd xmi:id="Syntax-Activities-IntermediateActivities-A_decisionInput_decisionNode-decisionNode" name="decisionNode" visibility="public" type="Syntax-Activities-IntermediateActivities-DecisionNode" association="Syntax-Activities-IntermediateActivities-A_decisionInput_decisionNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-IntermediateActivities-A_decisionInput_decisionNode-decisionNode-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-IntermediateActivities-A_decisionInput_decisionNode-decisionNode-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-IntermediateActivities-FlowFinalNode" name="FlowFinalNode">
+ <generalization xmi:id="Syntax-Activities-IntermediateActivities-FlowFinalNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-FinalNode"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Activities-CompleteStructuredActivities" name="CompleteStructuredActivities">
+ <packageImport xmi:id="Syntax-Activities-CompleteStructuredActivities-_packageImport.0" importedPackage="Syntax-Actions-BasicActions"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode" name="StructuredActivityNode">
+ <generalization xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-node" name="node" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityNode" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Activities-CompleteStructuredActivities-A_node_inStructuredNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-node-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-node">
+ <body>Nodes immediately contained in the group.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-node-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-node-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-activity" name="activity" visibility="public" type="Syntax-Activities-IntermediateActivities-Activity" redefinedProperty="Syntax-Activities-IntermediateActivities-ActivityNode-activity" association="Syntax-Activities-CompleteStructuredActivities-A_activity_structuredNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-activity-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-activity">
+ <body>Activity immediately containing the node.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-activity-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-mustIsolate" name="mustIsolate" visibility="public">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-mustIsolate-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-mustIsolate">
+ <body>If true, then the actions in the node execute in isolation from actions outside the node.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-mustIsolate-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-edge" name="edge" visibility="public" type="Syntax-Activities-IntermediateActivities-ActivityEdge" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Activities-CompleteStructuredActivities-A_edge_inStructuredNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-edge-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-edge">
+ <body>Edges immediately contained in the structured node.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-edge-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-edge-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeOutput" name="structuredNodeOutput" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeOutput-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeOutput-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeInput" name="structuredNodeInput" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeInput_structuredActivityNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeInput-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeInput-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode" name="LoopNode">
+ <ownedRule xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-noSetupParts_in_fUML" name="noSetupParts_in_fUML" constrainedElement="Syntax-Activities-CompleteStructuredActivities-LoopNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-noSetupParts_in_fUML-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-LoopNode-noSetupParts_in_fUML">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16674&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>no setupParts in fUML&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-noSetupParts_in_fUML-_specification">
+ <language>OCL</language>
+ <body>self.setupPart->isEmpty()</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-_generalization.0" general="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode"/>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-isTestedFirst" name="isTestedFirst" visibility="public">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-isTestedFirst-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-LoopNode-isTestedFirst">
+ <body>If true, the test is performed before the first execution of the body.
+If false, the body is executed once before the test is performed.
+</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-isTestedFirst-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-decider" name="decider" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" association="Syntax-Activities-CompleteStructuredActivities-A_decider_loopNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-decider-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-LoopNode-decider">
+ <body>An output pin within the test fragment the value of which is examined after execution of the test to determine whether to execute the loop body.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-test" name="test" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-ExecutableNode" association="Syntax-Activities-CompleteStructuredActivities-A_test_loopNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-test-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-LoopNode-test">
+ <body>The set of nodes, edges, and designated value that compute a Boolean value to determine if another execution of the body will be performed.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-test-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyOutput" name="bodyOutput" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" isOrdered="true" association="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_loopNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyOutput-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyOutput">
+ <body>A list of output pins within the body fragment the values of which are moved to the loop variable pins after completion of execution of the body, before the next iteration of the loop begins or before the loop exits.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyOutput-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyOutput-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariableInput" name="loopVariableInput" visibility="public" type="Syntax-Actions-BasicActions-InputPin" isOrdered="true" aggregation="composite" redefinedProperty="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeInput" association="Syntax-Activities-CompleteStructuredActivities-A_loopVariableInput_loopNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariableInput-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariableInput">
+ <body>A list of values that are moved into the loop variable pins before the first iteration of the loop.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariableInput-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariableInput-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyPart" name="bodyPart" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-ExecutableNode" association="Syntax-Activities-CompleteStructuredActivities-A_loopNode_bodyPart">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyPart-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyPart-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" isOrdered="true" aggregation="composite" redefinedProperty="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeOutput" association="Syntax-Activities-CompleteStructuredActivities-A_result_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-result-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-result-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariable" name="loopVariable" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" isOrdered="true" association="Syntax-Activities-CompleteStructuredActivities-A_loopVariable_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariable-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariable-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-setupPart" name="setupPart" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-ExecutableNode" association="Syntax-Activities-CompleteStructuredActivities-A_loopNode_setupPart">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-setupPart-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-LoopNode-setupPart-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-CompleteStructuredActivities-ExecutableNode" name="ExecutableNode" isAbstract="true">
+ <generalization xmi:id="Syntax-Activities-CompleteStructuredActivities-ExecutableNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ActivityNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause" name="Clause">
+ <generalization xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-test" name="test" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-ExecutableNode" association="Syntax-Activities-CompleteStructuredActivities-A_clause_test">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-test-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-Clause-test">
+ <body>A nested activity fragment with a designated output pin that specifies the result of the test.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-test-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-body" name="body" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-ExecutableNode" association="Syntax-Activities-CompleteStructuredActivities-A_clause_body">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-body-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-Clause-body">
+ <body>A nested activity fragment that is executed if the test evaluates to true and the clause is chosen over any concurrent clauses that also evaluate to true.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-body-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-body-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-predecessorClause" name="predecessorClause" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-Clause" association="Syntax-Activities-CompleteStructuredActivities-A_predecessorClause_successorClause">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-predecessorClause-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-Clause-predecessorClause">
+ <body>A set of clauses whose tests must all evaluate false before the current clause can be tested.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-predecessorClause-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-predecessorClause-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-successorClause" name="successorClause" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-Clause" association="Syntax-Activities-CompleteStructuredActivities-A_predecessorClause_successorClause">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-successorClause-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-Clause-successorClause">
+ <body>A set of clauses which may not be tested unless the current clause tests false.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-successorClause-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-successorClause-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-decider" name="decider" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" association="Syntax-Activities-CompleteStructuredActivities-A_decider_clause">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-decider-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-Clause-decider">
+ <body>An output pin within the test fragment the value of which is examined after execution of the test to determine whether the body should be executed.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-bodyOutput" name="bodyOutput" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" isOrdered="true" association="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_clause">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-bodyOutput-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-Clause-bodyOutput">
+ <body>A list of output pins within the body fragment whose values are moved to the result pins of the containing conditional node after execution of the clause body.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-bodyOutput-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-Clause-bodyOutput-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode" name="ConditionalNode">
+ <generalization xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-_generalization.0" general="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode"/>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isDeterminate" name="isDeterminate" visibility="public">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isDeterminate-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isDeterminate">
+ <body>If true, the modeler asserts that at most one test will succeed.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isDeterminate-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isAssured" name="isAssured" visibility="public">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isAssured-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isAssured">
+ <body>If true, the modeler asserts that at least one test will succeed.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-isAssured-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-clause" name="clause" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-Clause" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Activities-CompleteStructuredActivities-A_clause_conditionalNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-clause-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-clause">
+ <body>Set of clauses composing the conditional.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-clause-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" isOrdered="true" aggregation="composite" redefinedProperty="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeOutput" association="Syntax-Activities-CompleteStructuredActivities-A_result_conditionalNode">
+ <ownedComment xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-result-_ownedComment.0" annotatedElement="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-result">
+ <body>A list of output pins that constitute the data flow outputs of the conditional.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-result-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-ConditionalNode-result-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_result_conditionalNode" name="A_result_conditionalNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_result_conditionalNode-conditionalNode Syntax-Activities-CompleteStructuredActivities-ConditionalNode-result">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_result_conditionalNode-conditionalNode" name="conditionalNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-ConditionalNode" subsettedProperty="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode-structuredActivityNode" association="Syntax-Activities-CompleteStructuredActivities-A_result_conditionalNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_result_conditionalNode-conditionalNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_conditionalNode" name="A_clause_conditionalNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_clause_conditionalNode-conditionalNode Syntax-Activities-CompleteStructuredActivities-ConditionalNode-clause">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_conditionalNode-conditionalNode" name="conditionalNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-ConditionalNode" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Activities-CompleteStructuredActivities-A_clause_conditionalNode"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_test" name="A_clause_test" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-Clause-test Syntax-Activities-CompleteStructuredActivities-A_clause_test-clause">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_test-clause" name="clause" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-Clause" association="Syntax-Activities-CompleteStructuredActivities-A_clause_test">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_test-clause-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_predecessorClause_successorClause" name="A_predecessorClause_successorClause" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-Clause-successorClause Syntax-Activities-CompleteStructuredActivities-Clause-predecessorClause"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_clause" name="A_bodyOutput_clause" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_clause-clause Syntax-Activities-CompleteStructuredActivities-Clause-bodyOutput">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_clause-clause" name="clause" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-Clause" association="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_clause">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_clause-clause-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_clause-clause-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_body" name="A_clause_body" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-Clause-body Syntax-Activities-CompleteStructuredActivities-A_clause_body-clause">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_body-clause" name="clause" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-Clause" association="Syntax-Activities-CompleteStructuredActivities-A_clause_body">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_clause_body-clause-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_decider_clause" name="A_decider_clause" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_decider_clause-clause Syntax-Activities-CompleteStructuredActivities-Clause-decider">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_decider_clause-clause" name="clause" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-Clause" association="Syntax-Activities-CompleteStructuredActivities-A_decider_clause">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_decider_clause-clause-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_test_loopNode" name="A_test_loopNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_test_loopNode-loopNode Syntax-Activities-CompleteStructuredActivities-LoopNode-test">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_test_loopNode-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" association="Syntax-Activities-CompleteStructuredActivities-A_test_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_test_loopNode-loopNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopVariableInput_loopNode" name="A_loopVariableInput_loopNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_loopVariableInput_loopNode-loopNode Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariableInput">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopVariableInput_loopNode-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" subsettedProperty="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeInput_structuredActivityNode-structuredActivityNode" association="Syntax-Activities-CompleteStructuredActivities-A_loopVariableInput_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopVariableInput_loopNode-loopNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_loopNode" name="A_bodyOutput_loopNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_loopNode-loopNode Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyOutput">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_loopNode-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" association="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_loopNode-loopNode-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_bodyOutput_loopNode-loopNode-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_decider_loopNode" name="A_decider_loopNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_decider_loopNode-loopNode Syntax-Activities-CompleteStructuredActivities-LoopNode-decider">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_decider_loopNode-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" association="Syntax-Activities-CompleteStructuredActivities-A_decider_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_decider_loopNode-loopNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_node_inStructuredNode" name="A_node_inStructuredNode" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-ActivityNode-inStructuredNode Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-node"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_edge_inStructuredNode" name="A_edge_inStructuredNode" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-ActivityEdge-inStructuredNode Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-edge"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_activity_structuredNode" name="A_activity_structuredNode" visibility="private" memberEnd="Syntax-Activities-IntermediateActivities-Activity-structuredNode Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-activity"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopNode_bodyPart" name="A_loopNode_bodyPart" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-LoopNode-bodyPart Syntax-Activities-CompleteStructuredActivities-A_loopNode_bodyPart-loopNode">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopNode_bodyPart-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" association="Syntax-Activities-CompleteStructuredActivities-A_loopNode_bodyPart">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopNode_bodyPart-loopNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_result_loopNode" name="A_result_loopNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_result_loopNode-loopNode Syntax-Activities-CompleteStructuredActivities-LoopNode-result">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_result_loopNode-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" subsettedProperty="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode-structuredActivityNode" association="Syntax-Activities-CompleteStructuredActivities-A_result_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_result_loopNode-loopNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopVariable_loopNode" name="A_loopVariable_loopNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_loopVariable_loopNode-loopNode Syntax-Activities-CompleteStructuredActivities-LoopNode-loopVariable">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopVariable_loopNode-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" association="Syntax-Activities-CompleteStructuredActivities-A_loopVariable_loopNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopVariable_loopNode-loopNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopNode_setupPart" name="A_loopNode_setupPart" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-LoopNode-setupPart Syntax-Activities-CompleteStructuredActivities-A_loopNode_setupPart-loopNode">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopNode_setupPart-loopNode" name="loopNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-LoopNode" association="Syntax-Activities-CompleteStructuredActivities-A_loopNode_setupPart">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_loopNode_setupPart-loopNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode" name="A_structuredNodeOutput_structuredActivityNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode-structuredActivityNode Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeOutput">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode-structuredActivityNode" name="structuredActivityNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeOutput_structuredActivityNode-structuredActivityNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeInput_structuredActivityNode" name="A_structuredNodeInput_structuredActivityNode" visibility="private" memberEnd="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeInput_structuredActivityNode-structuredActivityNode Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode-structuredNodeInput">
+ <ownedEnd xmi:id="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeInput_structuredActivityNode-structuredActivityNode" name="structuredActivityNode" visibility="public" type="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeInput_structuredActivityNode">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-CompleteStructuredActivities-A_structuredNodeInput_structuredActivityNode-structuredActivityNode-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Activities-ExtraStructuredActivities" name="ExtraStructuredActivities">
+ <packageImport xmi:id="Syntax-Activities-ExtraStructuredActivities-_packageImport.0" importedPackage="Syntax-Activities-CompleteStructuredActivities"/>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionKind" name="ExpansionKind">
+ <ownedLiteral xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-parallel" name="parallel">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-parallel-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-parallel">
+ <body>The executions are independent. They may be executed concurrently.</body>
+ </ownedComment>
+ </ownedLiteral>
+ <ownedLiteral xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-iterative" name="iterative">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-iterative-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-iterative">
+ <body>The executions are dependent and must be executed one at a time, in order of the collection elements.</body>
+ </ownedComment>
+ </ownedLiteral>
+ <ownedLiteral xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-stream" name="stream">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-stream-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-stream">
+ <body>A stream of collection elements flows into a single execution, in order of the collection elements.</body>
+ </ownedComment>
+ </ownedLiteral>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode" name="ExpansionNode">
+ <generalization xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-_generalization.0" general="Syntax-Activities-IntermediateActivities-ObjectNode"/>
+ <ownedAttribute xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsOutput" name="regionAsOutput" visibility="public" type="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion" association="Syntax-Activities-ExtraStructuredActivities-A_outputElement_regionAsOutput">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsOutput-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsOutput">
+ <body>The expansion region for which the node is an output.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsOutput-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsInput" name="regionAsInput" visibility="public" type="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion" association="Syntax-Activities-ExtraStructuredActivities-A_inputElement_regionAsInput">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsInput-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsInput">
+ <body>The expansion region for which the node is an input.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsInput-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion" name="ExpansionRegion">
+ <ownedRule xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_crossing_edges" name="fUML_no_crossing_edges" constrainedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_crossing_edges-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_crossing_edges">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>Edges may not cross into or out of an expansion region.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_crossing_edges-_specification">
+ <language>OCL</language>
+ <body>self.edge->forAll(self.node->includes(source) and self.node->includes(target))</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_mode_cannot_be_stream" name="fUML_mode_cannot_be_stream" constrainedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_mode_cannot_be_stream-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_mode_cannot_be_stream">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>mode cannot be stream&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_mode_cannot_be_stream-_specification">
+ <language>OCL</language>
+ <body>self.mode &lt;> ExpansionKind::stream</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_output_pins" name="fUML_no_output_pins" constrainedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_output_pins-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_output_pins">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>An expansion region may not have output pins.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-fUML_no_output_pins-_specification">
+ <language>OCL</language>
+ <body>self.output->isEmpty()</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-_generalization.0" general="Syntax-Activities-CompleteStructuredActivities-StructuredActivityNode"/>
+ <ownedAttribute xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-mode" name="mode" visibility="public" type="Syntax-Activities-ExtraStructuredActivities-ExpansionKind">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-mode-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-mode">
+ <body>The way in which the executions interact:
+
+parallel: all interactions are independent
+
+iterative: the interactions occur in order of the elements
+
+stream: a stream of values flows into a single execution
+
+</body>
+ </ownedComment>
+ <defaultValue xmi:type="uml:InstanceValue" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-mode-iterative" name="iterative" type="Syntax-Activities-ExtraStructuredActivities-ExpansionKind" instance="Syntax-Activities-ExtraStructuredActivities-ExpansionKind-iterative"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-outputElement" name="outputElement" visibility="public" type="Syntax-Activities-ExtraStructuredActivities-ExpansionNode" association="Syntax-Activities-ExtraStructuredActivities-A_outputElement_regionAsOutput">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-outputElement-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-outputElement">
+ <body>An object node that accepts a separate element of the output collection during each of the multiple executions of the region. The values are formed into a collection that is available when the execution of the region is complete.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-outputElement-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-outputElement-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-inputElement" name="inputElement" visibility="public" type="Syntax-Activities-ExtraStructuredActivities-ExpansionNode" association="Syntax-Activities-ExtraStructuredActivities-A_inputElement_regionAsInput">
+ <ownedComment xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-inputElement-_ownedComment.0" annotatedElement="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-inputElement">
+ <body>An object node that holds a separate element of the input collection during each of the multiple executions of the region.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-inputElement-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-ExtraStructuredActivities-A_outputElement_regionAsOutput" name="A_outputElement_regionAsOutput" visibility="private" memberEnd="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsOutput Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-outputElement"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Activities-ExtraStructuredActivities-A_inputElement_regionAsInput" name="A_inputElement_regionAsInput" visibility="private" memberEnd="Syntax-Activities-ExtraStructuredActivities-ExpansionNode-regionAsInput Syntax-Activities-ExtraStructuredActivities-ExpansionRegion-inputElement"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Actions" name="Actions">
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Actions-BasicActions" name="BasicActions">
+ <packageImport xmi:id="Syntax-Actions-BasicActions-_packageImport.0" importedPackage="Syntax-CommonBehaviors-Communications"/>
+ <packageImport xmi:id="Syntax-Actions-BasicActions-_packageImport.1" importedPackage="Syntax-Activities-IntermediateActivities"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-SendSignalAction" name="SendSignalAction">
+ <ownedRule xmi:id="Syntax-Actions-BasicActions-SendSignalAction-target_signal_reception" name="target_signal_reception" constrainedElement="Syntax-Actions-BasicActions-SendSignalAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-SendSignalAction-target_signal_reception-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-SendSignalAction-target_signal_reception">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>The target input pin must have a type that has a reception for the signal.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-BasicActions-SendSignalAction-target_signal_reception-_specification">
+ <language>OCL</language>
+ <body>self.target.type.oclAsType(Classifier).allFeatures()->select(oclIsKindOf(Reception))->exists(f:Feature|self.signal.conformsTo(f.oclAsType(Reception).signal))
+</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-BasicActions-SendSignalAction-_generalization.0" general="Syntax-Actions-BasicActions-InvocationAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-SendSignalAction-target" name="target" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-BasicActions-A_target_sendSignalAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-SendSignalAction-target-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-SendSignalAction-target">
+ <body>The target object to which the signal is sent.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-SendSignalAction-signal" name="signal" visibility="public" type="Syntax-CommonBehaviors-Communications-Signal" association="Syntax-Actions-BasicActions-A_signal_sendSignalAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-SendSignalAction-signal-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-SendSignalAction-signal">
+ <body>The type of signal transmitted to the target object.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-OutputPin" name="OutputPin">
+ <generalization xmi:id="Syntax-Actions-BasicActions-OutputPin-_generalization.0" general="Syntax-Actions-BasicActions-Pin"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-Pin" name="Pin" isAbstract="true">
+ <generalization xmi:id="Syntax-Actions-BasicActions-Pin-_generalization.0" general="Syntax-Activities-IntermediateActivities-ObjectNode"/>
+ <generalization xmi:id="Syntax-Actions-BasicActions-Pin-_generalization.1" general="Syntax-Classes-Kernel-MultiplicityElement"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-InputPin" name="InputPin">
+ <generalization xmi:id="Syntax-Actions-BasicActions-InputPin-_generalization.0" general="Syntax-Actions-BasicActions-Pin"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-InvocationAction" name="InvocationAction" isAbstract="true">
+ <generalization xmi:id="Syntax-Actions-BasicActions-InvocationAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-InvocationAction-argument" name="argument" visibility="public" type="Syntax-Actions-BasicActions-InputPin" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-BasicActions-A_argument_invocationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-InvocationAction-argument-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-BasicActions-InvocationAction-argument-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-CallAction" name="CallAction" isAbstract="true">
+ <generalization xmi:id="Syntax-Actions-BasicActions-CallAction-_generalization.0" general="Syntax-Actions-BasicActions-InvocationAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-CallAction-isSynchronous" name="isSynchronous" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallAction-isSynchronous-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallAction-isSynchronous">
+ <body>If true, the call is synchronous and the caller waits for completion of the invoked behavior.
+
+If false, the call is asynchronous and the caller proceeds immediately and does not expect a return values.
+
+</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-BasicActions-CallAction-isSynchronous-_defaultValue" value="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-CallAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" isOrdered="true" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-BasicActions-A_result_callAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallAction-result">
+ <body>A list of output pins where the results of performing the invocation are placed.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-CallAction-result-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-BasicActions-CallAction-result-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction" name="CallBehaviorAction">
+ <ownedRule xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-is_synchronous" name="is_synchronous" constrainedElement="Syntax-Actions-BasicActions-CallBehaviorAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-is_synchronous-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallBehaviorAction-is_synchronous">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>isSynchronous must be true&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-is_synchronous-_specification">
+ <language>OCL</language>
+ <body>self.isSynchronous</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-inactive_behavior" name="inactive_behavior" constrainedElement="Syntax-Actions-BasicActions-CallBehaviorAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-inactive_behavior-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallBehaviorAction-inactive_behavior">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>The behavior may not be active. &lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-inactive_behavior-_specification">
+ <language>OCL</language>
+ <body>not self.behavior.isActive</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-proper_context" name="proper_context" constrainedElement="Syntax-Actions-BasicActions-CallBehaviorAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-proper_context-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallBehaviorAction-proper_context">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>If the behavior has a context, it must be the same as the context of the enclosing activity or a (direct or indirect) superclass of it.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-proper_context-_specification">
+ <language>OCL</language>
+ <body>self.behavior.context->notEmpty() implies
+ union(self.context.allParents())->includes(self.behavior.context)
+</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-_generalization.0" general="Syntax-Actions-BasicActions-CallAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-behavior" name="behavior" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" association="Syntax-Actions-BasicActions-A_behavior_callBehaviorAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallBehaviorAction-behavior-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallBehaviorAction-behavior">
+ <body>The invoked behavior. It must be capable of accepting and returning control.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-CallOperationAction" name="CallOperationAction">
+ <ownedRule xmi:id="Syntax-Actions-BasicActions-CallOperationAction-is_synchronous" name="is_synchronous" constrainedElement="Syntax-Actions-BasicActions-CallOperationAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallOperationAction-is_synchronous-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallOperationAction-is_synchronous">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>isSynchronous must be true&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-BasicActions-CallOperationAction-is_synchronous-_specification">
+ <language>OCL</language>
+ <body>self.isSynchronous</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-BasicActions-CallOperationAction-_generalization.0" general="Syntax-Actions-BasicActions-CallAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-CallOperationAction-operation" name="operation" visibility="public" type="Syntax-Classes-Kernel-Operation" association="Syntax-Actions-BasicActions-A_operation_callOperationAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallOperationAction-operation-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallOperationAction-operation">
+ <body>The operation to be invoked by the action execution.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-CallOperationAction-target" name="target" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-BasicActions-A_target_callOperationAction">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-CallOperationAction-target-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-CallOperationAction-target">
+ <body>The target object to which the request is sent. The classifier of the target object is used to dynamically determine a behavior to invoke. This object constitutes the context of the execution of the operation.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-BasicActions-Action" name="Action" isAbstract="true">
+ <generalization xmi:id="Syntax-Actions-BasicActions-Action-_generalization.0" general="Syntax-Activities-CompleteStructuredActivities-ExecutableNode"/>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-Action-output" name="output" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" isOrdered="true" isReadOnly="true" aggregation="composite" isDerived="true" isDerivedUnion="true" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Actions-BasicActions-A_action_output">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-Action-output-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-Action-output">
+ <body>The ordered set of output pins connected to the Action. The action places its results onto pins in this set.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-Action-output-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-BasicActions-Action-output-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-Action-context" name="context" visibility="public" type="Syntax-Classes-Kernel-Classifier" isReadOnly="true" isDerived="true" association="Syntax-Actions-BasicActions-A_context_action">
+ <ownedComment xmi:id="Syntax-Actions-BasicActions-Action-context-_ownedComment.0" annotatedElement="Syntax-Actions-BasicActions-Action-context">
+ <body>The classifier that owns the behavior of which this action is a part.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-Action-context-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-Action-input" name="input" visibility="public" type="Syntax-Actions-BasicActions-InputPin" isOrdered="true" isReadOnly="true" aggregation="composite" isDerived="true" isDerivedUnion="true" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Actions-BasicActions-A_action_input">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-Action-input-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-BasicActions-Action-input-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-BasicActions-Action-isLocallyReentrant" name="isLocallyReentrant" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-BasicActions-Action-isLocallyReentrant-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_action_output" name="A_action_output" visibility="private" memberEnd="Syntax-Actions-BasicActions-Action-output Syntax-Actions-BasicActions-A_action_output-action">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_action_output-action" name="action" visibility="public" type="Syntax-Actions-BasicActions-Action" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Actions-BasicActions-A_action_output">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_action_output-action-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_context_action" name="A_context_action" visibility="private" isDerived="true" memberEnd="Syntax-Actions-BasicActions-A_context_action-action Syntax-Actions-BasicActions-Action-context">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_context_action-action" name="action" visibility="public" type="Syntax-Actions-BasicActions-Action" association="Syntax-Actions-BasicActions-A_context_action"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_operation_callOperationAction" name="A_operation_callOperationAction" visibility="private" memberEnd="Syntax-Actions-BasicActions-A_operation_callOperationAction-callOperationAction Syntax-Actions-BasicActions-CallOperationAction-operation">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_operation_callOperationAction-callOperationAction" name="callOperationAction" visibility="public" type="Syntax-Actions-BasicActions-CallOperationAction" association="Syntax-Actions-BasicActions-A_operation_callOperationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_operation_callOperationAction-callOperationAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-BasicActions-A_operation_callOperationAction-callOperationAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_target_callOperationAction" name="A_target_callOperationAction" visibility="private" memberEnd="Syntax-Actions-BasicActions-A_target_callOperationAction-callOperationAction Syntax-Actions-BasicActions-CallOperationAction-target">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_target_callOperationAction-callOperationAction" name="callOperationAction" visibility="public" type="Syntax-Actions-BasicActions-CallOperationAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-BasicActions-A_target_callOperationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_target_callOperationAction-callOperationAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_behavior_callBehaviorAction" name="A_behavior_callBehaviorAction" visibility="private" memberEnd="Syntax-Actions-BasicActions-A_behavior_callBehaviorAction-callBehaviorAction Syntax-Actions-BasicActions-CallBehaviorAction-behavior">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_behavior_callBehaviorAction-callBehaviorAction" name="callBehaviorAction" visibility="public" type="Syntax-Actions-BasicActions-CallBehaviorAction" association="Syntax-Actions-BasicActions-A_behavior_callBehaviorAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_behavior_callBehaviorAction-callBehaviorAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-BasicActions-A_behavior_callBehaviorAction-callBehaviorAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_result_callAction" name="A_result_callAction" visibility="private" memberEnd="Syntax-Actions-BasicActions-A_result_callAction-callAction Syntax-Actions-BasicActions-CallAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_result_callAction-callAction" name="callAction" visibility="public" type="Syntax-Actions-BasicActions-CallAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-BasicActions-A_result_callAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_result_callAction-callAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_signal_sendSignalAction" name="A_signal_sendSignalAction" visibility="private" memberEnd="Syntax-Actions-BasicActions-A_signal_sendSignalAction-sendSignalAction Syntax-Actions-BasicActions-SendSignalAction-signal">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_signal_sendSignalAction-sendSignalAction" name="sendSignalAction" visibility="public" type="Syntax-Actions-BasicActions-SendSignalAction" association="Syntax-Actions-BasicActions-A_signal_sendSignalAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_signal_sendSignalAction-sendSignalAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-BasicActions-A_signal_sendSignalAction-sendSignalAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_target_sendSignalAction" name="A_target_sendSignalAction" visibility="private" memberEnd="Syntax-Actions-BasicActions-A_target_sendSignalAction-sendSignalAction Syntax-Actions-BasicActions-SendSignalAction-target">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_target_sendSignalAction-sendSignalAction" name="sendSignalAction" visibility="public" type="Syntax-Actions-BasicActions-SendSignalAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-BasicActions-A_target_sendSignalAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_target_sendSignalAction-sendSignalAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_action_input" name="A_action_input" visibility="private" memberEnd="Syntax-Actions-BasicActions-Action-input Syntax-Actions-BasicActions-A_action_input-action">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_action_input-action" name="action" visibility="public" type="Syntax-Actions-BasicActions-Action" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Actions-BasicActions-A_action_input">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_action_input-action-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-BasicActions-A_argument_invocationAction" name="A_argument_invocationAction" visibility="private" memberEnd="Syntax-Actions-BasicActions-A_argument_invocationAction-invocationAction Syntax-Actions-BasicActions-InvocationAction-argument">
+ <ownedEnd xmi:id="Syntax-Actions-BasicActions-A_argument_invocationAction-invocationAction" name="invocationAction" visibility="public" type="Syntax-Actions-BasicActions-InvocationAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-BasicActions-A_argument_invocationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-BasicActions-A_argument_invocationAction-invocationAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Actions-IntermediateActions" name="IntermediateActions">
+ <packageImport xmi:id="Syntax-Actions-IntermediateActions-_packageImport.0" importedPackage="Syntax-Actions-BasicActions"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-StructuralFeatureAction" name="StructuralFeatureAction" isAbstract="true">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-StructuralFeatureAction-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-StructuralFeatureAction">
+ <body>This abstract action class statically specifies the structural feature being accessed. The object to access is specified dynamically, by referring to an input pin on which the object will be placed at runtime. The type of the value of this pin is the classifier that owns the specified structural feature, and the value's multiplicity is 1..1.</body>
+ </ownedComment>
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-StructuralFeatureAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-StructuralFeatureAction-structuralFeature" name="structuralFeature" visibility="public" type="Syntax-Classes-Kernel-StructuralFeature" association="Syntax-Actions-IntermediateActions-A_structuralFeatureAction_structuralFeature">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-StructuralFeatureAction-structuralFeature-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-StructuralFeatureAction-structuralFeature">
+ <body>Structural feature to be read.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-StructuralFeatureAction-object" name="object" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_object_structuralFeatureAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-StructuralFeatureAction-object-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-StructuralFeatureAction-object">
+ <body>Gives the input pin from which the object whose structural feature is to be read or written is obtained.
+
+</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction" name="TestIdentityAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction-second" name="second" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_second_testIdentityAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction-second-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-TestIdentityAction-second">
+ <body>Gives the pin on which an object is placed.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_testIdentityAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-TestIdentityAction-result">
+ <body>Tells whether the two input objects are identical.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction-first" name="first" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_first_testIdentityAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-TestIdentityAction-first-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-TestIdentityAction-first">
+ <body>Gives the pin on which an object is placed.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-ValueSpecificationAction" name="ValueSpecificationAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-ValueSpecificationAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ValueSpecificationAction-value" name="value" visibility="public" type="Syntax-Classes-Kernel-ValueSpecification" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Actions-IntermediateActions-A_value_valueSpecificationAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-ValueSpecificationAction-value-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-ValueSpecificationAction-value">
+ <body>Value specification to be evaluated.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ValueSpecificationAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_valueSpecificationAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-ValueSpecificationAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-ValueSpecificationAction-result">
+ <body>Gives the output pin on which the result is put.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-WriteLinkAction" name="WriteLinkAction" isAbstract="true">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-WriteLinkAction-_generalization.0" general="Syntax-Actions-IntermediateActions-LinkAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction" name="WriteStructuralFeatureAction" isAbstract="true">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-_generalization.0" general="Syntax-Actions-IntermediateActions-StructuralFeatureAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-value" name="value" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_value_writeStructuralFeatureAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-value-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-value">
+ <body>Value to be added or removed from the structural feature.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-value-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_writeStructuralFeatureAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-result-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction" name="RemoveStructuralFeatureValueAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-_generalization.0" general="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-isRemoveDuplicates" name="isRemoveDuplicates" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-isRemoveDuplicates-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-isRemoveDuplicates">
+ <body>Specifies whether to remove duplicates of the value in nonunique structural features.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-isRemoveDuplicates-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-removeAt" name="removeAt" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_removeAt_removeStructuralFeatureValueAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-removeAt-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-removeAt">
+ <body>Specifies the position of an existing value to remove in ordered nonunique structural features. The type of the pin is UnlimitedNatural, but the value cannot be zero or unlimited.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-removeAt-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-ReadLinkAction" name="ReadLinkAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-ReadLinkAction-_generalization.0" general="Syntax-Actions-IntermediateActions-LinkAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ReadLinkAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_readLinkAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-ReadLinkAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-ReadLinkAction-result">
+ <body>The pin on which are put the objects participating in the association at the end not specified by the inputs.
+
+</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-ReadSelfAction" name="ReadSelfAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-ReadSelfAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ReadSelfAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_readSelfAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-ReadSelfAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-ReadSelfAction-result">
+ <body>Gives the output pin on which the hosting object is placed.
+
+</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction" name="ReadStructuralFeatureAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction-_generalization.0" general="Syntax-Actions-IntermediateActions-StructuralFeatureAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_readStructuralFeatureAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction-result">
+ <body>Gives the output pin on which the result is put.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction-result-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-LinkAction" name="LinkAction" isAbstract="true">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-LinkAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkAction-endData" name="endData" visibility="public" type="Syntax-Actions-IntermediateActions-LinkEndData" aggregation="composite" redefinedProperty="Syntax-Actions-IntermediateActions-LinkAction-endData" association="Syntax-Actions-IntermediateActions-A_endData_linkAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-LinkAction-endData-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-LinkAction-endData">
+ <body>Data identifying one end of a link by the objects on its ends and qualifiers.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-LinkAction-endData-_lowerValue" value="2"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-IntermediateActions-LinkAction-endData-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkAction-inputValue" name="inputValue" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_inputValue_linkAction">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-IntermediateActions-LinkAction-inputValue-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData" name="LinkEndCreationData">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData-_generalization.0" general="Syntax-Actions-IntermediateActions-LinkEndData"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData-isReplaceAll" name="isReplaceAll" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData-isReplaceAll-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-LinkEndCreationData-isReplaceAll">
+ <body>Specifies whether the existing links emanating from the object on this end should be destroyed before creating a new link.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData-isReplaceAll-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData-insertAt" name="insertAt" visibility="public" type="Syntax-Actions-BasicActions-InputPin" association="Syntax-Actions-IntermediateActions-A_insertAt_linkEndCreationData">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData-insertAt-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-LinkEndCreationData-insertAt">
+ <body>Specifies where the new link should be inserted for ordered association ends, or where an existing link should be moved to. The type of the input is UnlimitedNatural, but the input cannot be zero. This pin is omitted for association ends that are not ordered.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-LinkEndCreationData-insertAt-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-LinkEndData" name="LinkEndData">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-LinkEndData-_generalization.0" general="Syntax-Classes-Kernel-Element"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkEndData-value" name="value" visibility="public" type="Syntax-Actions-BasicActions-InputPin" association="Syntax-Actions-IntermediateActions-A_value_linkEndData">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-LinkEndData-value-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-LinkEndData-value">
+ <body>Input pin that provides the specified object for the given end. This pin is omitted if the link-end data specifies an 'open' end for reading.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-LinkEndData-value-_lowerValue"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkEndData-end" name="end" visibility="public" type="Syntax-Classes-Kernel-Property" association="Syntax-Actions-IntermediateActions-A_end_linkEndData">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-LinkEndData-end-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-LinkEndData-end">
+ <body>Association end for which this link-end data specifies values.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData" name="LinkEndDestructionData">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData-_generalization.0" general="Syntax-Actions-IntermediateActions-LinkEndData"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData-isDestroyDuplicates" name="isDestroyDuplicates" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData-isDestroyDuplicates-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-LinkEndDestructionData-isDestroyDuplicates">
+ <body>Specifies whether to destroy duplicates of the value in nonunique association ends.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData-isDestroyDuplicates-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData-destroyAt" name="destroyAt" visibility="public" type="Syntax-Actions-BasicActions-InputPin" association="Syntax-Actions-IntermediateActions-A_destroyAt_linkEndDestructionData">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData-destroyAt-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-LinkEndDestructionData-destroyAt">
+ <body>Specifies the position of an existing link to be destroyed in ordered nonunique association ends. The type of the pin is UnlimitedNatural, but the value cannot be zero or unlimited.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-LinkEndDestructionData-destroyAt-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-ClearAssociationAction" name="ClearAssociationAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-ClearAssociationAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ClearAssociationAction-association" name="association" visibility="public" type="Syntax-Classes-Kernel-Association" association="Syntax-Actions-IntermediateActions-A_association_clearAssociationAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-ClearAssociationAction-association-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-ClearAssociationAction-association">
+ <body>Association to be cleared.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ClearAssociationAction-object" name="object" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_object_clearAssociationAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-ClearAssociationAction-object-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-ClearAssociationAction-object">
+ <body>Gives the input pin from which is obtained the object whose participation in the association is to be cleared.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-ClearStructuralFeatureAction" name="ClearStructuralFeatureAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-ClearStructuralFeatureAction-_generalization.0" general="Syntax-Actions-IntermediateActions-StructuralFeatureAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-ClearStructuralFeatureAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_clearStructuralFeatureAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-ClearStructuralFeatureAction-result-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-CreateLinkAction" name="CreateLinkAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-CreateLinkAction-_generalization.0" general="Syntax-Actions-IntermediateActions-WriteLinkAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-CreateLinkAction-endData" name="endData" visibility="public" type="Syntax-Actions-IntermediateActions-LinkEndCreationData" aggregation="composite" redefinedProperty="Syntax-Actions-IntermediateActions-LinkAction-endData" association="Syntax-Actions-IntermediateActions-A_endData_createLinkAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-CreateLinkAction-endData-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-CreateLinkAction-endData">
+ <body>Specifies ends of association and inputs.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-CreateLinkAction-endData-_lowerValue" value="2"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-IntermediateActions-CreateLinkAction-endData-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction" name="CreateObjectAction">
+ <ownedRule xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-fUML_is_class" name="fUML_is_class" constrainedElement="Syntax-Actions-IntermediateActions-CreateObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-fUML_is_class-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-CreateObjectAction-fUML_is_class">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>The given classifier must be a class.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-fUML_is_class-_specification">
+ <language>OCL</language>
+ <body>self.classifier.oclIsKindOf(Class)</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-IntermediateActions-A_result_createObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-CreateObjectAction-result">
+ <body>Gives the output pin on which the result is put.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Actions-IntermediateActions-A_classifier_createObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-CreateObjectAction-classifier-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-CreateObjectAction-classifier">
+ <body>Classifier to be instantiated.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-DestroyLinkAction" name="DestroyLinkAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-DestroyLinkAction-_generalization.0" general="Syntax-Actions-IntermediateActions-WriteLinkAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-DestroyLinkAction-endData" name="endData" visibility="public" type="Syntax-Actions-IntermediateActions-LinkEndDestructionData" aggregation="composite" redefinedProperty="Syntax-Actions-IntermediateActions-LinkAction-endData" association="Syntax-Actions-IntermediateActions-A_endData_destroyLinkAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-DestroyLinkAction-endData-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-DestroyLinkAction-endData">
+ <body>Specifies ends of association and inputs.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-DestroyLinkAction-endData-_lowerValue" value="2"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-IntermediateActions-DestroyLinkAction-endData-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction" name="DestroyObjectAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyLinks" name="isDestroyLinks" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyLinks-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyLinks">
+ <body>Specifies whether links in which the object participates are destroyed along with the object.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyLinks-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyOwnedObjects" name="isDestroyOwnedObjects" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyOwnedObjects-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyOwnedObjects">
+ <body>Specifies whether objects owned by the object are destroyed along with the object.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-isDestroyOwnedObjects-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-target" name="target" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_target_destroyObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-DestroyObjectAction-target-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-DestroyObjectAction-target">
+ <body>The input pin providing the object to be destroyed.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction" name="AddStructuralFeatureValueAction">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-_generalization.0" general="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-isReplaceAll" name="isReplaceAll" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-isReplaceAll-_ownedComment.0" annotatedElement="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-isReplaceAll">
+ <body>Specifies whether existing values of the structural feature of the object should be removed before adding the new value.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-isReplaceAll-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-insertAt" name="insertAt" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-IntermediateActions-A_insertAt_addStructuralFeatureValueAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-insertAt-_lowerValue"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_target_destroyObjectAction" name="A_target_destroyObjectAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_target_destroyObjectAction-destroyObjectAction Syntax-Actions-IntermediateActions-DestroyObjectAction-target">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_target_destroyObjectAction-destroyObjectAction" name="destroyObjectAction" visibility="public" type="Syntax-Actions-IntermediateActions-DestroyObjectAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_target_destroyObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_target_destroyObjectAction-destroyObjectAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_endData_destroyLinkAction" name="A_endData_destroyLinkAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_endData_destroyLinkAction-destroyLinkAction Syntax-Actions-IntermediateActions-DestroyLinkAction-endData">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-A_endData_destroyLinkAction-_generalization.0" general="Syntax-Actions-IntermediateActions-A_endData_linkAction"/>
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_endData_destroyLinkAction-destroyLinkAction" name="destroyLinkAction" visibility="public" type="Syntax-Actions-IntermediateActions-DestroyLinkAction" redefinedProperty="Syntax-Actions-IntermediateActions-A_endData_linkAction-linkAction" association="Syntax-Actions-IntermediateActions-A_endData_destroyLinkAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_createObjectAction" name="A_result_createObjectAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_createObjectAction-createObjectAction Syntax-Actions-IntermediateActions-CreateObjectAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_createObjectAction-createObjectAction" name="createObjectAction" visibility="public" type="Syntax-Actions-IntermediateActions-CreateObjectAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_createObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_createObjectAction-createObjectAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_classifier_createObjectAction" name="A_classifier_createObjectAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_classifier_createObjectAction-createObjectAction Syntax-Actions-IntermediateActions-CreateObjectAction-classifier">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_classifier_createObjectAction-createObjectAction" name="createObjectAction" visibility="public" type="Syntax-Actions-IntermediateActions-CreateObjectAction" association="Syntax-Actions-IntermediateActions-A_classifier_createObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_classifier_createObjectAction-createObjectAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-IntermediateActions-A_classifier_createObjectAction-createObjectAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_endData_createLinkAction" name="A_endData_createLinkAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_endData_createLinkAction-createLinkAction Syntax-Actions-IntermediateActions-CreateLinkAction-endData">
+ <generalization xmi:id="Syntax-Actions-IntermediateActions-A_endData_createLinkAction-_generalization.0" general="Syntax-Actions-IntermediateActions-A_endData_linkAction"/>
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_endData_createLinkAction-createLinkAction" name="createLinkAction" visibility="public" type="Syntax-Actions-IntermediateActions-CreateLinkAction" redefinedProperty="Syntax-Actions-IntermediateActions-A_endData_linkAction-linkAction" association="Syntax-Actions-IntermediateActions-A_endData_createLinkAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_clearStructuralFeatureAction" name="A_result_clearStructuralFeatureAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_clearStructuralFeatureAction-clearStructuralFeatureAction Syntax-Actions-IntermediateActions-ClearStructuralFeatureAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_clearStructuralFeatureAction-clearStructuralFeatureAction" name="clearStructuralFeatureAction" visibility="public" type="Syntax-Actions-IntermediateActions-ClearStructuralFeatureAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_clearStructuralFeatureAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_clearStructuralFeatureAction-clearStructuralFeatureAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_object_clearAssociationAction" name="A_object_clearAssociationAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_object_clearAssociationAction-clearAssociationAction Syntax-Actions-IntermediateActions-ClearAssociationAction-object">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_object_clearAssociationAction-clearAssociationAction" name="clearAssociationAction" visibility="public" type="Syntax-Actions-IntermediateActions-ClearAssociationAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_object_clearAssociationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_object_clearAssociationAction-clearAssociationAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_association_clearAssociationAction" name="A_association_clearAssociationAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_association_clearAssociationAction-clearAssociationAction Syntax-Actions-IntermediateActions-ClearAssociationAction-association">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_association_clearAssociationAction-clearAssociationAction" name="clearAssociationAction" visibility="public" type="Syntax-Actions-IntermediateActions-ClearAssociationAction" association="Syntax-Actions-IntermediateActions-A_association_clearAssociationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_association_clearAssociationAction-clearAssociationAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_destroyAt_linkEndDestructionData" name="A_destroyAt_linkEndDestructionData" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_destroyAt_linkEndDestructionData-linkEndDestructionData Syntax-Actions-IntermediateActions-LinkEndDestructionData-destroyAt">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_destroyAt_linkEndDestructionData-linkEndDestructionData" name="linkEndDestructionData" visibility="public" type="Syntax-Actions-IntermediateActions-LinkEndDestructionData" association="Syntax-Actions-IntermediateActions-A_destroyAt_linkEndDestructionData">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_destroyAt_linkEndDestructionData-linkEndDestructionData-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_value_linkEndData" name="A_value_linkEndData" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_value_linkEndData-linkEndData Syntax-Actions-IntermediateActions-LinkEndData-value">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_value_linkEndData-linkEndData" name="linkEndData" visibility="public" type="Syntax-Actions-IntermediateActions-LinkEndData" association="Syntax-Actions-IntermediateActions-A_value_linkEndData">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_value_linkEndData-linkEndData-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_end_linkEndData" name="A_end_linkEndData" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_end_linkEndData-linkEndData Syntax-Actions-IntermediateActions-LinkEndData-end">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_end_linkEndData-linkEndData" name="linkEndData" visibility="public" type="Syntax-Actions-IntermediateActions-LinkEndData" association="Syntax-Actions-IntermediateActions-A_end_linkEndData">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_end_linkEndData-linkEndData-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-IntermediateActions-A_end_linkEndData-linkEndData-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_insertAt_linkEndCreationData" name="A_insertAt_linkEndCreationData" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_insertAt_linkEndCreationData-linkEndCreationData Syntax-Actions-IntermediateActions-LinkEndCreationData-insertAt">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_insertAt_linkEndCreationData-linkEndCreationData" name="linkEndCreationData" visibility="public" type="Syntax-Actions-IntermediateActions-LinkEndCreationData" association="Syntax-Actions-IntermediateActions-A_insertAt_linkEndCreationData">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_insertAt_linkEndCreationData-linkEndCreationData-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_endData_linkAction" name="A_endData_linkAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_endData_linkAction-linkAction Syntax-Actions-IntermediateActions-LinkAction-endData">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_endData_linkAction-linkAction" name="linkAction" visibility="public" type="Syntax-Actions-IntermediateActions-LinkAction" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Actions-IntermediateActions-A_endData_linkAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_readStructuralFeatureAction" name="A_result_readStructuralFeatureAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_readStructuralFeatureAction-readStructuralFeatureAction Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_readStructuralFeatureAction-readStructuralFeatureAction" name="readStructuralFeatureAction" visibility="public" type="Syntax-Actions-IntermediateActions-ReadStructuralFeatureAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_readStructuralFeatureAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_readStructuralFeatureAction-readStructuralFeatureAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_readSelfAction" name="A_result_readSelfAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_readSelfAction-readSelfAction Syntax-Actions-IntermediateActions-ReadSelfAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_readSelfAction-readSelfAction" name="readSelfAction" visibility="public" type="Syntax-Actions-IntermediateActions-ReadSelfAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_readSelfAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_readSelfAction-readSelfAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_readLinkAction" name="A_result_readLinkAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_readLinkAction-readLinkAction Syntax-Actions-IntermediateActions-ReadLinkAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_readLinkAction-readLinkAction" name="readLinkAction" visibility="public" type="Syntax-Actions-IntermediateActions-ReadLinkAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_readLinkAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_readLinkAction-readLinkAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_removeAt_removeStructuralFeatureValueAction" name="A_removeAt_removeStructuralFeatureValueAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_removeAt_removeStructuralFeatureValueAction-removeStructuralFeatureValueAction Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction-removeAt">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_removeAt_removeStructuralFeatureValueAction-removeStructuralFeatureValueAction" name="removeStructuralFeatureValueAction" visibility="public" type="Syntax-Actions-IntermediateActions-RemoveStructuralFeatureValueAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_removeAt_removeStructuralFeatureValueAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_removeAt_removeStructuralFeatureValueAction-removeStructuralFeatureValueAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_writeStructuralFeatureAction" name="A_result_writeStructuralFeatureAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_writeStructuralFeatureAction-writeStructuralFeatureAction Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_writeStructuralFeatureAction-writeStructuralFeatureAction" name="writeStructuralFeatureAction" visibility="public" type="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_writeStructuralFeatureAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_writeStructuralFeatureAction-writeStructuralFeatureAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_value_writeStructuralFeatureAction" name="A_value_writeStructuralFeatureAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_value_writeStructuralFeatureAction-writeStructuralFeatureAction Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction-value">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_value_writeStructuralFeatureAction-writeStructuralFeatureAction" name="writeStructuralFeatureAction" visibility="public" type="Syntax-Actions-IntermediateActions-WriteStructuralFeatureAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_value_writeStructuralFeatureAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_value_writeStructuralFeatureAction-writeStructuralFeatureAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_value_valueSpecificationAction" name="A_value_valueSpecificationAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_value_valueSpecificationAction-valueSpecificationAction Syntax-Actions-IntermediateActions-ValueSpecificationAction-value">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_value_valueSpecificationAction-valueSpecificationAction" name="valueSpecificationAction" visibility="public" type="Syntax-Actions-IntermediateActions-ValueSpecificationAction" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Actions-IntermediateActions-A_value_valueSpecificationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_value_valueSpecificationAction-valueSpecificationAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_valueSpecificationAction" name="A_result_valueSpecificationAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_valueSpecificationAction-valueSpecificationAction Syntax-Actions-IntermediateActions-ValueSpecificationAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_valueSpecificationAction-valueSpecificationAction" name="valueSpecificationAction" visibility="public" type="Syntax-Actions-IntermediateActions-ValueSpecificationAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_valueSpecificationAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_valueSpecificationAction-valueSpecificationAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_first_testIdentityAction" name="A_first_testIdentityAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_first_testIdentityAction-testIdentityAction Syntax-Actions-IntermediateActions-TestIdentityAction-first">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_first_testIdentityAction-testIdentityAction" name="testIdentityAction" visibility="public" type="Syntax-Actions-IntermediateActions-TestIdentityAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_first_testIdentityAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_first_testIdentityAction-testIdentityAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_result_testIdentityAction" name="A_result_testIdentityAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_result_testIdentityAction-testIdentityAction Syntax-Actions-IntermediateActions-TestIdentityAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_result_testIdentityAction-testIdentityAction" name="testIdentityAction" visibility="public" type="Syntax-Actions-IntermediateActions-TestIdentityAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-IntermediateActions-A_result_testIdentityAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_result_testIdentityAction-testIdentityAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_second_testIdentityAction" name="A_second_testIdentityAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_second_testIdentityAction-testIdentityAction Syntax-Actions-IntermediateActions-TestIdentityAction-second">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_second_testIdentityAction-testIdentityAction" name="testIdentityAction" visibility="public" type="Syntax-Actions-IntermediateActions-TestIdentityAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_second_testIdentityAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_second_testIdentityAction-testIdentityAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_object_structuralFeatureAction" name="A_object_structuralFeatureAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_object_structuralFeatureAction-structuralFeatureAction Syntax-Actions-IntermediateActions-StructuralFeatureAction-object">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_object_structuralFeatureAction-structuralFeatureAction" name="structuralFeatureAction" visibility="public" type="Syntax-Actions-IntermediateActions-StructuralFeatureAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_object_structuralFeatureAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_object_structuralFeatureAction-structuralFeatureAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_structuralFeatureAction_structuralFeature" name="A_structuralFeatureAction_structuralFeature" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-StructuralFeatureAction-structuralFeature Syntax-Actions-IntermediateActions-A_structuralFeatureAction_structuralFeature-structuralFeatureAction">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_structuralFeatureAction_structuralFeature-structuralFeatureAction" name="structuralFeatureAction" visibility="public" type="Syntax-Actions-IntermediateActions-StructuralFeatureAction" association="Syntax-Actions-IntermediateActions-A_structuralFeatureAction_structuralFeature">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_structuralFeatureAction_structuralFeature-structuralFeatureAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-IntermediateActions-A_structuralFeatureAction_structuralFeature-structuralFeatureAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_insertAt_addStructuralFeatureValueAction" name="A_insertAt_addStructuralFeatureValueAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_insertAt_addStructuralFeatureValueAction-addStructuralFeatureValueAction Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction-insertAt">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_insertAt_addStructuralFeatureValueAction-addStructuralFeatureValueAction" name="addStructuralFeatureValueAction" visibility="public" type="Syntax-Actions-IntermediateActions-AddStructuralFeatureValueAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_insertAt_addStructuralFeatureValueAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_insertAt_addStructuralFeatureValueAction-addStructuralFeatureValueAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-IntermediateActions-A_inputValue_linkAction" name="A_inputValue_linkAction" visibility="private" memberEnd="Syntax-Actions-IntermediateActions-A_inputValue_linkAction-linkAction Syntax-Actions-IntermediateActions-LinkAction-inputValue">
+ <ownedEnd xmi:id="Syntax-Actions-IntermediateActions-A_inputValue_linkAction-linkAction" name="linkAction" visibility="public" type="Syntax-Actions-IntermediateActions-LinkAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-IntermediateActions-A_inputValue_linkAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-IntermediateActions-A_inputValue_linkAction-linkAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-Actions-CompleteActions" name="CompleteActions">
+ <packageImport xmi:id="Syntax-Actions-CompleteActions-_packageImport.0" importedPackage="Syntax-Actions-BasicActions"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-CompleteActions-StartClassifierBehaviorAction" name="StartClassifierBehaviorAction">
+ <generalization xmi:id="Syntax-Actions-CompleteActions-StartClassifierBehaviorAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-StartClassifierBehaviorAction-object" name="object" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-CompleteActions-A_object_startClassifierBehaviorAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-StartClassifierBehaviorAction-object-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-StartClassifierBehaviorAction-object">
+ <body>Holds the object on which to start the owned behavior.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-CompleteActions-StartObjectBehaviorAction" name="StartObjectBehaviorAction">
+ <ownedRule xmi:id="Syntax-Actions-CompleteActions-StartObjectBehaviorAction-fUML_is_asynchronous" name="fUML_is_asynchronous" constrainedElement="Syntax-Actions-CompleteActions-StartObjectBehaviorAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-StartObjectBehaviorAction-fUML_is_asynchronous-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-StartObjectBehaviorAction-fUML_is_asynchronous">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>isSynchronous must be false.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-CompleteActions-StartObjectBehaviorAction-fUML_is_asynchronous-_specification">
+ <language>OCL</language>
+ <body>not self.isSynchronous</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-CompleteActions-StartObjectBehaviorAction-_generalization.0" general="Syntax-Actions-BasicActions-CallAction"/>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-StartObjectBehaviorAction-object" name="object" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-CompleteActions-A_object_startObjectBehaviorAction"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-CompleteActions-ReduceAction" name="ReduceAction">
+ <generalization xmi:id="Syntax-Actions-CompleteActions-ReduceAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReduceAction-reducer" name="reducer" visibility="public" type="Syntax-CommonBehaviors-BasicBehaviors-Behavior" association="Syntax-Actions-CompleteActions-A_reducer_reduceAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReduceAction-reducer-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReduceAction-reducer">
+ <body>Behavior that is applied to two elements of the input collection to produce a value that is the same type as elements of the collection.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReduceAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-CompleteActions-A_result_reduceAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReduceAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReduceAction-result">
+ <body>Gives the output pin on which the result is put.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReduceAction-collection" name="collection" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-CompleteActions-A_collection_reduceAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReduceAction-collection-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReduceAction-collection">
+ <body>The collection to be reduced.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReduceAction-isOrdered" name="isOrdered" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReduceAction-isOrdered-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReduceAction-isOrdered">
+ <body>Tells whether the order of the input collection should determine the order in which the behavior is applied to its elements.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-CompleteActions-ReduceAction-isOrdered-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction" name="ReadExtentAction">
+ <ownedRule xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-fUML_is_class" name="fUML_is_class" constrainedElement="Syntax-Actions-CompleteActions-ReadExtentAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-fUML_is_class-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReadExtentAction-fUML_is_class">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>The classifier must be a class.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-fUML_is_class-_specification">
+ <language>OCL</language>
+ <body>self.classifier.oclIsKindOf(Class)</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-CompleteActions-A_result_readExtentAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReadExtentAction-result">
+ <body>The runtime instances of the classifier.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Actions-CompleteActions-A_classifier_readExtentAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReadExtentAction-classifier-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReadExtentAction-classifier">
+ <body>The classifier whose instances are to be retrieved.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction" name="ReadIsClassifiedObjectAction">
+ <generalization xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-isDirect" name="isDirect" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-isDirect-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-isDirect">
+ <body>Indicates whether the classifier must directly classify the input object.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-isDirect-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-classifier" name="classifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Actions-CompleteActions-A_classifier_readIsClassifiedObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-classifier-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-classifier">
+ <body>The classifier against which the classification of the input object is tested.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-CompleteActions-A_result_readIsClassifiedObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-result">
+ <body>After termination of the action, will hold the result of the test.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-object" name="object" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-CompleteActions-A_object_readIsClassifiedObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-object-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-object">
+ <body>Holds the object whose classification is to be tested.</body>
+ </ownedComment>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction" name="ReclassifyObjectAction">
+ <ownedRule xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-fUML_old_new_classes" name="fUML_old_new_classes" constrainedElement="Syntax-Actions-CompleteActions-ReclassifyObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-fUML_old_new_classes-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReclassifyObjectAction-fUML_old_new_classes">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>All the old and new classifiers must be classes.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-fUML_old_new_classes-_specification">
+ <language>OCL</language>
+ <body>self.oldClassifier->forAll(oclIsKindOf(Class)) and self.newClassifier->forAll(oclIsKindOf(Class))</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-isReplaceAll" name="isReplaceAll" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-isReplaceAll-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReclassifyObjectAction-isReplaceAll">
+ <body>Specifies whether existing classifiers should be removed before adding the new classifiers.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-isReplaceAll-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-oldClassifier" name="oldClassifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Actions-CompleteActions-A_oldClassifier_reclassifyObjectAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-oldClassifier-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReclassifyObjectAction-oldClassifier">
+ <body>A set of classifiers to be removed from the classifiers of the object.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-oldClassifier-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-oldClassifier-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-object" name="object" visibility="public" type="Syntax-Actions-BasicActions-InputPin" aggregation="composite" subsettedProperty="Syntax-Actions-BasicActions-Action-input" association="Syntax-Actions-CompleteActions-A_reclassifyObjectAction_object">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-object-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-ReclassifyObjectAction-object">
+ <body>Holds the object to be reclassified.</body>
+ </ownedComment>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-newClassifier" name="newClassifier" visibility="public" type="Syntax-Classes-Kernel-Classifier" association="Syntax-Actions-CompleteActions-A_newClassifier_reclassifyObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-newClassifier-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-ReclassifyObjectAction-newClassifier-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction" name="AcceptEventAction">
+ <ownedRule xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_active_context" name="fUML_active_context" constrainedElement="Syntax-Actions-CompleteActions-AcceptEventAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_active_context-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_active_context">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>&#xD;
+&lt;P>The context of the containing activity of the accept event action must be an active class. &lt;/P>&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_active_context-_ownedComment.1" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction Syntax-Actions-CompleteActions-AcceptEventAction-fUML_active_context">
+ <body>An accept event action may not be contained directly or indirectly in the test part of a clause or loop node.</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_active_context-_specification">
+ <language>OCL</language>
+ <body>self.context.oclAsType(Class).isActive</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_only_signal_event_triggers" name="fUML_only_signal_event_triggers" constrainedElement="Syntax-Actions-CompleteActions-AcceptEventAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_only_signal_event_triggers-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_only_signal_event_triggers">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>All triggers must be for signal events.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_only_signal_event_triggers-_specification">
+ <language>OCL</language>
+ <body>self.trigger.event->forAll(oclIsKindOf(SignalEvent))</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_receive_all_triggering_signals" name="fUML_receive_all_triggering_signals" constrainedElement="Syntax-Actions-CompleteActions-AcceptEventAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_receive_all_triggering_signals-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_receive_all_triggering_signals">
+ <body>&lt;HTML>&lt;HEAD>&#xD;
+&lt;META content=&quot;MSHTML 6.00.6000.16705&quot; name=GENERATOR>&lt;/HEAD>&#xD;
+&lt;BODY>The context class must have receptions for all triggering signals.&lt;/BODY>&lt;/HTML></body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_receive_all_triggering_signals-_specification">
+ <language>OCL</language>
+ <body>let cls:Class = self.context.oclAsType(Class) in
+let classes:Bag(Class) = cls.allParents()->select(oclIsKindOf(Class))->collect(oclAsType(Class))->union(cls->asBag()) in
+classes.ownedReception.signal->includesAll(self.trigger.event->collect(oclAsType(SignalEvent)).signal)</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_no_accept_event_action_in_tests" name="fUML_no_accept_event_action_in_tests" constrainedElement="Syntax-Actions-CompleteActions-AcceptEventAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_no_accept_event_action_in_tests-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_no_accept_event_action_in_tests">
+ <body>An accept event action may not be contained directly or indirectly in the test part of a clause or loop node.</body>
+ </ownedComment>
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-fUML_no_accept_event_action_in_tests-_specification">
+ <language>OCL</language>
+ <body>self->closure(inStructuredNode.oclAsType(ActivityNode))->forAll(n |
+ let s : StructuredActivityNode = n.inStructuredNode in
+ s->notEmpty() implies
+ (s.oclIsTypeOf(ConditionalNode) implies s.oclAsType(ConditionalNode).clause.test->excludes(n.oclAsType(ExecutableNode)) and
+ s.oclIsTypeOf(LoopNode) implies s.oclAsType(LoopNode).test->excludes(n.oclAsType(ExecutableNode))))</body>
+ </specification>
+ </ownedRule>
+ <generalization xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-_generalization.0" general="Syntax-Actions-BasicActions-Action"/>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-isUnmarshall" name="isUnmarshall" visibility="public">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-isUnmarshall-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction-isUnmarshall">
+ <body>Indicates whether there is a single output pin for the event, or multiple output pins for attributes of the event.</body>
+ </ownedComment>
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-isUnmarshall-_defaultValue">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-result" name="result" visibility="public" type="Syntax-Actions-BasicActions-OutputPin" subsettedProperty="Syntax-Actions-BasicActions-Action-output" association="Syntax-Actions-CompleteActions-A_result_acceptEventAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-result-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction-result">
+ <body>Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved.</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-result-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-result-_upperValue" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-trigger" name="trigger" visibility="public" type="Syntax-CommonBehaviors-Communications-Trigger" aggregation="composite" subsettedProperty="Syntax-Classes-Kernel-Element-ownedElement" association="Syntax-Actions-CompleteActions-A_trigger_acceptEventAction">
+ <ownedComment xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-trigger-_ownedComment.0" annotatedElement="Syntax-Actions-CompleteActions-AcceptEventAction-trigger">
+ <body>The type of events accepted by the action, as specified by triggers. For triggers with signal events, a signal of the specified type or any subtype of the specified signal type is accepted.</body>
+ </ownedComment>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-AcceptEventAction-trigger-_upperValue" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_result_acceptEventAction" name="A_result_acceptEventAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_result_acceptEventAction-acceptEventAction Syntax-Actions-CompleteActions-AcceptEventAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_result_acceptEventAction-acceptEventAction" name="acceptEventAction" visibility="public" type="Syntax-Actions-CompleteActions-AcceptEventAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-CompleteActions-A_result_acceptEventAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_result_acceptEventAction-acceptEventAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_trigger_acceptEventAction" name="A_trigger_acceptEventAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_trigger_acceptEventAction-acceptEventAction Syntax-Actions-CompleteActions-AcceptEventAction-trigger">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_trigger_acceptEventAction-acceptEventAction" name="acceptEventAction" visibility="public" type="Syntax-Actions-CompleteActions-AcceptEventAction" subsettedProperty="Syntax-Classes-Kernel-Element-owner" association="Syntax-Actions-CompleteActions-A_trigger_acceptEventAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_trigger_acceptEventAction-acceptEventAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_reclassifyObjectAction_object" name="A_reclassifyObjectAction_object" visibility="private" memberEnd="Syntax-Actions-CompleteActions-ReclassifyObjectAction-object Syntax-Actions-CompleteActions-A_reclassifyObjectAction_object-reclassifyObjectAction">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_reclassifyObjectAction_object-reclassifyObjectAction" name="reclassifyObjectAction" visibility="public" type="Syntax-Actions-CompleteActions-ReclassifyObjectAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-CompleteActions-A_reclassifyObjectAction_object">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_reclassifyObjectAction_object-reclassifyObjectAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_oldClassifier_reclassifyObjectAction" name="A_oldClassifier_reclassifyObjectAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_oldClassifier_reclassifyObjectAction-reclassifyObjectAction Syntax-Actions-CompleteActions-ReclassifyObjectAction-oldClassifier">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_oldClassifier_reclassifyObjectAction-reclassifyObjectAction" name="reclassifyObjectAction" visibility="public" type="Syntax-Actions-CompleteActions-ReclassifyObjectAction" association="Syntax-Actions-CompleteActions-A_oldClassifier_reclassifyObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_oldClassifier_reclassifyObjectAction-reclassifyObjectAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-A_oldClassifier_reclassifyObjectAction-reclassifyObjectAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_object_readIsClassifiedObjectAction" name="A_object_readIsClassifiedObjectAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_object_readIsClassifiedObjectAction-readIsClassifiedObjectAction Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-object">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_object_readIsClassifiedObjectAction-readIsClassifiedObjectAction" name="readIsClassifiedObjectAction" visibility="public" type="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-CompleteActions-A_object_readIsClassifiedObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_object_readIsClassifiedObjectAction-readIsClassifiedObjectAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_result_readIsClassifiedObjectAction" name="A_result_readIsClassifiedObjectAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_result_readIsClassifiedObjectAction-readIsClassifiedObjectAction Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_result_readIsClassifiedObjectAction-readIsClassifiedObjectAction" name="readIsClassifiedObjectAction" visibility="public" type="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-CompleteActions-A_result_readIsClassifiedObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_result_readIsClassifiedObjectAction-readIsClassifiedObjectAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_classifier_readIsClassifiedObjectAction" name="A_classifier_readIsClassifiedObjectAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_classifier_readIsClassifiedObjectAction-readIsClassifiedObjectAction Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction-classifier">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_classifier_readIsClassifiedObjectAction-readIsClassifiedObjectAction" name="readIsClassifiedObjectAction" visibility="public" type="Syntax-Actions-CompleteActions-ReadIsClassifiedObjectAction" association="Syntax-Actions-CompleteActions-A_classifier_readIsClassifiedObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_classifier_readIsClassifiedObjectAction-readIsClassifiedObjectAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-A_classifier_readIsClassifiedObjectAction-readIsClassifiedObjectAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_classifier_readExtentAction" name="A_classifier_readExtentAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_classifier_readExtentAction-readExtentAction Syntax-Actions-CompleteActions-ReadExtentAction-classifier">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_classifier_readExtentAction-readExtentAction" name="readExtentAction" visibility="public" type="Syntax-Actions-CompleteActions-ReadExtentAction" association="Syntax-Actions-CompleteActions-A_classifier_readExtentAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_classifier_readExtentAction-readExtentAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_result_readExtentAction" name="A_result_readExtentAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_result_readExtentAction-readExtentAction Syntax-Actions-CompleteActions-ReadExtentAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_result_readExtentAction-readExtentAction" name="readExtentAction" visibility="public" type="Syntax-Actions-CompleteActions-ReadExtentAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_output-action" association="Syntax-Actions-CompleteActions-A_result_readExtentAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_result_readExtentAction-readExtentAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_result_reduceAction" name="A_result_reduceAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_result_reduceAction-reduceAction Syntax-Actions-CompleteActions-ReduceAction-result">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_result_reduceAction-reduceAction" name="reduceAction" visibility="public" type="Syntax-Actions-CompleteActions-ReduceAction" association="Syntax-Actions-CompleteActions-A_result_reduceAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_result_reduceAction-reduceAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_collection_reduceAction" name="A_collection_reduceAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_collection_reduceAction-reduceAction Syntax-Actions-CompleteActions-ReduceAction-collection">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_collection_reduceAction-reduceAction" name="reduceAction" visibility="public" type="Syntax-Actions-CompleteActions-ReduceAction" association="Syntax-Actions-CompleteActions-A_collection_reduceAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_collection_reduceAction-reduceAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_reducer_reduceAction" name="A_reducer_reduceAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_reducer_reduceAction-reduceAction Syntax-Actions-CompleteActions-ReduceAction-reducer">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_reducer_reduceAction-reduceAction" name="reduceAction" visibility="public" type="Syntax-Actions-CompleteActions-ReduceAction" association="Syntax-Actions-CompleteActions-A_reducer_reduceAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_reducer_reduceAction-reduceAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-A_reducer_reduceAction-reduceAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_object_startObjectBehaviorAction" name="A_object_startObjectBehaviorAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_object_startObjectBehaviorAction-startObjectBehaviorAction Syntax-Actions-CompleteActions-StartObjectBehaviorAction-object">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_object_startObjectBehaviorAction-startObjectBehaviorAction" name="startObjectBehaviorAction" visibility="public" type="Syntax-Actions-CompleteActions-StartObjectBehaviorAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-CompleteActions-A_object_startObjectBehaviorAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_object_startObjectBehaviorAction-startObjectBehaviorAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_object_startClassifierBehaviorAction" name="A_object_startClassifierBehaviorAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_object_startClassifierBehaviorAction-startClassifierBehaviorAction Syntax-Actions-CompleteActions-StartClassifierBehaviorAction-object">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_object_startClassifierBehaviorAction-startClassifierBehaviorAction" name="startClassifierBehaviorAction" visibility="public" type="Syntax-Actions-CompleteActions-StartClassifierBehaviorAction" subsettedProperty="Syntax-Actions-BasicActions-A_action_input-action" association="Syntax-Actions-CompleteActions-A_object_startClassifierBehaviorAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_object_startClassifierBehaviorAction-startClassifierBehaviorAction-_lowerValue"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="Syntax-Actions-CompleteActions-A_newClassifier_reclassifyObjectAction" name="A_newClassifier_reclassifyObjectAction" visibility="private" memberEnd="Syntax-Actions-CompleteActions-A_newClassifier_reclassifyObjectAction-reclassifyObjectAction Syntax-Actions-CompleteActions-ReclassifyObjectAction-newClassifier">
+ <ownedEnd xmi:id="Syntax-Actions-CompleteActions-A_newClassifier_reclassifyObjectAction-reclassifyObjectAction" name="reclassifyObjectAction" visibility="public" type="Syntax-Actions-CompleteActions-ReclassifyObjectAction" association="Syntax-Actions-CompleteActions-A_newClassifier_reclassifyObjectAction">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="Syntax-Actions-CompleteActions-A_newClassifier_reclassifyObjectAction-reclassifyObjectAction-_lowerValue"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Syntax-Actions-CompleteActions-A_newClassifier_reclassifyObjectAction-reclassifyObjectAction-_upperValue" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-L1" name="L1">
+ <packageMerge xmi:id="Syntax-L1-_packageMerge.0" mergedPackage="Syntax-Classes-Kernel"/>
+ <packageMerge xmi:id="Syntax-L1-_packageMerge.1" mergedPackage="Syntax-CommonBehaviors-BasicBehaviors"/>
+ <packageMerge xmi:id="Syntax-L1-_packageMerge.2" mergedPackage="Syntax-CommonBehaviors-Communications"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-L2" name="L2">
+ <packageMerge xmi:id="Syntax-L2-_packageMerge.0" mergedPackage="Syntax-L1"/>
+ <packageMerge xmi:id="Syntax-L2-_packageMerge.1" mergedPackage="Syntax-Actions-IntermediateActions"/>
+ <packageMerge xmi:id="Syntax-L2-_packageMerge.2" mergedPackage="Syntax-Activities-IntermediateActivities"/>
+ <packageMerge xmi:id="Syntax-L2-_packageMerge.3" mergedPackage="Syntax-Actions-BasicActions"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="Syntax-L3" name="L3">
+ <packageMerge xmi:id="Syntax-L3-_packageMerge.0" mergedPackage="Syntax-L2"/>
+ <packageMerge xmi:id="Syntax-L3-_packageMerge.1" mergedPackage="Syntax-Activities-CompleteStructuredActivities"/>
+ <packageMerge xmi:id="Syntax-L3-_packageMerge.2" mergedPackage="Syntax-Activities-ExtraStructuredActivities"/>
+ <packageMerge xmi:id="Syntax-L3-_packageMerge.3" mergedPackage="Syntax-Actions-CompleteActions"/>
+ </packagedElement>
+ </packagedElement>
+</uml:Model>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.pdoc b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.pdoc
new file mode 100644
index 00000000000..efb8e0a040c
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="A straightforward implementation of fUML 1.1 Execution Model.&#xD;&#xA;Contributes to &quot;Moka execution engine&quot; extension point.">
+ <referent firstName="Arnaud" lastName="Cuccuru" eMail="arnaud.cuccuru@cea.fr" currentCompany="CEA LIST"/>
+</doc:Documentation>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.xml b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.xml
new file mode 100644
index 00000000000..d75db090b7b
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.papyrus.moka.fuml.library" name="%extension-point.name" schema="schema/org.eclipse.papyrus.moka.fuml.library.exsd"/>
+ <extension-point id="org.eclipse.papyrus.moka.fuml.services" name="SystemServices" schema="schema/org.eclipse.papyrus.moka.fuml.services.exsd"/>
+ <extension
+ point="org.eclipse.papyrus.moka.engine">
+ <engine
+ class="org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine">
+ </engine>
+ </extension>
+
+</plugin>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.library.exsd b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.library.exsd
new file mode 100644
index 00000000000..23fad24da80
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.library.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.moka.fuml" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.moka.fuml" id="org.eclipse.papyrus.moka.fuml.library" name="OpaqueBehaviorExecutionLibrary"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="library"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="library">
+ <complexType>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.moka.fuml.registry.IOpaqueBehaviorExecutionRegistry"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.services.exsd b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.services.exsd
new file mode 100644
index 00000000000..edbd782d20c
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/schema/org.eclipse.papyrus.moka.fuml.services.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.moka.fuml" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.moka.fuml" id="org.eclipse.papyrus.moka.fuml.services" name="SystemServices"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="services"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="services">
+ <complexType>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.moka.fuml.registry.ISystemServicesRegistry"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/Activator.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/Activator.java
new file mode 100644
index 00000000000..59a2d4dcdf9
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/Activator.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.fuml"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/FUMLExecutionEngine.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/FUMLExecutionEngine.java
new file mode 100644
index 00000000000..75e044022c7
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/FUMLExecutionEngine.java
@@ -0,0 +1,420 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.model.IThread;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.moka.communication.request.isuspendresume.Resume_Request;
+import org.eclipse.papyrus.moka.communication.request.isuspendresume.Suspend_Request;
+import org.eclipse.papyrus.moka.communication.request.iterminate.Terminate_Request;
+import org.eclipse.papyrus.moka.debug.MokaBreakpoint;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.debug.MokaThread;
+import org.eclipse.papyrus.moka.engine.AbstractExecutionEngine;
+import org.eclipse.papyrus.moka.engine.IExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.IntegerValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.StringValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.UnlimitedNaturalValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Executor;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL3.ExecutionFactoryL3;
+import org.eclipse.papyrus.moka.fuml.debug.ControlDelegate;
+import org.eclipse.papyrus.moka.fuml.registry.DefaultSemanticStrategyRegistry;
+import org.eclipse.papyrus.moka.fuml.registry.IOpaqueBehaviorExecutionRegistry;
+import org.eclipse.papyrus.moka.fuml.registry.ISystemServicesRegistry;
+import org.eclipse.papyrus.moka.launch.EditorUtils;
+import org.eclipse.papyrus.moka.ui.presentation.AnimationUtils;
+import org.eclipse.papyrus.uml.extensionpoints.library.RegisteredLibrary;
+import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.Type;
+
+public class FUMLExecutionEngine extends AbstractExecutionEngine implements IExecutionEngine {
+
+ protected final static String LIBRAY_EXTENSION_POINT_ID = "org.eclipse.papyrus.moka.fuml.library";
+ protected final static String SERVICES_EXTENSION_POINT_ID = "org.eclipse.papyrus.moka.fuml.services" ;
+
+ protected static Behavior main = null;
+
+ protected String[] args ;
+
+ protected List<ParameterValue> arguments ;
+
+ protected Locus locus ;
+
+ public static ControlDelegate controlDelegate ;
+
+ protected boolean started = false ;
+
+ protected static ServicesRegistry servicesRegistry ;
+
+ protected static ILabelProvider labelProvider ;
+
+ public static Image getImage(Object element) {
+ try {
+ if (element instanceof EObject && ((EObject)element).eIsProxy()) {
+ labelProvider = null ;
+ servicesRegistry = null ;
+ }
+ if (labelProvider == null) {
+ if (servicesRegistry == null) {
+ if (main.eIsProxy()) {
+ IEditorPart part = EditorUtils.getEditorPart(main) ;
+ ServicesRegistry servicesRegistry = (ServicesRegistry)part.getAdapter(ServicesRegistry.class);
+ ResourceSet resourceSet = null ;
+ try {
+ resourceSet = servicesRegistry.getService(ModelSet.class) ;
+ } catch (ServiceException e1) {
+ resourceSet = new ResourceSetImpl() ;
+ e1.printStackTrace();
+ }
+ main = (Behavior) EcoreUtil.resolve(main, resourceSet) ;
+ }
+ else {
+ servicesRegistry = ServiceUtilsForResource.getInstance().getServiceRegistry(main.eResource());
+ }
+ }
+ LabelProviderService labelProviderService = servicesRegistry.getService(LabelProviderService.class);
+ labelProvider = labelProviderService.getLabelProvider() ;
+ labelProvider.getImage(element) ;
+ }
+ return labelProvider.getImage(element) ;
+ }
+ catch (Exception e) {
+ Activator.log.error(e) ;
+ return null ;
+ }
+ }
+
+ @Override
+ public void initRun(EObject eObjectToExecute, String[] args) {
+ super.initRun(eObjectToExecute, args);
+ AnimationUtils.init() ;
+ servicesRegistry = null ;
+ labelProvider = null ;
+ if (eObjectToExecute instanceof Behavior) {
+ main = (Behavior)eObjectToExecute ;
+ }
+ if (this.mode.equals(ILaunchManager.DEBUG_MODE)) {
+ this.debugTarget.setName("fUML Execution Engine") ;
+ }
+ }
+
+ @Override
+ public void start() throws IOException {
+ controlDelegate = new ControlDelegate() ;
+ super.start();
+ }
+
+ // Starts the execution of the given behavior
+ protected void start(Behavior behavior) {
+ if(behavior != null) {
+ main = behavior;
+ // creates the locus, executor and execution factory
+ this.locus = new Locus();
+ this.locus.engine = this ;
+ this.locus.setExecutor(new Executor());
+ this.locus.setFactory(new ExecutionFactoryL3());
+ // initializes built-in primitive types
+ this.initializeBuiltInPrimitiveTypes(locus);
+ // Initializes opaque behavior executions
+ this.registerOpaqueBehaviorExecutions(locus);
+ // Initializes system services
+ this.registerSystemServices(locus) ;
+ // Initializes semantic strategies
+ this.registerSemanticStrategies(locus);
+ // Initializes arguments
+ this.initializeArguments(this.args) ;
+ // sets the execution mode for the locus
+ locus.initDebugInformation(this.mode, this) ;
+ // Finally launches the execution
+ this.locus.executor.execute(main, null,this.arguments);
+ //
+ this.isTerminated = true ;
+ }
+ }
+
+ // Register semantic strategies available in the environment
+ protected void registerSemanticStrategies(Locus locus) {
+ // TODO Introduce an extension point
+ new DefaultSemanticStrategyRegistry().registerSemanticStrategies(locus);
+ }
+
+ // Register OpaqueBehaviorExecutions available in the environment
+ protected void registerOpaqueBehaviorExecutions(Locus locus) {
+ // Load any OpaqueBehaviorExecution library contributing to the extension LIBRAY_EXTENSION_POINT_ID
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement[] config = registry.getConfigurationElementsFor(LIBRAY_EXTENSION_POINT_ID);
+ try {
+ for(int i = 0; i < config.length; i++) {
+ IConfigurationElement e = config[i];
+ final Object o = e.createExecutableExtension("class");
+ loadLibrary(o, locus, main);
+ }
+ } catch (CoreException ex) {
+ System.out.println(ex.getMessage());
+ } catch (Exception ex) {
+ System.out.println(ex.getMessage());
+ }
+ }
+
+ // Register System Services available in the environment
+ protected void registerSystemServices(Locus locus) {
+ // Load any contribution to the extension SERVICES_EXTENSION_POINT_ID
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement[] config = registry.getConfigurationElementsFor(SERVICES_EXTENSION_POINT_ID);
+ try {
+ for(int i = 0; i < config.length; i++) {
+ IConfigurationElement e = config[i];
+ final Object o = e.createExecutableExtension("class");
+ loadServices(o, locus, main);
+ }
+ } catch (CoreException ex) {
+ System.out.println(ex.getMessage());
+ } catch (Exception ex) {
+ System.out.println(ex.getMessage());
+ }
+ }
+
+ // Initializes primitive types of the locus with content of UMLPrimitiveTypes
+ protected void initializeBuiltInPrimitiveTypes(Locus locus) {
+ RegisteredLibrary[] libraries = RegisteredLibrary.getRegisteredLibraries();
+ RegisteredLibrary umlPrimitiveTypes = null;
+ for(RegisteredLibrary l : libraries) {
+ if(l.getName().equals("UMLPrimitiveTypes"))
+ umlPrimitiveTypes = l;
+ }
+ if(umlPrimitiveTypes != null) {
+ URI libraryUri = umlPrimitiveTypes.uri;
+ ResourceSet resourceSet = Util.getResourceSet(main);
+ Resource libraryResource = resourceSet.getResource(libraryUri, true);
+ Package libraryObject = (Package)libraryResource.getContents().get(0);
+ for(Element e : libraryObject.getOwnedElements()) {
+ if(e instanceof PrimitiveType)
+ locus.factory.builtInTypes.add((PrimitiveType)e);
+ }
+ }
+ }
+
+ // Loads a library of OpaqueBehaviorExecutions using the safe runner pattern
+ protected static void loadLibrary(final Object o, final Locus locus, final Object context) {
+ ISafeRunnable runnable = new ISafeRunnable() {
+
+ public void handleException(Throwable e) {
+ System.out.println("Exception while loading the library");
+ }
+
+ public void run() throws Exception {
+ ((IOpaqueBehaviorExecutionRegistry)o).init(context).registerOpaqueBehaviorExecutions(locus);
+ }
+ };
+ SafeRunner.run(runnable);
+ }
+
+ // Loads System services using the safe runner pattern
+ protected static void loadServices(final Object o, final Locus locus, final Object context) {
+ ISafeRunnable runnable = new ISafeRunnable() {
+
+ public void handleException(Throwable e) {
+ System.out.println("Exception while loading system services");
+ }
+
+ public void run() throws Exception {
+ ((ISystemServicesRegistry)o).init(context).registerSystemServices(locus);
+ }
+ };
+ SafeRunner.run(runnable);
+ }
+
+
+ public boolean isDebugModeSupported() {
+ return true;
+ }
+
+ public MokaThread[] getThreads() {
+ if (this.locus == null)
+ return new MokaThread[]{} ;
+ // if (this.locus.mainThread == null) {
+ // this.locus.initDebugInformation(this.mode, this) ;
+ // }
+ return new MokaThread[]{this.locus.mainThread} ;
+ }
+
+ @Override
+ public void initializeArguments(String[] args) {
+ if (this.locus == null) {
+ this.args = args ;
+ return ;
+ }
+
+ this.arguments = new ArrayList<ParameterValue>() ;
+ if (this.args == null)
+ return ;
+
+ List<Value> tmpArgs = new ArrayList<Value>() ;
+
+ // analyzes arguments versus parameters of the main behavior
+ List<Parameter> parameters = main.getOwnedParameters() ;
+ if (parameters == null)
+ return ;
+ List<Parameter> parametersWhichNeedArguments = new ArrayList<Parameter>() ;
+ // There must be the same number of parameters (except the return parameter)
+ for (Parameter p : parameters) {
+ if (p.getDirection() != ParameterDirectionKind.RETURN_LITERAL)
+ parametersWhichNeedArguments.add(p) ;
+ }
+ if (parametersWhichNeedArguments.size() != this.args.length)
+ return ;
+
+ // iterates of parameters, and tries to create tokens corresponding to arguments
+ int i = 0 ;
+ for (Parameter p : parametersWhichNeedArguments) {
+ Type t = p.getType() ;
+ if (t != null) {
+ PrimitiveType pt = this.locus.factory.getBuiltInType(t.getName()) ;
+ if (pt == null)
+ return ;
+ if (pt.getName().equals("Integer")) {
+ IntegerValue value = new IntegerValue() ;
+ value.value = new Integer(this.args[i]) ;
+ tmpArgs.add(value) ;
+ }
+ else if (pt.getName().equals("String")) {
+ StringValue value = new StringValue() ;
+ value.value = this.args[i] ;
+ tmpArgs.add(value) ;
+ }
+ else if (pt.getName().equals("Boolean")) {
+ BooleanValue value = new BooleanValue() ;
+ value.value = new Boolean(this.args[i]) ;
+ tmpArgs.add(value) ;
+ }
+ else if (pt.getName().equals("UnlimitedNatural")) {
+ UnlimitedNaturalValue value = new UnlimitedNaturalValue() ;
+ value.value = new Integer(args[i]) ;
+ tmpArgs.add(value) ;
+ }
+ else {
+ return ; // Unsupported type. TODO Consider Real
+ }
+ }
+ i++ ;
+ }
+
+ i = 0 ;
+ // creates actual arguments
+ for (Value v : tmpArgs) {
+ ParameterValue arg = new ParameterValue() ;
+ arg.parameter = parameters.get(i) ;
+ arg.values = new ArrayList<Value>() ;
+ arg.values.add(v) ;
+ this.arguments.add(arg) ;
+ i++ ;
+ }
+ }
+
+ @Override
+ public void addBreakpoint(MokaBreakpoint breakpoint) {
+ controlDelegate.addBreakpoint(breakpoint) ;
+ }
+
+ @Override
+ public void removeBreakpoint(MokaBreakpoint breakpoint) {
+ controlDelegate.removeBreakpoint(breakpoint) ;
+ }
+
+ @Override
+ public void disconnect() {
+ // Does nothing
+ }
+
+ @Override
+ public void resume(Resume_Request request) {
+ if (!this.started) {
+ this.started = true ;
+ Runnable execution = new Runnable() {
+ public void run() {
+ if (main != null) {
+ start(main) ;
+ }
+ }
+ };
+ Thread mainThread = new Thread(execution) ;
+ mainThread.start() ;
+ }
+ else {
+ locus.mainThread.setStackFrames(new IStackFrame[]{}) ;
+ controlDelegate.resume(request) ;
+ }
+ }
+
+ @Override
+ public void resume() {
+ if (main != null)
+ this.start(main);
+ }
+
+ @Override
+ public void suspend(Suspend_Request request) {
+ controlDelegate.handleSuspendRequest() ;
+ }
+
+ @Override
+ public void terminate(Terminate_Request request) {
+ this.isTerminated = true ;
+ controlDelegate.handleTerminateRequest() ;
+ }
+
+ @Override
+ public IStackFrame[] getStackFrames(IThread thread) {
+ if (this.locus.stackFrames == null)
+ this.locus.stackFrames = new MokaStackFrame[]{} ;
+ return this.locus.stackFrames ;
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java
new file mode 100644
index 00000000000..f51c3f0734f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java
@@ -0,0 +1,105 @@
+package org.eclipse.papyrus.moka.fuml.debug;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.moka.communication.request.isuspendresume.Resume_Request;
+import org.eclipse.papyrus.moka.debug.MokaBreakpoint;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+
+public class ControlDelegate {
+
+ protected boolean suspendRequestedByCLient = false ;
+
+ protected ActivityExecution lastSuspendedActivityExecution ;
+
+ public synchronized void suspend(ActivityExecution execution) throws InterruptedException {
+ this.lastSuspendedActivityExecution = execution ;
+ wait();
+ }
+
+ protected int reasonForResume ;
+
+ public synchronized void resume(Resume_Request request) {
+ this.suspendRequestedByCLient = false ;
+ this.reasonForResume = request.getResumeDetail() ;
+ notify() ;
+ }
+
+ public int shallSuspend(ActivityExecution execution, Object activityNodeActiviationOrActivityEdgeInstance) {
+ // first checks if a suspend request has been emitted from client
+ if (this.suspendRequestedByCLient)
+ return DebugEvent.CLIENT_REQUEST ;
+ // then check if a breakpoint applies
+ if (DebugPlugin.getDefault().getBreakpointManager().isEnabled()) {
+ if (activityNodeActiviationOrActivityEdgeInstance instanceof ActivityNodeActivation) {
+ ActivityNodeActivation nodeActivation = (ActivityNodeActivation)activityNodeActiviationOrActivityEdgeInstance ;
+ if (nodeActivation.node != null) {
+ //String uri = EcoreUtil.getURI(nodeActivation.node).toString() ;
+ if (this.urisOfObjectWithBreakpoints.contains(EcoreUtil.getURI(nodeActivation.node).toString()))
+ return DebugEvent.BREAKPOINT ;
+ }
+ }
+ if (activityNodeActiviationOrActivityEdgeInstance instanceof ActivityEdgeInstance) {
+ ActivityEdgeInstance edgeInstance = (ActivityEdgeInstance)activityNodeActiviationOrActivityEdgeInstance ;
+ if (edgeInstance.edge != null)
+ if (this.urisOfObjectWithBreakpoints.contains(EcoreUtil.getURI(edgeInstance.edge).toString()))
+ return DebugEvent.BREAKPOINT ;
+ }
+ }
+ int shallSuspend = -1 ;
+ switch (this.reasonForResume) {
+ case DebugEvent.CLIENT_REQUEST :
+ shallSuspend = -1 ;
+ break;
+ case DebugEvent.STEP_INTO :
+ shallSuspend = DebugEvent.STEP_END ;
+ break;
+ case DebugEvent.STEP_OVER :
+ if (! (StackFrameManager.getInstance().contains(execution) && StackFrameManager.getInstance().contains(lastSuspendedActivityExecution)))
+ shallSuspend = DebugEvent.STEP_END ;
+ else
+ shallSuspend = (execution == lastSuspendedActivityExecution) ? DebugEvent.STEP_END : -1;
+ break;
+ case DebugEvent.STEP_RETURN :
+ shallSuspend = StackFrameManager.getInstance().isBefore(execution, lastSuspendedActivityExecution) ? DebugEvent.STEP_END : -1;
+ break;
+ default:
+ break;
+ }
+ return shallSuspend ;
+ }
+
+ public void handleSuspendRequest() {
+ this.suspendRequestedByCLient = true ;
+ }
+
+ public synchronized void handleTerminateRequest() {
+ notify() ;
+ }
+
+ protected List<String> urisOfObjectWithBreakpoints = new ArrayList<String>() ;
+
+ public synchronized void addBreakpoint(MokaBreakpoint breakpoint) {
+ //String eObjectURI = EcoreUtil.getURI(breakpoint.getModelElement()).toString() ;
+ String eObjectURI = breakpoint.getMarker().getAttribute(EValidator.URI_ATTRIBUTE, (String)null) ;
+ if (eObjectURI != null) {
+ if (! urisOfObjectWithBreakpoints.contains(eObjectURI))
+ urisOfObjectWithBreakpoints.add(eObjectURI) ;
+ }
+ }
+
+ public synchronized void removeBreakpoint(MokaBreakpoint breakpoint) {
+ //String eObjectURI = EcoreUtil.getURI(breakpoint.getModelElement()).toString() ;
+ String eObjectURI = breakpoint.getMarker().getAttribute(EValidator.URI_ATTRIBUTE, (String)null) ;
+ if (eObjectURI != null) {
+ urisOfObjectWithBreakpoints.remove(eObjectURI) ;
+ }
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/Debug.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/Debug.java
new file mode 100644
index 00000000000..2473430b0d5
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/Debug.java
@@ -0,0 +1,23 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.debug;
+
+public class Debug {
+
+ public static void println(String message) {
+ //System.err.println(message) ;
+ //FIXME Bug 404555: [Moka] Pollution of the console with debug messages
+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=404555
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FumlThread.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FumlThread.java
new file mode 100644
index 00000000000..59a3010c294
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FumlThread.java
@@ -0,0 +1,45 @@
+package org.eclipse.papyrus.moka.fuml.debug;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.moka.debug.MokaDebugTarget;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.debug.MokaThread;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.CallBehaviorAction;
+import org.eclipse.uml2.uml.CallOperationAction;
+
+public class FumlThread extends MokaThread {
+
+ public FumlThread(MokaDebugTarget debugTarget) {
+ super(debugTarget);
+ }
+
+ @Override
+ public boolean canStepInto() {
+ boolean canStepInto = super.canStepInto() ;
+ if (canStepInto) {
+ try {
+ MokaStackFrame topStackFrame = (MokaStackFrame)this.getTopStackFrame() ;
+ EObject modelElement = topStackFrame.getModelElement() ;
+ if (modelElement instanceof CallOperationAction) {
+ CallOperationAction action = (CallOperationAction)modelElement ;
+ canStepInto = action.getOperation().getMethods().get(0) instanceof Activity ;
+ }
+ else if (modelElement instanceof CallBehaviorAction) {
+ CallBehaviorAction action = (CallBehaviorAction)modelElement ;
+ canStepInto = action.getBehavior() instanceof Activity ;
+ }
+ else {
+ canStepInto = false ;
+ }
+ } catch (DebugException e) {
+ canStepInto = false ;
+ } catch (NullPointerException e) {
+ canStepInto = false ;
+ }
+ }
+ return canStepInto ;
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/StackFrameManager.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/StackFrameManager.java
new file mode 100644
index 00000000000..fd5c37ffe77
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/StackFrameManager.java
@@ -0,0 +1,69 @@
+package org.eclipse.papyrus.moka.fuml.debug;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityExecution;
+
+public class StackFrameManager {
+
+ protected static StackFrameManager eInstance ;
+
+ protected List<ActivityExecution> activityExecutions = new ArrayList<ActivityExecution>() ;
+ protected Map<ActivityExecution, MokaStackFrame> activityExecutionsToStackFrame = new HashMap<ActivityExecution, MokaStackFrame>() ;
+
+ private StackFrameManager() {
+
+ }
+
+ public static StackFrameManager getInstance() {
+ if (eInstance == null)
+ eInstance = new StackFrameManager() ;
+ return eInstance ;
+ }
+
+ public void pushActivityExecution(ActivityExecution execution) {
+ this.activityExecutions.add(execution) ;
+ this.activityExecutionsToStackFrame.put(execution, null) ;
+ }
+
+ public ActivityExecution popActivityExecution() {
+ ActivityExecution removed = this.activityExecutions.remove(activityExecutions.size() - 1) ;
+ this.activityExecutionsToStackFrame.remove(removed) ;
+ return removed ;
+ }
+
+ public void setStackFrame(ActivityExecution execution, MokaStackFrame stackFrame) {
+ this.activityExecutionsToStackFrame.put(execution, stackFrame) ;
+ }
+
+ public ActivityExecution getTopActivityExecution() {
+ return activityExecutions.get(activityExecutions.size() - 1) ;
+ }
+
+ public boolean isBefore(ActivityExecution execution1, ActivityExecution execution2) {
+ int indexOfExecution2 = activityExecutions.indexOf(execution2) ;
+ if (indexOfExecution2 < 0) // execution2 has already been removed from the list of executions, so execution1 was necessarily before
+ return true ;
+ int indexOfExecution1 = activityExecutions.indexOf(execution1) ;
+ return indexOfExecution1 < indexOfExecution2 ;
+ }
+
+ public boolean contains(ActivityExecution execution) {
+ return this.activityExecutions.contains(execution) ;
+ }
+
+ public MokaStackFrame[] getStackFrames() {
+ MokaStackFrame[] stackFrames = new MokaStackFrame[this.activityExecutions.size()] ;
+ int j = 0 ;
+ for (int i = activityExecutions.size() - 1 ; i >=0 ; i--) {
+ MokaStackFrame stackFrameElement = this.activityExecutionsToStackFrame.get(activityExecutions.get(i)) ;
+ stackFrames[j] = stackFrameElement ;
+ j++ ;
+ }
+ return stackFrames ;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/FUMLPresentationUtils.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/FUMLPresentationUtils.java
new file mode 100644
index 00000000000..f45e19fb112
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/FUMLPresentationUtils.java
@@ -0,0 +1,53 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.uml2.uml.StructuralFeature;
+
+public class FUMLPresentationUtils {
+
+ public static MokaStackFrame getMokaStackFrame(ActivityNodeActivation activityNodeActivation) {
+ return new MokaStackFrame_from_ActivityNodeActivation(activityNodeActivation) ;
+ }
+
+ public static MokaStackFrame getMokaStackFrame(ActivityEdgeInstance activityEdgeInstance) {
+ return new MokaStackFrame_from_ActivityEdgeInstance(activityEdgeInstance) ;
+ }
+
+ public static String getValueString(Value value) {
+ if (value == null)
+ return "null" ;
+ if (value instanceof Object_ || value instanceof Reference) {
+ String className = value.getClass().getSimpleName() ;
+ String id = "" + value.hashCode() ;
+ return className + " (id=" + id + ")" ;
+ }
+ return value.toString() ;
+ }
+
+ public static String getValueString(FeatureValue featureValue) {
+ StructuralFeature f = featureValue.feature ;
+ String valueString = "" ;
+ if (isCollection(featureValue)) {
+ valueString += f.getType() != null ? f.getType().getName() : "any" ;
+ valueString += "[] (size=" + featureValue.values.size();
+ valueString += (")") ;
+ }
+ else {
+ Value value = featureValue.values.size() == 1 ? featureValue.values.get(0) : null ;
+ return getValueString(value) ;
+ }
+ return valueString ;
+ }
+
+ public static boolean isCollection(FeatureValue featureValue) {
+ return featureValue.feature.getUpper() == -1 ||
+ featureValue.feature.getUpper() > 1 ||
+ featureValue.values.size() > 1 ;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityEdgeInstance.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityEdgeInstance.java
new file mode 100644
index 00000000000..5bf762260cf
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityEdgeInstance.java
@@ -0,0 +1,38 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+
+public class MokaStackFrame_from_ActivityEdgeInstance extends MokaStackFrame_from_UMLModelElement {
+
+ protected ActivityEdgeInstance activityEdgeInstance ;
+
+ public MokaStackFrame_from_ActivityEdgeInstance(ActivityEdgeInstance activityEdgeInstance) {
+ super(activityEdgeInstance.edge);
+ this.activityEdgeInstance = activityEdgeInstance ;
+ }
+
+ ///////////////////////////////
+ // Presentation
+ ///////////////////////////////
+
+ public String getLabel() {
+ String activityName = activityEdgeInstance.edge.getActivity().getName() ;
+ String nodeName = activityEdgeInstance.edge.getName() ;
+ if (nodeName == null || nodeName.length() == 0)
+ nodeName = "Anonymous edge" ;
+ return activityName + "(" + nodeName + ")" ;
+ }
+
+ ///////////////////////////////
+ // Debug
+ ///////////////////////////////
+
+ @Override
+ protected Object_ getContextObject() {
+ return activityEdgeInstance.group.getActivityExecution().context ;
+ }
+
+
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityNodeActivation.java
new file mode 100644
index 00000000000..992e67dd69c
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_ActivityNodeActivation.java
@@ -0,0 +1,35 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Activities.IntermediateActivities.ActivityNodeActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+
+public class MokaStackFrame_from_ActivityNodeActivation extends MokaStackFrame_from_UMLModelElement {
+
+ protected ActivityNodeActivation activityNodeActivation ;
+
+ public MokaStackFrame_from_ActivityNodeActivation(ActivityNodeActivation activityNodeActivation) {
+ super(activityNodeActivation.node);
+ this.activityNodeActivation = activityNodeActivation ;
+ }
+
+ ///////////////////////////////
+ // Presentation
+ ///////////////////////////////
+
+ public String getLabel() {
+ String activityName = activityNodeActivation.getActivityExecution().getBehavior().getName() ;
+ String nodeName = activityNodeActivation.node.getName() ;
+ if (nodeName == null || nodeName.length() == 0)
+ nodeName = "Anonymous node" ;
+ return activityName + "(" + nodeName + ")" ;
+ }
+
+ ///////////////////////////////
+ // Debug
+ ///////////////////////////////
+
+ @Override
+ protected Object_ getContextObject() {
+ return activityNodeActivation.getExecutionContext() ;
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_UMLModelElement.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_UMLModelElement.java
new file mode 100644
index 00000000000..ccb08a734a8
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaStackFrame_from_UMLModelElement.java
@@ -0,0 +1,80 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.debug.MokaStackFrame;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.ui.presentation.IPresentation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class MokaStackFrame_from_UMLModelElement extends MokaStackFrame implements IPresentation {
+
+ public MokaStackFrame_from_UMLModelElement(Element modelElement) {
+ super(Locus.getDebugTarget());
+ this.modelElement = modelElement ;
+ }
+
+ ///////////////////////////////
+ // Presentation
+ ///////////////////////////////
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.ui.presentation.IPresentation#getLabel()
+ */
+ abstract public String getLabel() ;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.ui.presentation.IPresentation#getDetails()
+ */
+ public String getDetails() {
+ // Not used
+ return "";
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.ui.presentation.IPresentation#getImage()
+ */
+ public Image getImage() {
+ return FUMLExecutionEngine.getImage(modelElement) ;
+ }
+
+ ///////////////////////////////
+ // Debug
+ ///////////////////////////////
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.debug.MokaStackFrame#hasVariables()
+ */
+ @Override
+ public boolean hasVariables() throws DebugException {
+ return true ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.debug.MokaStackFrame#getVariables()
+ */
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ Object_ contextObject = this.getContextObject() ;
+ IVariable[] variables ;
+ if (contextObject == null) {
+ variables = new IVariable[]{};
+ }
+ else {
+ MokaVariable_from_ContextObject var = new MokaVariable_from_ContextObject(contextObject) ;
+ variables = new IVariable[]{var} ;
+ }
+ return variables ;
+ }
+
+ /**
+ * Returns the context fUML Object_ for this stack frame
+ *
+ * @return the context fUML Object_ for this stack frame
+ */
+ protected abstract Object_ getContextObject() ;
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_for_fUML.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_for_fUML.java
new file mode 100644
index 00000000000..70dfd4b4151
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_for_fUML.java
@@ -0,0 +1,46 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.debug.MokaValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.ui.presentation.IPresentation;
+import org.eclipse.swt.graphics.Image;
+
+public abstract class MokaValue_for_fUML extends MokaValue implements IPresentation {
+
+ public MokaValue_for_fUML() {
+ super(Locus.getDebugTarget());
+ }
+
+ //////////////////////////////////
+ // Presentation
+ //////////////////////////////////
+
+ public String getLabel() {
+ // Not used
+ return "";
+ }
+
+ public abstract String getDetails() ;
+
+ public Image getImage() {
+ // Not used
+ return null ;
+ }
+
+ //////////////////////////////////
+ // Debug
+ //////////////////////////////////
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ return new IVariable[]{};
+ }
+
+ @Override
+ public boolean hasVariables() throws DebugException {
+ return false ;
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_FeatureValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_FeatureValue.java
new file mode 100644
index 00000000000..26f0fef998d
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_FeatureValue.java
@@ -0,0 +1,90 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import java.util.List;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.debug.MokaVariable;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public class MokaValue_from_FeatureValue extends MokaValue_for_fUML {
+
+ protected FeatureValue featureValue ;
+
+ protected IVariable[] variables ;
+
+ public MokaValue_from_FeatureValue(FeatureValue featureValue) {
+ super() ;
+ this.featureValue = featureValue ;
+ }
+
+ ////////////////////////
+ // Presentation
+ ////////////////////////
+
+ @Override
+ public String getDetails() {
+ return computeDetails() ;
+ }
+
+ ////////////////////////
+ // Debug
+ ////////////////////////
+
+ @Override
+ public String getValueString() throws DebugException {
+ String valueString = null;
+ if (FUMLPresentationUtils.isCollection(featureValue)) {
+ valueString = FUMLPresentationUtils.getValueString(featureValue) ;
+ }
+ else {
+ valueString = computeDetails() ;
+ }
+ return valueString ;
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (variables == null) {
+ if (featureValue.values.isEmpty()) {
+ variables = new IVariable[]{} ;
+ }
+ else {
+ variables = new IVariable[featureValue.values.size()] ;
+ for (int i = 0 ; i < variables.length ; i++) {
+ MokaVariable valueVariable = new MokaVariable_from_Value(featureValue.values.get(i)) ;
+ valueVariable.setName("[" + (i + 1) + "]") ;
+ variables[i] = valueVariable ;
+ }
+ }
+ }
+ return variables ;
+ }
+
+ @Override
+ public boolean hasVariables() throws DebugException {
+ return this.getVariables().length > 0 && FUMLPresentationUtils.isCollection(featureValue);
+ }
+
+ protected String computeDetails() {
+ String valueString = FUMLPresentationUtils.isCollection(featureValue) ? "{ " : "" ;
+ List<Value> values = featureValue.values ;
+ boolean first = true ;
+ if (values.isEmpty() && !FUMLPresentationUtils.isCollection(featureValue))
+ return "null" ;
+ for (Value v : values) {
+ if (first) {
+ valueString += v.toString() ;
+ first = false ;
+ }
+ else {
+ valueString += ", " ;
+ valueString += v.toString() ;
+ }
+ }
+ valueString += FUMLPresentationUtils.isCollection(featureValue) ? " }" : "";
+ return valueString ;
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_Value.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_Value.java
new file mode 100644
index 00000000000..3feabd65fe1
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaValue_from_Value.java
@@ -0,0 +1,64 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.CompoundValue;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+
+public class MokaValue_from_Value extends MokaValue_for_fUML {
+
+ protected Value value ;
+
+ protected IVariable[] variables ;
+
+ public MokaValue_from_Value(Value value) {
+ super();
+ this.value = value ;
+ }
+
+ //////////////////////////////////
+ // Presentation
+ //////////////////////////////////
+
+ public String getDetails() {
+ return value.toString();
+ }
+
+ //////////////////////////////////
+ // Debug
+ //////////////////////////////////
+
+ @Override
+ public String getValueString() throws DebugException {
+ return FUMLPresentationUtils.getValueString(value) ;
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ if (variables == null) {
+ if (! (value instanceof CompoundValue)) {
+ variables = new IVariable[]{} ;
+ }
+ else if (((CompoundValue)value).featureValues.isEmpty()) {
+ variables = new IVariable[]{} ;
+ }
+ else {
+ CompoundValue compound = (CompoundValue)value ;
+ variables = new IVariable[compound.featureValues.size()] ;
+ for (int i = 0 ; i < variables.length ; i++) {
+ IVariable featureValueVariable = new MokaVariable_from_FeatureValue(compound.featureValues.get(i)) ;
+ variables[i] = featureValueVariable ;
+ }
+ }
+ }
+ return variables;
+ }
+
+ @Override
+ public boolean hasVariables() throws DebugException {
+ return getVariables().length > 0;
+ }
+
+
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_for_fUML.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_for_fUML.java
new file mode 100644
index 00000000000..02aa78930e2
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_for_fUML.java
@@ -0,0 +1,26 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.papyrus.moka.debug.MokaVariable;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.moka.ui.presentation.IPresentation;
+import org.eclipse.swt.graphics.Image;
+
+public abstract class MokaVariable_for_fUML extends MokaVariable implements IPresentation {
+
+ public MokaVariable_for_fUML() {
+ super(Locus.getDebugTarget());
+ }
+
+ public String getLabel() {
+ // Not used
+ return "";
+ }
+
+ public String getDetails() {
+ // Not used
+ return "";
+ }
+
+ public abstract Image getImage() ;
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_ContextObject.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_ContextObject.java
new file mode 100644
index 00000000000..6660121be20
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_ContextObject.java
@@ -0,0 +1,37 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class MokaVariable_from_ContextObject extends MokaVariable_for_fUML {
+
+ protected Object_ contextObject ;
+
+ public MokaVariable_from_ContextObject(Object_ contextObject) {
+ super();
+ this.name = "context" ;
+ this.contextObject = contextObject ;
+ }
+
+ //////////////////////////////////
+ // Presentation
+ //////////////////////////////////
+
+ public Image getImage() {
+ // not used for variables
+ return FUMLExecutionEngine.getImage(UMLPackage.eINSTANCE.getInstanceSpecification()) ;
+ }
+
+ //////////////////////////////////
+ // Debug
+ //////////////////////////////////
+ @Override
+ public IValue getValue() throws DebugException {
+ return new MokaValue_from_Value(contextObject) ;
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_FeatureValue.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_FeatureValue.java
new file mode 100644
index 00000000000..063d26b676d
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_FeatureValue.java
@@ -0,0 +1,42 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
+import org.eclipse.swt.graphics.Image;
+
+public class MokaVariable_from_FeatureValue extends MokaVariable_for_fUML {
+
+ protected FeatureValue featureValue ;
+
+ protected IValue value ;
+
+ public MokaVariable_from_FeatureValue(FeatureValue featureValue) {
+ super() ;
+ this.featureValue = featureValue ;
+ this.name = featureValue.feature.getName() ;
+ }
+
+ ////////////////////////
+ // Presentation
+ ////////////////////////
+
+ @Override
+ public Image getImage() {
+ return FUMLExecutionEngine.getImage(featureValue.feature);
+ }
+
+ ////////////////////////
+ // Debug
+ ////////////////////////
+
+ @Override
+ public IValue getValue() throws DebugException {
+ if (this.value == null) {
+ this.value = new MokaValue_from_FeatureValue(featureValue) ;
+ }
+ return this.value;
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_Value.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_Value.java
new file mode 100644
index 00000000000..4d8aaebf585
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/presentation/MokaVariable_from_Value.java
@@ -0,0 +1,36 @@
+package org.eclipse.papyrus.moka.fuml.presentation;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class MokaVariable_from_Value extends MokaVariable_for_fUML {
+
+ protected Value value ;
+
+ public MokaVariable_from_Value(Value value) {
+ super();
+ this.value = value ;
+ }
+
+ //////////////////////////////////
+ // Presentation
+ //////////////////////////////////
+
+ public Image getImage() {
+ // not used for variables
+ return FUMLExecutionEngine.getImage(UMLPackage.eINSTANCE.getInstanceSpecification()) ;
+ }
+
+ //////////////////////////////////
+ // Debug
+ //////////////////////////////////
+ @Override
+ public IValue getValue() throws DebugException {
+ return new MokaValue_from_Value(value) ;
+ }
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractOpaqueBehaviorExecutionRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractOpaqueBehaviorExecutionRegistry.java
new file mode 100644
index 00000000000..14c580be9c0
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractOpaqueBehaviorExecutionRegistry.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.registry;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.OpaqueBehaviorExecution;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.uml.extensionpoints.library.RegisteredLibrary;
+import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+
+public abstract class AbstractOpaqueBehaviorExecutionRegistry implements IOpaqueBehaviorExecutionRegistry {
+
+ protected EObject contextEObject = null;
+
+ protected Locus locus = null;
+
+ protected Map<String, OpaqueBehavior> opaqueBehaviorsMap = null;
+
+ public IOpaqueBehaviorExecutionRegistry init(Object parameters) {
+ if(parameters instanceof EObject)
+ this.contextEObject = (EObject)parameters;
+ return this;
+ }
+
+ public void registerOpaqueBehaviorExecutions(Locus locus) {
+ this.locus = locus;
+ }
+
+ protected void buildOpaqueBehaviorsMap(final String LIBRARY_NAME) {
+ opaqueBehaviorsMap = new HashMap<String, OpaqueBehavior>();
+ RegisteredLibrary[] libraries = RegisteredLibrary.getRegisteredLibraries();
+ RegisteredLibrary library = null;
+ for(RegisteredLibrary l : libraries) {
+ if(l.getName().equals(LIBRARY_NAME))
+ library = l;
+ }
+ if(library != null) {
+ URI libraryUri = library.uri;
+ ResourceSet resourceSet = Util.getResourceSet(contextEObject);
+ Resource libraryResource = resourceSet.getResource(libraryUri, true);
+ for(Iterator<EObject> i = libraryResource.getAllContents(); i.hasNext();) {
+ EObject cddOpaqueBehavior = i.next();
+ if(cddOpaqueBehavior instanceof OpaqueBehavior) {
+ OpaqueBehavior f = (OpaqueBehavior)cddOpaqueBehavior;
+ opaqueBehaviorsMap.put(f.getQualifiedName(), f);
+ }
+ }
+ }
+ }
+
+ protected void registerOpaqueBehaviorExecution(OpaqueBehaviorExecution behaviorExecution, String behaviorQualifiedName) {
+ behaviorExecution.types.add(this.opaqueBehaviorsMap.get(behaviorQualifiedName));
+ locus.factory.primitiveBehaviorPrototypes.add(behaviorExecution);
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractSystemServicesRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractSystemServicesRegistry.java
new file mode 100644
index 00000000000..8887fd6615e
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/AbstractSystemServicesRegistry.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.fuml.registry;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Object_;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+import org.eclipse.papyrus.uml.extensionpoints.library.RegisteredLibrary;
+import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
+import org.eclipse.uml2.uml.Class ;
+
+/**
+ * Abstract implementation of ISystemServicesRegistry.
+ * Clients should consider extending this abstract implementation rather than directly implementing ISystemServicesRegistry
+ *
+ */
+public abstract class AbstractSystemServicesRegistry implements ISystemServicesRegistry {
+
+ protected EObject contextEObject ;
+
+ protected Locus locus ;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.fuml.registry.ISystemServicesRegistry#init(java.lang.Object)
+ */
+ public ISystemServicesRegistry init(Object parameters) {
+ if(parameters instanceof EObject)
+ this.contextEObject = (EObject)parameters;
+ return this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.moka.fuml.registry.ISystemServicesRegistry#registerSystemServices(org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus)
+ */
+ public void registerSystemServices(Locus locus) {
+ this.locus = locus ;
+ List<Object_> services = this.instantiateServices() ;
+ // Guarantees that created services are added to the locus
+ for (Object_ o : services) {
+ o.locus = locus ;
+ locus.extensionalValues.add(o) ;
+ }
+ }
+
+ /**
+ * Clients should implement this method by calling this.instantiateServices(libraryName, serviceQualifiedNames,
+ * where libraryName is the name of a registered library containing the service classes to be instantiated,
+ * and serviceQualifiedNames is the list of qualified names of service classes to be instantiated
+ *
+ * @return A List<Object_> containing instantiated services, to be added to a specific locus
+ */
+ protected abstract List<Object_> instantiateServices() ;
+
+ /**
+ * Convenience method which calls the instantiate method on each service identified in the given serviceQualifiedNames list,
+ * for the library identified by the given libraryName.
+ * libraryName shall refer to the name of a registered library (registered using the oep.uml.extensionpoints.UMLLibrary)
+ * serviceQualifiedNames shall contain qualified names of classes defined in the library identified by libraryName
+ *
+ * @param libraryName The name of the registered library containing the service classes to be instantiated
+ * @param serviceQualifiedNames The list of qualified names of service classes to be instantiated
+ * @return A List<Object_> containing instantiated services, to be added to a specific locus
+ */
+ protected List<Object_> instantiateServices(String libraryName, List<String> serviceQualifiedNames) {
+ List<Object_> serviceInstances = new ArrayList<Object_>() ;
+ RegisteredLibrary[] libraries = RegisteredLibrary.getRegisteredLibraries();
+ RegisteredLibrary library = null;
+ for(RegisteredLibrary l : libraries) {
+ if(l.getName().equals(libraryName))
+ library = l;
+ }
+ if(library != null) {
+ URI libraryUri = library.uri;
+ ResourceSet resourceSet = Util.getResourceSet(contextEObject);
+ Resource libraryResource = resourceSet.getResource(libraryUri, true);
+ for(Iterator<EObject> i = libraryResource.getAllContents(); i.hasNext();) {
+ EObject cddService = i.next();
+ if(cddService instanceof Class) {
+ if (serviceQualifiedNames.contains(((Class)cddService).getQualifiedName())) {
+ serviceInstances.add(this.instantiateService((Class)cddService)) ;
+ }
+ }
+ }
+ }
+ return serviceInstances ;
+ }
+
+ /**
+ * Constructs a service instance from a given service class.
+ * The service instance is returned in the form of a fuml Object_.
+ * The return Object_ typically overrids Objec_.dispatch(Operation)
+ *
+ * @param service The class representing the service to be instantiated
+ * @return The instance of the service class, to be added at a specific locus
+ */
+ protected abstract Object_ instantiateService(Class service) ;
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/DefaultSemanticStrategyRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/DefaultSemanticStrategyRegistry.java
new file mode 100644
index 00000000000..f0c6e0cacba
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/DefaultSemanticStrategyRegistry.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.registry;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.RedefinitionBasedDispatchStrategy;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.Communications.FIFOGetNextEventStrategy;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.FirstChoiceStrategy;
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+
+public class DefaultSemanticStrategyRegistry implements ISemanticStrategyRegistry {
+
+ public ISemanticStrategyRegistry init(Object parameters) {
+ // no need for additional parameters
+ return this;
+ }
+
+ public void registerSemanticStrategies(Locus locus) {
+ locus.factory.setStrategy(new FirstChoiceStrategy());
+ locus.factory.setStrategy(new FIFOGetNextEventStrategy());
+ locus.factory.setStrategy(new RedefinitionBasedDispatchStrategy());
+ }
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/IOpaqueBehaviorExecutionRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/IOpaqueBehaviorExecutionRegistry.java
new file mode 100644
index 00000000000..dcca51d64ea
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/IOpaqueBehaviorExecutionRegistry.java
@@ -0,0 +1,23 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.registry;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+
+public interface IOpaqueBehaviorExecutionRegistry {
+
+ public IOpaqueBehaviorExecutionRegistry init(Object parameters);
+
+ public void registerOpaqueBehaviorExecutions(Locus locus);
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISemanticStrategyRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISemanticStrategyRegistry.java
new file mode 100644
index 00000000000..5261f867a1f
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISemanticStrategyRegistry.java
@@ -0,0 +1,23 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.registry;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+
+public interface ISemanticStrategyRegistry {
+
+ public ISemanticStrategyRegistry init(Object parameters);
+
+ public void registerSemanticStrategies(Locus locus);
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISystemServicesRegistry.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISystemServicesRegistry.java
new file mode 100644
index 00000000000..2617011ae52
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/ISystemServicesRegistry.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.fuml.registry;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.Locus;
+
+
+/**
+ * The main entry point for the org.eclipse.papyrus.moka.services extension point,
+ * which enables to pre-instantiate services objects at the locus before any execution starts.
+ * Contributing to this extension point simply consists in implementing this interface.
+ *
+ * @see AbstractSystemServicesRegistry, which provides an abstract implementation for this interface.
+ *
+ */
+public interface ISystemServicesRegistry {
+
+ /**
+ * Performs some initializations on the context ISystemServicesRegistry.
+ * This method should be called before calling registerSystemServices.
+ *
+ * @param parameters The object representing the initialization parameters for the context ISystemServicesRegistry
+ * @return The initialized ISystemServicesRegistry
+ */
+ public ISystemServicesRegistry init(Object parameters);
+
+ /**
+ * Register specific system services at the given locus
+ *
+ * @param locus The locus where services have to be registered
+ */
+ public void registerSystemServices(Locus locus) ;
+
+}
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/SystemServicesRegistryUtils.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/SystemServicesRegistryUtils.java
new file mode 100644
index 00000000000..4540c262996
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/registry/SystemServicesRegistryUtils.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.moka.fuml.registry;
+
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.UMLFactory;
+
+public class SystemServicesRegistryUtils {
+
+ protected static SystemServicesRegistryUtils eInstance ;
+
+ private SystemServicesRegistryUtils() {} ;
+
+ public static SystemServicesRegistryUtils getInstance() {
+ if (eInstance == null)
+ eInstance = new SystemServicesRegistryUtils() ;
+ return eInstance ;
+ }
+
+ public OpaqueBehavior generateOpaqueBehaviorSignature(Operation operation) {
+ OpaqueBehavior method = UMLFactory.eINSTANCE.createOpaqueBehavior() ;
+ method.setName(operation.getName() + "Method") ;
+ for (Parameter p : operation.getOwnedParameters()) {
+ Parameter behaviorParameter = method.createOwnedParameter(p.getName(), p.getType()) ;
+ behaviorParameter.setDirection(p.getDirection()) ;
+ behaviorParameter.setLower(p.getLower()) ;
+ behaviorParameter.setUpper(p.getUpper()) ;
+ }
+ return method ;
+ }
+
+ // TODO may be useful to do something similar for activities
+}

Back to the top