Abstract Syntax Tree Metamodel [message #1710584] |
Wed, 07 October 2015 17:34 |
Claudia Pereira Messages: 3 Registered: December 2012 |
Junior Member |
|
|
I am analysing the Abstract Syntax Tree Metamodel (OMG Specification) and its implementation provided for MoDisco.
The OMG Specification, at section 8.1.4, say: "The ASTM Core Syntax Specification defines a set of generic modeling elements commonly used in formal programming languages in the form of a finite, labeled, directed tree, where internal nodes are represented by the classes, the relationships between interior nodes are depicted by unidirectional associations, and the leaf nodes are depicted by associations to terminal primitive classes. This section provides the High-Level Composite UML Class Diagrams of the ASTM SyntaxObject".
In the implementation of this metamodel, all the associations are compositions.
I would like to know the reasons why the metamodel was specified and implemented in this way.
Thank you in advance.
Best regards,
Claudia
|
|
|
|
Re: Abstract Syntax Tree Metamodel [message #1710675 is a reply to message #1710668] |
Thu, 08 October 2015 10:34 |
Adolfo Sanchez-Barbudo Herrera Messages: 260 Registered: July 2009 |
Senior Member |
|
|
Hi Claudia,
In the specification there is no real clue about if the associations are composite or not. However, in the own statement you pasted you find terms like "tree" or "interior nodes". That might be interpreted as the following: ASTM model instances should conform a tree rather than a graph. The proposed GASTM implementation in MoDISCO, therefore ensures building trees by providing all EReferences as containment ones.
It's later on, when you transform to KDM, when you start to create graphs and creating cross-references (non containment) between different KDM elements.
A final remark that supports the comments above, therefore the rationale about using containment EReferences, is the following statement from the specification:
"The Abstract Syntax Tree Metamodeling (ASTM) and the Knowledge Discovery Metamodeling (KDM) are two complementary modeling specifications developed by the OMG Architecture Driven Modernization Task Force. Their relationship can be clearly understood by recognizing that the KDM establishes a specification for abstract semantic graph models, while the ASTM establishes a specification for abstract syntax tree models"
Cheers,
Adolfo.
|
|
|
Powered by
FUDForum. Page generated in 0.03310 seconds