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

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

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

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Advanced Topics in Software Engineering (02265) Ekkart Kindler

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

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

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

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

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Technology Tutorial. - Details and Advanced Concepts - Patrick Könemann Software Engineering 2 (02162)

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

Compositional Model Based Software Development

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Model Driven Engineering (MDE)

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

Colored Petri Net Evaluation Tool. Stephen Rojcewicz CS 2310

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

All you need are models Anneke Kleppe, Klasse Objecten

Language engineering and Domain Specific Languages

AMFIBIA: A Meta-Model for the Integration of Business Process Modelling Aspects

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

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

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

Metamodeling and Metaprogramming Seminar

EMF course - PACT. Etienne Borde

20. Eclipse and Framework Extension Languages

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

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

The Eclipse Modeling Framework and MDA Status and Opportunities

Lesson learned from using EMF to build Desktop & Web Applications. Ludwigsburg, Oct

Introduction to OpenArchitectureWare

EGF Tutorial. Benoît Langlois Thales/EPM. EGF Tutorial by Thales; made available under the EPL v1.0

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

A universal PNML Tool. Lukasz Zoglowek

project in an industrial context

CSSE 490 Model-Based Software Engineering: Cougaar Model-Driven Architecture Example

Model Driven Architecture

PragmaDev. change request. Emmanuel Gaudin. PragmaDev ITU-T SG17 change request Grimstad June 24,

First Steps in RCP. Jan Blankenhorn, WeigleWilczek GmbH, Stuttgart, Germany. February 19th, 2009

SysML Past, Present, and Future. J.D. Baker Sparx Systems Ambassador Sparx Systems Pty Ltd

What Every Xtext User Wished to Know Industry Experience of Implementing 80+ DSLs

Horváth Ákos Bergmann Gábor Dániel Varró István Ráth

Model Abstraction versus Model to Text Transformation

MDA Driven xuml Plug-in for JAVA

Model Driven Architecture - The Vision

Agenda. Why OSGi. What is OSGi. How OSGi Works. Apache projects related to OSGi Progress Software Corporation. All rights reserved.

Defining Domain-Specific Modeling Languages

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

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

Introduction to MDE and Model Transformation

WoPeD Workflow Petri Net Designer

Reconciling TGGs with QVT

Modelling in Enterprise Architecture. MSc Business Information Systems

Charlie Garrod Bogdan Vasilescu

BIG MODELS AN ALTERNATIVE APPROACH

A Formal Approach to Modeling and Model Transformations in Software Engineering

Grammars. Prof. Andreas Prinz. Introduction, Compilers. Examples Meta-models vs. Grammars Summary

Chair of Software. Engineering. Overview. School of Business Informatics and Mathematics. 1. Find out why software engineering is important

Eclipse Modeling Framework (EMF) Paweł Żalejko

Deliverable D4.2. SHAPE MDE Toolset User s Guide

Stepwise Refinement. Lecture 12 COP 3014 Spring February 2, 2017

developer.* The Independent Magazine for Software Professionals

Tiger EMF Model Transformation Framework (EMT)

epnk: A generic PNML tool Users and Developers Guide

The Edapt Solution for the Reengineering Case

innoq Deutschland GmbH innoq Schweiz GmbH D Ratingen CH-6330 Cham Tel Tel

Roles in Software Development using Domain Specific Modelling Languages

CSSE 490 Model-Based Software Engineering: Introduction to Domain Engineering

Introduction to Dependable Systems: Meta-modeling and modeldriven

Objectives for this class meeting. 1. Conduct review of core concepts concerning contracts and pre/post conditions

Modelling with UML, MOF, and OCL

Language Extension and Composition with Language Workbenches

Static analysis and testing of executable DSL specification

Protégé-2000: A Flexible and Extensible Ontology-Editing Environment

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

Transformational Design with

Beware: Testing RCP Applications in Tycho can cause Serious Harm to your Brain. OSGi p2

jbpm Tools Reference Guide

Model driven Engineering & Model driven Architecture

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

Modularity in Java. With OSGi. Alex Docklands.LJC January Copyright 2016 Alex Blewitt

An EMF Framework for Event-B

Model Driven Engineering

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

Meta-Modeling and Modeling Languages

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

Raising the Level of Development: Models, Architectures, Programs

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

EMF Metrics: Specification and Calculation of Model Metrics within the Eclipse Modeling Framework

Java Modularity Support in OSGi R4. Richard S. Hall ApacheCon (San Diego) December 14 th, 2005

Dresden OCL2 in MOFLON

3rd Lecture Languages for information modeling

DEV427 MODEL-DRIVEN DEVELOPMENT USING PowerDesigner. Xiao-Yun WANG PowerDesigner Chief Architect

!MDA$based*Teaching*and* Research*in*Software*Engineering*!

Transcription:

Model-based Software Engineering (02341, Spring 2017)

I. Introduction

1. Motivation What is software engineering? What is software? software = program software engineering = programming 3

Program vs. Software is much more than Software >> Program Software Engineering >>> Programming is much much more than 4

Programming vs. SE Software Software Engineer Software Engineering Program Programmer Programming 5

