INTRODUCTION TO MODEL DRIVEN ENGINEERING Transformation Definition - - PowerPoint PPT Presentation

introduction to model driven engineering
SMART_READER_LITE
LIVE PREVIEW

INTRODUCTION TO MODEL DRIVEN ENGINEERING Transformation Definition - - PowerPoint PPT Presentation

Advised reading: MDA Explained, The model-driven architecture, Anneke Kleppe, Jos Warmer, Wim Bast, Addison Wesley 1 (ETEW 681.3*D2 KLEP 2003) Chapters 1-3 Architecture and Modelling of Information Systems (D0I71A) Prof. dr. Monique Snoeck


slide-1
SLIDE 1

Transformation Tool

Transformation Definition

TOWARDS A COMPLETE INFORMATION SYSTEM:

INTRODUCTION TO MODEL DRIVEN ENGINEERING

Architecture and Modelling

  • f Information Systems (D0I71A)
  • Prof. dr. Monique Snoeck

Advised reading: MDA Explained, The model-driven architecture, Anneke Kleppe, Jos Warmer, Wim Bast, Addison Wesley (ETEW 681.3*D2 KLEP 2003) Chapters 1-3

1

14:52

slide-2
SLIDE 2

Transformation Tool

Transformation Definition

MDE approach

2

  • Modelling domain model: What next?
  • Final output  software

Programmatic implementation Automatic model-to-code generation (MDE)

  • Model-Driven Engineering
  • use a platform-independent model (PIM) to define a system's functionality
  • Use this PIM to generate platform specific models (PSM) and then code
  • Model-Driven Architecture
  • A set of architectural concepts enabling MDE

14:52

slide-3
SLIDE 3

Transformation Tool

Transformation Definition

MERODE's use of MDE = model simulation

  • JMermaid + Code generation tool
  • Used for model simulation
  • to automatically generate a ready-to-use

software prototype

  • allows testing and refining the system model based on detected defects in the conceptual

business model given its fully working prototype.

  • = Illustration of MDE.

MDE can be used in general to generate (part of) the final software

3

14:52

slide-4
SLIDE 4

Transformation Tool

Transformation Definition

Why Model Simulation ?

4

14:52

slide-5
SLIDE 5

Transformation Tool

Transformation Definition

5

Requirements Code

14:52

slide-6
SLIDE 6

Transformation Tool

Transformation Definition

Agenda

  • MDE Fundamentals
  • Development cycle
  • Building blocks
  • MDA Framework
  • Current State

6

14:52

slide-7
SLIDE 7

Transformation Tool

Transformation Definition

Software Development Life Cycle: Current Practice

7 Informal Formal

Mostly Text Diagrams & Text Diagrams & Text Code

Requirements Analysis Design Code Test

14:52

slide-8
SLIDE 8

Transformation Tool

Transformation Definition

Problems with current practices

  • Productivity
  • code is the driving force
  • XP: only coding and testing. How can an outsider understand how the code works ?
  • Portability
  • frequent new technologies
  • adopted because demanded, solve real problems, no support for older technologies
  • Complexity worsened by different versions, lack of backward compatibility
  • Interoperability
  • Systems do not exist in isolation
  • Individual Components use best technologies, but need to interact
  • Maintenance and documentation
  • time consuming task
  • benefit is ‘for others’
  • ‘code is the documentation’ but high level documentation absolute must for complex systems

8

14:52

slide-9
SLIDE 9

Transformation Tool

Transformation Definition

Software Development Life Cycle: MDA Practice

9

Code Mostly Text

Requirements Analysis Design Code Test

Transformational Steps

Informal Formal

PSM PIM

14:52

slide-10
SLIDE 10

Transformation Tool

Transformation Definition

MDE Development Life Cycle

  • PIM: Platform Independent Model
  • describes the system from a business perspective
  • PSM: Platform Specific Model
  • Specifies the system in terms of constructs available in a specific implementation

technology

  • Transformational approach

10

PIM Code

Transformation Tool Transformation Tool

PSM PSM PSM PSM

14:52

slide-11
SLIDE 11

Transformation Tool

Transformation Definition

Compare with Zachman's Framework

11

1 2 3 4 5 6 Contextual/ Scope Conceptual/ Enterprise Logical/ IS Functionality Physical/ Design As Built/ Subcontractor Functioning/ Code Why

Objective Precedent Objective

Who

Organization Reporting Organization

When

Event Cycle Event

Where

Node Line Node

What

Entity Relationship Entity

How

Input Process Output

PIM

PSM

Mapping Platform

CODE

14:52

slide-12
SLIDE 12

Transformation Tool

Transformation Definition

MDE Benefits

  • Productivity
  • less code to be written
  • shift of attention from code to PIM  to solving the business problem
  • BUT: development of transformations is hard !
  • Portability
  • PIM is by definition completely portable
  • effective portability depends on available transformations
  • Interoperability
  • Documentation
  • PIM fulfils the role of high-level documentation
  • Tools needed for maintaining the relationships between PIM – PSM and Code
  • Still documentation required for PIM, e.g. motivation of choices

12

14:52

slide-13
SLIDE 13

