Issue 18249: MARTE: VSL short form for NFP_Real subtypes (marte-rtf) Source: Simula Research Laboratory (Mr. Bran Selic, selic(at)acm.org) Nature: Uncategorized Issue Severity: Summary: There are numerous examples in the MARTE spec that show the use of tuple value expressions of the form (v, u), where v is the value and u is the unit (e.g., (50, ms)) to specify the value of a subtype of NFP_Real (e.g., NFP_Duration, NFP_Weight, etc.). However, based on how tuple expressions work, this is not valid, since, without additional information, the parser cannot know which attributes are being assigned these two values. Note that subtypes of NFP_Real can have many attributes (e.g., NFP_Duration has 11 attributes) and most of them have at least two Real-type attributes. Based on that, in an expression such as (50, ms), it is not possible to determine which attribute is being assigned the value 50 (e.g., in case of NFP_Duration, it could be either the "value" attribute, the "precision" attribute, the "worst" attribute, or the "best" attribute). VSL does allow label-less expressions of this type, but, that can only work if the list of values follows the order in which the attributes appear (which, actually, is not quite clear from the spec), and if the use of the default or null literals is used for entries that are not assigned. For example, for an NFP duration of 50 milliseconds, the proper lable-less expression looks like it should be: (null, null, null,null, null, 50, ms, null, null, null, null), or, alternatively (-, -, -, -, -, 50, ms, -, -, -, -). Clearly, this is far too cumbersome for practical application. One possible solution is to have VSL recognize the special and most common by far case of subtypes of NFP_Real, allowing a short form in cases where only the value and unit need to be specified (leaving the other attribute values to default). This short form would, naturally, be the (v, u) form. That would make the common form currently used in the spec valid. Resolution: Revised Text: Actions taken: November 6, 2012: received issue Discussion: End of Annotations:===== M-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=fkzEyRtbZo6Yq40FstZZwa35I5tmLVPf2AHrKXNfqmY=; b=lcdo765DdOWnPD/jiOPQciEGbqfq+h3nYm3p8L6O/WYRbhXRdO1PfQy21YUa+rac20 Y83kBcvvLu66ETa0nNfR9xyU2e8t7ImAzjPXSywloheAzrXH3KiR5Wp4d345LwYoE46M I7E7xy5fa3o0SiL95zyagImhfx81rKJX7kJ2s4gV3kQLqJZJV6rCGc9nUygtTuATyrYm 3JdmA7NPIKVndOjKRQvqcclHSY/aYk3NYpw3Arrqu+Fpb9bIFKjpkGY811Drfbvrgr9Z c9Cq+jUmdPTv5+n9WBgMnSf4/8qJL2vNpMzgIdOHqwcOdvYWlcc3UggMtuTD5+e9RMlh gtJQ== Sender: bran.selic@gmail.com From: Bran Selic Date: Tue, 6 Nov 2012 09:27:13 +0100 X-Google-Sender-Auth: EtMqSSD-GEwxgAjh2LzQnwmPZtE Subject: MARTE: VSL short form for NFP_Real subtypes To: "issues@omg.org" There are numerous examples in the MARTE spec that show the use of tuple value expressions of the form (v, u), where v is the value and u is the unit (e.g., (50, ms)) to specify the value of a subtype of NFP_Real (e.g., NFP_Duration, NFP_Weight, etc.). However, based on how tuple expressions work, this is not valid, since, without additional information, the parser cannot know which attributes are being assigned these two values. Note that subtypes of NFP_Real can have many attributes (e.g., NFP_Duration has 11 attributes) and most of them have at least two Real-type attributes. Based on that, in an expression such as (50, ms), it is not possible to determine which attribute is being assigned the value 50 (e.g., in case of NFP_Duration, it could be either the "value" attribute, the "precision" attribute, the "worst" attribute, or the "best" attribute). VSL does allow label-less expressions of this type, but, that can only work if the list of values follows the order in which the attributes appear (which, actually, is not quite clear from the spec), and if the use of the default or null literals is used for entries that are not assigned. For example, for an NFP duration of 50 milliseconds, the proper lable-less expression looks like it should be: (null, null, null,null, null, 50, ms, null, null, null, null), or, alternatively (-, -, -, -, -, 50, ms, -, -, -, -). Clearly, this is far too cumbersome for practical application. One possible solution is to have VSL recognize the special and most common by far case of subtypes of NFP_Real, allowing a short form in cases where only the value and unit need to be specified (leaving the other attribute values to default). This short form would, naturally, be the (v, u) form. That would make the common form currently used in the spec valid.