01 mde principles

Post on 21-Feb-2017

687 views 0 download

Transcript of 01 mde principles

Model Driven EngineeringMDE Principles Ludovico Iovino

ludovico.iovino@gssi.infn.itludovico.iovino@univaq.it

Roadmap

What is a model ?

What is Model Driven Engineering ?

MDSE Application

Metamodeling, modeling and transformations

01

02

03

04

The human mind continuously re-works reality by applying cognitive processes

Abstraction

Important notions of abstraction

What is a model ?

Capability of finding the commonality in many different observations

generalize specific features of real objects classify the objects into coherent clusters aggregate objects into more complex ones

We will see…

Abstraction and human mind

Human mind

Re-works reality

Applying cognitive process

2 different realities

The Brainstorming

The Great Thinking

Do you know what a model is about ?

ExampleLet us consider a system in reality

Modelfor our system

Let us consider a now a

Modelfor our system

Let us consider a now a

What about asking a child to draw a model for our

system ?

What about asking a child to draw a model for our

system ?

What about asking a child to draw a model for our

system ?

What is a model ?

A model reflects author’s background

A model reflects author’s background

and whishes

Ludovico Iovino, Model Driven Engineering– MDE principles

What is a model?- A model represents reality for the given purpose; - The model is an abstraction of reality in the sense that it cannot

represent all aspects of reality

Ludovico Iovino, Model Driven Engineering– MDE principles

What is a model?- A model represents reality for the given purpose; - The model is an abstraction of reality in the sense that it cannot

represent all aspects of reality- Modeling, in the broadest sense, is the cost-effective use of

something in place of something else for some cognitive purpose.

Ludovico Iovino, Model Driven Engineering– MDE principles

What is a model?- A model represents reality for the given purpose; - The model is an abstraction of reality in the sense that it cannot

represent all aspects of reality- Modeling, in the broadest sense, is the cost-effective use of

something in place of something else for some cognitive purpose. - It allows us to use something that is simpler, safer or cheaper than

reality instead of reality for some purpose

This allows us to deal with the world in a simplified

manner, avoiding the complexity, danger and

irreversibility of reality

Simpler, safer or cheaper than reality

Ludovico Iovino, Model Driven Engineering– MDE principles

What is a model?- A model represents reality for the given purpose; - The model is an abstraction of reality in the sense that it cannot

represent all aspects of reality- Modeling, in the broadest sense, is the cost-effective use of

something in place of something else for some cognitive purpose. - It allows us to use something that is simpler, safer or cheaper than

reality (instead of reality) for some purpose- This allows us to deal with the world in a simplified manner, avoiding

the complexity, danger and irreversibility of reality

Ludovico Iovino, Model Driven Engineering– MDE principles

What is a model?- A model represents reality for the given purpose; - The model is an abstraction of reality in the sense that it cannot

represent all aspects of reality- Modeling, in the broadest sense, is the cost-effective use of

something in place of something else for some cognitive purpose. - It allows us to use something that is simpler, safer or cheaper than

reality instead of reality for some purpose- This allows us to deal with the world in a simplified manner, avoiding

the complexity, danger and irreversibility of reality

The world boundaries directly affect the assumptions on the model semantics

1 2

1 2

What does it mean?

1 2

What does it mean? «2» comes after «1»«2» depends on «1» «1» specializes/refines «2»«2» listens to «1»«2» contains «1»etc

1 2

- What does it mean?- How many different meanings are you able to attach to it?

Ludovico Iovino, Model Driven Engineering– MDE principles

So…what is a model?

Ludovico Iovino, Model Driven Engineering– MDE principles

So…what is a model?- A simplified or partial representation of reality, defined in order to

accomplish a task or to reach an agreement

Ludovico Iovino, Model Driven Engineering– MDE principles

So…what is a model?- A simplified or partial representation of reality, defined in order to

accomplish a task or to reach an agreement

ModelrepresentsSystem

Mapping Feature A model is based on an original (=system)

Ludovico Iovino, Model Driven Engineering– MDE principles

So…what is a model?- A simplified or partial representation of reality, defined in order to

accomplish a task or to reach an agreement

ModelrepresentsSystem

Mapping Feature A model is based on an original (=system)Reduction Feature A model only reflects a (relevant) selection of the

original‘s properties

Ludovico Iovino, Model Driven Engineering– MDE principles

So…what is a model?- A simplified or partial representation of reality, defined in order to

accomplish a task or to reach an agreement

ModelrepresentsSystem

Mapping Feature A model is based on an original (=system)Reduction Feature A model only reflects a (relevant) selection of the

original‘s properties