Transformation Tool

Transformation Definition

MDE Benefits

  • Productivity
  • reduce code & testing
  • increase design effort
  • Requirements change
  • Prototype faster  detect changes sooner

13

0% 10% 20% 30% 40% 50% 60%

Effort per project phase

0% 10% 20% 30% 40% 50%

Detected Requirements Changes

14:52

slide-14
SLIDE 14

Transformation Tool

Transformation Definition

MDE Benefits

  • Interoperability

14

PIM PSM PSM Code Code

PSM Bridge Code Bridge First Transformation First Transformation Second Transformation Second Transformation

14:52

slide-15
SLIDE 15

Transformation Tool

Transformation Definition

Agenda

  • MDE Fundamentals
  • Development cycle
  • Building blocks
  • MDA Framework
  • Current State

15

14:52

slide-16
SLIDE 16

Transformation Tool

Transformation Definition

MDE Required building blocks

  • Well-specified high-level models: precise and complete
  • Languages to write these high-level models
  • Definitions of how to transform a PIM into PSMs
  • custom made or publicly available
  • Definitions of how to transform a PSM into code
  • Languages to write these transformations
  • Tools to execute these PIM-PSM transformations
  • with features to tune and debug transformations
  • Tools to execute transformation of PSM to code

16

14:52

slide-17
SLIDE 17

Transformation Tool

Transformation Definition

Agenda

  • MDE Fundamentals
  • Development cycle
  • Building blocks
  • MDA Framework
  • Current State

17

14:52

slide-18
SLIDE 18

Transformation Tool

Transformation Definition

MDA Framework

  • Models

18

14:52

slide-19
SLIDE 19

Transformation Tool

Transformation Definition

MDA Framework

  • Languages
  • Entity Relationship Modelling
  • UML Class Diagram
  • Finite State Machines
  • Harel State charts
  • Business Process Modelling Notation
  • UML Activity Diagram
  • BPEL
  • Petri Nets
  • Use Case Diagrams

19

14:52

slide-20
SLIDE 20

Transformation Tool

Transformation Definition

MDA Framework: Models

  • Different views in one Language (Single

Model, multiple views)

  • e.g. UML
  • Different Views/Models in different languages

20

System UML

Written in Describes Describes

System ER

Written in Describes Describes

BPMN

14:52

slide-21
SLIDE 21

Transformation Tool

Transformation Definition

MDA Framework: Models

  • PIM versus PSM
  • e.g. Interaction diagram:
  • language independent  platform independent ?
  • object oriented  platform specific ?
  • Process-Data CRUD-Matrix
  • language independent  platform independent
  • transforms to any technology  platform independent
  • Models are more or less platform independent/specific

21

14:52

slide-22
SLIDE 22

Transformation Tool

Transformation Definition

MDA Framework: Transformations

  • A transformation is the automatic generation of a target model from a source model

according to some transformation definition

  • A transformation definition is a set of transformation rules
  • Transformation definitions are between languages
  • A transformation rule defines how one or more constructs in the source language can

be transformed into one or more constructs in the target language

22

PIM Code PSM PSM PSM PSM

Transformation Tool

Transformation Definition

Transformation Tool

Transformation Definition

14:52

slide-23
SLIDE 23

Transformation Tool

Transformation Definition

MDA Framework: Transformations

23

Customer Account

> owns < owned_by

1..1 0..∗

Class Customer Owns: Linked_list (ACCOUNT) … ID: INTEGER name: STRING … End Class Account Owned_by: CUSTOMER … balance: REAL Deposit (amount: real) is … Withdraw (amount: real) is … End

Create Table Customer ("ID" "integer", “name” “char(50)”) Create Table Account (“Customer_id” “INTEGER”, “balance” “DOUBLE”, …) Balance: real Deposit (amount:real) Withdraw (amount: real) ID : INTEGER Name: STRING

UML Class Diagram

UML Class D to Eiffel Transformation

Eiffel SQL DDL

UML Class D to SQL Transformation

14:52

slide-24
SLIDE 24

Transformation Tool

Transformation Definition

MDA Framework: Transformations

24

ATM Account: 123-456789-10

<<SOAP-ENV:Envelope xmlns:SOAP-ENV = http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"/> <SOAP-ENV:Body> <m:NotifyWithdraw xmlns:m="http://www.bank.com/"> <AcountID> 123-456789-10 </AccountID> <amount> 100 </amount> <currency> Euro </Currency> </m:NotifyWithdraw </SOAP-ENV:Body> </SOAP-ENV:Envelope>

withdraw(100 €)

ThisAccount := AccountList.Find(123-456789-10) ThisAccount.withdraw(100)

UML Collaboration Diagram

UML Coll. D to Eiffel Transformation

Eiffel SOAP

UML Coll. D to SOAP Transformation

14:52

slide-25
SLIDE 25

Transformation Tool

Transformation Definition

Agenda

  • MDE Fundamentals
  • Development cycle
  • Building blocks
  • MDA Framework
  • Current State

25

14:52

slide-26
SLIDE 26

Transformation Tool

Transformation Definition

MDA Today - http://www.omg.org/mda

