+ All Categories
Home > Documents > Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged...

Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged...

Date post: 13-Jan-2016
Category:
Upload: piers-griffith
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
18
Diagram Definition se Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 [email protected] (Presenter) and Yvan Labiche 1 [email protected] 1 Carleton University, Dep. of System and Computer Engineering, Ottawa, Cana 2 IBM Canada Ltd., Rational Software, Ottawa Lab, Canada
Transcript
Page 1: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

Diagram Definition A Case Study with the UML Class Diagram

MoDELS 2011, Wellington, NZ

ByMaged Elaasar1,2

[email protected](Presenter)

andYvan Labiche1

[email protected]

1Carleton University, Dep. of System and Computer Engineering, Ottawa, Canada

2IBM Canada Ltd., Rational Software, Ottawa Lab, Canada

Page 2: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

22

Outline The Need for Diagram Definition (Problem Statement)

Existing Diagram Definition Approaches (Related Works)

Diagram Definition Specification (Background)

UML Class Diagram Definition Case Study (Contribution)

Interchanging an Example Class Diagram (Experiment)

Limitations and Future Work

Page 3: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

33

The Need for Diagram Definition

Graphical modeling languages are defined with their:– Abstract syntax: formally using MOF

– Concrete graphical syntax: informally using text and (example) figures

Formal diagram definition is needed– Enables interchange of modeling diagrams among tools

– Enables consistent rendering of diagrams by tools

– Enables consistent interpretation of diagrams by users

Page 4: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

44

Existing Diagram Definition Approaches

Diagran

Interchange

Metamodel

Diagram

Interchange Rules

for a language

Graphical syntax

Mapping

(rendering rules)

Target Language

Diagram

Interchange

(DI) v1.0

Fixed Informal Informal (mixed

with interchange

rules)

Any (mainly UML)

Graphical

Modeling

Framework (GMF)

Extensible Formal (using code) Formal (inflexible) Any

XML Process

Definition

Language (XPDL)

Merged with

abstract syntax

Given by abstract

syntax

No need for

mapping

BPMN

Diagram

Definition (DD)

v1.0

Extensible Formal (using

metamodel)

Formal (flexible) Any

Page 5: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

55

Diagram Definition (DD) Specification

DD defines two standard metamodels– Diagram Interchange (DI): enables defining the diagram interchange syntax

– Diagram Graphics (DG): enables defining the concrete graphical syntax

Page 6: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

66

MOF

DI

AS

M3 spec

M2 spec

M1 user

AS DI

Model Diagram

AbstractSyntax

DiagramSyntax

CS MappingSpecification

Graphics

ConcreteSyntax

CS Mapping

Model(interchanged)

MappingLanguage

MOF

View(rendered)

Controller(executed)

Instantiates

Specializes

References

AS: Abstract Syntax

CS : Concrete Syntax

DG

DD Spec

LanguageSpec

DI : Diagram Interchange

DG: Diagram Graphics

Diagram Definition Architecture

Page 7: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

77

Diagram Interchange (DI)

Defines diagram interchange syntax (what users can control)

Examples: diagram layout, appearance options, notational options

Provides basic primitives that can be extended for each language

Page 8: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

88

Diagram Graphics (DG)

Defines concrete graphical syntax (what language specifications control)

Examples: shape and line notations for each abstract syntax element

Provides extensive 2D graphics primitives (similar to SVG)

Page 9: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

99

UML Class Diagram Definition: a Case Study

We validated the DD architecture on UML

DI

UML

M2

UML DI UML CSMapping DG

We used a subset of the UML class diagram– Three classifiers: Class, Interface and Datatype

– Three relations: Association, Generalization and InterfaceRealization

Page 10: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1010

UML Diagram Interchange

Metamodel design principles:– Avoid interchanging specification-controlled info

– Avoid interchanging purely stylistic info (e.g., colors)

– Interchange simple layout info (bounds / waypoints relative to diagram)

– Interchange overlapping order (using ordered collections)

– Keep the inheritance hierarchy small (mixed bags of optional properties)

Page 11: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1111

UML Concrete Syntax MappingUML DI Elements to Graphics

Map all diagram to graphics

Map all diagram elements to graphics

Map a shape to a group{a graphic, labels and compartments}

Map an edge to a group{a poly line and labels}

Map a compartment to a group {rectangle and nested elements}

Map a label to a text with appropriate string

Page 12: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1212

UML Concrete Syntax Mapping: UML Elements to Strings

Define signature of an element

Define signature of a property

Define signature of an interface

Page 13: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1313

UML Concrete Syntax Mapping:UML Element to Graphics

Map a class a rectangle

Map an interface to a rectangle

Map an interface to a circle

Define an interface realization line style

Define an interface realization line marker

Map an interface realizationto a poly line

Page 14: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1414

Diagram Definition Export Testing Architecture

What tools provide today

Diagram

Model

Tool-SpecificFormat

StandardFormat

UML DI Model

UMLModel

Export

Export

DGModel

Concrete Syntax

Mapping

SVGImage

Rendering

To Graphics

RSA

Tool

M2M

Transformation

M2M

Transformation

M2M

Transformation

M2T

Transformation

Page 15: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1515

Interchanging an Example Class Diagram: an Experiment

RSA

Diagram

Exported

Diagram

Page 16: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1616

Limitations and Future Works

No normative mapping from DG to SVG (needed to bootstrap DD)

Mapping language is textual (need a simpler graphical mapping language)

Mapping is unidirectional (abstract/diagram syntax -> concrete syntax)

Page 17: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1717

Conclusion

Diagram definition is needed for consistent interchange and interpretation

Diagram definition (DD) v1.0 is a new specification to address this need.

We validated DD with a case study involving a subset of UML class diagram– Defined UML DI metamodel

– Defined a mapping from UML DI metamodel to DG metamodel

Defined a tool architecture for testing DD (export)

Carried an experiment for interchanging an example class diagram successfully

Page 18: Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 melaasar@ca.ibm.com (Presenter) and Yvan Labiche.

1818

Thank YouQuestions?

Maged Elaasar, [email protected]


Recommended