CISC836: Models in Software Development: Methods, Techniques and Tools

Similar documents
Dominique Blouin Etienne Borde

Sequence Diagram Generation with Model Transformation Technology

CISC836: Models in Software Development: Methods, Techniques and Tools

Dominique Blouin Etienne Borde

Eclipse Modeling Framework (EMF) Paweł Żalejko

Planned Review Date: June 10, 2009 Communication Channel: eclipse.tools.emf Dave Steinberg and Ed Merks

Language engineering and Domain Specific Languages

Model Driven Ontology: A New Methodology for Ontology Development

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language

EMFT 1.0 Release Review (OCL, Query, Transaction, and Validation)

Coral: A Metamodel Kernel for Transformation Engines

Introduction to Dependable Systems: Meta-modeling and modeldriven

Acceleo Galileo Simultaneous Release

Modellierung operationaler Aspekte von Systemarchitekturen. Master Thesis presentation. October 2005 March Mirko Bleyh - Medieninformatik

MEMOCenterNG A full-featured modeling environment for organization modeling and model-driven software development

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

ECLIPSE MODELING PROJECT

(Meta)Models between MetaEdit+

INTRODUCTION TO EMF. Creating Model using EMF. Our Domain model used to showcase this use case is as shown below in fig.1

Introduction to EGF. Benoît Langlois / Thales Global Services.

Kermeta tutorial. How to create an EMF meta model? François Tanguy, Didier Vojtisek, Zoé Drey, Marie Gouyette. Abstract

Metamodeling with Metamodels. Using. UML/MOF including OCL

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations

ATL TRANSFORMATION EXAMPLE

Wikileaking Eclipse Modeling - Spilling the beans on how industry uses EMF based tooling successfully! Ronan Barrett, Ericsson

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Using Eclipse in MIS Research

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Start Up Benoît Langlois / Thales Global Services Eclipse (EMFT) EGF 2011 by Thales; made available under the EPL v1.

The Eclipse Modeling Framework and MDA Status and Opportunities

It s all Done with Mirrors Patterns and OCL. KMF Kent Modelling Framework D.H.Akehurst and O.Patrascoiu

Christian Doppler Laboratory

BLU AGE 2009 Edition Agile Model Transformation

Static analysis and testing of executable DSL specification

Kermeta tutorial. How to create a metamodel. François Tanguy, Didier Vojtisek. Abstract

Implementation of a data layer for the visualization of component-based applications

A modelling language for the effective design of Java annotations

AN ERD TOOL. Abstract. Ron McFadyen Applied Computer Science University of Winnipeg Winnipeg, Manitoba, Canada R3B 2E9

TOPCASED. Toolkit In OPen source for Critical Applications & SystEms Development

Introduction to MDE and Model Transformation

with openarchitectureware

An EMF Framework for Event-B

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

Model2Roo: A Model Driven Approach for Web Application Development based on the Eclipse Modeling Framework and Spring Roo

UML PROFILING AND DSL

Model-based Software Engineering (02341, spring 2017) Ekkart Kindler

The etrice Eclipse Project Proposal

Technical Solutions for the Transformation-Driven Graphical Tool Building Platform METAclipse

PAPYRUS FUTURE. CEA Papyrus Team

Papyrus: Advent of an Open Source IME at Eclipse (Redux)

ATL Transformation Example

Model-Driven Development of Simulation-Based System Design Tools

Extending Unified Modeling Language to Support Aspect-Oriented Software Development

Defining Domain-Specific Modeling Languages

UML 2.5: Specification Simplification

AbstractCommand, AbstractEnumerator, AbstractOverrideableCommand, AddCommand, AbstractTreeIterator, Adapter, EAnnotation.

ADT: Eclipse development tools for ATL

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

OCL Tooling for OMG specifications

Index. business modeling syntax 181 business process modeling 57 business rule 40

Model-Driven Iterative Development of 3D Web-Applications Using SSIML, X3D and JavaScript

EMF Europa Simultaneous Release

CISC836: Models in Software Development: Methods, Techniques and Tools

Orccad, a Model Driven Architecture and Environment for Real-Time Control. Soraya Arias Florine Boudin Roger Pissard-Gibollet Daniel Simon