26

14:52

slide-27
SLIDE 27

Transformation Tool

Transformation Definition

MDA Today: Standards & Languages

  • UML: for PIMs and PSMs
  • OCL: Object Constraint Language (for PIM)
  • Action Semantics
  • Profiles: define languages derived from UML, mostly suited for PSMs
  • MOF: language used to define other languages
  • QVT= standardized language to define transformations

27

14:52

slide-28
SLIDE 28

Transformation Tool

Transformation Definition

MDA Today: Tools

  • PIM to PSM transformation tools
  • PSM to Code transformation tools
  • PIM to Code transformation tools
  • Tunable Tools

28

Interchange of Models (in XMI, JMI or IDL) and Transformation Definitions

Code Files Transformation Tool Transf.Def. Editor Transf.Def. Repository Model Editor Model Validator Model Repository Code File Parser Code File Generator Code Editor(IDE)

14:52

slide-29
SLIDE 29

Transformation Tool

Transformation Definition

MDA Today - http://www.omg.org/mda

29

Changes continuously …

14:52

slide-30
SLIDE 30

Transformation Tool

Transformation Definition

MDA Problems

  • Redundancy
  • more specialized artifacts, multiple representation of same object.
  • Rampant Round Trip Problems
  • several models for one object ==> propagation of change
  • Manual propagation
  • bottom up propagation of change
  • Forward engineering is the easy part …
  • Moving Complexity rather than reducing it ?
  • inherent versus accidental/spurious
  • MDD solves versus moves complexity ?
  • Traceability problems
  • More expertise required
  • business user, analyst and developer need to understand the impact of a proposed change on all the related

artifacts

30

14:52

slide-31
SLIDE 31

Transformation Tool

Transformation Definition

MDA languages

  • UML 2.1 has become enormous and unwieldy
  • complexity tends to impede successful adoption
  • some of the constructs in UML 2.1 are nearly semantics-free (e.g. use cases).
  • semantics carry the meaning essential to enable automation
  • ==> lack of semantics at all levels makes the production of automated MDD tools difficult
  • DSL are not a fundamental solution: boil down to the same issues on semantics.

31

14:52

slide-32
SLIDE 32

Transformation Tool

Transformation Definition

Key Success Factors for MDA

  • semantics, Semantics, SEMANTICS
  • Quality of the MODELS
  • Garbage In  Garbage Out
  • Platform independent & Abstract ≠ imprecise & ambiguous!
  • Quality of the MAPPING
  • Quality In + Mess it up  Garbage Out !
  • Design
  • Software Architecture key to Adaptable & Flexible software
  • Mapping requires PERSISTENT MODELS, in machine readable form
  • 4 Layer Metamodelling Architecture
  • STANDARDS & TOOL Integration

32

14:52

slide-33
SLIDE 33

Transformation Tool

Transformation Definition

Challenge : Quality of the PIM

John is a person. Any student is a person. Any employee is a person. John ∈ PERSON, STUDENT ⊆ PERSON, EMPLOYEE ⊆ PERSON.

33

  • Unambiguity
  • Natural Language
  • Formal language
  • Completeness
  • PERSON =? STUDENT ∪ EMPLOYEE
  • STUDENT ∩ EMPLOYEE = ?∅

14:52

slide-34
SLIDE 34

Transformation Tool

Transformation Definition

Challenge : Quality of the PIM

  • In order for a model to be executable it needs to be
  • Consistent
  • Method named “Ship” in OET, should be named “Ship” in FSM as well.
  • (sufficiently) complete
  • E.g. creating & ending methods required
  •  Exercise: think of all consistency rules seen so far
  • “Check Model”
  • What would happen if a model does not satisfy these checks ?

34

14:52

slide-35
SLIDE 35

Transformation Tool

Transformation Definition

MDA : Where to next ?

  • CASE-tools were not as big as a success as promised
  • Computer Aided Software Engineering were either code-generation oriented, either based
  • n 4th generation languages
  • Transformations behind code generation were hidden and not adaptable

35

14:52

slide-36
SLIDE 36

Transformation Tool

Transformation Definition

MDA : Where to next ?

  • Will MDA be a success ?

Positive elements:

  • Growth of available tools (see OMG’s website)
  • Silo problem reduced
  • better integration of tools through XML standards
  • interpretation of XMI is still a problem == > semantics !!
  • more Open Source tools available
  • evolution to de facto standards
  • Transformations are open & customizable
  • Students trained at modelling with tools

36

14:52

slide-37
SLIDE 37

Transformation Tool

Transformation Definition

MDA : Where to next ?

  • Will MDA be a success ?

Negative elements:

  • Not Invented Here syndrome
  • Unwillingness to use artefacts made by other, based on the belief that in-house developments

are inherently better suited, more secure or more controlled than existing implementations.

  • MDE easier for domain layer + part of ISS Layer, but way harder for user interfaces
  • User interfaces are rarely “standard” and often require customization by means of “manual”

programming.

  • Wizard-based development – “Visual” programming
  • Eases programming and allows “fast” in-house development
  • Need for/belief in advantage of “automating” software production is not really high.

37

14:52