Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience...

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

Transcript of Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience...

Page 1: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Software Engineering 2 A practical course in software engineering

Ekkart Kindler

Page 2: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Conclusion, Outlook, Discussion

Page 3: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

3 SE 2 (02162 e15), L09

Motivation

Page 4: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

4 SE 2 (02162 e15), L09

Page 5: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

5 SE 2 (02162 e15), L09

1. What did you learn?

Objectives of this course:

Basic skills in software engineering!

Page 6: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

6 SE 2 (02162 e15), L09

Software Engineering is

… much more than programming!

… listening and understanding!

… analytic and conceptual work!

… communication!

… a social process!

… acquiring new technologies!

… a discipline with proven concepts, methods, notations, and tools!

… and ever new technologies emerging!

Page 7: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

7 SE 2 (02162 e15), L09

Experience

Software Engineering requires much

experience!

This experience

can not be taught theoretically!

will be provided in this course!

tutorial

project

and (only) backed by the lectures

Page 8: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

8 SE 2 (02162 e15), L09

Objective

Practice the concepts, methods, notations and

Tools for software engineering

(improve programming skills)

understanding of the software engineering process

experiences with problems and concepts for

solving them

writing documents and creating models

use of methods and tools

practice communication and presentation skills

capability of teamwork and leadership

acquire new technologies

Page 9: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

9 SE 2 (02162 e15), L09

Motivation

Page 10: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

10 SE 2 (02162 e15), L09

Problems

imprecise requirements

mistakable and unclear requirements

inconsistent requirements

changing requirements

changing environments (software / hardware)

different versions and configurations

changing tools, notations, languages, methods, concepts, technologies

collective knowledge only

communication

Page 11: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

11 SE 2 (02162 e15), L09

Software engineering

Branches: Development:

actual development of the software product

Management: Manage (control and improve) the development process

Quality management: Planning and implementing measures that guarantee that the software meets the required quality

Software maintenance: Remove faults occurring in operation, adapt software to changing requirements and environments

Page 12: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

12 SE 2 (02162 e15), L09

Process

Planning

phase

Definition

phase

Design

phase

Implem.

phase

Acceptance

phase

Mainten.

phase

Page 13: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

13 SE 2 (02162 e15), L09

Process Meta model

Phase

Role

Document

needs

produces

needs

Method Notation

used in

uses

is involved

works on

written in

State has

Page 14: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

14 SE 2 (02162 e15), L09

Process

Planning

phase

Definition

phase

Design

phase

Implem.

phase

Acceptance

phase

Mainten.

phase

Page 15: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

15 SE 2 (02162 e15), L09

Models

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

target source

:Arc source target

:Petrinet

:Token

Place Transition

1 source

1 target

Arc

*

PetriNet

Token *

Node

Object

1 source

1 target

Association Class

ClassDiagram

* *

:Class :Class

:Association

:Association

Place

Transition

Arc

Token

Page 16: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

16 SE 2 (02162 e15), L09

Issues

Purpose and roles of models in SE

Model / View / Controller

Model Domain model and functions

View Representation of model and user interaction

Controller Makes changes and calls functions of the model

queries

informs on changes

makes changes

selects

informs on user interactions

Page 17: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

17 SE 2 (02162 e15), L09

Issues

How to make useful UML models

Domain model OOA

Implementation OOD

Learn to use new technologies YOURSELF!

Eclipse / Bluemix / Webservices / Android

/ Rest / …

Page 18: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

18 SE 2 (02162 e15), L09

Issues

Get requirements straight

Write a systems specification

Movement App Video App

Door opens

”Make noise” App

Surveillance

Page 19: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

19 SE 2 (02162 e15), L09

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

what

how

Page 20: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

20 SE 2 (02162 e15), L09

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

rough

detailed

Page 21: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

21 SE 2 (02162 e15), L09

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

low cost

high cost

Page 22: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

22 SE 2 (02162 e15), L09

Issues

writing,

talking,

communicating, and

organizing yourself

work together

version management

(other/better tools)

Page 23: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler Issues

Quality

Management

Testing

Reviews

Many practical issues on programming and solving

problems

23 SE 2 (02162 e15), L09

Page 24: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

24 SE 2 (02162 e15), L09

Issues

Integration and extension

Integrating features in existing software

(PlugIn Mechanisms, …)

Developing parts in parallel

(based on a common model)

Separating concerns

Stepwise extension

(prototyping, agile)

Page 25: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

25 SE 2 (02162 e15), L09

Topics

Software Specifications (incl. writing)

Modelling & Meta modelling

Quality mangament (incl. testing)

Code generation

Working together

Management

Page 26: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