Towards a model driven Modelica IDE

MDT OCL Goes Generic. Introduction to OCL and Study of the Generic Metamodel and API. Christian W. Damus IBM Rational Software OCL Committer

FSToolkit: Adopting Software Engineering Practices for Enabling Definitions of Federated Resource Infrastructures

Modeling Requirements

A universal PNML Tool. Lukasz Zoglowek

Ákos Horváth Gábor Bergmann Dániel Varró István Ráth Model Driven Software Development Lecture 3

Software Project Seminar VII: Tools of the Craft. 23 march 2006 Jevgeni Kabanov

The Case for Meta-modeling Frameworks Specialisation

Deliverable: D 1.2 Specification of Traceability concepts

Design Specification of Cyber-Physical Systems: Towards a Domain-Specific Modeling Language based on Simulink, Eclipse Modeling Framework, and Giotto

SOFTWARE testing is one of the main steps of each development

Comparative analysis of MDA tools

A MOF based Meta-Model and a Concrete DSL Syntax of IIS*Case PIM Concepts

Diagram Definition: a Case Study with the UML Class Diagram

Model-based Software Engineering (02341, spring 2017) Ekkart Kindler

Preserving Non-essential Information Related to the Presentation of a Language Instance. Terje Gjøsæter and Andreas Prinz

A Metamodel independent approach for Conflict Detection to support distributed development in MDE. Mostafa Pordel A THESIS

Tool Paper: Combining Alf and UML in Modeling Tools An Example with Papyrus

On the customization of model management systems for code centric IDEs

Modeling and Assessment of Safety Critical Systems

Bachelor of Engineering, IT Thesis

Model driven Engineering & Model driven Architecture

Model-Driven Engineering (MDE) Lecture 1: Metamodels and Xtext Regina Hebig, Thorsten Berger

A Model-Driven Framework for Domain Specific Process Design and Governance

University of Mannheim

A Comparison of Ecore and GOPPRR through an Information System Meta Modeling Approach

EMF Compare Galileo Simultaneous Release

Building applications in less time. Eclipsecon France 2018

From a lot of Boxes to a lot of Words

SUMMARY: MODEL DRIVEN SECURITY

Model handling with EMF

Kermeta. in compiled mode

Object-Oriented Design

Common Pattern Modeling Language for Object and Component Architectures

Uml Class Diagram To Java Code Example Sheet

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

Transcription:

CISC836: Models in Software Development: Methods, Techniques and Tools Topic 4: Code Generation with EMF Meta modeling Languages for meta models: Ecore Using EMF and Ecoreto define a data model Using EMF to generate code for data model Juergen Dingel Jan, 2017 1