Pragmatic Feature A model needs to be usable in place of an original with respect to some purpose

MotivationWhat is Model Driven Engineering ?

MotivationWhat is Model Driven Engineering ?

Shifting focus from code centric techniques to Models

MotivationWhat is Model Driven Engineering ?

Shitfting focus from code centric techniques to Models

Ludovico Iovino, Model Driven Engineering– MDE principles

Motivation- Model as the central artifact of software development

Model

Rapid prototyping

Static analysis

Code generation

Automated testing

Refactoring/Transformation

Documentation

Ludovico Iovino, Model Driven Engineering– MDE principles

Motivation- Quality problems in software development

[Slide by Bernhard Rumpe]

Ludovico Iovino, Model Driven Engineering– MDE principles

Motivation- Quality problems in software development

[Slide by Bernhard Rumpe]

Ludovico Iovino, Model Driven Engineering– MDE principles

Motivation- Quality problems in software development

[Slide by Bernhard Rumpe]

Ludovico Iovino, Model Driven Engineering– MDE principles

Motivation- Quality problems in software development

[Slide by Bernhard Rumpe]

Ludovico Iovino, Model Driven Engineering– MDE principles

Motivation- Traditional usage of models in software development

- Communication with customers and users (requirement specification, prototypes)

- Support for software design, capturing of the intention- Task specification for programming - Code visualization

[Slide by Bernhard Rumpe]

Ludovico Iovino, Model Driven Engineering– MDE principles

MotivationModels as drafts- Communication of ideas and alternatives- Objective: modeling per se

Models as guidelines- Design decisions are documented- Objective: instructions for implementation

Models as programs- Applications are generated automatically- Objective: models are source code and vice versa

[Slide by Bernhard Rumpe]

t

Ludovico Iovino, Model Driven Engineering– MDE principles

MDSE Concepts- Model Driven Software Engineering (MDSE) concepts

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Driven Software Engineering (MDSE) conceptsAbstraction from specific realization technologies- Requires modeling languages, which do not hold specific concepts of realization technologies (e.g., Java

EJB)- Improved portability of software to new/changing technologies – model once, build everywhere- Interoperability between different technologies can be automated (so called Technology Bridges)

Automated code generation from abstract models- e.g., generation of Java-APIs, XML Schemas, etc. from UML- Requires expressive and precise models- Increased productivity and efficiency (models stay up-to-date)

Separate development of application and infrastructure- Separation of application-code and infrastructure-code (e.g. Application Framework) increases

reusability- Flexible development cycles as well as different development roles possible

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Driven Software Engineering (MDSE) Equation

Models

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Driven Software Engineering (MDSE) Equation

+Models Transformations

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Driven Software Engineering (MDSE) Equation

+Models Transformations Software=

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Driven Software Engineering (MDSE) Equation

+Models Transformations Software=

Minimal MD Infrastructure

Ludovico Iovino, Model Driven Engineering– MDE principles

The MD* Jungle of Acronyms- Model-Driven Development (MDD) is a development paradigm that uses

models as the primary artifact of the development process. - Model-driven Architecture (MDA) is the particular vision of MDD proposed by

the Object Management Group (OMG) - Model-Driven Engineering (MDE) is a superset of MDD because it goes beyond

of the pure development - Model-Based Engineering (or “model-based development”) (MBE) is a softer

version of MDE, where models do not “drive” the process

Ludovico Iovino, Model Driven Engineering– MDE principles

Target of MDSE- The Problem Domain is defined as the field or area of expertise that

needs to be examined to solve a problem.- The Domain Model is the conceptual model of the problem domain

(entities, relations, roles, constraint)- Technical Spaces represent specific working contexts for the

specification, implementation, and deployment of applications (decide the storage formats)

Ludovico Iovino, Model Driven Engineering– MDE principles

Target of MDSE- The Problem Domain is defined as the field or area of expertise that

needs to be examined to solve a problem.- The Domain Model is the conceptual model of the problem domain

(entities, relations, roles, constraint)- Technical Spaces represent specific working contexts for the

specification, implementation, and deployment of applications (decide the storage formats)

Ludovico Iovino, Model Driven Engineering– MDE principles

Target of MDSE- The Problem Domain is defined as the field or area of expertise that

needs to be examined to solve a problem.- The Domain Model is the conceptual model of the problem domain

(entities, relations, roles, constraint)- Technical Spaces represent specific working contexts for the

specification, implementation, and deployment of applications (decide the storage formats)

Ludovico Iovino, Model Driven Engineering– MDE principles

Modeling languages- Domain-Specific Languages (DSLs): languages that are designed

