Issue 19008: Extensional values should have an unique identifier (fuml-rtf) Source: (, ) Nature: Enhancement Severity: Minor Summary: Locus has a "set" for all extensional values, however, there is no unique identifier in the ExtensionalValue to support the uniqueness. It should be defined an attribute objectId as "isID" (from UML 2.4.1, isID, indicates this property can be used to uniquely identify an instance of the containing class.) in the class ExtensionalValue. The only mention to an object identifier is a reference marked as non-normative, which uses Java to define an object identifier. 8.2.2.2.6 Locus pg. 103 extensionalValues : ExtensionalValue [0..*] The set of values that are members of classifier extents at this locus. 8.3.2.2.27 Value pg. 159 [6] objectId ( ) : String // Return an identifier for this object. // [Non-normative.] return super.toString(); Resolution: Normatively define IDs for extensional values In general, it is not necessary in UML to model an explicit ID attribute in order to enforce uniqueness of a property with multiple values. Objects (instances of classes) are automatically distinguishable and unique under UML semantics. Identifying a property typed by a class as isUnique (the default) then means directly that no instance of that class (note that ExtensionalValue is a class in the Execution Model) can appear more than once in the set of values for the property. Nevertheless, the issue does make a reasonable point that a Value::objectId operation is provided, but that its specification is non-normative. However, this operation is, in fact, used normatively in CompoundValue::toString. Indeed, while it is unclear how to assign unique IDs to all values within the context of the Execution Model, it is certainly reasonable to assign IDs to the extensional values at a locus, as the issue requests. This ID could be assigned when the extensional value is added to the extent at a certain locus. To make the ID unique across multiple loci then requires that each locus also have an ID that can be used to further qualify the IDs of extensional values at that locus. Such an ID could be assigned when the locus is created, as part of the initialization of the execution environment. Finally, note that the isID meta-attribute is not given any semantics in bUML, so it is not used in the Execution Model. Revised Text: (Note: This proposal presumes the resolution to issue [1]FUML12-13.) In 8.2.2.1 Overview, under the heading "Configuring the Execution Environment at a Locus", add the following to the first bullet in the second paragraph: The identifier for this instance must be initialized to a non-empty string, which should be distinct from the identifiers for any remote loci that may be available from this locus. In Figure 8.4, and in the normative XMI, add the following attribute to the class Locus: identifier : String [Editor's Note: The operation makeIdentifier, added below, also needs to be added to Figure 8.4.] In 8.2.2.2.6 Locus, under "Attributes", replace "None" with *identifier : String The identifier of this locus, which should be unique at least within the current execution environment. In operation add, after the statement value.locus = this; add the statement value.identifier = this.identifier + "#" + this.makeIdentifier(value); After the operation instantiate, add the following operation, and renumber subsequent operations appropriately: makeIdentifier ( in value : ExtensionalValue ) : String // Return an identifier for the given (newly created) extensional value. // [No normative specification. A conforming implementation may create an identifier // an identifier in any way such that all identifiers for extensional values created // at any one locus are unique.] In 8.3.2.1, Figure 8.11, and in the normative XMI, remove operation objectId from class Value. In Figure 8.12, and in the normative XMI, add the following attribute to class ExtensionalValue: identifier : String and add the following operation to class ExtensionalValue: toString ( ) : String In 8.3.2.2.2 CompoundValue, in operation toString, replace the first statement String buffer = "(" + this.objectId() + ":"; with String buffer = "("; In the body of the first while loop, replace the statement buffer = buffer + " " + types.getValue(i - 1).name; with if (i != 1) { buffer = buffer + " "; } buffer = buffer + types.getValue(i - 1).name; Within the body of the second while loop, in the nested while loop with index j (as already modified by the resolution to issue [2]FUML12-13), replace the statement buffer = buffer + " Reference to (" + object.objectId() + ":"; with buffer = buffer + " Reference to " + object.identifier + "("; In the following while loop, with index n, replace the statement buffer = buffer + " " + types.getValue(n - 1).name; with if (n != 1) { buffer = buffer + " "; } buffer = buffer + types.getValue(n - 1).name; In 8.3.2.2.7 ExtensionalValue, under Attributes, replace "None" with *identifier : String The identifier for this extensional value, unique among the extensional values created at the same locus as this value. Add the operation [3] toString ( ) : String return this.identifier + super.toString(); In 8.3.2.2.11 Link, in operation addTo, remove the statement Debug.println(?[addTo] link = ? + this.objectId()); In operation destroy, remove the statement Debug.println("[destroy] link = " + this.objectId()); In 8.3.2.2.19 Object, in operation destroy, remove the statement Debug.println("[destroy] object = " + this.objectId()); In 8.3.2.2.27 Value, remove operation [7] objectId and renumber subsequent operations appropriately. ---------------------------------------------------------------------------------------- [1] http://issues.omg.org/browse/FUML12-13 [2] http://issues.omg.org/browse/FUML12-13 Actions taken: October 11, 2013: received issue October 8, 2015: Resolved December 22, 2015: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 11 Oct 2013 12:05:10 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Alessandro Gerlinger Romero Employer: mailFrom: romgerale@yahoo.com.br Terms_Agreement: I agree Specification: Semantics of a Foundational Subset for Executable UML Models (fUML) Section: 8.2.2.2.6 FormalNumber: ptc/2012-10-18 Version: 1.1 RTF Beta Doc_Year: 2012 Doc_Month: October Doc_Day: 18 Page: 103, 159 Title: Extensional values should have an unique identifier Nature: Enhancement Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: 131.246.160.228 Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36 Time: 12:05 PM Description: Locus has a "set" for all extensional values, however, there is no unique identifier in the ExtensionalValue to support the uniqueness. It should be defined an attribute objectId as "isID" (from UML 2.4.1, isID, indicates this property can be used to uniquely identify an instance of the containing class.) in the class ExtensionalValue. The only mention to an object identifier is a reference marked as non-normative, which uses Java to define an object identifier. 8.2.2.2.6 Locus pg. 103 extensionalValues : ExtensionalValue [0..*] The set of values that are members of classifier extents at this locus. 8.3.2.2.27 Value pg. 159 [6] objectId ( ) : String // Return an identifier for this object. // [Non-normative.] return super.toString();