model driven engineering ss 10 prof. albert zündorf fachgebiet für software engineering...

28
Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Upload: liesl-stolberg

Post on 05-Apr-2015

104 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS 10

Prof. Albert Zündorf

Fachgebiet für Software EngineeringWilhelmshöher Allee 73

34121 Kassel(Raum 1339)

Page 2: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 2

Organisatorisches

Umfang: 2 SWS teils Vorlesungen teils Übungen

Übungsbetreuung: Nina Geiger

Ort und Zeit: Vorlesung: Freitag 10:00 - 12:00 Raum 1340

(Erste Vorlesung: 16.04.10)Übung: In obigem Zeitraum

Prüfung: Pflichtübungsaufgaben (korrigiert, bepunktet)

Folienskript / Screen Videos: http://www.se.eecs.uni-kassel.de.

Page 3: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 3

Inhalt

Objektmodelle / Modellebenen

Werkzeuge

Modelltransformation Inplace Model to Model (Triple Graph Grammars) Model refinement Model to Text Text to Model

Page 4: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 4

Objektmodelle

29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

Page 5: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 5

29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

Page 6: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 6

Page 7: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 7

29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

Page 8: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 8

Page 9: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 9

29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

Page 10: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 10

Page 11: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 11

Hausaufgabe 1:

Erstellt ein Klassendiagramm für Study Right und eins für Ludo

Ecore und Editoren generieren

Je ein Beispielmodell für Study Right und Ludo anlegen

Schreibt ein generisches PopUp Commando das Anzahl der verwendeten Klassen zählt Anzahl der verwendeten Attribute zählt Anzahl der Objekte zählt Anzahl der Attributwerte, die vom Default abweichen

Page 12: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 12

Hausaufgabe 2:

Klasse LoadEcoreModel

methode: loadModel(String filename)

mit DynamicEMF enthaltene Objektstruktur und Klassen anlegen

JUnit Test für ladet damit eine StudyRight Datei ladet damit eine Ludo Datei

im EDobs Model editieren

methode storeModel zum speichern

ausprobieren

Page 13: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 13

Transformation rule model

p1:Pawnf2:Field

f3:Field

f4:Field

p1:PawnOpf2:FieldOp

f3:FieldOp

«delete»

«create»next

next

next

match«bound»

Page 14: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 14

Hausaufgabe 3:

Baut einen Traforule Schema Builder:

input: EPackage X

output: EPackage XTrafos

EClass C EClass COp bound attr match attr modifier attr

EAttr A EAttr A:EString für Attribute Conditions

ERef R ERef R plus modifer attr RModifier

Page 15: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 15

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 16: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 16

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 17: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 17

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 18: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 18

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 19: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 19

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 20: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 20

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 21: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 21

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 22: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 22

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 23: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 23

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 24: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 24

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 25: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 25

Rule Matching 29

20 17 35

17

ExaminationBoard

Student Karli

Study-RightUniversity

32

23

mathcalculusstochastic

modeling modern arts

algebra

exam

philosophy

ra:Room

sa:Student

aa:Assignment

stud

ass ass

r2:Room

s3:Student

a4:Assignment

stud

ass

r1:Room

a5:Assignment

ass

ass

:Step

cands=

match=

toOne=

toMany=

byType=

Page 26: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 26

Page 27: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 27

Page 28: Model Driven Engineering SS 10 Prof. Albert Zündorf Fachgebiet für Software Engineering Wilhelmshöher Allee 73 34121 Kassel (Raum 1339)

Model Driven Engineering SS2010 © 2010 Albert Zündorf, University of Kassel 28