Software Die Menge aller Programme, Prozeduren und Objekte, zusammen mit den zugehörigen Daten und der Dokumentation, die für eine lauffähige Anwendung nötig oder wünschenswert sind. [frei nach Informatik DUDEN und Hesse] 6

Software The sum of all programs, procedures and objects along with the associated data and documentation, which are necessary (or at least desirable) for running an application on a computer system. 7

2. Models in SE and a glimpse of how software can be developed by using models without doing any programming at all. 8

Modelling 9

Idea for some Software 10

Example of a Petri net request 1 request 2 critical 1 critical 2 semaphor idle 1 idle 2 11

Stages Examples Taxonomy (done on blackboard) Glossary Model (developed on blackboard) 12

Models (Meta Models) PetriNet object * Object context Arc inv: ( self.source.ocliskindof(place) and self.target.ocliskindof(transition) ) or ( self.source.ocliskindof(transition) and self.target.ocliskindof(place) ) Petri net model Node 1 source 1 target Arc Transition Place Model Meta model for Petri for nets Petri nets token * Token 13

Don t think models as Java PetriNet * Object context Arc inv: ( self.source.ocliskindof(place) and self.target.ocliskindof(transition) ) or ( self.source.ocliskindof(transition) and self.target.ocliskindof(place) ) Petri net model Node 1 source 1 target Arc Transition Place * Token 14

Domain model A domain model makes the concepts of a domain explicit It makes the concepts and the relations among them precise As software engineers, we used UML (class diagrams) as a language for formulating a domain model Process Examples Talk to experts Taxonomy / Glossary Create the model 15

Domain model PetriNet * Object context Arc inv: ( self.source.ocliskindof(place) and self.target.ocliskindof(transition) ) or ( self.source.ocliskindof(transition) and self.target.ocliskindof(place) ) Petri net model Node 1 source 1 target Arc Transition Place * Token 16

Syntax for instances :Petrinet graphical / concrete syntax :Transition target source :Arc target :Place source :Arc abstract syntax (as an UML object diagram) :Arc :Token :Place source target :Arc source target :Transition 17

Overview PetriNet meta model build-time * Object Node 1 source 1 target Arc is an instance of Transition Place * Token :Petrinet :Transition source :Arc target :Place target source model runtime :Arc :Arc :Token :Place source target :Arc source target :Transition 18

Benefits of Modelling Better understanding Mapping of instances to XML syntax (XMI) Automatic code generation API for creating, deleting and modifying model Methods for loading and saving models (in XMI) Standard mechanisms for keeping track of changes (observers) 19

PetriNet * Object Node 1 source 1 target Arc Transition Place * Token :Petrinet :Transition source :Arc target :Place target source :Arc :Arc :Token :Place source target :Arc source target :Transition 20

Answers: Program an editor Standard technology for mapping abstract to concrete syntax: EMF / GMF / 21

GMF/Sirius PetriNet Transition * Place Object Arc Token Node 1 source 1 target Arc Transition Place * Token generate an editor :Petrinet :Transition source :Arc target :Place target source :Arc :Arc :Token :Place source target :Arc source target :Transition 22

Benefits of Modelling (cntd.) Better Understanding Mapping of instances to XML syntax (XMI) Automatic Code Generation API for creating, deleting and modifying model Methods for loading and saving models (in XMI) Standard mechanisms for keeping track of changes (observers) Editors and GUIs 23

Idea for some Software 24

