Issues for MOF Model to Text Finalization Task Force

To comment on any of these issues, send email to mtt-ftf@omg.org. (Please include the issue number in the Subject: header, thusly: [Issue ###].) To submit a new issue, send email to issues@omg.org.

List of issues (green=resolved, yellow=pending Board vote, red=unresolved)

List options: All ; Open Issues only; or Closed Issues only

Issue 11093: Issue: Typos in examples
Issue 11094: In chapter '7 Overview':
Issue 11095: Issue: Grammar error:
Issue 11279: Whitespace handling rules unclear
Issue 11604: Annex A1
Issue 11964: Section: 8.2
Issue 12174: Specification error in concrete syntax
Issue 12176: Ambiguity detected in Invocation rule Message
Issue 12184: Section: 7.2, 7.3, A3 OCLExpression
Issue 12186: Inconsistency in metamodel Message

Issue 11093: Issue: Typos in examples (mtt-ftf)

Click here for this issue's archive.
Source: TCS (Mr. Sreedhar Reddy, sreedhar.reddy(at)tcs.com)
Nature: Uncategorized Issue
Severity:
Summary:
Issue: Typos in examples: 
In Annex A, A.1 Example 1: 
In the example fragment 
[template public SchemaToDDL (s: Schema)] 
[for (t:Table | s.table)] 
TableToDDL(t) 
[/for] 
[/template]

Resolution:
Revised Text:
Actions taken:
June 8, 2007: received issue

Issue 11094: In chapter '7 Overview': (mtt-ftf)

Click
here for this issue's archive.
Source: TCS (Mr. Sreedhar Reddy, sreedhar.reddy(at)tcs.com)
Nature: Uncategorized Issue
Severity:
Summary:
Examples have incorrectly escaped template invocations 
E.g. 
[attributeToJava(c.attribute)] 
[operationToJava(allOperations(c))] 
// Constructor 
[c.name/]() 
{ 
} 
} 
[/template] 

template invocations are not escaped properly. 
They should be [TableToDDL(t)/],[attributeToJava(c.attribute)/] and 
[operationToJava(allOperations(c))/] respectively. 

Resolution: Replace with the text below, [attributeToJava(c.attribute)/] [operationToJava(allOperations(c))/] // Constructor [c.name/]() { } } [/template]
Revised Text:
Actions taken:
June 8, 2007: received issue
January 15, 2008: closed issue

Issue 11095: Issue: Grammar error: (mtt-ftf)

Click
here for this issue's archive.
Source: TCS (Mr. Sreedhar Reddy, sreedhar.reddy(at)tcs.com)
Nature: Uncategorized Issue
Severity:
Summary:
Grammar error in section '8.2 concrete syntax': 
<elseif> ::= '[elseif]' '(' <OclExpressionCS> ')' <production> ('[/elseif]')? 

It should be: 
<elseif> ::= '[elseif' '(' <OclExpressionCS> ')' ']' <production> '[/elseif]' 

Resolution: Replace the following text in section '8.2 concrete syntax': <elseif> ::= '[elseif]' '(' <OclExpressionCS> ')' <production> ('[/elseif]')? With the text below, <elseif> ::= '[elseif' '(' <OclExpressionCS> ')' ']' <production> ('[/elseif]')?
Revised Text:
Actions taken:
June 8, 2007: received issue
January 15, 2008: closed issue

Issue 11279: Whitespace handling rules unclear (mtt-ftf)

Click
here for this issue's archive.
Source: TCS (Mr. Sreedhar Reddy, sreedhar.reddy(at)tcs.com)
Nature: Uncategorized Issue
Severity:
Summary:
Whitespace handling rules are not clear: 
1. Is whitespace preceding multi-line block expressions (such as for, if, etc) included in  the text output? Examples 
given in the appendix do not seem to include it. 
2. Whitespace handling rule 3 says: "Indentation of the text produced for the invoked template starts at the indentation at the point of the template invocation." Should this be the case even for an embedded template invocation, i.e. a template 
invocation that is surrounded by other expressions on the same line? 
E.g. 
[template printClass(c:Class)] 
class [c.name/] implements [printInterfaceName(c.implementsInterface) sep(',')] 
[/template] 
[template printInterfaceName(i:Interface)] 
[i.name/] 
[/template] 
Here printInterface is invoked iteratively for each interface implemented by the class. 
One would expect following kind of output from this: 
class myClass implements myIntf1, myIntf2, myIntf3,... 

But the rule seems to say that the output of each template invocation starts at the same indentation level. 
This is probably not the intended behaviour, atleast for embedded template invocations (like the one above). 

Resolution: Replace existing text in the section discussing whitespace handling with the text given below, Text production rules will be easier to specify by viewing the body of a template (or a block expression) as follows: <block-body> ::= <body-element>* <body-element> ::= <literalString> | <whitespace> | <expression> | <BOL-indicator> <whitespace> ::= space | tab | newline <expression> ::= <stand-alone-block-expression> | <embedded-block-expression> | <stand-alone-template-invocation> | <embedded-template-invocation> | <other-expression> <BOL-indicator> ::= ‘^’ <stand-alone-block-expression> is a block expression (single or multi-line) that is not surrounded by other body elements on the lines where the block head and the tail occur. <embedded-block-expression> is a block expression that is surrounded by other nonwhitespace body elements on the lines where block head or tail occur. <stand-alone-template-invocation> is a template invocation expression that stands on a line all by itself. <embedded-template-invocation> is a template invocation that is surrounded by other body elements on the same line. <other-expression> refers to all expressions other than the block and template invocation expressions. Text production rules: - All body elements produce text - The text output of a block-body is the sequential concatenation of the text outputs of its body elements - Rules for identifying starting and ending of block body: o template: body starts at the beginning of the next line after the template head, and ends on the last character (excluding the new line) of the line previous to the template tail. o multi-line-block: body starts at the beginning of the next line after the block head, and ends on the last character (excluding the new line) of the line previous to the block tail. o single-line-block: body starts after the closing bracket of the block head and ends before the starting bracket of the block tail. - Text outputs of different body elements: o A literal string is output as is. o A whitespace character is output as is. The text produced by the execution of <other-expression> is output as is. o The text produced by the execution of <embedded-block-expression> is output as is. o The text produced by the execution of <embedded-template-invocation> is output as is. o <stand-alone-block-expression> needs special handling: .. Ignore the whitespace characters occurring before the beginning of the head. .. In the case of a multi-line 'for block', when a separator character is not specified, use 'new line' as the default separator between the outputs produced by successive iterations. o <stand-alone-template-invocation> needs special handling: .. Add the whitespace preceding the invocation expression before each line of the text produced by the invoked template. .. In the case of an iterative template invocation (e.g. when the argument is a collection), if a separator character is not specified, use 'new line' as the default separator between the outputs produced by successive iterations. <BOL-indicator> is a special character (‘^’) that marks the beginning of a line – i.e. on the line on which this character appears, the whitespace preceding the character should be excluded from the text output. In code-explicit mode, all whitespace must be explicitly specified. Move this section after the section describing concrete syntax.
Revised Text:
Actions taken:
August 13, 2007: received issue
January 15, 2008: closed issue

Issue 11604: Annex A1 (mtt-ftf)

Click
here for this issue's archive.
Source: CrimsonLogic India Pvt. Ltd. (Mr. Jayaprakash, emailtojp(at)rediffmail.com)
Nature: Revision
Severity: Minor
Summary:
The sample input model diagram on page 26 (Annex A, Example 1 -- RDBMS model to Oracle DDL) is inaccurate. The 'refersTo' relation from the Department_fky entity should point to the Department_pky entity and not to the Employee_pky entity. Also, the 'foreignKey' relation from the Employee entity should point towards the Department_fky entity and not as shown.

Resolution: issue withdrawn by submitter, closed
Revised Text:
Actions taken:
October 12, 2007: received issue
October 12, 2007: closed issue, withdrawn by submitter

Issue 11964: Section: 8.2 (mtt-ftf)

Click
here for this issue's archive.
Nature: Revision
Severity: Minor
Summary:
Grammar errors in section '8.2 concrete syxtax: syntax: ::= 'elseif' '(' <OclExpressionCS> ')' <production_code> ('/elseif') ? It should be: ::= 'elseif' '(' <OclExpressionCS> ')' <production_code> '/elseif' syntax: ::= '[else]' <production> ('[/else]')? It should be: ::= '[else]' <production> '[/else]'

Resolution:
Revised Text:
Actions taken:
January 2, 2008: received issue

Discussion:


Issue 12174: Specification error in concrete syntax (mtt-ftf)

Click
here for this issue's archive.
Nature: Revision
Severity: Minor
Summary:
I've detected an error in the module rule of the concrete syntax section (8.2). This rule has an inconsistency with respect to the metamodel specified in section 8.1. The syntax is: <module_decl> ::= '[module' <PathNameCS> ‘(‘ <PathNameCS> ‘)’ [extends_decl] '/]' | 'module' <PathNameCS> [extends_decl] ---------- -------------- | Module | 0..* ---------> 1..* | TypedModel | ---------- -------------- So a Module can contain one or more TypedModels, but the grammar does not seem to provide ways to attach more than one. Solution: The module rule could be changed as follows: <module_decl> := '[module' <PathNameCS> ‘(‘ <PathNameCS> ( ‘,’ <PathNameCS>)* ‘)’ [extends_decl] '/]' | 'module' <PathNameCS> ‘(‘ <PathNameCS> ( ‘,’ <PathNameCS>)* ‘)’ [extends_decl]

Resolution:
Revised Text:
Actions taken:
January 14, 2008: received issue

Issue 12176: Ambiguity detected in Invocation rule Message (mtt-ftf)

Click
here for this issue's archive.
Nature: Revision
Severity: Significant
Summary:
The Mof2Text concrete syntax contain the following rules (see p. 22): <OclExpressionCS> ::= ( <PropertyCallExpCS> | <VariableExpCS> | <LiteralExpCS> | <LetExpCS> | <OclMessageExpCS> | <ifExp> | <invocation> ) <invocation> ::= ( <PathNameCS> '(' <actualarglist> ')' | 'super' ) [ <before> ] [ <separator> ] [ <after> ] <actualarglist> ::= ( <OclExpressionCS> ( ',' <OclExpressionCS> )* )? <before> ::= 'before' '(' <OclExpressionCS> ')' <separator> ::= 'separator' '(' <OclExpressionCS> ')' <after> ::= 'after' '(' <OclExpressionCS> ')' The OCL concrete syntax contain the following rules (see OCL Specificacion. Pages 64, 72, 80 and 81) OclExpressionCS ::= PropertyCallExpCS | VariableExpCS | LiteralExpCS | LetExpCS | OclMessageExpCS | IfExpCS PropertyCallExpCS ::= ModelPropertyCallExpCS | LoopExpCS ModelPropertyCallExpCS ::= OperationCallExpCS | AttributeCallExpCS | NavigationCallExpCS OperationCallExpCS ::= OclExpressionCS[1] simpleNameCS OclExpressionCS[2] | OclExpressionCS '->' simpleNameCS '(' argumentsCS? ')' | OclExpressionCS '.' simpleNameCS '(' argumentsCS? ')' | simpleNameCS '(' argumentsCS? ')' | OclExpressionCS '.' simpleNameCS isMarkedPreCS '(' argumentsCS? ')' | simpleNameCS isMarkedPreCS '(' argumentsCS? ')' | pathNameCS '(' argumentsCS? ')' | simpleNameCS OclExpressionCS argumentsCS[1] ::= OclExpressionCS ( ‘,’ argumentsCS[2] )? The conflict appears when the before, separator and after rules are all empty at the same time in the <invocation> MOF2Text rule. In that case the resolution proceeds as follows: OclExpressionCS ::= invocation ::= PathNameCS '(' actualarglist ')' OclExpressionCS ::= PropertyCallExpCS ::= ModelPropertyCallExpCS ::= OperationCallCS ::= pathNameCS '(' argumentsCS? ')' Solution: The best solution I have found to avoid this conflict involves the introduction of a new keyword, 'invoke'. The invocation rule could be updated as follows: <invocation> ::= invoke ( <PathNameCS> '(' <actualarglist> ')' | 'super' ) [ <before> ] [ <separator> ] [ <after> ] This way we can distinguish easily between the two cases. TemplateInvocation, MacroInvocation and QueryInvocation would then always resolve unambiguously into this last rule.

Resolution:
Revised Text:
Actions taken:
January 15, 2008: received issue

Issue 12184: Section: 7.2, 7.3, A3 OCLExpression (mtt-ftf)

Click
here for this issue's archive.
Nature: Revision
Severity: Minor
Summary:
Title: OCLExpression doesn't support the plus operator for string concatenations Message: The OCL specification defines (see 7.4: Basic Values and Types, page 10) the number of operations on the predefined types. The string type supports the concat, substring and size operations, but the plus operator is only used in integer types. The Mof2Text specification uses the plus operator to concatenate strings, and it's an error. Here there are some examples: 1. 7.2 Traceability --> [trace (c.id + '_definition') ] 2. 7.3 Directing Output to Files --> [file ('file:\\' + c.name + '.java', false, c.id + 'impl')] 3. A.3 Example 3 --> [file (c.name + '.cpp', false)] [trace (c.id + '.header')]

Resolution:
Revised Text:
Actions taken:
January 16, 2008: received issue

Issue 12186: Inconsistency in metamodel Message (mtt-ftf)

Click
here for this issue's archive.
Nature: Revision
Severity: Significant
Summary:
Title: Inconsistency in metamodel Message: The Mof2Text metamodel cannot attach static text to a body section. --------- ---------------------- | Block | 1 ---------> 0..* | TemplateExpression | --------- body ---------------------- --------- ---------------------- ----------------- | Block | -------|> | TemplateExpression | --------|> | OclExpression | --------- ---------------------- ----------------- The problem can be reproduced with the following example (extracted from Example 1. Page 25): [template public TableToDDL(t: Table)] CREATE TABLE [t.name/] ( [for (c:Column|t.column) separator(',')] [c.name/] [c.type/] [/for] ); [KeyToDDL(t.key)/] [ForeignKeyToDDL(t.foreignKey)/] [/template] The template body contains a ForBlock, a TemplateExpression ([t.name/]) and two TemplateInvocation (KeyToDDL and ForeignKeyToDDL). It seems that there are no ways to attach the static text portions "CREATE TABLE", "(" and ");" to the model. The OCL specification contains a StringLiteralExp class that could be used to attach this kind of static literal text. But for that to work, StringLiteralExp instances should be attachable somewhere, for instance, in the Block's body. In that case, perhaps that 'body' property could change its type from TemplateExpression to the more general OCLExpression, in order to allow StringLiteralExp's to be directly added to 'body', although this could be too much a general solution and would possibly require further testing. Solution: The metamodel could be change as follows: --------- ----------------- | Block | 1 ---------> 0..* | OclExpression | --------- body -----------------

Resolution:
Revised Text:
Actions taken:
January 16, 2008: received issue