Code Generation Papyrus (https://eclipse.org/papyrus/) UML 2.5, with support for UML 2C++ and Java http://wiki.eclipse.org/papyrus/codegen/cpp_description http://wiki.eclipse.org/java_code_generation Extensible (plugin your own generators) Existing support somewhat partial Papyrus-RT and IBM RSA-RTE UML-RT, with support for C++ and Java (RSA-RTE) Executable w/ support for behavioural models Eclipse Modeling Framework (EMF) Not executable, but Very good support for structural models Now for implementation of applications heavily reliant on structured data 2

Metamodeling Can use concepts from Class models/diagrams to describe structure ( abstract syntax ) of modeling concepts in UML: Classes: Section 11.4.2 in [UML2.5] Statemachines: Section 14.2.2 Interactions: Section 17.2.2 Activities: Section 15.2.2 Packages: Section 12.2.2 Behaviour Classification: Classifiers, Features, Properties, Operations These Simple class Classifiers: models Datatype, are metamodels, signals, Interfaces i.e., Values: Literals, Expression, Time models describing models 3

Metamodeling (Cont d) Meta model MM: model (a specification) of a set of models (i.e., a modeling language L(MM)) Instance M of meta model MM: well-formed model in modeling language L (i.e., M L(MM)) Languages for expressing meta models Meta Object Facility (MOF): OMG standardized language for defining modeling languages subset of UML class diagrams: types (classes, primitive, enumeration), generalization, attributes, associations, operations ECore: Eclipse version of MOF; used by Xtext Object Constraint Language (OCL): Meta model MM instance of Model M declarative language to express well-formedness rules (e.g., the inheritance hierarchy is acyclic ) conforms to 4

Metamodeling (Cont d) OMG Unified Modeling Language, Infrastructure, Version 2.2. Number: formal/2009-02-04 5

Eclipse Modeling Framework Eclipse-based open-source framework supporting the development of applications requiring a structured data model (DM) Consists of Ecore Meta modelling language for the description of DMs with support for q change notification (via the Observer design pattern), q persistence (via XMI serialization), and q generic object manipulation (via reflective API) EMF.Codegen Generates code implementing the DM and supporting the development of tools creating and manipulating data model instances: q Model: Java interfaces and implementation of DM (using Factory design pattern) q Editor: plugin for tree-based editor of DM instances qedit: implementation classes adapting DM classes for editing and display (via Adapter Factory design pattern) Large user community: http://www.eclipse.org/emf 6

Meta modeling language Tree editor Graphical editor API Ecore conforms to created with help of uses Data Model (DM) creates generates Tree editor conform to generates Java code uses creates Application creates creates DM instances uses 7

Ecore: Metamodeling Language Metamodel(simplified): EObject Base of every Ecoreclass and every generated class Provides support for notification and persistence [Summary of package org.eclipse.emf.ecore] [Steinberg, Budinsky, Paternostro, Merks. EMF: Eclipse Modeling Framework (2nd Ed.). 2008] 8

Eclipse EMF: Supporting Technology Editors are Eclipse plugins Sirius Framework for automatic generation of graphical editors Junit Supported by generated test code Design patterns Observer Factory Adapter Factory 9

Object, called subject, maintains list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. Used for MVC pattern. Observer Design Pattern [Wikipedia. Observer pattern. https://en.wikipedia.org/wiki/observer_pattern. 2016] 10

Factory Design Pattern Object, called the Factory, encapsulates details of creation of different Products [OODesign.com. Factory pattern. http://www.oodesign.com/factory-pattern.html. 2016] 11

Using EMF: Getting Started Download and installation http://www.eclipse.org/modeling/emf Documentation http://www.eclipse.org/modeling/emf/docs/ Tutorials http://www.vogella.com/tutorials/eclipseemf/article.html http://eclipsesource.com/blogs/tutorials/emf-tutorial/ http://www.philmann-dark.de/emfdocs/tutorial.html 12

Using EMF: Create Domain Model (DM) Example: http://eclipsesource.com/blogs/tutorials/emf-tutorial/ bowling.ecore Root classes: League, Tournament Containment relationship b/w Matchup and Game is bi-directional Containment = true for reference games matchup is opposite of games 13

Genmodel Using EMF: Generate Code from DM Generated from.ecore model Contains additional info necessary for code generation (package names, source paths, project names, generator settings) Automatically synchronized with.ecoremodel when.ecoremodel is saved To generate: Open.genmodel right-click root node select plugin to generate CISC836, Winter 2017 EMF 14

Using EMF: Use Generated DM Editor Code for DM editor generated as Eclipse plugin Invocation of the editor will create another instance of Eclipse in which the editor will execute 15

Using EMF: Use Generated DM Editor (Cont d) 16

Using EMF: Use Generated DM Java Code 17

Using generated test code Generating JavaDoc Generating method bodies Using EMF: Demo 18

Pros EMF: Pros and Cons Quite powerful, stable, adequate documentation Integral part of Eclipse Modeling ecosystem: Cons EMF Forms: for generation of form-based UI Xtext: for DSL implementation ATL: for model-to-model transformation Inherit Eclipse baggage (but can use Rich Client Platform) 19

Installation EMF: More Info http://www.eclipse.org/modeling/emf Documentation http://www.eclipse.org/modeling/emf/docs/? Tutorials http://eclipsesource.com/blogs/tutorials/emf-tutorial/ http://www.vogella.com/tutorials/eclipseemf/article.html http://www.philmann-dark.de/emfdocs/tutorial.html Book Steinberg, Budinsky, Paternostro, Merks. EMF: Eclipse Modeling Framework (2 nd Ed.). Addison-Wesley Professional. 2008. 20