Today Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginname package PetriNets.impl; Bundle-SymbolicName: APetriNetEditorIn15Minutes.diagr Bundle-Version: 1.0.0.qualifier public class PetriNetImpl extends EObjectImpl implements PetriNet { Bundle-ClassPath: <plugin>. protected EList<PetriNets.Object> object; Bundle-Activator: PetriNets.diagram.part.PetriNetDiagr Bundle-Vendor: %providername <extension point="org.eclipse.emf.ecore.generated_pa protected PetriNetImpl() { Bundle-Localization: <package plugin super(); Export-Package: PetriNets.diagram.edit.parts, uri = "PetriNets" } PetriNets.diagram.part, class = "PetriNets.PetriNetsPackage" PetriNets.diagram.providers genmodel = "model/petrinet.genmodel" /> protected EClass estaticclass() { Require-Bundle: org.eclipse.core.runtime, </extension> return PetriNetsPackage.Literals.PETRI_NET; org.eclipse.core.resources, } org.eclipse.core.expressions, </plugin> org.eclipse.jface, public EList<PetriNets.Object> getobject() { org.eclipse.ui.ide, if (object == null) { org.eclipse.ui.views, object = new EObjectContainmentEList<PetriNets.Object>(Petri org.eclipse.ui.navigator, } org.eclipse.ui.navigator.resources, return object; org.eclipse.emf.ecore, } org.eclipse.emf.ecore.xmi, org.eclipse.emf.edit.ui, public NotificationChain einverseremove(internaleobject otherend, int org.eclipse.gmf.runtime.emf.core, switch (featureid) { org.eclipse.gmf.runtime.emf.commands.core, case PetriNetsPackage.PETRI_NET OBJECT: org.eclipse.gmf.runtime.emf.ui.properties, return ((InternalEList<?>)getObject()).basicRemove(otherEn org.eclipse.gmf.runtime.diagram.ui, } org.eclipse.gmf.runtime.diagram.ui.properties, return super.einverseremove(otherend, featureid, msgs); org.eclipse.gmf.runtime.diagram.ui.providers, } org.eclipse.gmf.runtime.diagram.ui.providers.ide, org.eclipse.gmf.runtime.diagram.ui.render, public Object eget(int featureid, boolean resolve, boolean coretype) { org.eclipse.gmf.runtime.diagram.ui.resources.ed switch (featureid) { org.eclipse.gmf.runtime.diagram.ui.resources.e case PetriNetsPackage.PETRI_NET OBJECT: APetriNetEditorIn15Minutes;visibility:=reexpor return getobject(); } return super.eget(featureid, resolve, coretype); 25

Vision 26

Vision PetriNet * Object 1 source Node 1 target Transition Place Arc * Token Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginname package PetriNets.impl; Bundle-SymbolicName: APetriNetEditorIn15Minutes.diagr Bundle-Version: 1.0.0.qualifier public class PetriNetImpl extends EObjectImpl implements PetriNet { Bundle-ClassPath:. protected EList<PetriNets.Object> object; Bundle-Activator: PetriNets.diagram.part.PetriNetDiagr Bundle-Vendor: %providername protected PetriNetImpl() { Bundle-Localization: plugin super(); Export-Package: PetriNets.diagram.edit.parts, } PetriNets.diagram.part, PetriNets.diagram.providers protected EClass estaticclass() { Require-Bundle: org.eclipse.core.runtime, return PetriNetsPackage.Literals.PETRI_NET; org.eclipse.core.resources, } org.eclipse.core.expressions, org.eclipse.jface, public EList<PetriNets.Object> getobject() { org.eclipse.ui.ide, if (object == null) { org.eclipse.ui.views, object = new EObjectContainmentEList<PetriNets.Object>(Petri org.eclipse.ui.navigator, } org.eclipse.ui.navigator.resources, return object; org.eclipse.emf.ecore, } org.eclipse.emf.ecore.xmi, org.eclipse.emf.edit.ui, public NotificationChain einverseremove(internaleobject otherend, int org.eclipse.gmf.runtime.emf.core, switch (featureid) { org.eclipse.gmf.runtime.emf.commands.core, case PetriNetsPackage.PETRI_NET OBJECT: org.eclipse.gmf.runtime.emf.ui.properties, return ((InternalEList<?>)getObject()).basicRemove(otherEn org.eclipse.gmf.runtime.diagram.ui, } org.eclipse.gmf.runtime.diagram.ui.properties, return super.einverseremove(otherend, featureid, msgs); org.eclipse.gmf.runtime.diagram.ui.providers, } org.eclipse.gmf.runtime.diagram.ui.providers.ide, org.eclipse.gmf.runtime.diagram.ui.render, public Object eget(int featureid, boolean resolve, boolean coretype) { org.eclipse.gmf.runtime.diagram.ui.resources.ed switch (featureid) { org.eclipse.gmf.runtime.diagram.ui.resources.e case PetriNetsPackage.PETRI_NET OBJECT: APetriNetEditorIn15Minutes;visibility:=reexpor return getobject(); } return super.eget(featureid, resolve, coretype); Analysis Design Implementation Coding 27

Buzzwords Model Driven Architecture (MDA ) OMG TM software development approach for separating business logic from platform specific details using models automatic generators (for code and other models) Model-based Software Engineering (MBSE) General term for making better use of models for easing the software development Ultimately: Getting rid of programming resp. technical artefacts. 28

Buzzwords DSL (Domain Specific Language): Make it easy to develop a language for some domain (in our example Petri nets) along with editors (graphical or textual) MBSE technologies can be used for developing DSLs by using domain models (meta-models) More on the use of the term meta and meta-model later in this course 29

Theses We will always have programming and programmers! We should always teach programming! But, software engineers should be trained in their engineering and modelling skills! And this is where they should be at their best! Most of the rest can be automated! Eventually, programming will be for software engineers as assembler is today for programmers. 30

3. Modelling with a Purpose Anologies: Models as floor plans (see earlier slides) Architects and construction engineers use quite different kind of plans driven by the puprose They even use models (miniatures) Models as maps Understand the world ( domain) PetriNet * Object Node 1 source Arc 1 target Find your way round in the software Transition Place Token * 31

Maps 32

Maps Different level of abstraction and detail Different focus Different aspects Different purpose 33

Software vs Programming For programs (small software) models are often not needed, and making them might be a waste of time. For software they are essential for building something which works out and the different pieces fit to each other 34

Discussion Two models: Which is better? Always ask first: Better for what? PetriNet * Object Node 1 source 1 target Arc Transition Place * Token 35

Course: today Lecture Introduction and Motivation Organization Organisation of this course Project More details on the project in week 4! Tutorial Tutorial 1: Getting started with EMF (Petrinet example) Overview of task and steps DO IT 36