Issue 13873: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation (fuml-ftf) Source: NASA (Dr. Nicolas F. Rouquette, nicolas.f.rouquette(at)jpl.nasa.gov) Nature: Uncategorized Issue Severity: Summary: Specification: Semantics of a Foundation Subset for Executable UML Models, FTF – Beta 1 (ptc/08-11-03) Section: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation Depends on: http://www.omg.org/issues/fuml-ftf.html#Issue13544 Summary: Part of CreateLinkActionActivation.doAction() entails destroying all links that have a value for any end for which isReplaceAll is true. (see fUML 1.0, page 238). This involves the following chain of invocations: - fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(Link, LinkEndData) – see fUML 1.0, page 238; - fUML.Semantics.Actions.BasicActions.ActionActivation.getTokens(InputPin) -- see fUML 1.0, page 233; - fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.takeTokens() – see fUML 1.0, p. 215 By taking the tokens from the pin activation corresponding to the input pin, LinkActionActivation.endMatchesEndData() induces side effects on the state of the execution engine each time it is called. Proposed Resolution: Resolving this issue entails 3 things: a) Defining a read-only operation to read the tokens available on an input pin: fUML.Semantics.Actions.BasicActions.ActionActivation.readTokens(InputPin) /** * NFR 04/16/2009 For LinkActionActivation.endMatchesEndData(Link, LinkEndData), * we need a mechanism to test whether the available tokens match the link end data * and if they do, then actually remove them. * * readTokens() is the same as getTokens() except that: * getTokens() removes the tokens on the pin activation, i.e, pinActivation.takeTokens() * readTokens() leaves the tokens on the pin activation, i.e., pinActivation.getTokens() * @param pin * @return */ public fUML.Semantics.Classes.Kernel.ValueList readTokens( fUML.Syntax.Actions.BasicActions.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. // NFR 04/16/2009 Debug.println("[readTokens] node = " + this.node.name + " (pin: " + pin.name + ")"); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken) token).value; if (value != null) { values.addValue(value); } } return values; } b) With the above operation, LinkActionActivation.endMatchesEndData() can be fixed as follows: public boolean endMatchesEndData(fUML.Semantics.Classes.Kernel.Link link, fUML.Syntax.Actions.IntermediateActions.LinkEndData endData) { // 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.readTokens(endData.value).getValue(0); if (endData instanceof LinkEndDestructionData) { if (!((LinkEndDestructionData) endData).isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { int destroyAt = ((UnlimitedNaturalValue) (this .readTokens(((LinkEndDestructionData) endData).destroyAt).getValue(0))).value.naturalValue; matches = linkFeatureValue.values.getValue(0).equals(endValue) && linkFeatureValue.position == destroyAt; } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } return matches; } c) All other actions/activity behaviors which directly or indirectly invoked LinkActionActivation.endMatchesEndData() need to be reviewed to make sure that the tokens will be consumed. There are only 3 cases to consider: fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.DestroyLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.ReadLinkActionActivation.doAction() CreateLinkActionActivation.doAction() already consumes the tokens when creating the new link instance. DestroyLinkActionActivation.doAction() needs extra logic to delete the tokens from the input pins *after* determining the matching links to destroy, if any. This requires modifying this operation as follows: 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.] DestroyLinkAction action = (DestroyLinkAction) (this.node); LinkEndDestructionDataList destructionDataList = action.endData; boolean destroyOnlyOne = false; int j = 1; while (!destroyOnlyOne & j <= destructionDataList.size()) { LinkEndDestructionData endData = destructionDataList.getValue(j - 1); destroyOnlyOne = !endData.end.multiplicityElement.isUnique & !endData.end.multiplicityElement.isOrdered & !endData.isDestroyDuplicates; j = j + 1; } LinkEndDataList endDataList = new LinkEndDataList(); for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); endDataList.addValue(endData); } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this.getAssociation()); ExtensionalValueList matchingLinks = new ExtensionalValueList(); for (int i = 0; i < extent.size(); i++) { ExtensionalValue value = extent.getValue(i); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { matchingLinks.addValue(link); } } /* * NFR 04/16/2009 * Now that we know which matching links to destroy, * we need to ensure all of the tokens on the input pins * of this action are consumed. */ for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); Property end = endData.end; if (!endData.isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { this.getTokens(endData.destroyAt); } this.getTokens(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("choice")) .choose(matchingLinks.size()); matchingLinks.getValue(i - 1).destroy(); } } else { for (int i = 0; i < matchingLinks.size(); i++) { ExtensionalValue matchingLink = matchingLinks.getValue(i); matchingLink.destroy(); } } } ReadLinkActionActivation.doAction() needs extra logic to consume the tokens after matching the data against all of the links in the extension. 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); LinkEndDataList endDataList = action.endData; LinkEndData openEnd = null; int i = 1; while ((openEnd == null) & i <= endDataList.size()) { if (endDataList.getValue(i-1).value == null) { openEnd = endDataList.getValue(i-1); } i = i + 1; } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this.getAssociation()); for (int j = 0; j < extent.size(); j++) { ExtensionalValue value = extent.getValue(j); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { Value resultValue = link.getFeatureValue(openEnd.end).values.getValue(0); this.putToken(action.result, resultValue); } } /* * NFR 04/16/2009 * Now that we have checked all links for possible matches, * we have to consume the tokens on the input pins corresponding to the non-open link ends. */ for (int k=0; k<endDataList.size(); k++) { LinkEndData endData = endDataList.getValue(k); if (endData.value != null) { this.getTokens(endData.value); } } } Resolution: Part of the problem is that the name for ActionActivation::getTokens is inconsistent with the names of other operations in the execution model, where “get” is used for operations that do not consume tokens while “take” is used for operations that do. Therefore, it makes sense to change the name of the current “getTokens” operation to “takeTokens” and use the name “getTokens” for the new operation (rather than “readTokens”, as proposed). Also, to be consistent with the resolution to issue 13310, the new operation should call pinActivation.getUnofferedTokens(), rather than pinActivation.getTokens(). Other than this, the rest of the proposed resolution is accepted. Revised Text: In Figure 74 add the following operation to ActionActivation: takeTokens(pin: InputPin): Value[*] In Subclause 8.6.2.2.1, rename “ActionActivation::getTokens” to “ActionActivation::takeTokens” and add: ActionActivation::getTokens(in pin: InputPin): Values[*] // 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.name + ", pin = " + pin.name); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getUnofferedTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken)token).value; if (value != null) { values.addValue(value); } } return values; In the methods for the following operations, replace uses of “getTokens” with “takeTokens”: BasicActions:: CallActionActivation::doAction CallOperationActionActivation::getCallExecution SendSignalActivation::doAction IntermediateActions:: AddStructuralFeatureValueActionActivation::doAction ClearAssociationActionActivation::doAction ClearStructuralFeatureActionActivation::doAction CreateLinkActionActivation::doAction DestroyObjectActionActivation::doAction ReadStructuralFeatureValueActivation::doAction RemoveStructuralFeatureActionActivation::doAction TestIdentityActionActivation::doAction CompleteActions:: ReadIsClassifiedObjectActionActivation::doAction ReclassifyObjectActionActivation::doAction ReduceAction::Activation::doAction StartClassifierBehaviorActionActivation::doAction StartObjectBehaviorActivation::doAction CompleteStructuredActivities::LoopNodeActivation::doStructuredActivity In DestroyLinkActionActivation::doAction, before the final if statement, add: // 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.getValue(i); Property end = endData.end; if (!endData.isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { this.takeTokens(endData.destroyAt); } this.takeTokens(endData.value); } In ReadLinkActionActivation::doAction, at the end, add: // 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.getValue(k); if (endData.value != null) { this.takeTokens(endData.value); } } Actions taken: April 16, 2009: received issue July 23, 2010: closed issue Discussion: End of Annotations:===== m: "Rouquette, Nicolas F" To: "issues@omg.org" CC: Ed Seidewitz , "conrad.bock@nist.gov" , Scott Cinnamond Date: Thu, 16 Apr 2009 17:13:05 -0700 Subject: FUML: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation, Thread-Topic: FUML: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation, Thread-Index: Acm+8Udc/iZpKVbUSIuxkDQzbw7VMg== Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: ums-smtp.jpl.nasa.gov [128.149.137.72] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized Specification: Semantics of a Foundation Subset for Executable UML Models, FTF . Beta 1 (ptc/08-11-03) Section: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation Depends on: http://www.omg.org/issues/fuml-ftf.html#Issue13544 Summary: Part of CreateLinkActionActivation.doAction() entails destroying all links that have a value for any end for which isReplaceAll is true. (see fUML 1.0, page 238). This involves the following chain of invocations: - fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(Link, LinkEndData) . see fUML 1.0, page 238; - fUML.Semantics.Actions.BasicActions.ActionActivation.getTokens(InputPin) -- see fUML 1.0, page 233; - fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.takeTokens() . see fUML 1.0, p. 215 By taking the tokens from the pin activation corresponding to the input pin, LinkActionActivation.endMatchesEndData() induces side effects on the state of the execution engine each time it is called. Proposed Resolution: Resolving this issue entails 3 things: a) Defining a read-only operation to read the tokens available on an input pin: fUML.Semantics.Actions.BasicActions.ActionActivation.readTokens(InputPin) /** * NFR 04/16/2009 For LinkActionActivation.endMatchesEndData(Link, LinkEndData), * we need a mechanism to test whether the available tokens match the link end data * and if they do, then actually remove them. * * readTokens() is the same as getTokens() except that: * getTokens() removes the tokens on the pin activation, i.e, pinActivation.takeTokens() * readTokens() leaves the tokens on the pin activation, i.e., pinActivation.getTokens() * @param pin * @return */ public fUML.Semantics.Classes.Kernel.ValueList readTokens( fUML.Syntax.Actions.BasicActions.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. // NFR 04/16/2009 Debug.println("[readTokens] node = " + this.node.name + " (pin: " + pin.name + ")"); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken) token).value; if (value != null) { values.addValue(value); } } return values; } b) With the above operation, LinkActionActivation.endMatchesEndData() can be fixed as follows: public boolean endMatchesEndData(fUML.Semantics.Classes.Kernel.Link link, fUML.Syntax.Actions.IntermediateActions.LinkEndData endData) { // 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.readTokens(endData.value).getValue(0); if (endData instanceof LinkEndDestructionData) { if (!((LinkEndDestructionData) endData).isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { int destroyAt = ((UnlimitedNaturalValue) (this .readTokens(((LinkEndDestructionData) endData).destroyAt).getValue(0))).value.naturalValue; matches = linkFeatureValue.values.getValue(0).equals(endValue) && linkFeatureValue.position == destroyAt; } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } return matches; } c) All other actions/activity behaviors which directly or indirectly invoked LinkActionActivation.endMatchesEndData() need to be reviewed to make sure that the tokens will be consumed. There are only 3 cases to consider: fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.DestroyLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.ReadLinkActionActivation.doAction() CreateLinkActionActivation.doAction() already consumes the tokens when creating the new link instance. DestroyLinkActionActivation.doAction() needs extra logic to delete the tokens from the input pins *after* determining the matching links to destroy, if any. This requires modifying this operation as follows: 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.] DestroyLinkAction action = (DestroyLinkAction) (this.node); LinkEndDestructionDataList destructionDataList = action.endData; boolean destroyOnlyOne = false; int j = 1; while (!destroyOnlyOne & j <= destructionDataList.size()) { LinkEndDestructionData endData = destructionDataList.getValue(j - 1); destroyOnlyOne = !endData.end.multiplicityElement.isUnique & !endData.end.multiplicityElement.isOrdered & !endData.isDestroyDuplicates; j = j + 1; } LinkEndDataList endDataList = new LinkEndDataList(); for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); endDataList.addValue(endData); } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this.getAssociation()); ExtensionalValueList matchingLinks = new ExtensionalValueList(); for (int i = 0; i < extent.size(); i++) { ExtensionalValue value = extent.getValue(i); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { matchingLinks.addValue(link); } } /* * NFR 04/16/2009 * Now that we know which matching links to destroy, * we need to ensure all of the tokens on the input pins * of this action are consumed. */ for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); Property end = endData.end; if (!endData.isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { this.getTokens(endData.destroyAt); } this.getTokens(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("choice")) .choose(matchingLinks.size()); matchingLinks.getValue(i - 1).destroy(); } } else { for (int i = 0; i < matchingLinks.size(); i++) { ExtensionalValue matchingLink = matchingLinks.getValue(i); matchingLink.destroy(); } } } ReadLinkActionActivation.doAction() needs extra logic to consume the tokens after matching the data against all of the links in the extension. 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); LinkEndDataList endDataList = action.endData; LinkEndData openEnd = null; int i = 1; while ((openEnd == null) & i <= endDataList.size()) { if (endDataList.getValue(i-1).value == null) { openEnd = endDataList.getValue(i-1); } i = i + 1; } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this.getAssociation()); for (int j = 0; j < extent.size(); j++) { ExtensionalValue value = extent.getValue(j); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { Value resultValue = link.getFeatureValue(openEnd.end).values.getValue(0); this.putToken(action.result, resultValue); } } /* * NFR 04/16/2009 * Now that we have checked all links for possible matches, * we have to consume the tokens on the input pins corresponding to the non-open link ends. */ for (int k=0; k To: "Rouquette, Nicolas F" Cc: Nicolas . I basically agree with your resolution to this issue, however it struck me as confusing to have ActionActivation::getTokens call pinActivation.takeTokens and have ActionActivation::readTokens call pinActivation.getTokens. To be consistent, the first ActionActivation operation should be called takeTokens, and then the name .getTokens. can be used for the new operation. (My fault for introducing the inconsistent naming for ActionActivation::getTokens in the first place!). With this alteration, below is my proposed resolution for your issue. Let me know if you have any issue with it. If not, I am planning to include this in our first ballot which I am (finally!) trying to get issued. -- Ed Resolution: Part of the problem is that the name for ActionActivation::getTokens is inconsistent with the names of other operations in the execution model, where .get. is used for operations that do not consume tokens while .take. is used for operations that do. Therefore, it makes sense to change the name of the current .getTokens. operation to .takeTokens. and use the name .getTokens. for the new operation (rather than .readTokens., as proposed). Also, to be consistent with the resolution to issue 13310, the new operation should call pinActivation.getUnofferedTokens(), rather than pinActivation.getTokens(). Other than this, the rest of the proposed resolution is accepted. Revised Text: In Figure 74 add the following operation to ActionActivation: takeTokens(pin: InputPin): Value[*] In Subclause 8.6.2.2.1, rename .ActionActivation::getTokens. to .ActionActivation::takeTokens. and add: ActionActivation::getTokens(in pin: InputPin): Values[*] // 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.name + ", pin = " + pin.name); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getUnofferedTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken)token).value; if (value != null) { values.addValue(value); } } return values; In the methods for the following operations, replace uses of .getTokens. with .takeTokens.: BasicActions:: CallActionActivation::doAction CallOperationActionActivation::getCallExecution SendSignalActivation::doAction IntermediateActions:: AddStructuralFeatureValueActionActivation::doAction ClearAssociationActionActivation::doAction ClearStructuralFeatureActionActivation::doAction CreateLinkActionActivation::doAction ReadStructuralFeatureValueActivation::doAction RemoveStructuralFeatureActionActivation::doAction TestIdentityActionActivation::doAction CompleteActions:: ReadIsClassifiedObjectActionActivation::doAction ReclassifyObjectActionActivation::doAction ReduceAction::Activation::doAction StartClassifierBehaviorActionActivation::doAction StartObjectBehaviorActivation::doAction CompleteStructuredActivities::LoopNodeActivation::doStructuredActivity In DestroyLinkActionActivation::doAction, before the final if statement, add: // 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.getValue(i); Property end = endData.end; if (!endData.isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { this.takeTokens(endData.destroyAt); } this.takeTokens(endData.value); } In ReadLinkActionActivation::doAction, at the end, add: // Now that matching is done, ensure that all tokens on end data input pins // are consumed. for (int k=0; k To: "issues@omg.org" CC: Ed Seidewitz , "conrad.bock@nist.gov" , Scott Cinnamond Date: Thu, 16 Apr 2009 17:13:05 -0700 Subject: FUML: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation, Thread-Topic: FUML: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation, Thread-Index: Acm+8Udc/iZpKVbUSIuxkDQzbw7VMg== Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: ums-smtp.jpl.nasa.gov [128.149.137.72] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized Specification: Semantics of a Foundation Subset for Executable UML Models, FTF . Beta 1 (ptc/08-11-03) Section: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation Depends on: http://www.omg.org/issues/fuml-ftf.html#Issue13544 Summary: Part of CreateLinkActionActivation.doAction() entails destroying all links that have a value for any end for which isReplaceAll is true. (see fUML 1.0, page 238). This involves the following chain of invocations: - fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(Link, LinkEndData) . see fUML 1.0, page 238; - fUML.Semantics.Actions.BasicActions.ActionActivation.getTokens(InputPin) -- see fUML 1.0, page 233; - fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.takeTokens() . see fUML 1.0, p. 215 By taking the tokens from the pin activation corresponding to the input pin, LinkActionActivation.endMatchesEndData() induces side effects on the state of the execution engine each time it is called. Proposed Resolution: Resolving this issue entails 3 things: a) Defining a read-only operation to read the tokens available on an input pin: fUML.Semantics.Actions.BasicActions.ActionActivation.readTokens(InputPin) /** * NFR 04/16/2009 For LinkActionActivation.endMatchesEndData(Link, LinkEndData), * we need a mechanism to test whether the available tokens match the link end data * and if they do, then actually remove them. * * readTokens() is the same as getTokens() except that: * getTokens() removes the tokens on the pin activation, i.e, pinActivation.takeTokens() * readTokens() leaves the tokens on the pin activation, i.e., pinActivation.getTokens() * @param pin * @return */ public fUML.Semantics.Classes.Kernel.ValueList readTokens( fUML.Syntax.Actions.BasicActions.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. // NFR 04/16/2009 Debug.println("[readTokens] node = " + this.node.name + " (pin: " + pin.name + ")"); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken) token).value; if (value != null) { values.addValue(value); } } return values; } b) With the above operation, LinkActionActivation.endMatchesEndData() can be fixed as follows: public boolean endMatchesEndData(fUML.Semantics.Classes.Kernel.Link link, fUML.Syntax.Actions.IntermediateActions.LinkEndData endData) { // 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.readTokens(endData.value).getValue(0); if (endData instanceof LinkEndDestructionData) { if (!((LinkEndDestructionData) endData).isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { int destroyAt = ((UnlimitedNaturalValue) (this .readTokens(((LinkEndDestructionData) endData).destroyAt).getValue(0))).value.naturalValue; matches = linkFeatureValue.values.getValue(0).equals(endValue) && linkFeatureValue.position == destroyAt; } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } return matches; } c) All other actions/activity behaviors which directly or indirectly invoked LinkActionActivation.endMatchesEndData() need to be reviewed to make sure that the tokens will be consumed. There are only 3 cases to consider: fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.DestroyLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.ReadLinkActionActivation.doAction() CreateLinkActionActivation.doAction() already consumes the tokens when creating the new link instance. DestroyLinkActionActivation.doAction() needs extra logic to delete the tokens from the input pins *after* determining the matching links to destroy, if any. This requires modifying this operation as follows: 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.] DestroyLinkAction action = (DestroyLinkAction) (this.node); LinkEndDestructionDataList destructionDataList = action.endData; boolean destroyOnlyOne = false; int j = 1; while (!destroyOnlyOne & j <= destructionDataList.size()) { LinkEndDestructionData endData = destructionDataList.getValue(j - 1); destroyOnlyOne = !endData.end.multiplicityElement.isUnique & !endData.end.multiplicityElement.isOrdered & !endData.isDestroyDuplicates; j = j + 1; } LinkEndDataList endDataList = new LinkEndDataList(); for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); endDataList.addValue(endData); } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this .getAssociation()); ExtensionalValueList matchingLinks = new ExtensionalValueList(); for (int i = 0; i < extent.size(); i++) { ExtensionalValue value = extent.getValue(i); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { matchingLinks.addValue(link); } } /* * NFR 04/16/2009 * Now that we know which matching links to destroy, * we need to ensure all of the tokens on the input pins * of this action are consumed. */ for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); Property end = endData.end; if (!endData.isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { this.getTokens(endData.destroyAt); } this.getTokens(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("choice")) .choose(matchingLinks.size()); matchingLinks.getValue(i - 1).destroy(); } } else { for (int i = 0; i < matchingLinks.size(); i++) { ExtensionalValue matchingLink = matchingLinks.getValue(i); matchingLink.destroy(); } } } ReadLinkActionActivation.doAction() needs extra logic to consume the tokens after matching the data against all of the links in the extension. 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); LinkEndDataList endDataList = action.endData; LinkEndData openEnd = null; int i = 1; while ((openEnd == null) & i <= endDataList.size()) { if (endDataList.getValue(i-1).value == null) { openEnd = endDataList.getValue(i-1); } i = i + 1; } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this .getAssociation()); for (int j = 0; j < extent.size(); j++) { ExtensionalValue value = extent.getValue(j); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { Value resultValue = link.getFeatureValue(openEnd.end).values.getValue(0); this.putToken(action.result, resultValue); } } /* * NFR 04/16/2009 * Now that we have checked all links for possible matches, * we have to consume the tokens on the input pins corresponding to the non-open link ends. */ for (int k=0; k To: Ed Seidewitz CC: "fuml-ftf@omg.org" Date: Fri, 17 Apr 2009 17:39:49 -0700 Subject: RE: issue 13873 -- FUML FTF issue Thread-Topic: issue 13873 -- FUML FTF issue Thread-Index: Acm/bsj1exAK50sZR06GtXw3pm8UUwAGmMJgAA0ucJA= Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: altvirehtstap02.jpl.nasa.gov [128.149.137.73] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized Ed, I agree with this revision of 13873; however, note that there is one affected action missing from your list: In IntermediateActions: DestroyObjectActionActivation.doAction - Nicolas. From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Friday, April 17, 2009 11:26 AM To: Rouquette, Nicolas F Cc: fuml-ftf@omg.org Subject: RE: issue 13873 -- FUML FTF issue Nicolas . I basically agree with your resolution to this issue, however it struck me as confusing to have ActionActivation::getTokens call pinActivation.takeTokens and have ActionActivation::readTokens call pinActivation.getTokens. To be consistent, the first ActionActivation operation should be called takeTokens, and then the name .getTokens. can be used for the new operation. (My fault for introducing the inconsistent naming for ActionActivation::getTokens in the first place!). With this alteration, below is my proposed resolution for your issue. Let me know if you have any issue with it. If not, I am planning to include this in our first ballot which I am (finally!) trying to get issued. -- Ed Resolution: Part of the problem is that the name for ActionActivation::getTokens is inconsistent with the names of other operations in the execution model, where .get. is used for operations that do not consume tokens while .take. is used for operations that do. Therefore, it makes sense to change the name of the current .getTokens. operation to .takeTokens. and use the name .getTokens. for the new operation (rather than .readTokens., as proposed). Also, to be consistent with the resolution to issue 13310, the new operation should call pinActivation.getUnofferedTokens(), rather than pinActivation.getTokens(). Other than this, the rest of the proposed resolution is accepted. Revised Text: In Figure 74 add the following operation to ActionActivation: takeTokens(pin: InputPin): Value[*] In Subclause 8.6.2.2.1, rename .ActionActivation::getTokens. to .ActionActivation::takeTokens. and add: ActionActivation::getTokens(in pin: InputPin): Values[*] // 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.name + ", pin = " + pin.name); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getUnofferedTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken)token).value; if (value != null) { values.addValue(value); } } return values; In the methods for the following operations, replace uses of .getTokens. with .takeTokens.: BasicActions:: CallActionActivation::doAction CallOperationActionActivation::getCallExecution SendSignalActivation::doAction IntermediateActions:: AddStructuralFeatureValueActionActivation::doAction ClearAssociationActionActivation::doAction ClearStructuralFeatureActionActivation::doAction CreateLinkActionActivation::doAction ReadStructuralFeatureValueActivation::doAction RemoveStructuralFeatureActionActivation::doAction TestIdentityActionActivation::doAction CompleteActions:: ReadIsClassifiedObjectActionActivation::doAction ReclassifyObjectActionActivation::doAction ReduceAction::Activation::doAction StartClassifierBehaviorActionActivation::doAction StartObjectBehaviorActivation::doAction CompleteStructuredActivities::LoopNodeActivation::doStructuredActivity In DestroyLinkActionActivation::doAction, before the final if statement, add: // 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.getValue(i); Property end = endData.end; if (!endData.isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { this.takeTokens(endData.destroyAt); } this.takeTokens(endData.value); } In ReadLinkActionActivation::doAction, at the end, add: // Now that matching is done, ensure that all tokens on end data input pins // are consumed. for (int k=0; k To: "issues@omg.org" CC: Ed Seidewitz , "conrad.bock@nist.gov" , Scott Cinnamond Date: Thu, 16 Apr 2009 17:13:05 -0700 Subject: FUML: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation, Thread-Topic: FUML: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation, Thread-Index: Acm+8Udc/iZpKVbUSIuxkDQzbw7VMg== Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: ums-smtp.jpl.nasa.gov [128.149.137.72] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized Specification: Semantics of a Foundation Subset for Executable UML Models, FTF . Beta 1 (ptc/08-11-03) Section: 8.6.2.2.1 ActionActivation, 8.6.3.2.4 CreateLinkActionActivation and 8.6.3.2.8 LinkActionActivation Depends on: http://www.omg.org/issues/fuml-ftf.html#Issue13544 Summary: Part of CreateLinkActionActivation.doAction() entails destroying all links that have a value for any end for which isReplaceAll is true. (see fUML 1.0, page 238). This involves the following chain of invocations: - fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(Link, LinkEndData) . see fUML 1.0, page 238; - fUML.Semantics.Actions.BasicActions.ActionActivation.getTokens(InputPin) -- see fUML 1.0, page 233; - fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.takeTokens() . see fUML 1.0, p. 215 By taking the tokens from the pin activation corresponding to the input pin, LinkActionActivation.endMatchesEndData() induces side effects on the state of the execution engine each time it is called. Proposed Resolution: Resolving this issue entails 3 things: a) Defining a read-only operation to read the tokens available on an input pin: fUML.Semantics.Actions.BasicActions.ActionActivation.readTokens(InputPin) /** * NFR 04/16/2009 For LinkActionActivation.endMatchesEndData(Link, LinkEndData), * we need a mechanism to test whether the available tokens match the link end data * and if they do, then actually remove them. * * readTokens() is the same as getTokens() except that: * getTokens() removes the tokens on the pin activation, i.e, pinActivation.takeTokens() * readTokens() leaves the tokens on the pin activation, i.e., pinActivation.getTokens() * @param pin * @return */ public fUML.Semantics.Classes.Kernel.ValueList readTokens( fUML.Syntax.Actions.BasicActions.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. // NFR 04/16/2009 Debug.println("[readTokens] node = " + this.node.name + " (pin: " + pin.name + ")"); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken) token).value; if (value != null) { values.addValue(value); } } return values; } b) With the above operation, LinkActionActivation.endMatchesEndData() can be fixed as follows: public boolean endMatchesEndData(fUML.Semantics.Classes.Kernel.Link link, fUML.Syntax.Actions.IntermediateActions.LinkEndData endData) { // 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.readTokens(endData.value).getValue(0); if (endData instanceof LinkEndDestructionData) { if (!((LinkEndDestructionData) endData).isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { int destroyAt = ((UnlimitedNaturalValue) (this .readTokens(((LinkEndDestructionData) endData).destroyAt).getValue(0))).value.naturalValue; matches = linkFeatureValue.values.getValue(0).equals(endValue) && linkFeatureValue.position == destroyAt; } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } else { matches = linkFeatureValue.values.getValue(0).equals(endValue); } } return matches; } c) All other actions/activity behaviors which directly or indirectly invoked LinkActionActivation.endMatchesEndData() need to be reviewed to make sure that the tokens will be consumed. There are only 3 cases to consider: fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.DestroyLinkActionActivation.doAction() fUML.Semantics.Actions.IntermediateActions.ReadLinkActionActivation.doAction() CreateLinkActionActivation.doAction() already consumes the tokens when creating the new link instance. DestroyLinkActionActivation.doAction() needs extra logic to delete the tokens from the input pins *after* determining the matching links to destroy, if any. This requires modifying this operation as follows: 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.] DestroyLinkAction action = (DestroyLinkAction) (this.node); LinkEndDestructionDataList destructionDataList = action.endData; boolean destroyOnlyOne = false; int j = 1; while (!destroyOnlyOne & j <= destructionDataList.size()) { LinkEndDestructionData endData = destructionDataList.getValue(j - 1); destroyOnlyOne = !endData.end.multiplicityElement.isUnique & !endData.end.multiplicityElement.isOrdered & !endData.isDestroyDuplicates; j = j + 1; } LinkEndDataList endDataList = new LinkEndDataList(); for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); endDataList.addValue(endData); } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this .getAssociation()); ExtensionalValueList matchingLinks = new ExtensionalValueList(); for (int i = 0; i < extent.size(); i++) { ExtensionalValue value = extent.getValue(i); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { matchingLinks.addValue(link); } } /* * NFR 04/16/2009 * Now that we know which matching links to destroy, * we need to ensure all of the tokens on the input pins * of this action are consumed. */ for (int i = 0; i < destructionDataList.size(); i++) { LinkEndDestructionData endData = destructionDataList.getValue(i); Property end = endData.end; if (!endData.isDestroyDuplicates & !end.multiplicityElement.isUnique & end.multiplicityElement.isOrdered) { this.getTokens(endData.destroyAt); } this.getTokens(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("choice")) .choose(matchingLinks.size()); matchingLinks.getValue(i - 1).destroy(); } } else { for (int i = 0; i < matchingLinks.size(); i++) { ExtensionalValue matchingLink = matchingLinks.getValue(i); matchingLink.destroy(); } } } ReadLinkActionActivation.doAction() needs extra logic to consume the tokens after matching the data against all of the links in the extension. 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); LinkEndDataList endDataList = action.endData; LinkEndData openEnd = null; int i = 1; while ((openEnd == null) & i <= endDataList.size()) { if (endDataList.getValue(i-1).value == null) { openEnd = endDataList.getValue(i-1); } i = i + 1; } ExtensionalValueList extent = this.getExecutionLocus().getExtent(this .getAssociation()); for (int j = 0; j < extent.size(); j++) { ExtensionalValue value = extent.getValue(j); Link link = (Link) value; if (this.linkMatchesEndData(link, endDataList)) { Value resultValue = link.getFeatureValue(openEnd.end).values.getValue(0); this.putToken(action.result, resultValue); } } /* * NFR 04/16/2009 * Now that we have checked all links for possible matches, * we have to consume the tokens on the input pins corresponding to the non-open link ends. */ for (int k=0; k To: Ed Seidewitz CC: "fuml-ftf@omg.org" Date: Mon, 20 Apr 2009 13:44:42 -0700 Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Thread-Topic: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Thread-Index: Acm/qs9M3uFwwmJJT1umq+WRGD/kHgBahjCAAChtWgAAD/rxoA== Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: ums-smtp.jpl.nasa.gov [128.149.137.72] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized Ed, In my tests, I do see a material difference between: 1) ActionActivation.getTokens(InputPin) calls pinActivation.getTokens(InputPin) vs. 2) ActionActivation.getTokens(InputPin) calls pinActivation.getUnofferedTokens(InputPin) My tests run fine with the former but I can.t get anything significant to run with the latter. Here.s an example that illustrates the difference: Here is a simple test: With (1), this works . i.e., the value on the output activity parameter node matches what I get when I checkpoint the state of the execution locus: # Loading & running: E:\dsltk-1.0M6\workspace\org.modeldriven.executable-sysml\test\mdxml\Test1.mdxml 19 Apr 2009 22:14:00,859 INFO fuml.FUML loading file, Test1.mdxml 19 Apr 2009 22:14:11,734 INFO config.FumlConfiguration initializing... 19 Apr 2009 22:14:11,750 INFO config.FumlConfigDataBinding loading schema chain... 19 Apr 2009 22:14:14,140 INFO library.Library initializing... 19 Apr 2009 22:14:14,140 INFO library.Library loading file, fUML_Library.uml 19 Apr 2009 22:14:15,421 INFO library.Library registering element: OutputChannel (fUML-Library.mdzip#_jJIzHXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: ListFunctions (fUML-Library.mdzip#_jJIy6nOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: TextInputChannel (fUML-Library.mdzip#_jJIzJnOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: IntegerFunctions (fUML-Library.mdzip#_jJIyV3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Not (fUML-Library.mdzip#_jJIy2HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Div (fUML-Library.mdzip#_jJIybXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Size (fUML-Library.mdzip#_jJIy3HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: PrimitiveBehaviors (fUML-Library.mdzip#_jJIyU3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIyjXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Implies (fUML-Library.mdzip#_jJIy1HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyq3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Or (fUML-Library.mdzip#_jJIyyHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: Common (fUML-Library.mdzip#_jJIzyXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: TextOutputChannel (fUML-Library.mdzip#_jJIzUHOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyhXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyo3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyr3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: fUML_Library (fUML-Library.mdzip#_jJIyUXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: Channel (fUML-Library.mdzip#_jJIy_HOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIylHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyenOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyiXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyt3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ListSize (fUML-Library.mdzip#_jJIy63OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyp3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyunOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: Notification (fUML-Library.mdzip#_jJIzynOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyWHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: Listener (fUML-Library.mdzip#_jJIzznOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyXXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: + (fUML-Library.mdzip#_jJIyYXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIys3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: UnlimitedNaturalFunctions (fUML-Library.mdzip#_jJIymXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: StandardInputChannel (fUML-Library.mdzip#_jJIzb3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: * (fUML-Library.mdzip#_jJIyaXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Neg (fUML-Library.mdzip#_jJIyc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Substring (fUML-Library.mdzip#_jJIy43OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ToBoolean (fUML-Library.mdzip#_jJIywHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: Status (fUML-Library.mdzip#_jJIz0HOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: - (fUML-Library.mdzip#_jJIyZXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: StringFunctions (fUML-Library.mdzip#_jJIy23OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIykXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Abs (fUML-Library.mdzip#_jJIygnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyfnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Concat (fUML-Library.mdzip#_jJIy33OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Mod (fUML-Library.mdzip#_jJIydnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyxXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: And (fUML-Library.mdzip#_jJIy0HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ListGet (fUML-Library.mdzip#_jJIy8HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: StandardOutputChannel (fUML-Library.mdzip#_jJIzcXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: InputChannel (fUML-Library.mdzip#_jJIzC3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ReadLine (fUML-Library.mdzip#_jJIzoXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIymnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering element: BasicInputOutput (fUML-Library.mdzip#_jJIy-HOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyn3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: WriteLine (fUML-Library.mdzip#_jJIzc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering element: ActiveChannel (fUML-Library.mdzip#_jJIzm3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,500 INFO library.Library registering element: BooleanFunctions (fUML-Library.mdzip#_jJIyv3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: Xor (fUML-Library.mdzip#_jJIyzHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:16,015 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,142 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "UML_Standard_Profile.xml#magicdraw_uml_standard_profile_v_0001". 19 Apr 2009 22:14:16,015 WARN fuml.PackagedElementImport imported invalid Package (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:16,031 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,162 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLConformance.mdxml#_16_0_1_ff3038a_1235075564546_996224_750". 19 Apr 2009 22:14:16,031 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:16,031 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,167 Column: 114) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLCompliance.mdxml#_16_0_1_ff3038a_1234741872546_621546_10270". 19 Apr 2009 22:14:16,031 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:16,031 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,172 Column: 117) - Element or attribute "packagedElement" contains an invalid external reference, "CrossOutSubsetting.mdxml#_16_0_1_ff3038a_1235016563031_566037_3434". 19 Apr 2009 22:14:16,031 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:17,015 INFO fuml.FUML executing behavior: Test2 19 Apr 2009 22:14:17,015 DEBUG environment.ExecutionEnvironment creating 1 parameter(s): [execute] creating 1 parameter(s): 19 Apr 2009 22:14:17,015 DEBUG environment.ExecutionEnvironment checking parameter 'database' 19 Apr 2009 22:14:17,015 DEBUG environment.ExecutionEnvironment executing the behavior... [execute] executing the behavior... [execute] Activity Test2... [createNodeActivations] Creating a node activation for init... [createNodeActivations] Creating a node activation for create database... [createNodeActivations] Creating a node activation for db... [createNodeActivations] Creating a node activation for create contact1... [createNodeActivations] Creating a node activation for ct1... [createNodeActivations] Creating a node activation for create contact2... [createNodeActivations] Creating a node activation for ct2... [createNodeActivations] Creating a node activation for register contact1... [createNodeActivations] Creating a node activation for reg1.ct... [createNodeActivations] Creating a node activation for reg1.db... [createNodeActivations] Creating a node activation for dbFork... [createNodeActivations] Creating a node activation for register contact2... [createNodeActivations] Creating a node activation for reg2.ct... [createNodeActivations] Creating a node activation for reg2.db... [createNodeActivations] Creating a node activation for database... [createEdgeInstances] Creating an edge instance from init to create database. [createEdgeInstances] Creating an edge instance from db to dbFork. [createEdgeInstances] Creating an edge instance from ct1 to reg1.ct. [createEdgeInstances] Creating an edge instance from ct2 to reg2.ct. [createEdgeInstances] Creating an edge instance from dbFork to reg1.db. [createEdgeInstances] Creating an edge instance from dbFork to reg2.db. [createEdgeInstances] Creating an edge instance from dbFork to database. [run] node = init [run] node = create database [run] node = db [run] node = create contact1 [run] node = ct1 [run] node = create contact2 [run] node = ct2 [run] node = register contact1 [run] node = reg1.ct [run] node = reg1.db [run] node = dbFork [run] node = register contact2 [run] node = reg2.ct [run] node = reg2.db [run] node = database [run] Checking for enabled nodes... [run] Checking node init... [run] Node init is enabled. [run] Checking node create database... [run] Checking node db... [run] Checking node create contact1... [run] Node create contact1 is enabled. [run] Checking node ct1... [run] Checking node create contact2... [run] Node create contact2 is enabled. [run] Checking node ct2... [run] Checking node register contact1... [run] Checking node reg1.ct... [run] Checking node reg1.db... [run] Checking node dbFork... [run] Checking node register contact2... [run] Checking node reg2.ct... [run] Checking node reg2.db... [run] Checking node database... [run] Sending offer to node init. [receiveOffer] node = init [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [addToken] node = init [receiveOffer] node = create database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [removeToken] node = init [_endIsolation] End isolation. [fire] Action create database... [putToken] node = create database [addToken] node = db [fire] Pin db... [receiveOffer] node = dbFork [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Fork node dbFork... [addToken] node = dbFork [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Output activity parameter node database... [addToken] node = database [removeToken] node = db [fire] Checking if create database should fire again... [run] Sending offer to node create contact1. [receiveOffer] node = create contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact1... [putToken] node = create contact1 [addToken] node = ct1 [fire] Pin ct1... [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg1.ct... [addToken] node = reg1.ct [removeToken] node = ct1 [fire] Pin reg1.db... [addToken] node = reg1.db [_endIsolation] End isolation. [fire] Action register contact1... [getTokens] node = register contact1 (pin: reg1.ct) [removeToken] node = reg1.ct [getTokens] node = register contact1 (pin: reg1.db) [removeToken] node = reg1.db [fire] Checking if register contact1 should fire again... [fire] Checking if create contact1 should fire again... [run] Sending offer to node create contact2. [receiveOffer] node = create contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact2... [putToken] node = create contact2 [addToken] node = ct2 [fire] Pin ct2... [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg2.ct... [addToken] node = reg2.ct [removeToken] node = ct2 [fire] Pin reg2.db... [addToken] node = reg2.db [removeToken] node = dbFork [_endIsolation] End isolation. [fire] Action register contact2... [readTokens] node = register contact2 (pin: reg2.ct) [readTokens] node = register contact2 (pin: reg2.db) [getTokens] node = register contact2 (pin: reg2.ct) [removeToken] node = reg2.ct [getTokens] node = register contact2 (pin: reg2.db) [removeToken] node = reg2.db [fire] Checking if register contact2 should fire again... [fire] Checking if create contact2 should fire again... [execute] Activity Test2 completed. [destroy] object = fUML.Semantics.Activities.IntermediateActivities.ActivityExecution@116fe10 19 Apr 2009 22:14:17,562 DEBUG environment.ExecutionEnvironment output parameter 'database' has 1 value(s) [execute] output parameter 'database' has 1 value(s) 19 Apr 2009 22:14:17,578 DEBUG environment.ExecutionEnvironment value [0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@820671: Database) [execute] value [0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@820671: Database) # Checkpointing (runtime objects their reified representation as value specifications) Mapping the locus: (9 extensional values) done. => classifier: Database has 1 instance(s). <005/009> = (Instance){Database@0x177cd4a} => runtime value: fUML.Semantics.Classes.Kernel.Object_@820671 => classifier: Contact has 2 instance(s). <006/009> = (Instance){Contact@0x46c14f} => runtime value: fUML.Semantics.Classes.Kernel.Object_@f4a9a3 <008/009> = (Instance){Contact@0x13d476c} => runtime value: fUML.Semantics.Classes.Kernel.Object_@6d136c => classifier: StandardOutputChannel has 1 instance(s). <001/009> = (Instance){StandardOutputChannel@0x1c42a9} => runtime value: fUML.Library.ChannelImplementation.StandardOutputChannelObject@74f356 => classifier: InputChannel has 1 instance(s). <002/009> = (Instance){InputChannel@0x15ca0cc} => runtime value: fUML.Library.PipeImplementation.PipeInputChannelObject@d47289 => classifier: StandardOutputChannel has 1 instance(s). <004/009> = (Instance){StandardOutputChannel@0x40e825} => runtime value: org.modeldriven.fuml.library.channel.StandardOutputChannelObject@abb9e4 => classifier: A_registeredContacts_database has 2 instance(s). <007/009> = (Instance){A_registeredContacts_database@0x148dc72} => runtime value: fUML.Semantics.Classes.Kernel.Link@8d444 . registeredContacts = <006> . database = <005> <009/009> = (Instance){A_registeredContacts_database@0x80e4ee} => runtime value: fUML.Semantics.Classes.Kernel.Link@116270f . registeredContacts = <008> . database = <005> => classifier: OutputChannel has 1 instance(s). <003/009> = (Instance){OutputChannel@0x35c584} => runtime value: fUML.Library.PipeImplementation.PipeOutputChannelObject@1d6f445 (2) represents the 13873 resolution from ballot1. It does not work for me: # Loading & running: E:\dsltk-1.0M6\workspace\org.modeldriven.executable-sysml\test\mdxml\Test1.mdxml 19 Apr 2009 22:15:44,640 INFO fuml.FUML loading file, Test1.mdxml 19 Apr 2009 22:15:48,796 INFO config.FumlConfiguration initializing... 19 Apr 2009 22:15:48,796 INFO config.FumlConfigDataBinding loading schema chain... 19 Apr 2009 22:15:48,953 INFO library.Library initializing... 19 Apr 2009 22:15:48,953 INFO library.Library loading file, fUML_Library.uml 19 Apr 2009 22:15:49,109 INFO library.Library registering element: OutputChannel (fUML-Library.mdzip#_jJIzHXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: ListFunctions (fUML-Library.mdzip#_jJIy6nOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: TextInputChannel (fUML-Library.mdzip#_jJIzJnOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: IntegerFunctions (fUML-Library.mdzip#_jJIyV3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Not (fUML-Library.mdzip#_jJIy2HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Div (fUML-Library.mdzip#_jJIybXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Size (fUML-Library.mdzip#_jJIy3HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: PrimitiveBehaviors (fUML-Library.mdzip#_jJIyU3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIyjXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Implies (fUML-Library.mdzip#_jJIy1HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyq3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Or (fUML-Library.mdzip#_jJIyyHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Common (fUML-Library.mdzip#_jJIzyXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: TextOutputChannel (fUML-Library.mdzip#_jJIzUHOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyhXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyo3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyr3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: fUML_Library (fUML-Library.mdzip#_jJIyUXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Channel (fUML-Library.mdzip#_jJIy_HOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIylHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyenOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyiXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyt3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ListSize (fUML-Library.mdzip#_jJIy63OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyp3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyunOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Notification (fUML-Library.mdzip#_jJIzynOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyWHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Listener (fUML-Library.mdzip#_jJIzznOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyXXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: + (fUML-Library.mdzip#_jJIyYXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIys3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: UnlimitedNaturalFunctions (fUML-Library.mdzip#_jJIymXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: StandardInputChannel (fUML-Library.mdzip#_jJIzb3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: * (fUML-Library.mdzip#_jJIyaXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Neg (fUML-Library.mdzip#_jJIyc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Substring (fUML-Library.mdzip#_jJIy43OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToBoolean (fUML-Library.mdzip#_jJIywHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Status (fUML-Library.mdzip#_jJIz0HOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: - (fUML-Library.mdzip#_jJIyZXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: StringFunctions (fUML-Library.mdzip#_jJIy23OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIykXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Abs (fUML-Library.mdzip#_jJIygnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyfnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Concat (fUML-Library.mdzip#_jJIy33OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Mod (fUML-Library.mdzip#_jJIydnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyxXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: And (fUML-Library.mdzip#_jJIy0HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ListGet (fUML-Library.mdzip#_jJIy8HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: StandardOutputChannel (fUML-Library.mdzip#_jJIzcXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: InputChannel (fUML-Library.mdzip#_jJIzC3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ReadLine (fUML-Library.mdzip#_jJIzoXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIymnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: BasicInputOutput (fUML-Library.mdzip#_jJIy-HOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyn3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: WriteLine (fUML-Library.mdzip#_jJIzc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: ActiveChannel (fUML-Library.mdzip#_jJIzm3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: BooleanFunctions (fUML-Library.mdzip#_jJIyv3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Xor (fUML-Library.mdzip#_jJIyzHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,142 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "UML_Standard_Profile.xml#magicdraw_uml_standard_profile_v_0001". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Package (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,162 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLConformance.mdxml#_16_0_1_ff3038a_1235075564546_996224_750". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,167 Column: 114) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLCompliance.mdxml#_16_0_1_ff3038a_1234741872546_621546_10270". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,172 Column: 117) - Element or attribute "packagedElement" contains an invalid external reference, "CrossOutSubsetting.mdxml#_16_0_1_ff3038a_1235016563031_566037_3434". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,625 INFO fuml.FUML executing behavior: Test2 19 Apr 2009 22:15:49,625 DEBUG environment.ExecutionEnvironment creating 1 parameter(s): [execute] creating 1 parameter(s): 19 Apr 2009 22:15:49,625 DEBUG environment.ExecutionEnvironment checking parameter 'database' 19 Apr 2009 22:15:49,625 DEBUG environment.ExecutionEnvironment executing the behavior... [execute] executing the behavior... [execute] Activity Test2... [createNodeActivations] Creating a node activation for init... [createNodeActivations] Creating a node activation for create database... [createNodeActivations] Creating a node activation for db... [createNodeActivations] Creating a node activation for create contact1... [createNodeActivations] Creating a node activation for ct1... [createNodeActivations] Creating a node activation for create contact2... [createNodeActivations] Creating a node activation for ct2... [createNodeActivations] Creating a node activation for register contact1... [createNodeActivations] Creating a node activation for reg1.ct... [createNodeActivations] Creating a node activation for reg1.db... [createNodeActivations] Creating a node activation for dbFork... [createNodeActivations] Creating a node activation for register contact2... [createNodeActivations] Creating a node activation for reg2.ct... [createNodeActivations] Creating a node activation for reg2.db... [createNodeActivations] Creating a node activation for database... [createEdgeInstances] Creating an edge instance from init to create database. [createEdgeInstances] Creating an edge instance from db to dbFork. [createEdgeInstances] Creating an edge instance from ct1 to reg1.ct. [createEdgeInstances] Creating an edge instance from ct2 to reg2.ct. [createEdgeInstances] Creating an edge instance from dbFork to reg1.db. [createEdgeInstances] Creating an edge instance from dbFork to reg2.db. [createEdgeInstances] Creating an edge instance from dbFork to database. [run] node = init [run] node = create database [run] node = db [run] node = create contact1 [run] node = ct1 [run] node = create contact2 [run] node = ct2 [run] node = register contact1 [run] node = reg1.ct [run] node = reg1.db [run] node = dbFork [run] node = register contact2 [run] node = reg2.ct [run] node = reg2.db [run] node = database [run] Checking for enabled nodes... [run] Checking node init... [run] Node init is enabled. [run] Checking node create database... [run] Checking node db... [run] Checking node create contact1... [run] Node create contact1 is enabled. [run] Checking node ct1... [run] Checking node create contact2... [run] Node create contact2 is enabled. [run] Checking node ct2... [run] Checking node register contact1... [run] Checking node reg1.ct... [run] Checking node reg1.db... [run] Checking node dbFork... [run] Checking node register contact2... [run] Checking node reg2.ct... [run] Checking node reg2.db... [run] Checking node database... [run] Sending offer to node init. [receiveOffer] node = init [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [addToken] node = init [receiveOffer] node = create database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [removeToken] node = init [_endIsolation] End isolation. [fire] Action create database... [putToken] node = create database [addToken] node = db [fire] Pin db... [receiveOffer] node = dbFork [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Fork node dbFork... [addToken] node = dbFork [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Output activity parameter node database... [addToken] node = database [removeToken] node = db [fire] Checking if create database should fire again... [run] Sending offer to node create contact1. [receiveOffer] node = create contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact1... [putToken] node = create contact1 [addToken] node = ct1 [fire] Pin ct1... [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg1.ct... [addToken] node = reg1.ct [removeToken] node = ct1 [fire] Pin reg1.db... [addToken] node = reg1.db [_endIsolation] End isolation. [fire] Action register contact1... [getTokens] node = register contact1 (pin: reg1.ct) [removeToken] node = reg1.ct [getTokens] node = register contact1 (pin: reg1.db) [removeToken] node = reg1.db [fire] Checking if register contact1 should fire again... [fire] Checking if create contact1 should fire again... [run] Sending offer to node create contact2. [receiveOffer] node = create contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact2... [putToken] node = create contact2 [addToken] node = ct2 [fire] Pin ct2... [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg2.ct... [addToken] node = reg2.ct [removeToken] node = ct2 [fire] Pin reg2.db... [addToken] node = reg2.db [removeToken] node = dbFork [_endIsolation] End isolation. [fire] Action register contact2... [readTokens] node = register contact2 (pin: reg2.ct) 19 Apr 2009 22:15:49,656 ERROR fuml.FUML Index: 0, Size: 0 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at fUML.Semantics.Classes.Kernel.ValueList.getValue(ValueList.java:24) at fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(LinkActionActivation.java:107) at fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction(CreateLinkActionActivation.java:86) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:143) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Actions.BasicActions.InputPinActivation.receiveOffer(InputPinActivation.java:64) at fUML.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance.sendOffer(ActivityEdgeInstance.java:91) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.sendOffers(ActivityNodeActivation.java:197) at fUML.Semantics.Activities.IntermediateActivities.ObjectNodeActivation.sendUnofferedTokens(ObjectNodeActivation.java:146) at fUML.Semantics.Actions.BasicActions.PinActivation.fire(PinActivation.java:70) at fUML.Semantics.Actions.BasicActions.ActionActivation.sendOffers(ActionActivation.java:249) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.run(ActivityNodeActivationGroup.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.activate(ActivityNodeActivationGroup.java:185) at fUML.Semantics.Activities.IntermediateActivities.ActivityExecution.execute(ActivityExecution.java:94) at fUML.Semantics.Loci.Executor.execute(Executor.java:74) at org.modeldriven.fuml.environment.ExecutionEnvironment.execute(ExecutionEnvironment.java:40) at org.modeldriven.fuml.FUML.execute(FUML.java:83) at org.modeldriven.fuml.FUML.(FUML.java:56) at gov.nasa.jpl.fuml.FastAndFuriousFUML.main(FastAndFuriousFUML.java:336) Exception in thread "main" org.modeldriven.fuml.FumlException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at org.modeldriven.fuml.FUML.execute(FUML.java:87) at org.modeldriven.fuml.FUML.(FUML.java:56) at gov.nasa.jpl.fuml.FastAndFuriousFUML.main(FastAndFuriousFUML.java:336) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at fUML.Semantics.Classes.Kernel.ValueList.getValue(ValueList.java:24) at fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(LinkActionActivation.java:107) at fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction(CreateLinkActionActivation.java:86) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:143) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Actions.BasicActions.InputPinActivation.receiveOffer(InputPinActivation.java:64) at fUML.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance.sendOffer(ActivityEdgeInstance.java:91) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.sendOffers(ActivityNodeActivation.java:197) at fUML.Semantics.Activities.IntermediateActivities.ObjectNodeActivation.sendUnofferedTokens(ObjectNodeActivation.java:146) at fUML.Semantics.Actions.BasicActions.PinActivation.fire(PinActivation.java:70) at fUML.Semantics.Actions.BasicActions.ActionActivation.sendOffers(ActionActivation.java:249) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.run(ActivityNodeActivationGroup.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.activate(ActivityNodeActivationGroup.java:185) at fUML.Semantics.Activities.IntermediateActivities.ActivityExecution.execute(ActivityExecution.java:94) at fUML.Semantics.Loci.Executor.execute(Executor.java:74) at org.modeldriven.fuml.environment.ExecutionEnvironment.execute(ExecutionEnvironment.java:40) at org.modeldriven.fuml.FUML.execute(FUML.java:83) ... 2 more Why? See LinkActionActivation: public boolean endMatchesEndData(fUML.Semantics.Classes.Kernel.Link link, fUML.Syntax.Actions.IntermediateActions.LinkEndData endData) { // 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); // Ops, no tokens! There are 21 different places in fUML/Semantics including the above where something like this can happen. I added a comment to those places that are specifically related to issue 13873. fUML/Semantics/Actions/BasicActions/CallOperationActionActivation.java: Value target = this.takeTokens(action.target).getValue(0); // FUML #13873 fUML/Semantics/Actions/BasicActions/SendSignalActionActivation.java: Value target = this.takeTokens(action.target).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/AcceptEventActionActivation.java: this.putTokens(resultPins.getValue(0), result); fUML/Semantics/Actions/CompleteActions/ReadIsClassifiedObjectActionActivation.java: Value input = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/ReclassifyObjectActionActivation.java: Value input = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java: Value object = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/StartObjectBehaviorActionActivation.java: Value object = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/AddStructuralFeatureValueActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/ClearAssociationActionActivation.java: Value objectValue = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/ClearStructuralFeatureActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/CreateLinkActionActivation.java: insertAt = ((UnlimitedNaturalValue) (this .takeTokens(endData.insertAt).getValue(0))).value.naturalValue; // FUML #13873 fUML/Semantics/Actions/IntermediateActions/DestroyObjectActionActivation.java: Value value = this.takeTokens(action.target).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/LinkActionActivation.java: Value endValue = this.getTokens(endData.value).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/LinkActionActivation.java: .getTokens(((LinkEndDestructionData) endData).destroyAt).getValue(0))).value.naturalValue; // FUML #13873 fUML/Semantics/Actions/IntermediateActions/ReadStructuralFeatureActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java: Value inputValue = this.takeTokens(action.value).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java: Value firstValue = this.takeTokens(action.first).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java: Value secondValue = this.takeTokens(action.second).getValue(0); // FUML #13873 fUML/Semantics/Activities/IntermediateActivities/ActivityNodeActivation.java: this.heldTokens.getValue(0).withdraw(); fUML/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java: value = ((ObjectToken) (tokens.getValue(0))).value; It is possible that I may have missed something in updating my sandbox based on the ballot1 resolutions; however, I can assure you that I systematically went through every modification I did and through each resolution in ballot1. It is possible that I may have missed something. - Nicolas. From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Monday, April 20, 2009 6:08 AM To: Rouquette, Nicolas F Cc: fuml-ftf@omg.org Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Nicolas . I don.t agree. As explained in the resolution to Issue 13310, the reason to use getUnofferedTokens for an input pin is that this operation respects the pin multiplicity upper bound, while getTokens does not. There is no limitation on how many values can be held by an input pin . the only limitation is that a single firing of an action can only remove up to the maximum number of values allowed by the multiplicity upper bound of the pin. To respect this, ActionActivation::getTokens uses getUnofferedTokens, and there should be no other option. Now, perhaps getUnofferedTokens is an unfortunate name. It is an inherited operation from ObjectNode, and reflects the idea that tokens can get offered in batches from an object node. However, for an input pin of an action other than a structured action, values are not removed by offering tokens, but, rather, explicitly by the firing of the action. Nevertheless, the number removed must be limited by the pin multiplicity upper bound (note that this is specific behavior to pins . object nodes, in general, are not multiplicity elements). But coming up with a better name for ObjectNode::getUnofferedTokens, if you think this is too confusing, should be handled as a separate issue. -- Ed PS: Because the issue in this case isn.t really the .offering. of tokens, despite the name of getUnofferedTokens, the relative ordering of the offering of tokens is not really an issue. However, I thought I would mention that the rule is that sequential offers (which may contain multiple tokens) are always accepted in the order in which they are offered. Within an offer of multiple tokens, the ordering is always based on the ordering given by the source of the values in the offer. If that source was ordered, then one can rely on that ordering of the tokens, otherwise no particular ordering is guaranteed. -------------------------------------------------------------------------------- From: Rouquette, Nicolas F [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Monday, April 20, 2009 4:53 AM To: Ed Seidewitz; fuml-ftf@omg.org Subject: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 I updated my fUML reference implementation with all of the fixes in ballot1 and found a few glitches. This message is about the resolution for 13873 in ballot 1 which includes: ActionActivation::getTokens(in pin: InputPin): Values[*] // 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.name + ", pin = " + pin.name); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getUnofferedTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken)token).value; if (value != null) { values.addValue(value); } } return values; This operation creates room for confusion between different kinds of operations called .getTokens(.). that differ slightly on whether they report on just the held tokens or the held tokens that haven.t been offered yet. I suggest renaming the above operation: ActionActivation::getUnofferedTokens(InputPin) if it is useful. For the purpose of this resolution, -- i.e., to support LinkActionActivation::endMatchesEndData(Link, LinkEndData), we need ActionActivation::getTokens(InputPin), to call pinActivation.getTokens() because we do not have any guarantees about the relative ordering when the input pin held tokens will be offered but not yet consumed and testing for the link action activation. At minimum, this resolution needs to be changed with: ActionActivation::getTokens(in pin: InputPin): Values[*] // 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.name + ", pin = " + pin.name); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken)token).value; if (value != null) { values.addValue(value); } } return values; - Nicolas. From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Friday, April 17, 2009 3:21 PM To: fuml-ftf@omg.org Subject: fUML FTF Ballot 1 Attached (at long last!) is the first fUML FTF issue resolution ballot. Sorry for sending this out late on a Friday evening (at last that is what it is here on the US East Coast.), but I don.t think any of these issue resolutions will be controversial. Therefore, I am planning for the voting period to start on Monday. If anyone happens to see any problems with the resolutions over the weekend, please let me know, and I can tweak the ballot. Other wise, voting will be open from Monday, 20 April 2009 (at 6:00 PM EDT) through Monday, 4 May (at 6:00 PM EDT). Each named FTF representative should vote. Instructions for voting are on the first page of the ballot. This ballot includes resolutions for most of the currently open issues. A couple of this ones not resolved will require some discussion. And, when I get time, I am planning to submit some more that will probably need careful consideration by the group. But let.s get these simple ones passed first! Thanks. -- Ed Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Date: Mon, 20 Apr 2009 18:39:14 -0400 X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Thread-Index: Acm/qs9M3uFwwmJJT1umq+WRGD/kHgBahjCAAChtWgAAD/rxoAAEgtqA From: "Ed Seidewitz" To: "Rouquette, Nicolas F" Cc: Nicolas . You implemented all the issue resolutions, not just 13873, right? In particular, you implemented all of 13310, particularly the part at the end about removing the call to this.sendUnofferedTokens from PinActivation::fire? -- Ed Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Date: Mon, 20 Apr 2009 23:20:10 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Thread-Index: Acm/qs9M3uFwwmJJT1umq+WRGD/kHgBahjCAAChtWgAAD/rxoAAONy0g From: "Ed Seidewitz" To: "Rouquette, Nicolas F" Cc: Nicolas . I have reproduced your model as a test case in the ModelEx version of the execution model (albeit without the real domain context), and it runs correctly (see below). I believe that the resolution to 13873 is correct, in combination with the other resolutions in Ballot 1. -- Ed [testLinkCreator] Setting up... [testLinkCreator] Testing... [testExecute] Executing the behavior... [execute] Activity ABLinkCreator... [createNodeActivations] Creating a node activation for Init... [createNodeActivations] Creating a node activation for Create A... [createNodeActivations] Creating a node activation for Create A.a... [createNodeActivations] Creating a node activation for Create B1... [createNodeActivations] Creating a node activation for Create B1.b... [createNodeActivations] Creating a node activation for Create B2... [createNodeActivations] Creating a node activation for Create B2.b... [createNodeActivations] Creating a node activation for Fork... [createNodeActivations] Creating a node activation for Parameter(output)... [createNodeActivations] Creating a node activation for Create Link 1... [createNodeActivations] Creating a node activation for Create Link 1.a... [createNodeActivations] Creating a node activation for Create Link 1.b... [createNodeActivations] Creating a node activation for Create Link 2... [createNodeActivations] Creating a node activation for Create Link 2.a... [createNodeActivations] Creating a node activation for Create Link 2.b... [createEdgeInstances] Creating an edge instance from Init to Create A. [createEdgeInstances] Creating an edge instance from Create A.a to Fork. [createEdgeInstances] Creating an edge instance from Fork to Parameter(output). [createEdgeInstances] Creating an edge instance from Fork to Create Link 1.a. [createEdgeInstances] Creating an edge instance from Fork to Create Link 2.a. [createEdgeInstances] Creating an edge instance from Create B1.b to Create Link 1.b. [createEdgeInstances] Creating an edge instance from Create B2.b to Create Link 2.b. [run] node = Init [run] node = Create A [run] node = Create A.a [run] node = Create B1 [run] node = Create B1.b [run] node = Create B2 [run] node = Create B2.b [run] node = Fork [run] node = Parameter(output) [run] node = Create Link 1 [run] node = Create Link 1.a [run] node = Create Link 1.b [run] node = Create Link 2 [run] node = Create Link 2.a [run] node = Create Link 2.b [run] Checking for enabled nodes... [run] Checking node Init... [run] Node Init is enabled. [run] Checking node Create A... [run] Checking node Create A.a... [run] Checking node Create B1... [run] Node Create B1 is enabled. [run] Checking node Create B1.b... [run] Checking node Create B2... [run] Node Create B2 is enabled. [run] Checking node Create B2.b... [run] Checking node Fork... [run] Checking node Parameter(output)... [run] Checking node Create Link 1... [run] Checking node Create Link 1.a... [run] Checking node Create Link 1.b... [run] Checking node Create Link 2... [run] Checking node Create Link 2.a... [run] Checking node Create Link 2.b... [run] Sending offer to node Init. [receiveOffer] node = Init [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [addToken] node = Init [receiveOffer] node = Create A [_beginIsolation] Begin isolation. [receiveOffer] Firing. [removeToken] node = Init [_endIsolation] End isolation. [fire] Action Create A... [putToken] node = Create A [addToken] node = Create A.a [fire] Pin Create A.a... [receiveOffer] node = Fork [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Fork node Fork... [addToken] node = Fork [receiveOffer] node = Parameter(output) [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Output activity parameter node Parameter(output)... [addToken] node = Parameter(output) [removeToken] node = Create A.a [receiveOffer] node = Create Link 1 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = Create Link 2 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [fire] Checking if Create A should fire again... [run] Sending offer to node Create B1. [receiveOffer] node = Create B1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action Create B1... [putToken] node = Create B1 [addToken] node = Create B1.b [fire] Pin Create B1.b... [receiveOffer] node = Create Link 1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin Create Link 1.a... [addToken] node = Create Link 1.a [fire] Pin Create Link 1.b... [addToken] node = Create Link 1.b [removeToken] node = Create B1.b [_endIsolation] End isolation. [fire] Action Create Link 1... [takeTokens] node = Create Link 1, pin = Create Link 1.a [removeToken] node = Create Link 1.a [takeTokens] node = Create Link 1, pin = Create Link 1.b [removeToken] node = Create Link 1.b [fire] Checking if Create Link 1 should fire again... [fire] Checking if Create B1 should fire again... [run] Sending offer to node Create B2. [receiveOffer] node = Create B2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action Create B2... [putToken] node = Create B2 [addToken] node = Create B2.b [fire] Pin Create B2.b... [receiveOffer] node = Create Link 2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin Create Link 2.a... [addToken] node = Create Link 2.a [removeToken] node = Fork [fire] Pin Create Link 2.b... [addToken] node = Create Link 2.b [removeToken] node = Create B2.b [_endIsolation] End isolation. [fire] Action Create Link 2... [getTokens] node = Create Link 2, pin = Create Link 2.a [getTokens] node = Create Link 2, pin = Create Link 2.b [takeTokens] node = Create Link 2, pin = Create Link 2.a [removeToken] node = Create Link 2.a [takeTokens] node = Create Link 2, pin = Create Link 2.b [removeToken] node = Create Link 2.b [fire] Checking if Create Link 2 should fire again... [fire] Checking if Create B2 should fire again... [execute] Activity ABLinkCreator completed. [destroy] object = fUML.Semantics.Activities.IntermediateActivities.ActivityExecution@57225722 [testExecute] Output parameter output has 1 value(s): [testExecute] value [0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@436e436e: A) [testLinkCreator] Done! AB has 2 instance(s): [0] (fUML.Semantics.Classes.Kernel.Link@4e8a4e8a: AB a[0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@436e436e: A) b[0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@4a624a62: B)) [1] (fUML.Semantics.Classes.Kernel.Link@65e465e4: AB a[0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@436e436e: A) b[0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@59985998: B)) From: "Rouquette, Nicolas F" To: Ed Seidewitz CC: "fuml-ftf@omg.org" Date: Tue, 21 Apr 2009 13:40:57 -0700 Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Thread-Topic: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Thread-Index: Acm/qs9M3uFwwmJJT1umq+WRGD/kHgBahjCAAChtWgAAD/rxoAAEgtqAAA6zCeA= Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: ums-smtp.jpl.nasa.gov [128.149.137.72] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized Bingo! I had indeed forgotten to remove the last part of 13310. . Nicolas. From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Monday, April 20, 2009 3:39 PM To: Rouquette, Nicolas F Cc: fuml-ftf@omg.org Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Nicolas . You implemented all the issue resolutions, not just 13873, right? In particular, you implemented all of 13310, particularly the part at the end about removing the call to this.sendUnofferedTokens from PinActivation::fire? -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Monday, April 20, 2009 4:45 PM To: Ed Seidewitz Cc: fuml-ftf@omg.org Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Ed, In my tests, I do see a material difference between: 1) ActionActivation.getTokens(InputPin) calls pinActivation.getTokens(InputPin) vs. 2) ActionActivation.getTokens(InputPin) calls pinActivation.getUnofferedTokens(InputPin) My tests run fine with the former but I can.t get anything significant to run with the latter. Here.s an example that illustrates the difference: Here is a simple test: With (1), this works . i.e., the value on the output activity parameter node matches what I get when I checkpoint the state of the execution locus: # Loading & running: E:\dsltk-1.0M6\workspace\org.modeldriven.executable-sysml\test\mdxml\Test1.mdxml 19 Apr 2009 22:14:00,859 INFO fuml.FUML loading file, Test1.mdxml 19 Apr 2009 22:14:11,734 INFO config.FumlConfiguration initializing... 19 Apr 2009 22:14:11,750 INFO config.FumlConfigDataBinding loading schema chain... 19 Apr 2009 22:14:14,140 INFO library.Library initializing... 19 Apr 2009 22:14:14,140 INFO library.Library loading file, fUML_Library.uml 19 Apr 2009 22:14:15,421 INFO library.Library registering element: OutputChannel (fUML-Library.mdzip#_jJIzHXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: ListFunctions (fUML-Library.mdzip#_jJIy6nOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: TextInputChannel (fUML-Library.mdzip#_jJIzJnOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: IntegerFunctions (fUML-Library.mdzip#_jJIyV3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Not (fUML-Library.mdzip#_jJIy2HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Div (fUML-Library.mdzip#_jJIybXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Size (fUML-Library.mdzip#_jJIy3HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: PrimitiveBehaviors (fUML-Library.mdzip#_jJIyU3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIyjXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Implies (fUML-Library.mdzip#_jJIy1HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyq3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Or (fUML-Library.mdzip#_jJIyyHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: Common (fUML-Library.mdzip#_jJIzyXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering element: TextOutputChannel (fUML-Library.mdzip#_jJIzUHOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyhXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,437 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyo3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyr3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: fUML_Library (fUML-Library.mdzip#_jJIyUXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: Channel (fUML-Library.mdzip#_jJIy_HOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIylHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyenOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyiXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyt3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ListSize (fUML-Library.mdzip#_jJIy63OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyp3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyunOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: Notification (fUML-Library.mdzip#_jJIzynOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyWHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,453 INFO library.Library registering element: Listener (fUML-Library.mdzip#_jJIzznOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,453 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyXXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: + (fUML-Library.mdzip#_jJIyYXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIys3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: UnlimitedNaturalFunctions (fUML-Library.mdzip#_jJIymXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: StandardInputChannel (fUML-Library.mdzip#_jJIzb3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: * (fUML-Library.mdzip#_jJIyaXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Neg (fUML-Library.mdzip#_jJIyc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Substring (fUML-Library.mdzip#_jJIy43OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ToBoolean (fUML-Library.mdzip#_jJIywHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: Status (fUML-Library.mdzip#_jJIz0HOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: - (fUML-Library.mdzip#_jJIyZXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: StringFunctions (fUML-Library.mdzip#_jJIy23OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIykXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Abs (fUML-Library.mdzip#_jJIygnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyfnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Concat (fUML-Library.mdzip#_jJIy33OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: Mod (fUML-Library.mdzip#_jJIydnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyxXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: And (fUML-Library.mdzip#_jJIy0HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ListGet (fUML-Library.mdzip#_jJIy8HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: StandardOutputChannel (fUML-Library.mdzip#_jJIzcXOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering element: InputChannel (fUML-Library.mdzip#_jJIzC3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,484 INFO library.Library registering behavior: ReadLine (fUML-Library.mdzip#_jJIzoXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIymnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering element: BasicInputOutput (fUML-Library.mdzip#_jJIy-HOeEd2TgN94jve35g) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyn3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: WriteLine (fUML-Library.mdzip#_jJIzc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:15,500 INFO library.Library registering element: ActiveChannel (fUML-Library.mdzip#_jJIzm3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,500 INFO library.Library registering element: BooleanFunctions (fUML-Library.mdzip#_jJIyv3OeEd2TgN94jve35g) 19 Apr 2009 22:14:15,500 INFO library.Library registering behavior: Xor (fUML-Library.mdzip#_jJIyzHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:14:16,015 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,142 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "UML_Standard_Profile.xml#magicdraw_uml_standard_profile_v_0001". 19 Apr 2009 22:14:16,015 WARN fuml.PackagedElementImport imported invalid Package (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:16,031 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,162 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLConformance.mdxml#_16_0_1_ff3038a_1235075564546_996224_750". 19 Apr 2009 22:14:16,031 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:16,031 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,167 Column: 114) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLCompliance.mdxml#_16_0_1_ff3038a_1234741872546_621546_10270". 19 Apr 2009 22:14:16,031 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:16,031 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,172 Column: 117) - Element or attribute "packagedElement" contains an invalid external reference, "CrossOutSubsetting.mdxml#_16_0_1_ff3038a_1235016563031_566037_3434". 19 Apr 2009 22:14:16,031 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:14:17,015 INFO fuml.FUML executing behavior: Test2 19 Apr 2009 22:14:17,015 DEBUG environment.ExecutionEnvironment creating 1 parameter(s): [execute] creating 1 parameter(s): 19 Apr 2009 22:14:17,015 DEBUG environment.ExecutionEnvironment checking parameter 'database' 19 Apr 2009 22:14:17,015 DEBUG environment.ExecutionEnvironment executing the behavior... [execute] executing the behavior... [execute] Activity Test2... [createNodeActivations] Creating a node activation for init... [createNodeActivations] Creating a node activation for create database... [createNodeActivations] Creating a node activation for db... [createNodeActivations] Creating a node activation for create contact1... [createNodeActivations] Creating a node activation for ct1... [createNodeActivations] Creating a node activation for create contact2... [createNodeActivations] Creating a node activation for ct2... [createNodeActivations] Creating a node activation for register contact1... [createNodeActivations] Creating a node activation for reg1.ct... [createNodeActivations] Creating a node activation for reg1.db... [createNodeActivations] Creating a node activation for dbFork... [createNodeActivations] Creating a node activation for register contact2... [createNodeActivations] Creating a node activation for reg2.ct... [createNodeActivations] Creating a node activation for reg2.db... [createNodeActivations] Creating a node activation for database... [createEdgeInstances] Creating an edge instance from init to create database. [createEdgeInstances] Creating an edge instance from db to dbFork. [createEdgeInstances] Creating an edge instance from ct1 to reg1.ct. [createEdgeInstances] Creating an edge instance from ct2 to reg2.ct. [createEdgeInstances] Creating an edge instance from dbFork to reg1.db. [createEdgeInstances] Creating an edge instance from dbFork to reg2.db. [createEdgeInstances] Creating an edge instance from dbFork to database. [run] node = init [run] node = create database [run] node = db [run] node = create contact1 [run] node = ct1 [run] node = create contact2 [run] node = ct2 [run] node = register contact1 [run] node = reg1.ct [run] node = reg1.db [run] node = dbFork [run] node = register contact2 [run] node = reg2.ct [run] node = reg2.db [run] node = database [run] Checking for enabled nodes... [run] Checking node init... [run] Node init is enabled. [run] Checking node create database... [run] Checking node db... [run] Checking node create contact1... [run] Node create contact1 is enabled. [run] Checking node ct1... [run] Checking node create contact2... [run] Node create contact2 is enabled. [run] Checking node ct2... [run] Checking node register contact1... [run] Checking node reg1.ct... [run] Checking node reg1.db... [run] Checking node dbFork... [run] Checking node register contact2... [run] Checking node reg2.ct... [run] Checking node reg2.db... [run] Checking node database... [run] Sending offer to node init. [receiveOffer] node = init [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [addToken] node = init [receiveOffer] node = create database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [removeToken] node = init [_endIsolation] End isolation. [fire] Action create database... [putToken] node = create database [addToken] node = db [fire] Pin db... [receiveOffer] node = dbFork [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Fork node dbFork... [addToken] node = dbFork [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Output activity parameter node database... [addToken] node = database [removeToken] node = db [fire] Checking if create database should fire again... [run] Sending offer to node create contact1. [receiveOffer] node = create contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact1... [putToken] node = create contact1 [addToken] node = ct1 [fire] Pin ct1... [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg1.ct... [addToken] node = reg1.ct [removeToken] node = ct1 [fire] Pin reg1.db... [addToken] node = reg1.db [_endIsolation] End isolation. [fire] Action register contact1... [getTokens] node = register contact1 (pin: reg1.ct) [removeToken] node = reg1.ct [getTokens] node = register contact1 (pin: reg1.db) [removeToken] node = reg1.db [fire] Checking if register contact1 should fire again... [fire] Checking if create contact1 should fire again... [run] Sending offer to node create contact2. [receiveOffer] node = create contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact2... [putToken] node = create contact2 [addToken] node = ct2 [fire] Pin ct2... [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg2.ct... [addToken] node = reg2.ct [removeToken] node = ct2 [fire] Pin reg2.db... [addToken] node = reg2.db [removeToken] node = dbFork [_endIsolation] End isolation. [fire] Action register contact2... [readTokens] node = register contact2 (pin: reg2.ct) [readTokens] node = register contact2 (pin: reg2.db) [getTokens] node = register contact2 (pin: reg2.ct) [removeToken] node = reg2.ct [getTokens] node = register contact2 (pin: reg2.db) [removeToken] node = reg2.db [fire] Checking if register contact2 should fire again... [fire] Checking if create contact2 should fire again... [execute] Activity Test2 completed. [destroy] object = fUML.Semantics.Activities.IntermediateActivities.ActivityExecution@116fe10 19 Apr 2009 22:14:17,562 DEBUG environment.ExecutionEnvironment output parameter 'database' has 1 value(s) [execute] output parameter 'database' has 1 value(s) 19 Apr 2009 22:14:17,578 DEBUG environment.ExecutionEnvironment value [0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@820671: Database) [execute] value [0] = Reference to (fUML.Semantics.Classes.Kernel.Object_@820671: Database) # Checkpointing (runtime objects their reified representation as value specifications) Mapping the locus: (9 extensional values) done. => classifier: Database has 1 instance(s). <005/009> = (Instance){Database@0x177cd4a} => runtime value: fUML.Semantics.Classes.Kernel.Object_@820671 => classifier: Contact has 2 instance(s). <006/009> = (Instance){Contact@0x46c14f} => runtime value: fUML.Semantics.Classes.Kernel.Object_@f4a9a3 <008/009> = (Instance){Contact@0x13d476c} => runtime value: fUML.Semantics.Classes.Kernel.Object_@6d136c => classifier: StandardOutputChannel has 1 instance(s). <001/009> = (Instance){StandardOutputChannel@0x1c42a9} => runtime value: fUML.Library.ChannelImplementation.StandardOutputChannelObject@74f356 => classifier: InputChannel has 1 instance(s). <002/009> = (Instance){InputChannel@0x15ca0cc} => runtime value: fUML.Library.PipeImplementation.PipeInputChannelObject@d47289 => classifier: StandardOutputChannel has 1 instance(s). <004/009> = (Instance){StandardOutputChannel@0x40e825} => runtime value: org.modeldriven.fuml.library.channel.StandardOutputChannelObject@abb9e4 => classifier: A_registeredContacts_database has 2 instance(s). <007/009> = (Instance){A_registeredContacts_database@0x148dc72} => runtime value: fUML.Semantics.Classes.Kernel.Link@8d444 . registeredContacts = <006> . database = <005> <009/009> = (Instance){A_registeredContacts_database@0x80e4ee} => runtime value: fUML.Semantics.Classes.Kernel.Link@116270f . registeredContacts = <008> . database = <005> => classifier: OutputChannel has 1 instance(s). <003/009> = (Instance){OutputChannel@0x35c584} => runtime value: fUML.Library.PipeImplementation.PipeOutputChannelObject@1d6f445 (2) represents the 13873 resolution from ballot1. It does not work for me: # Loading & running: E:\dsltk-1.0M6\workspace\org.modeldriven.executable-sysml\test\mdxml\Test1.mdxml 19 Apr 2009 22:15:44,640 INFO fuml.FUML loading file, Test1.mdxml 19 Apr 2009 22:15:48,796 INFO config.FumlConfiguration initializing... 19 Apr 2009 22:15:48,796 INFO config.FumlConfigDataBinding loading schema chain... 19 Apr 2009 22:15:48,953 INFO library.Library initializing... 19 Apr 2009 22:15:48,953 INFO library.Library loading file, fUML_Library.uml 19 Apr 2009 22:15:49,109 INFO library.Library registering element: OutputChannel (fUML-Library.mdzip#_jJIzHXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: ListFunctions (fUML-Library.mdzip#_jJIy6nOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: TextInputChannel (fUML-Library.mdzip#_jJIzJnOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: IntegerFunctions (fUML-Library.mdzip#_jJIyV3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Not (fUML-Library.mdzip#_jJIy2HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Div (fUML-Library.mdzip#_jJIybXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Size (fUML-Library.mdzip#_jJIy3HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering element: PrimitiveBehaviors (fUML-Library.mdzip#_jJIyU3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIyjXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,109 INFO library.Library registering behavior: Implies (fUML-Library.mdzip#_jJIy1HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyq3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Or (fUML-Library.mdzip#_jJIyyHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Common (fUML-Library.mdzip#_jJIzyXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: TextOutputChannel (fUML-Library.mdzip#_jJIzUHOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: > (fUML-Library.mdzip#_jJIyhXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyo3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyr3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: fUML_Library (fUML-Library.mdzip#_jJIyUXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Channel (fUML-Library.mdzip#_jJIy_HOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIylHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Max (fUML-Library.mdzip#_jJIyenOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: <= (fUML-Library.mdzip#_jJIyiXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyt3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ListSize (fUML-Library.mdzip#_jJIy63OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyp3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyunOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Notification (fUML-Library.mdzip#_jJIzynOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToInteger (fUML-Library.mdzip#_jJIyWHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Listener (fUML-Library.mdzip#_jJIzznOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyXXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: + (fUML-Library.mdzip#_jJIyYXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: >= (fUML-Library.mdzip#_jJIys3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: UnlimitedNaturalFunctions (fUML-Library.mdzip#_jJIymXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: StandardInputChannel (fUML-Library.mdzip#_jJIzb3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: * (fUML-Library.mdzip#_jJIyaXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Neg (fUML-Library.mdzip#_jJIyc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Substring (fUML-Library.mdzip#_jJIy43OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToBoolean (fUML-Library.mdzip#_jJIywHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: Status (fUML-Library.mdzip#_jJIz0HOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: - (fUML-Library.mdzip#_jJIyZXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: StringFunctions (fUML-Library.mdzip#_jJIy23OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIykXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Abs (fUML-Library.mdzip#_jJIygnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Min (fUML-Library.mdzip#_jJIyfnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Concat (fUML-Library.mdzip#_jJIy33OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Mod (fUML-Library.mdzip#_jJIydnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToString (fUML-Library.mdzip#_jJIyxXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: And (fUML-Library.mdzip#_jJIy0HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ListGet (fUML-Library.mdzip#_jJIy8HOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: StandardOutputChannel (fUML-Library.mdzip#_jJIzcXOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: InputChannel (fUML-Library.mdzip#_jJIzC3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ReadLine (fUML-Library.mdzip#_jJIzoXOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: ToUnlimitedNatural (fUML-Library.mdzip#_jJIymnOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: BasicInputOutput (fUML-Library.mdzip#_jJIy-HOeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: < (fUML-Library.mdzip#_jJIyn3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: WriteLine (fUML-Library.mdzip#_jJIzc3OeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: ActiveChannel (fUML-Library.mdzip#_jJIzm3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering element: BooleanFunctions (fUML-Library.mdzip#_jJIyv3OeEd2TgN94jve35g) 19 Apr 2009 22:15:49,140 INFO library.Library registering behavior: Xor (fUML-Library.mdzip#_jJIyzHOeEd2TgN94jve35g) (Execution: null) 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,142 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "UML_Standard_Profile.xml#magicdraw_uml_standard_profile_v_0001". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Package (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,162 Column: 113) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLConformance.mdxml#_16_0_1_ff3038a_1235075564546_996224_750". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,167 Column: 114) - Element or attribute "packagedElement" contains an invalid external reference, "fUMLCompliance.mdxml#_16_0_1_ff3038a_1234741872546_621546_10270". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,281 ERROR fuml.PackagedElementImport Invalid External Reference (Line: 4,172 Column: 117) - Element or attribute "packagedElement" contains an invalid external reference, "CrossOutSubsetting.mdxml#_16_0_1_ff3038a_1235016563031_566037_3434". 19 Apr 2009 22:15:49,281 WARN fuml.PackagedElementImport imported invalid Profile (null) 'unknown' as non-executable "stub" element 19 Apr 2009 22:15:49,625 INFO fuml.FUML executing behavior: Test2 19 Apr 2009 22:15:49,625 DEBUG environment.ExecutionEnvironment creating 1 parameter(s): [execute] creating 1 parameter(s): 19 Apr 2009 22:15:49,625 DEBUG environment.ExecutionEnvironment checking parameter 'database' 19 Apr 2009 22:15:49,625 DEBUG environment.ExecutionEnvironment executing the behavior... [execute] executing the behavior... [execute] Activity Test2... [createNodeActivations] Creating a node activation for init... [createNodeActivations] Creating a node activation for create database... [createNodeActivations] Creating a node activation for db... [createNodeActivations] Creating a node activation for create contact1... [createNodeActivations] Creating a node activation for ct1... [createNodeActivations] Creating a node activation for create contact2... [createNodeActivations] Creating a node activation for ct2... [createNodeActivations] Creating a node activation for register contact1... [createNodeActivations] Creating a node activation for reg1.ct... [createNodeActivations] Creating a node activation for reg1.db... [createNodeActivations] Creating a node activation for dbFork... [createNodeActivations] Creating a node activation for register contact2... [createNodeActivations] Creating a node activation for reg2.ct... [createNodeActivations] Creating a node activation for reg2.db... [createNodeActivations] Creating a node activation for database... [createEdgeInstances] Creating an edge instance from init to create database. [createEdgeInstances] Creating an edge instance from db to dbFork. [createEdgeInstances] Creating an edge instance from ct1 to reg1.ct. [createEdgeInstances] Creating an edge instance from ct2 to reg2.ct. [createEdgeInstances] Creating an edge instance from dbFork to reg1.db. [createEdgeInstances] Creating an edge instance from dbFork to reg2.db. [createEdgeInstances] Creating an edge instance from dbFork to database. [run] node = init [run] node = create database [run] node = db [run] node = create contact1 [run] node = ct1 [run] node = create contact2 [run] node = ct2 [run] node = register contact1 [run] node = reg1.ct [run] node = reg1.db [run] node = dbFork [run] node = register contact2 [run] node = reg2.ct [run] node = reg2.db [run] node = database [run] Checking for enabled nodes... [run] Checking node init... [run] Node init is enabled. [run] Checking node create database... [run] Checking node db... [run] Checking node create contact1... [run] Node create contact1 is enabled. [run] Checking node ct1... [run] Checking node create contact2... [run] Node create contact2 is enabled. [run] Checking node ct2... [run] Checking node register contact1... [run] Checking node reg1.ct... [run] Checking node reg1.db... [run] Checking node dbFork... [run] Checking node register contact2... [run] Checking node reg2.ct... [run] Checking node reg2.db... [run] Checking node database... [run] Sending offer to node init. [receiveOffer] node = init [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [addToken] node = init [receiveOffer] node = create database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [removeToken] node = init [_endIsolation] End isolation. [fire] Action create database... [putToken] node = create database [addToken] node = db [fire] Pin db... [receiveOffer] node = dbFork [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Fork node dbFork... [addToken] node = dbFork [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [_endIsolation] End isolation. [receiveOffer] node = database [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Output activity parameter node database... [addToken] node = database [removeToken] node = db [fire] Checking if create database should fire again... [run] Sending offer to node create contact1. [receiveOffer] node = create contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact1... [putToken] node = create contact1 [addToken] node = ct1 [fire] Pin ct1... [receiveOffer] node = register contact1 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg1.ct... [addToken] node = reg1.ct [removeToken] node = ct1 [fire] Pin reg1.db... [addToken] node = reg1.db [_endIsolation] End isolation. [fire] Action register contact1... [getTokens] node = register contact1 (pin: reg1.ct) [removeToken] node = reg1.ct [getTokens] node = register contact1 (pin: reg1.db) [removeToken] node = reg1.db [fire] Checking if register contact1 should fire again... [fire] Checking if create contact1 should fire again... [run] Sending offer to node create contact2. [receiveOffer] node = create contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [_endIsolation] End isolation. [fire] Action create contact2... [putToken] node = create contact2 [addToken] node = ct2 [fire] Pin ct2... [receiveOffer] node = register contact2 [_beginIsolation] Begin isolation. [receiveOffer] Firing. [fire] Pin reg2.ct... [addToken] node = reg2.ct [removeToken] node = ct2 [fire] Pin reg2.db... [addToken] node = reg2.db [removeToken] node = dbFork [_endIsolation] End isolation. [fire] Action register contact2... [readTokens] node = register contact2 (pin: reg2.ct) 19 Apr 2009 22:15:49,656 ERROR fuml.FUML Index: 0, Size: 0 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at fUML.Semantics.Classes.Kernel.ValueList.getValue(ValueList.java:24) at fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(LinkActionActivation.java:107) at fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction(CreateLinkActionActivation.java:86) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:143) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Actions.BasicActions.InputPinActivation.receiveOffer(InputPinActivation.java:64) at fUML.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance.sendOffer(ActivityEdgeInstance.java:91) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.sendOffers(ActivityNodeActivation.java:197) at fUML.Semantics.Activities.IntermediateActivities.ObjectNodeActivation.sendUnofferedTokens(ObjectNodeActivation.java:146) at fUML.Semantics.Actions.BasicActions.PinActivation.fire(PinActivation.java:70) at fUML.Semantics.Actions.BasicActions.ActionActivation.sendOffers(ActionActivation.java:249) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.run(ActivityNodeActivationGroup.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.activate(ActivityNodeActivationGroup.java:185) at fUML.Semantics.Activities.IntermediateActivities.ActivityExecution.execute(ActivityExecution.java:94) at fUML.Semantics.Loci.Executor.execute(Executor.java:74) at org.modeldriven.fuml.environment.ExecutionEnvironment.execute(ExecutionEnvironment.java:40) at org.modeldriven.fuml.FUML.execute(FUML.java:83) at org.modeldriven.fuml.FUML.(FUML.java:56) at gov.nasa.jpl.fuml.FastAndFuriousFUML.main(FastAndFuriousFUML.java:336) Exception in thread "main" org.modeldriven.fuml.FumlException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at org.modeldriven.fuml.FUML.execute(FUML.java:87) at org.modeldriven.fuml.FUML.(FUML.java:56) at gov.nasa.jpl.fuml.FastAndFuriousFUML.main(FastAndFuriousFUML.java:336) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at fUML.Semantics.Classes.Kernel.ValueList.getValue(ValueList.java:24) at fUML.Semantics.Actions.IntermediateActions.LinkActionActivation.endMatchesEndData(LinkActionActivation.java:107) at fUML.Semantics.Actions.IntermediateActions.CreateLinkActionActivation.doAction(CreateLinkActionActivation.java:86) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:143) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Actions.BasicActions.InputPinActivation.receiveOffer(InputPinActivation.java:64) at fUML.Semantics.Activities.IntermediateActivities.ActivityEdgeInstance.sendOffer(ActivityEdgeInstance.java:91) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.sendOffers(ActivityNodeActivation.java:197) at fUML.Semantics.Activities.IntermediateActivities.ObjectNodeActivation.sendUnofferedTokens(ObjectNodeActivation.java:146) at fUML.Semantics.Actions.BasicActions.PinActivation.fire(PinActivation.java:70) at fUML.Semantics.Actions.BasicActions.ActionActivation.sendOffers(ActionActivation.java:249) at fUML.Semantics.Actions.BasicActions.ActionActivation.fire(ActionActivation.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivation.receiveOffer(ActivityNodeActivation.java:141) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.run(ActivityNodeActivationGroup.java:144) at fUML.Semantics.Activities.IntermediateActivities.ActivityNodeActivationGroup.activate(ActivityNodeActivationGroup.java:185) at fUML.Semantics.Activities.IntermediateActivities.ActivityExecution.execute(ActivityExecution.java:94) at fUML.Semantics.Loci.Executor.execute(Executor.java:74) at org.modeldriven.fuml.environment.ExecutionEnvironment.execute(ExecutionEnvironment.java:40) at org.modeldriven.fuml.FUML.execute(FUML.java:83) ... 2 more Why? See LinkActionActivation: public boolean endMatchesEndData(fUML.Semantics.Classes.Kernel.Link link, fUML.Syntax.Actions.IntermediateActions.LinkEndData endData) { // 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); // Ops, no tokens! There are 21 different places in fUML/Semantics including the above where something like this can happen. I added a comment to those places that are specifically related to issue 13873. fUML/Semantics/Actions/BasicActions/CallOperationActionActivation.java: Value target = this.takeTokens(action.target).getValue(0); // FUML #13873 fUML/Semantics/Actions/BasicActions/SendSignalActionActivation.java: Value target = this.takeTokens(action.target).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/AcceptEventActionActivation.java: this.putTokens(resultPins.getValue(0), result); fUML/Semantics/Actions/CompleteActions/ReadIsClassifiedObjectActionActivation.java: Value input = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/ReclassifyObjectActionActivation.java: Value input = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java: Value object = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/CompleteActions/StartObjectBehaviorActionActivation.java: Value object = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/AddStructuralFeatureValueActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/ClearAssociationActionActivation.java: Value objectValue = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/ClearStructuralFeatureActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/CreateLinkActionActivation.java: insertAt = ((UnlimitedNaturalValue) (this .takeTokens(endData.insertAt).getValue(0))).value.naturalValue; // FUML #13873 fUML/Semantics/Actions/IntermediateActions/DestroyObjectActionActivation.java: Value value = this.takeTokens(action.target).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/LinkActionActivation.java: Value endValue = this.getTokens(endData.value).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/LinkActionActivation.java: .getTokens(((LinkEndDestructionData) endData).destroyAt).getValue(0))).value.naturalValue; // FUML #13873 fUML/Semantics/Actions/IntermediateActions/ReadStructuralFeatureActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java: Value value = this.takeTokens(action.object).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/RemoveStructuralFeatureValueActionActivation.java: Value inputValue = this.takeTokens(action.value).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java: Value firstValue = this.takeTokens(action.first).getValue(0); // FUML #13873 fUML/Semantics/Actions/IntermediateActions/TestIdentityActionActivation.java: Value secondValue = this.takeTokens(action.second).getValue(0); // FUML #13873 fUML/Semantics/Activities/IntermediateActivities/ActivityNodeActivation.java: this.heldTokens.getValue(0).withdraw(); fUML/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java: value = ((ObjectToken) (tokens.getValue(0))).value; It is possible that I may have missed something in updating my sandbox based on the ballot1 resolutions; however, I can assure you that I systematically went through every modification I did and through each resolution in ballot1. It is possible that I may have missed something. - Nicolas. From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Monday, April 20, 2009 6:08 AM To: Rouquette, Nicolas F Cc: fuml-ftf@omg.org Subject: RE: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 Nicolas . I don.t agree. As explained in the resolution to Issue 13310, the reason to use getUnofferedTokens for an input pin is that this operation respects the pin multiplicity upper bound, while getTokens does not. There is no limitation on how many values can be held by an input pin . the only limitation is that a single firing of an action can only remove up to the maximum number of values allowed by the multiplicity upper bound of the pin. To respect this, ActionActivation::getTokens uses getUnofferedTokens, and there should be no other option. Now, perhaps getUnofferedTokens is an unfortunate name. It is an inherited operation from ObjectNode, and reflects the idea that tokens can get offered in batches from an object node. However, for an input pin of an action other than a structured action, values are not removed by offering tokens, but, rather, explicitly by the firing of the action. Nevertheless, the number removed must be limited by the pin multiplicity upper bound (note that this is specific behavior to pins . object nodes, in general, are not multiplicity elements). But coming up with a better name for ObjectNode::getUnofferedTokens, if you think this is too confusing, should be handled as a separate issue. -- Ed PS: Because the issue in this case isn.t really the .offering. of tokens, despite the name of getUnofferedTokens, the relative ordering of the offering of tokens is not really an issue. However, I thought I would mention that the rule is that sequential offers (which may contain multiple tokens) are always accepted in the order in which they are offered. Within an offer of multiple tokens, the ordering is always based on the ordering given by the source of the values in the offer. If that source was ordered, then one can rely on that ordering of the tokens, otherwise no particular ordering is guaranteed. -------------------------------------------------------------------------------- From: Rouquette, Nicolas F [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Monday, April 20, 2009 4:53 AM To: Ed Seidewitz; fuml-ftf@omg.org Subject: Problem with Resolution 13873 -- RE: fUML FTF Ballot 1 I updated my fUML reference implementation with all of the fixes in ballot1 and found a few glitches. This message is about the resolution for 13873 in ballot 1 which includes: ActionActivation::getTokens(in pin: InputPin): Values[*] // 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.name + ", pin = " + pin.name); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getUnofferedTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken)token).value; if (value != null) { values.addValue(value); } } return values; This operation creates room for confusion between different kinds of operations called .getTokens(.). that differ slightly on whether they report on just the held tokens or the held tokens that haven.t been offered yet. I suggest renaming the above operation: ActionActivation::getUnofferedTokens(InputPin) if it is useful. For the purpose of this resolution, -- i.e., to support LinkActionActivation::endMatchesEndData(Link, LinkEndData), we need ActionActivation::getTokens(InputPin), to call pinActivation.getTokens() because we do not have any guarantees about the relative ordering when the input pin held tokens will be offered but not yet consumed and testing for the link action activation. At minimum, this resolution needs to be changed with: ActionActivation::getTokens(in pin: InputPin): Values[*] // 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.name + ", pin = " + pin.name); PinActivation pinActivation = this.getPinActivation(pin); TokenList tokens = pinActivation.getTokens(); ValueList values = new ValueList(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.getValue(i); Value value = ((ObjectToken)token).value; if (value != null) { values.addValue(value); } } return values; - Nicolas. From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Friday, April 17, 2009 3:21 PM To: fuml-ftf@omg.org Subject: fUML FTF Ballot 1 Attached (at long last!) is the first fUML FTF issue resolution ballot. Sorry for sending this out late on a Friday evening (at last that is what it is here on the US East Coast.), but I don.t think any of these issue resolutions will be controversial. Therefore, I am planning for the voting period to start on Monday. If anyone happens to see any problems with the resolutions over the weekend, please let me know, and I can tweak the ballot. Other wise, voting will be open from Monday, 20 April 2009 (at 6:00 PM EDT) through Monday, 4 May (at 6:00 PM EDT). Each named FTF representative should vote. Instructions for voting are on the first page of the ballot. This ballot includes resolutions for most of the currently open issues. A couple of this ones not resolved will require some discussion. And, when I get time, I am planning to submit some more that will probably need careful consideration by the group. But let.s get these simple ones passed first! Thanks. -- Ed