Skip to main content



      Home
Home » Modeling » MoDisco » Abstract Syntax Tree Metamodel(Specification and implementation of the ASTM)
Abstract Syntax Tree Metamodel [message #1710584] Wed, 07 October 2015 13:34 Go to next message
Eclipse UserFriend
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 #1710668 is a reply to message #1710584] Thu, 08 October 2015 05:39 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Thanks for looking to the (G)ASTM implementation as provided within MoDisco.
This particular component has been made available by an external contributor (Adolfo Sanchez-Barbudo Herrera), I've just pinged him so that he provides you more insights on his implementation choices.

Best regards,
Re: Abstract Syntax Tree Metamodel [message #1710675 is a reply to message #1710668] Thu, 08 October 2015 06:34 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Using Modisco discoverer from maven
Next Topic:Querying an Ecore Instance
Goto Forum:
  


Current Time: Tue Apr 01 22:49:33 EDT 2025

Powered by FUDForum. Page generated in 0.06753 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top