specifically for a certain domain or context- DSLs have been largely used in computer science. Examples: HTML,

Logo, VHDL, SQL

- General Purpose Modeling Languages (GPMLs, GMLs, or GPLs): languages that can be applied to any sector or domain for (software) modeling purposes

- The typical examples are: UML, Petri-nets, or state machines

Ludovico Iovino, Model Driven Engineering– MDE principles

Metamodeling- To represent the models themselves as “instances” of some more

abstract models.- Metamodel = yet another abstraction, highlighting properties of the

model itself - Modelware is the MDSE paradigm not so different from

grammarware

Ludovico Iovino, Model Driven Engineering– MDE principles

Metamodeling- To represent the models themselves as “instances” of some more

abstract models.- Metamodel = yet another abstraction, highlighting properties of the

model itself - The relationship between models and metamodel is called

conformance (c2)

m

MM

Conform to (c2)

Ludovico Iovino, Model Driven Engineering– MDE principles

Metamodeling

What is a model Transformation?

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Transformation- Transformations are defined at metamodel level but applied at model level- MDSE provides appropriate languages for defining model transformation

rules- Rules can be written manually from scratch by a developer, or can be

defined as a refined specification of an existing one. - Alternatively, transformations themselves can be produced automatically

out of some higher level mapping rules between models- defining a mapping between elements of a model to elements to another one

(model mapping or model weaving)- automating the generation of the actual transformation rules through a system that

receives as input the two model definitions and the mapping

- Transformations themselves can be seen as models!

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Transformation

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Transformation- Software modernization

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Transformation- Software modernization

Exomorphic Transformation

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Transformation- Software modernization

Exomorphic TransformationTransforms this view into another view

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Classification- A very simple way of classifying the modeling languages and the

respective models is based on the level of abstraction at which the modeling is performed- Describe requirements and needs at very abstract level without details to the

implementation- Define the behavior of the system in terms of stored data w/o technological

details- Define all the technological aspects in detail

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Classification- Static models: Focus on the static aspects of the system in terms of

managed data and of structural shape and architecture of the system.

- Dynamic models: Emphasize the dynamic behavior of the system by showing the execution

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Classification- Static models: Focus on the static aspects of the system in terms of

managed data and of structural shape and architecture of the system.

- Dynamic models: Emphasize the dynamic behavior of the system by showing the execution

Ludovico Iovino, Model Driven Engineering– MDE principles

Model Classification- Static models: Focus on the static aspects of the system in terms of

managed data and of structural shape and architecture of the system.

- Dynamic models: Emphasize the dynamic behavior of the system by showing the execution

Ludovico Iovino, Model Driven Engineering– MDE principles

MDSE adoption in Industry- Some studies done in the past 5 years show that modeling is not

extensively adopted among practitioners - New developments in the last few years in terms of new technologies

and the release of standard tools have changed the landscape- As Steve Mellor like to say “modeling and MDE will be commonplace

in 3 years time”

Ludovico Iovino, Model Driven Engineering– MDE principles

MDSE adoption in Industry- Some studies done in the past 5 years show that modeling is not

extensively adopted among practitioners - New developments in the last few years in terms of new technologies

and the release of standard tools have changed the landscape- As Steve Mellor like to say “modeling and MDE will be commonplace

in 3 years time [since 1985]

Ludovico Iovino, Model Driven Engineering– MDE principles

MDSE adoption in Industry- Experts think that the biggest challenges faced by companies

adopting MDE approaches are not much on the technical side…

Ludovico Iovino, Model Driven Engineering– MDE principles

MDSE adoption in Industry- Experts think that the biggest challenges faced by companies

adopting MDE approaches are not much on the technical side…- But much more on the human factor side:

“Dealing with people’s habits and resistance to change”“Accepting and adopting standards”“Tool availability, business lines ,…”“Impatience of getting to the results”

Ludovico Iovino, Model Driven Engineering– MDE principles

Tool support- Many people assume that drawing tools and modeling tools are two

interchangeable concepts

Ludovico Iovino, Model Driven Engineering– MDE principles

Tool support- Many people assume that drawing tools and modeling tools are two

interchangeable concepts … this is far from true- Only some tools are drawing and modeling tools at the same time- Some modeling tools use a concrete textual syntax for specifying

models and thus there is no support for drawing in them

Many drawing tools are not modeling tools. A drawing tool can be considered a modeling tool if the tool “understands” the drawings

Tool support

Many drawing tools are not modeling tools. A drawing tool can be considered a modeling tool if the tool “understands” the drawings

Tool support

Check the correctnessHave a meaningCan be exportedCan be processed