Issue 8756: Section: Classes (uml2-rtf) Source: NIST (Dr. Conrad Bock, conrad.bock(at)nist.gov) Nature: Revision Severity: Minor Summary: Multiple default values. In Figures 10 and 12, the max multiplicity for defaultValue is 1. What if the property or parameter is multivalued? There is no value specification for collections. Resolution: Revised Text: Actions taken: May 3, 2005: received issue Discussion: Due to lack of time, the RTF/FTF agrees that the following are problems that need fixing, but decided to defer their resolution to a future RTF working on this specification. End of Annotations:===== m: webmaster@omg.org Date: 03 May 2005 15:57:51 -0400 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Conrad Bock Company: NIST mailFrom: conrad.bock@nist.gov Notification: No Specification: UML 2 Superstructure Section: Classes FormalNumber: /ptc/04-10-02 Version: RevisionDate: Page: Nature: Revision Severity: Minor HTTP User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) Description Multiple default values. In Figures 10 and 12, the max multiplicity for defaultValue is 1. What if the property or parameter is multivalued? There is no value specification for collections. X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=ROQ9HuS+ c=1 sm=1 tr=0 a=eW53zEZrsyElcQ0NK1QpqA==:117 a=eW53zEZrsyElcQ0NK1QpqA==:17 a=0Bzu9jTXAAAA:8 a=9cW_t1CCXrUA:10 a=u9EReRu7m0cA:10 a=5BVfam01AWAA:10 a=uER6g-tzV7oA:10 a=YYzpnO7rAAAA:8 a=r77TgQKjGQsHNAKrUKIA:9 a=9iDbn-4jx3cA:10 a=cKsnjEOsciEA:10 a=KHpXyVWLAAAA:8 a=7OUVe7TeAAAA:8 a=97WRd6UGAAAA:8 a=I3cdlrxjAAAA:8 a=oCcaPWc0AAAA:8 a=cElRC-8Cu1QSbw57rFIA:9 a=xw_B0iEMEfjy6Yai:21 a=G93eBU1meSziT5i2:21 a=wPNLvfGTeEIA:10 a=jta71DdDkwcA:10 a=DLrAvYGtb7wA:10 a=WP4_USCxRkkA:10 a=y1fuBQt2dhcA:10 a=VWtqRZUfChcA:10 a=BZKTUwb-Mv607V79OrkA:9 a=QkVCn3OBy4RiCmvW:21 a=zno4kR-irfaFyafZ:21 a=e6OgpMWrD-fC7paQ:21 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=_W_S_7VecoQA:10 a=frz4AuCg-hUA:10 X-AUTH: edwillink+ed:2500 Date: Wed, 27 Aug 2014 17:30:25 +0100 From: Ed Willink User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 CC: "uml2-rtf@omg.org" Subject: Re: AW: Status of old Issue 8756: Multiple default values X-Virus-Scanned: amavisd-new at omg.org Hi If you really want to start worrying about collections then you need a solution for nested collections. Currently UML 2.x does not support OCL 2.x's nested collections and OCL does not support UML's bounded collections. OCL 2.5 will accommodate multiplicity bounds at each level of nesting, and once the OCL Library is a useable model, UML models can use OCL Collection types as model types. It is not pretty, but it avoids any UML 2.5 change to align OCL. Fundamentally the concept of multiplicity needs revision. A TypedElement need only support the [0..1] optional multiplicity, so that the [0..*]{ordered,unique} attributes are carried recursively by the Collection/Multiplicity, which is the solution to be proposed for the OCL 2.5 pivot model. Regards Ed Willink On 27/08/2014 16:58, Wendland, Marc-Florian wrote: Hi all, the problem of not being able to express collections of ValueSpecifications is not local to defaultValue. There are other places where this problem arises like, for example, in Message arguments. We currently work around this issue by using Expression with an additional Stereotype <>. Having a CollectionSpecification (extends ValueSpecification) inside UML would be the most appropriate solution from my point of view. I also think that this is not local to LiteralSpecifications. What about a collection of Intervals, Expressions etc.? I heard often the argument to use OCL for this purpose, but at least in the industrial testing domain, OCL is not common or even known. For the definition of standalone Collections of ValueSpecifications UML should provide a solution. I think that OCL should be used for more sophisticated things, but not for such a fundamental (and, IMHO, heavily required) concept. Best regards, Marc-Florian Von: Axel Scheithauer [mailto:Axel.Scheithauer@oose.de] Gesendet: Mittwoch, 27. August 2014 13:48 An: BERNARD, Yves Cc: uml2-rtf@omg.org; Tim Weilkiens; ed-s@modeldriven.com Betreff: AW: Status of old Issue 8756: Multiple default values Hi Yves, as far as I understand, there is no abstract syntax for literal specification of collections within pure UML. That is what would be required here. Therefore it is not merely an issue of the notation. An opaque expression with an Activity, whether shown as a diagram or as ALF-text makes no difference, is in fact a workaround, since this is a procedural and not a literal specification. I’m not so sure whether using OCL is really a workaround. Since OCL can be considered to be a part of UML (or not?), an opaqueExpression with Language OCL can be in fact a standard UML literal specification (e.g. Set{1..100}). There is even a defined notation (chapter 8.3.4). The question remains, whether we want a more UML-like way than an OCL-Expression to specify this. Two solutions were hinted at in the issue. Unlimited upper value for the multiplicity of defaultValue or a new Metaclass CollectionSpecification. About the first possibility I’m not so sure. How should I interpret a property with multiplicity [4..*] that has one single valued default value? The interpretation could be, that the minimum number of instances are created, all of them according to the ValueSpecification of the default value. As far as I understand, this is the interpretation used with SysML context specific initial values. Whether this is SysML-specific or dependent on the conditions given there (instance specification having no name and same owner as the block), is not clear to me. The alternative interpretation would be, that the model is inconsistent. Which interpretation is correct? --Axel PS: Shouldn’t we be leading this discussion on Jira: http://solitaire.omg.org/browse/UMLR-55?jql=text%20~%20%22Multiple%20default%20values%22 An issue about context-specific default values in UML is here http://solitaire.omg.org/browse/UMLR-113?jql=text%20~%20%22default%20value%22 Von: BERNARD, Yves [mailto:Yves.Bernard@airbus.com] Gesendet: Mittwoch, 27. August 2014 08:43 An: Tim Weilkiens; ed-s@modeldriven.com Cc: uml2-rtf@omg.org Betreff: RE: Status of old Issue 8756: Multiple default values Hi Tim, As Ed pointed out, UML is missing a concrete notation for collection UML but its abstract syntax allows assigning a collection to a default value. Using OCL or ALF in an opaque expression is only a workaround for the lack of notation. Therefore, the actual issue is with the notation for the collections rather than with the default values. Yves De : Tim Weilkiens [mailto:Tim.Weilkiens@oose.de] Envoyé : mercredi 27 août 2014 08:22 À : ed-s@modeldriven.com Cc : uml2-rtf@omg.org Objet : RE: Status of old Issue 8756: Multiple default values I can use expressions and textual languages to specify my set of values. But I can't use UML itself to model a set of InstanceValues and assign each of them as default values for a property with multiplicity > 1. My understanding is that the defaultValue multiplicity 0..1 is correct. The issue is that I can't model sets of values specified by UML model elements, e.g. a set of LiteralStrings or InstanceValues. Tim -----Original Message----- From: Ed Seidewitz [ed-s@modeldriven.com] Received: Dienstag, 26 Aug. 2014, 22:20 To: Tim Weilkiens [Tim.Weilkiens@oose.de] CC: uml2-rtf@omg.org [uml2-rtf@omg.org] Subject: Re: Status of old Issue 8756: Multiple default values Well, if you used an InstanceValue for a Set object, then you would be initializing the property to a single set Object that contained the set of values, rather than to the set of values itself (consistent with the multiplicity of the property). However, if you could, instead, use an OpaqueExpression with language=“Alf” and body = “{new A(1), new A(2), new A(3)}” to represent a set of instances of class A (to use Alf notation, A would have to have a constructor that took the appropriate arguments, an Integer in this example). Per the Alf standard, this is semantically equivalent to the OpaqueExpression having as a behavior an Activity that, when executed, produced the required set of values (actually multiple values, not a collection object). You could, of course, also create an Activity diagrammatically to do this, but a textual notation is much easier! — Ed From: Ed Seidewitz Date: Tuesday, August 26, 2014 at 4:09 PM To: Tim Weilkiens Cc: "uml2-rtf@omg.org" Subject: Re: Status of old Issue 8756: Multiple default values Tim — You could use InstanceValue for that, if it pointed to an instance of a Set that had a slot that contained a set of values, which could themselves be represented as InstanceValues. Or you could again use OCL or Alf notation in an OpaqueExpression. — Ed From: Tim Weilkiens Date: Tuesday, August 26, 2014 at 4:06 PM To: "uml2-rtf@omg.org" , Ed Willink Subject: RE: Status of old Issue 8756: Multiple default values Hi Ed, How - for example - would you define a default value for a set of instance values? I can't use InstanceValue for that. If you're completely right, could we close the issue? Tim -----Original Message----- From: Ed Willink [ed@willink.me.uk] Received: Dienstag, 26 Aug. 2014, 21:36 To: Tim Weilkiens [Tim.Weilkiens@oose.de]; uml2-rtf@omg.org [uml2-rtf@omg.org] Subject: Re: Status of old Issue 8756: Multiple default values Hi You are confusing what the multiplicity applies to. The 0..1 says the default value is optional. The default value may be a single ValueSpecification that represents multiple values. e.g. an ExpressionInOCL whose body is Set{1..100}. Regards Ed Willink On 26/08/2014 20:21, Tim Weilkiens wrote: Hi, I’ve stumbled over an old issue that the multiplicity of defaultValue:ValueSpecification for properties is 0..1. It seems that it is not possible to specify default values for properties with a lower multiplicity > 1. On the other hand the definitions of ValueSpecification states: A ValueSpecification is the specification of a (possibly empty) set of values. However I can’t find a note in the specification how - for instance - to specify a set of Strings. There is only the concrete ValueSpecification LiteralString. Any ideas? Issue 8756: http://www.omg.org/issues/issue8756.txt Thanks, Tim Tim Weilkiens (CEO oose) Consulting & Training oose Innovative Informatik GmbH Kontorhaus Montblanc, Schulterblatt 36, D-20357 Hamburg, Germany HRB 66648 Amtsgericht Hamburg, USt-Id DE191433946 CEO Tim Weilkiens Fon: +49 (40) 41 42 50-0, Fax: +49 (40) 41 42 50-50 Internet: www.oose.de, E-Mail: info@oose.de No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4745 / Virus Database: 4007/8105 - Release Date: 08/26/14 The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4745 / Virus Database: 4007/8107 - Release Date: 08/26/14