+ All Categories
Home > Documents > Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie...

Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie...

Date post: 16-Apr-2018
Category:
Upload: vuanh
View: 218 times
Download: 4 times
Share this document with a friend
27
Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for model-driven Tool support for model-driven development in practice development in practice PisaTel Meeting Roma, 29 novembre 2007 Antonino Sabetta ISTI-CNR, Pisa
Transcript
Page 1: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo”Software Engineering Laboratory

Tool support for model­driven Tool support for model­driven development in practicedevelopment in practice

PisaTel MeetingRoma, 29 novembre 2007

Antonino SabettaISTI-CNR, Pisa

Page 2: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

MDD: what's it all about?» Making software is a matter of:

» art and inspiration?» craftsmanship?» engineering best­practices?» industrial production (i.e. automated, repeatable)?

» Model Driven (MD) approaches advocate» expressing design artifacts in a machine­readable format» automatically obtain new artifacts from existing ones

» model transformation» code generation» reverse engineering

Page 3: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

What can I do with models that I can't do without

» Modeling as a means for....» Better/easier/higher­quality design

» Raising the level of abstraction» Gain better understanding of design choices and their 

implications» (Early) analysis

» functional verification» extra­functional verification (performance, 

schedulability)» Automated implementation (i.e. code generation)

» you want code eventually, don't you?

Page 4: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Different tools for different purposes

» Metamodeling» Model­to­model transformation» UML modeling» Code generation» Model­driven analysis

Page 5: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Different tools for different purposes

» Metamodeling» Model­to­model transformation» UML modeling

» methodology­neutral» methodology­specific

» Code generation» Model­driven analysis

Page 6: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Papyrus UML» feature highlights

» Eclipse­based, free, open source, actively developed» OMG standards compliant (v.2.0)» open development process» developed by knowledgeable people, directly involved in OMG 

standardization process (MARTE OMG profile for Modeling and Analysis of Real Time Embedded Systems)

» Both SysML and MARTE are already implemented in Papyrus (Papyrus's MARTE is the official reference implementation)

» Supports all the UML standard diagrams» Extremely easy to extend with custom profiles (see next slides)» Code generation (based on Acceleo); C++ and Java supported out­

of­the­box, other languages can be added with new templates

Page 7: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Why do I need extensions/annotations?» The UML metamodel:

» is generic» has several semantic variation points (bug or feature?)» BUT it can be customized, specialized, constrained: UML profiles

» What can you do with UML profiles:» tailor the language to your domain and to your development 

process and practices» attach a semantics that suits your need (i.e. generate special 

code based on the information included in the stereotypes)» augment the model with extra information that is necessary for 

performance predictions

Page 8: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Defining a custom profile with Papyrus

Page 9: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Defining a custom profile with Papyrus

Page 10: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Using a custom profile with Papyrus

Page 11: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Under the hood: XMI

Page 12: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Magicdraw (NoMagic Inc.)

» Pros:» Compliant with v.2.0 family of  OMG standards; interoperable» Full support for Profiles and consistency checks with constraint 

language» Actively developed and maintained» Commercial support

» Cons:» Proprietary tool, expensive

Note: It's a general purpose UML modeling tool (does not attach a specific semantics to models, thus it is not capable e.g. to execute statecharts)

Page 13: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

MagicDraw

Page 14: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

MagicDraw

Page 15: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

MagicDraw

Page 16: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

UniMod

» Pros» Development methodology based on statecharts and 

events» Statecharts can be directly mapped to C++/Java code

» Note: UniMod assumes a particular semantics for UML statecharts and imposes a predefined design work­flow. (All of this could be implemented ­ under the hood ­ via the UML profiling mechanism with a “neutral” modeling tool)

Page 17: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

UniMod

» Cons» UniMod 1.3 is based on obsolete UML 1.5 std.» No support for custom annotations, no Profiles (neither 

custom nor standard profiles)» No support for interchange, no interoperability» UniMod 2 (was due for April 2007) seems to be dead

Page 18: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

UniMod: structural modeling

Page 19: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

UniMod: behavioral modeling

Page 20: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

UniMod: behavioral modeling

Page 21: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

UniMod code generation capabilities

Page 22: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

iUML (Kennedy­Carter)

» Distinguishing features (iUMLite 2.2, free, March 2005)» Executable models (simulates statecharts)» Body of actions is specified with an action­language (ASL), 

imperative with some declarative shortcuts for operation on sets

» Latest non­free version claims to be capable of generating code from statemachines

» Shortcomings» Based on obsolete UML standard (1.5)» No profiles, no extensions (neither std nor custom)» No import­export in free edition

Page 23: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

iUML (Kennedy­Carter)

Page 24: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

iUML (Kennedy­Carter)

Page 25: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Modeling to automate implementation

» Code generation» Acceleo

» Eclipse based» incremental code generation» produce code by populating templates» the meaning of the model (how modeling elements map to actual 

code) is expressed in the code­generation process

» Alternatives: AndroMDA, StringTemplate, JET

Page 26: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Conclusion

» Models are used for a number of purposes» Tools cover different areas

» high­level design, architectural modeling» predictive analysis, early verification» code generation, reverse engineering

» Different approaches» some tools offer fuller use of the standard but require that the language 

and the design process be tailored for your purposes (very flexible, but exploit this flexibility implies making customizations)

» others come packaged with predefined design workflow and specialized features (quicker adoption, but less flexible)

Page 27: Tool support for modeldriven development in practice · Istituto di Scienza e Tecnologie dell'Informazione “A. Faedo” Software Engineering Laboratory Tool support for modeldriven

  SOFTWARE ENGINEERING LABORATORY

Discussion

» Open vs closed vs proprietary» interoperability is an issue» support for std interchange formats

» Built­in support for executable models» Interfacing with 3rd party code generation engines» Support for profiling/annotations» Support for latest OMG standard specifications» Active development; frequent updates and fixes» Community support and good documentation


Recommended