26 SE 2 (02162 e15), L09

2. What did you not learn?

Page 27: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

27 SE 2 (02162 e15), L09

Technology issues

MOF (Meta Object Facility)

Software without Programming (EMF and

more) / code generation technologies

Other technology: other application servers,

databases, service technologies

Analyse, validate, verify these models, …

Other programming and modelling paradigms:

e.g. Aspect oriented Modelling

...

Page 28: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Advanced Software Engineering

Just to give you some idea

Page 29: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

29 SE 2 (02162 e15), L09

Future technologies

Modelling dynamic behaviour

(and generating code from that)

Defining transformations

Get completely rid of programming?!

Page 30: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

30 SE 2 (02162 e15), L09

More details & experience

Master courses

Requirements Engineering (H.S)

Systems integration (H.B.)

Web Services (H.B.)

Formal methods (A.H.)

Advanced topics in SE (E.K., f16)

Bachelor and master projects

(last week / CITIES presentation)

Page 31: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Coordinating Interactions

The Event Coordination Notation

Ekkart Kindler

Page 32: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

32 SE 2 (02162 e15), L09

From lecture 1: Example

Page 33: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

33 SE 2 (02162 e15), L09

From lecture 1: Example

Place Transition

1 source

1 target

Arc

*

PetriNet

Token *

Node

Object

From this (EMF) model for Petri nets: Generation of (Java) code for • all classes • methods for changing the Petri net • loading and saving the Petri net as

XML files (XMI)

Place

Transition

Arc

Token

With this and some more GMF information: Generation of the Java code of a graphical complete editor (with many fancy features). No programming at all.

Page 34: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

34 SE 2 (02162 e15), L09

From lecture 1

Place Transition

1 source

1 target

Arc

*

PetriNet

Token

*

Node

Object

Analysis

Design

Implementation

Coding

Manifest-Version: 1.0

Bundle-ManifestVersion: 2

Bundle-Name: %pluginName

Bundle-SymbolicName: APetriNetEditorIn15Minutes.diagr

Bundle-Version: 1.0.0.qualifier

Bundle-ClassPath: .

Bundle-Activator: PetriNets.diagram.part.PetriNetDiagr

Bundle-Vendor: %providerName

Bundle-Localization: plugin

Export-Package: PetriNets.diagram.edit.parts,

PetriNets.diagram.part,

PetriNets.diagram.providers

Require-Bundle: org.eclipse.core.runtime,

org.eclipse.core.resources,

org.eclipse.core.expressions,

org.eclipse.jface,

org.eclipse.ui.ide,

org.eclipse.ui.views,

org.eclipse.ui.navigator,

org.eclipse.ui.navigator.resources,

org.eclipse.emf.ecore,

org.eclipse.emf.ecore.xmi,

org.eclipse.emf.edit.ui,

org.eclipse.gmf.runtime.emf.core,

org.eclipse.gmf.runtime.emf.commands.core,

org.eclipse.gmf.runtime.emf.ui.properties,

org.eclipse.gmf.runtime.diagram.ui,

org.eclipse.gmf.runtime.diagram.ui.properties,

org.eclipse.gmf.runtime.diagram.ui.providers,

org.eclipse.gmf.runtime.diagram.ui.providers.ide,

org.eclipse.gmf.runtime.diagram.ui.render,

org.eclipse.gmf.runtime.diagram.ui.resources.ed

org.eclipse.gmf.runtime.diagram.ui.resources.e

APetriNetEditorIn15Minutes;visibility:=reexpor

package PetriNets.impl;

