1 / 20

Integrating Graphical and Textual Modelling Languages

Integrating Graphical and Textual Modelling Languages. Luc Engelen and Mark van den Brand. Integrating Metamodel-based and Grammar-based Modelling Languages. Luc Engelen and Mark van den Brand. Overview. Problem description Two approaches Two implementations Case study

honora
Download Presentation

Integrating Graphical and Textual Modelling Languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Integrating Graphical and Textual Modelling Languages Luc Engelen and Mark van den Brand

  2. Integrating Metamodel-based and Grammar-based Modelling Languages Luc Engelen and Mark van den Brand

  3. Overview • Problem description • Two approaches • Two implementations • Case study • Advanced applications • Conclusions / Software Engineering and Technology

  4. Problem description / Software Engineering and Technology

  5. Two approaches Extract (M2T) Convert and transform (T2M) Merge (M2M) Interpret as XMI Interpret as ‘model’ Rewrite (T2T) = Metamodel-based model = Metamodel-based model fragment = Grammar-based model fragment = XMI-representation of model / Software Engineering and Technology

  6. Embedding a textual language • Embedding in a custom language Statement Textual SendSignal Assignment MethodCall Statement: String • Embedding the UML / Software Engineering and Technology

  7. Modelware approach • Extracting textual fragments • Merging models andfragments of models / Software Engineering and Technology

  8. Modelware approach S • Convert and transform LS LS ::= S { “;” S } S ::= “stat” source CF target / Software Engineering and Technology

  9. Modelware approach S • Convert and transform LS LS ::= S { “;” S } S ::= “stat” source CF target list: LS s: S f:CF s: S f:CF s: S stat; stat; stat / Software Engineering and Technology

  10. Modelware approach S • Convert and transform LS LS ::= S { “;” S } S ::= “stat” source CF target list: LS s: S s: S s: S stat; stat; stat / Software Engineering and Technology

  11. Modelware approach LS S S • Convert and transform LS LS ::= S { “;” S } S ::= “stat” source CF target list: LS T2M M2M list: LS s: S s: S s: S stat; stat; stat s: S s: S s: S / Software Engineering and Technology

  12. Grammarware approach • Rewriting <packagedElement xmi:type="uml:Class" xmi:id="_id1" name="A"> <ownedAttribute xmi:id="_id2" name="a" type="_id3"/> <ownedOperation xmi:id="_id4" name="n" method="_id5"> </ownedOperation> <ownedBehavior xmi:type=“uml::OpaqueBehavior" xmi:id=“_id6"> <body>behavior{ a := n(a) }</body> </ownedBehavior> </packagedElement> • Textual fragments use names, XMI uses Identifiers Class2Id[(A, _id1), …] Attribute2Id[(A, a, _id2, _id3), …] Operation2Id[A, n, _id4), …] / Software Engineering and Technology

  13. Grammarware approach T( A “:=” B ) → <effect xsi:type = “slco:AssignmentStatement”/> T(B) T(A) </effect> T( “false” ) → <expression xsi:type=“slco:BooleanConstantExpression” value=“false”/> / Software Engineering and Technology

  14. Two implementations • Modelware • Xpand for T2M • Xtext for M2T • Xtend for M2M All from the openArchitectureWare platform for eclipse • Grammarware • SDF for the grammars • XMI grammar off the shelf • Custom grammars for the fragments • ASF for the T2T transformation / Software Engineering and Technology

  15. Case study / Software Engineering and Technology

  16. Case study / Software Engineering and Technology

  17. Observations • Modelling in eclipse • Diagrams • Simple textual models • Structure editing • Our approaches add • Embedding of textual fragments in metamodel based models • Modelware • Restricted to LL(*) grammar • Straightforward mapping from grammar to metamodel • Grammarware • Forces switching between environments • Deals with plain XMI • Tool-specific • Low level of abstraction / Software Engineering and Technology

  18. Advanced applications <packagedElement xmi:type="uml:Class" xmi:id="_id1" name="A"> <ownedAttribute xmi:id="_id2" name="a" type="_id3"/> <ownedOperation xmi:id="_id4" name="n" method="_id5"> </ownedOperation> <ownedBehavior xmi:type=“uml::OpaqueBehavior" xmi:id=“_id6"> <body>behavior{ a := m(a) }</body> </ownedBehavior> </packagedElement> Method “m” not found in class “A” / Software Engineering and Technology

  19. Conclusions • Embedding grammar-based languages in metamodel-based languages • Two approaches • Modelware • Grammarware • Two implementations • Case study: textual alternative for UML activity diagrams / Software Engineering and Technology

  20. Conclusions • Grammarware approach and implementation • Flexible grammar definitions • Dealing with XMI • Modelware approach and implementation • Only one modelling environment • Conversion and transformation in two steps / Software Engineering and Technology

More Related