public class PetriNetImpl extends EObjectImpl implements PetriNet {

protected EList<PetriNets.Object> object;

protected PetriNetImpl() {

super();

}

protected EClass eStaticClass() {

return PetriNetsPackage.Literals.PETRI_NET;

}

public EList<PetriNets.Object> getObject() {

if (object == null) {

object = new EObjectContainmentEList<PetriNets.Object>(Petri

}

return object;

}

public NotificationChain eInverseRemove(InternalEObject otherEnd, int

switch (featureID) {

case PetriNetsPackage.PETRI_NET__OBJECT:

return ((InternalEList<?>)getObject()).basicRemove(otherEn

}

return super.eInverseRemove(otherEnd, featureID, msgs);

}

public Object eGet(int featureID, boolean resolve, boolean coreType) {

switch (featureID) {

case PetriNetsPackage.PETRI_NET__OBJECT:

return getObject();

}

return super.eGet(featureID, resolve, coreType);

Manifest-Version: 1.0

Bundle-ManifestVersion: 2

Bundle-Name: %pluginName

Bundle-SymbolicName: APetriNetEditorIn15Minutes.diagr

Bundle-Version: 1.0.0.qualifier

Bundle-ClassPath: .

Bundle-Activator: PetriNets.diagram.part.PetriNetDiagr

Bundle-Vendor: %providerName

Bundle-Localization: plugin

Export-Package: PetriNets.diagram.edit.parts,

PetriNets.diagram.part,

PetriNets.diagram.providers

Require-Bundle: org.eclipse.core.runtime,

org.eclipse.core.resources,

org.eclipse.core.expressions,

org.eclipse.jface,

org.eclipse.ui.ide,

org.eclipse.ui.views,

org.eclipse.ui.navigator,

org.eclipse.ui.navigator.resources,

org.eclipse.emf.ecore,

org.eclipse.emf.ecore.xmi,

org.eclipse.emf.edit.ui,

org.eclipse.gmf.runtime.emf.core,

org.eclipse.gmf.runtime.emf.commands.core,

org.eclipse.gmf.runtime.emf.ui.properties,

org.eclipse.gmf.runtime.diagram.ui,

org.eclipse.gmf.runtime.diagram.ui.properties,

org.eclipse.gmf.runtime.diagram.ui.providers,

org.eclipse.gmf.runtime.diagram.ui.providers.ide,

org.eclipse.gmf.runtime.diagram.ui.render,

org.eclipse.gmf.runtime.diagram.ui.resources.ed

org.eclipse.gmf.runtime.diagram.ui.resources.e

APetriNetEditorIn15Minutes;visibility:=reexpor

package PetriNets.impl;

public class PetriNetImpl extends EObjectImpl implements PetriNet {

protected EList<PetriNets.Object> object;

protected PetriNetImpl() {

super();

}

protected EClass eStaticClass() {

return PetriNetsPackage.Literals.PETRI_NET;

}

public EList<PetriNets.Object> getObject() {

if (object == null) {

object = new EObjectContainmentEList<PetriNets.Object>(Petri

}

return object;

}

public NotificationChain eInverseRemove(InternalEObject otherEnd, int

switch (featureID) {

case PetriNetsPackage.PETRI_NET__OBJECT:

return ((InternalEList<?>)getObject()).basicRemove(otherEn

}

return super.eInverseRemove(otherEnd, featureID, msgs);

}

public Object eGet(int featureID, boolean resolve, boolean coreType) {

switch (featureID) {

case PetriNetsPackage.PETRI_NET__OBJECT:

return getObject();

}

return super.eGet(featureID, resolve, coreType);

Page 35: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler e.g. a Petri net simulator?

35 SE 2 (02162 e15), L09

Page 36: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler 2. The Event Coordination Notation

Motivation

Given some object oriented software with (or without)

explicit domain model

Model behaviour on top of it – and make these models

executable

Model behaviour on a high level of abstraction (domain):

coordination of behaviour

Integrate behaviour models with structural models

Integrate different structural models and manually written

code (or code generated by different technologies)

36 SE 2 (02162 e15), L09

Page 37: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

37 SE 2 (02162 e15), L09

2.1 Example: Vending machine

Slot

Panel

Control

Coffee

Brewer

Output

*

*

*

*

*

*

Safe

Coin

Tea

1

Page 38: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

38 SE 2 (02162 e15), L09

Instance: Object Diagram

: Slot

:Panel

:Control

:Coffee

:Output

: Safe

:Coin

:Tea

:Coffee

:Coin

:Coin

Page 39: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

39 SE 2 (02162 e15), L09

Coordination Diagram

Slot

insert

return_

pass

reset

Panel GUI

coffee GUI

tea GUI

cancel GUI

Coffee

Output GUI

cup_in GUI

cup_out GUI

*

cup_in: 1

coffee: 1

tea: 1

reset: ALL

coffee: 1

tea: 1

cancel: ALL

reset: ALL

pass: 1

pass: 1

*

*

*

*

insert: 1

*

return_: ALL

pass: 1

Safe

pass

GUI Coin

insert GUI

pass

return_

Tea

Brewer

coffee

tea

reset

cup_in

1

Control

coffee

tea

cancel

pass

reset

Page 40: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

40 SE 2 (02162 e15), L09

... + Event declaration

Slot

insert

return_

pass

reset

Panel GUI

coffee GUI

tea GUI

cancel GUI

Control

coffee

tea

cancel

pass

reset Coffee

Output GUI

cup_in GUI

cup_out GUI

*

cup_in: 1

coffee: 1

tea: 1

reset: ALL

coffee: 1

tea: 1

cancel: ALL

reset: ALL

pass: 1

pass: 1

*

*

*

*

insert: 1

*

return_: ALL

pass: 1

Safe

pass

GUI Coin

insert GUI

pass

return_

Tea

insert(Coin coin, Slot slot) coffee() pass(Coin coin, Slot slot) tea()

return(Slot slot) cancel() reset_()

cup_in() cup_out()

Brewer

coffee

tea

reset

cup_in

1

Page 41: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

41 SE 2 (02162 e15), L09

Interactions

: Slot

:Panel

:Control

:Coffee

:Output

: Safe

:Coin

:Tea

:Coffee

:Coin

:Coin

coffee

coffee

coffee

pass pass pass

pass

coffee: 1

pass: 1

pass: 1

coffee: 1

coffee: 1

pass: 1

Page 42: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

42 SE 2 (02162 e15), L09

Interactions

: Slot

:Panel

:Control

:Coffee

:Output

: Safe

:Coin

:Tea

:Coffee

:Coin

:Coin

coffee

coffee

coffee

pass pass pass

pass

coffee: 1

pass: 1

pass: 1 coffee: 1

pass: 1

Page 43: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

43 SE 2 (02162 e15), L09

Another Interaction

: Slot

:Panel

:Control

:Coffee

:Output

: Safe

:Coin

:Tea

:Coffee

:Coin

:Coin

cancel reset

reset

reset reset

return

return

cancel

reset return

reset: ALL cancel: ALL

reset: ALL

reset: ALL reset: ALL

return: ALL

return: ALL

Page 44: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

44 SE 2 (02162 e15), L09

Local behaviour: Coffee

Page 45: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

45 SE 2 (02162 e15), L09

Local behaviour: Coin

Page 46: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

46 SE 2 (02162 e15), L09

Local behaviour: Control

reset

cancel

coffee

pass

Page 47: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

47 SE 2 (02162 e15), L09

Local behaviour: Slot

reset

return

Page 48: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler

48 SE 2 (02162 e15), L09

Interactions

: Slot

:Panel

:Control

:Coffee

:Output

: Safe

:Coin

:Tea

:Coffee

:Coin

:Coin

cancel reset

reset

reset reset

return

return

cancel

reset return

reset: ALL cancel: ALL

reset: ALL

reset: ALL reset: ALL

return: ALL

return: ALL

Page 49: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler 2.2 ECNO: Basic Concepts

ElementTypes (Classes)

EventTypes with

parameters

Global Behaviour: Coordination annotations for references

Event type

Quantification (1 or ALL)

Local behaviour: ECNO nets (or something else)

Event binding (with parameter assignment)

Condition

Action

49 SE 2 (02162 e15), L09

insert(Coin coin, Slot slot)

Control

coffee

tea

cancel

pass

reset

Brewer

coffee tea

reset

cup_in

coffee: 1

tea: 1

reset: ALL

Page 50: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler 2.3 Extensions

ECNO with its basic concepts has some limitations,

which makes modelling things in an adequate way a

bit painful.

Sometimes, we want to extend event types later

50 SE 2 (02162 e15), L09

Page 51: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler Event Extension

51 SE 2 (02162 e15), L09

tea

tea_blend tea_temp

Page 52: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler 2.4 Example2: Petri nets

52 SE 2 (02162 e15), L09

Fire Transition t:

for ALL incoming Arcs a:

for ONE source Place p of Arc a:

find a token and remove it

for ALL outgoing arcs a:

for ONE target Place p of Arc a:

add a new Token

Transition t enabled:

for ALL incoming Arcs a:

for ONE source Place p of Arc a:

find a token

t

remove add

Page 53: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler Petri net: Abstract Syntax

53 SE 2 (02162 e15), L09

Page 54: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler Example2: Petri nets

54 SE 2 (02162 e15), L09

Fire Transition t:

for ALL incoming Arcs a:

for ONE source Place p of Arc a:

find a token and remove it

for ALL outgoing arcs a:

for ONE target Place p of Arc a:

add a new Token

Transition t enabled:

for ALL incoming Arcs a:

for ONE source Place p of Arc a:

find a token

t

remove add

Page 55: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler ECNO Semantics of PN

55 SE 2 (02162 e15), L09

Page 56: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler Result

56 SE 2 (02162 e15), L09

t1

t2 t3

t4

Page 57: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler Petri net simulator

57 SE 2 (02162 e15), L09

Page 58: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler 3. Conclusion

58 SE 2 (02162 e15), L09

Page 59: Software Engineering 2 (02162) · 2015-11-20 · Ekkart Kindler SE 2 (02162 e15), L09 7 Experience Software Engineering requires much experience! This experience can not be taught

Ekkart Kindler Next Steps

59 SE 2 (02162 e15), L09