???a???? ?d???? - PowerPoint PPT Presentation

About This Presentation
Title:

???a???? ?d????

Description:

nikos_at_science.tuc.gr ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 42
Provided by: tuc84
Category:
Tags: chart | diagram | state

less

Transcript and Presenter's Notes

Title: ???a???? ?d????


1
???a???? ?d????µe?? ap? ???t??a
  • ?? ?????a?? Spa???d????
  • nikos_at_science.tuc.gr
  • ????? ??
  • Ge???? ?µ?µa ????te??e??? ???t??
  • ?a???, 6 F?eß??? 2012

2
?e??e??µe?a pa???s?as??
  • ??sa????
  • ?d????µe?? ap? ???t??a ???a???? ????sµ???? Model
    Driven Engineering (MDE)
  • ?d????µe?? ap? ???t??a ????te?t????? ????sµ????
    Model Driven Architecture (MDA)
  • ??a pa??de??µa ??a t? ???ssa UML
  • ??a???µµata ?atast?se??Statecharts
  • ?etat??p? statechart se ??d??a
  • ?etaµ??t??? statechart
  • ??t?µat? pa?a???? ??d??a µe t?? xPand
  • S?µpe??sµata

3
? e???te??? ep?st?µ?????? ?????
  • ? ???a???? ????sµ???? ? ?e???????a ????sµ????
    (Software Engineering, IEEE, 1990) efa?µ??e? µ?a
    s?st?µat???, µe??d??? p??s????s? st?? a??pt???,
    ?e?t?????a ?a? s??t???s? t?? ????sµ????
  • ??a d?ad??as?a a??pt???? ????sµ???? (software
    process) apa?t? sta e??t?µata (Boehn, 1988)
  • ?? ?a ?????µe µet?
  • G?a p?s? ????? ?a s??e??s??µe ?a t? ?????µe
  • ??a µe??d?????a a??pt???? ????sµ???? (software
    methodology) e??a? ??a p??d?a?e??aµµ??? ?a?
    ???a??µ??? s????? te?????? ?a? ?a????? ?? ?p????
    ??????? ap? p???? ?a? µe p??a se??? ?a
    ???s?µ?p??????? ?? te?????? (Tolvanen, 1998)

4
???a???? ?d????µe?? ap? ???t??aModel Driven
Engineering (MDE)
  • MDE (Beydeda et al., 2005) e??a? ? s?st?µat???
    ???s? µ??t???? ?? p??ta????? e??a?e?a ?a???? t??
    ????? ???? t?? ????? ????sµ???? st??e???ta? st??
    f???t?t?ta, d?a?e?t???????t?ta ?a?
    epa?a???s?µ?t?ta t?? ????sµ????
  • ?as??eta? se µetas??µat?sµ??? µ??t???? ?a? se
    µetaµ??t??a (Jouault and Bézivin, 2006)
  • ???a? ? de?te?? epa??stas? t?? p??????µe???
    de?aet?a? µet? t?? ???sa?at???sµ??? st??
    ?p??es?e? µ??a???? ????sµ???? (Service-oriented
    Software Engineering SOSE)

5
????te?t????? ?d????µe?? ap? ???t??a
(Model-Driven Architecture, MDA)
  • ? MDA e??a? µ?a a???te?t????? s?st?µ?t?? p??
    ßas??eta? st?? f???s?f?a t?? MDE ?a? ????e? t??a
    ep?peda µ??te??p???s?? e??? s?st?µat??
    ????sµ????
  • ?p?????st??? ??e???t?t? ???t??? Computation
    Independent Model (CIM)
  • ???t??? ??e???t?t? ??atf??µa?Platform
    Independent Model (PIM)
  • ???t??? S???e???µ???? ??atf??µa?Platform
    Specific Model (PSM)
  • ???st??e ap? t?? Object Management Group (OMG) t?
    2003

6
?etas??µat?sµ?? ???t???? St? UML
  • ?f?? d?µ??????sa t?? d????aµµa pe??pt?s?? ???s??
    t?? UML ??at? ?a ?e????s? p??? ta ???a
    d?a???µµata ap? t?? a???
  • ?e p??a se??? ?a p??? ta d?a???µµata ???ta ta
    d?a???µµata t??e?? ?et? a?t? t?? d?ast????t?t??
  • G?at? p??pe? ?a? ??a a?t? ?a ta ?e????s? ap? t??
    a??? ?a? a? ?e??s? ??t?
  • ??? µp??e? ?a µe ß????se? a?t? ?
    ???te??-st?af?? µ??a????
  • G?a ?a d??µe p?? ???eta? a?t?

7
???sµ?? ?e??pt?s?? ???s??
  • Use Case Vehicle Reservation
  • Precondition A customer wants to make a
    reservation for a vehicle.
  • Description The customer selects pickup and
    return locations, as well as the pickup and
    return dates and times. The customer selects
    the vehicle type.The system presents all
    matching vehicles. If the customer requests
    detail information on a particular vehicle, the
    system presents detail information to the
    customer.If the customer selects a vehicle, the
    system gets the customer information (full name,
    telephone number, email address). The system
    presents information on protection products (such
    as damage waiver, personal accident insurance).
    If the customer either accepts the reservation
    or rejects it and the use case finishes.

8
?etas??µat?sµ?? ?e?µ???? se ???t??? (Text to
Model Trans. T2M)
  • ??s?d?? ?e????af? ?e??pt?s?? ???s??
  • ???d?? ?????aµµa ???e??
  • ?a???e? ?etas??µat?sµ??
  • ??s?ast??? (???e?? µe ??t??a G??µµata) -gt ???e??
  • ??s?ast??? p??sd????st??? ????? (???e?? µe ??t??a
    ?????a G??µµata) -gt ?d??t?te? ???e??
  • ??µata (???e?? µe ?????a G??µµata) -gt
  • S?s?et?se?? t??e?? ef?s?? e?????? t?t??e?
  • ????d?? t??e?? ef?s?? a?af????ta? µ??? se µ?a

9
S??ta?t??? ?????s? t?? ???sµ?? ?e??pt?s?? ???s??
  • A customer wants to make a reservation for a
    vehicle.
  • The customer selects pickup and return locations,
    as well as the pickup and return dates and times.
  • The customer selects the vehicle type.
  • The system presents all matching vehicles. If the
    customer requests detail information on a
    particular vehicle, the system presents detail
    information to the customer.
  • If the customer selects a vehicle, the system
    gets the customer information (full name,
    telephone number, email address).
  • The system presents information on protection
    products (such as damage waiver, personal
    accident insurance)
  • The customer either accepts the reservation or
    rejects it and the use case finishes.

10
??t?µat? ??µ??????a ??a???µµat?? ???e??
?e? t? e??a s?efte?!!! ?p??? ?a ??at? ?st????? µe
t?? ep?????? t?? ???st?
11
?pe?e??as?a ??a???µµat?? ???e??
12
?etas??µat?sµ?? ???t???? se ???t??? (Model to
Model Trans. M2M)
  • G?a t?? ap????e?s? a?t??e?µ???? se s?es?a?? ß?s?
    ded?µ???? p??pe? ?a µetat???? t? d????aµµa t??e??
    se ?????aµµa ??t?t?t?? S??se?? (Entity
    Relationship ER Diagram, Wimmer et al., 2007)
  • ??s?d?? ?????aµµa ???e??
  • ???d?? ?????aµµa ??t?t?t?? S?s?et?se??
  • ?a???e? ?etas??µat?sµ??
  • ???? (Class) -gt ??t?t?ta (Entity)
  • ?d??t?ta (Property) -gt ?a?a?t???st??? (Attribute)
  • S?s??t?s? (Association) -gt S??s? (Relationship)
  • ?d??t?ta S?s??t?s?? (Association property) -gt
    ????? (Role)

13
?????aµµa ???e?? se ?????aµµa ??t?t?t?? S??se??
?etas??µat?sµ??
?pe?e??as?a
14
?etas??µat?sµ?? ???t???? se ?e?µe?? (Model to
Text Trans. M2T)
  • G?a t?? ???p???s? t?? s?st?µat?? se Java
  • ??s?d?? ?????aµµa ???e??
  • ???d?? ??d??a? Java
  • ?a???e? ?etas??µat?sµ??
  • ???s? (Class) -gt Java class
  • ?d??t?ta (Property) -gt Java class property
  • ?d??t?ta S?s??t?s?? (Association property) -gt
    Java class property
  • ??? e??a? µe p???ap??t?ta gt 1 t?te ???s?µ?p???se
    t?? ???s? java.util.Vector
  • ????d?? (Method) -gt Java method p?? ????e?
    (throws) ??a UnsupportedOperationException
  • ?a??µ???? ?a? ??a C

15
???p???s? Java
  • ???e?? Customer.java
  • import java.util.Vector
  •  
  • public class Customer
  • private Object _fullName
  • private Object _telephoneNumber
  • private Object _emailAddress
  • public VectorltReservationgt _myReservations
    new VectorltReservationgt()
  • public VehicleType _select
  •  
  • public void getCustomerInformation()
  • throw new UnsupportedOperationException()
  •  
  • ???e?? Customer.java
  • import java.util.Vector
  •  
  • public class Customer
  • private String _fullName
  • private int _telephoneNumber
  • private String _emailAddress
  • public VectorltReservationgt _myReservations
    new VectorltReservationgt()
  • public VehicleType _select
  •  
  • public String getCustomerInformation()
  • return new String("Name "_fullName
  • "\nTel. "_telephoneNumber
  • "\nEmail "_emailAddress)
  • .....
  •  

?pe?e??as?a
16
???p???s? C
  • ???e?? Customer.cpp
  • include ltexceptiongt
  • include ltvectorgt
  • using namespace std
  • include "Customer.h"
  • include "Reservation.h"
  • include "VehicleType.h"
  • void CustomergetCustomerInformation()
  • throw "Not yet implemented"
  • ???e?? Customer.h
  • include ltexceptiongt
  • include ltvectorgt
  • using namespace std
  • ifndef __Customer_h__
  • define __Customer_h__
  • include "Reservation.h
  • class Reservation
  • class VehicleType
  • class Customer
  • class Customer
  • private string _fullName
  • private string _telephoneNumber
  • private string _emailAddress
  • public stdvectorltReservationgt
    _myReservations
  • public VehicleType _select
  • public void getCustomerInformation()

17
??a ???a?e?? CASE (Computer Aided Software
Engineering)
18
G??sse? ??d???? S??p?? (?ed???)
  • O?a?a ??a a?t? a??? e?? ???? pe?a?t??? ?a
    a?t?µat?p???s? t?? pa?a???? t?? ????sµ????
  • ??? µp??? ?a ???s? ??a? d??? µ?? µetas??µat?sµ?
  • G?a ?a d??µe ?a? t??

19
G??sse? ??d???? S??p?? (? ped???) Domain Specific
Languages DSLs
  • ?? G??sse? ??d???? ?ed??? ap?te???? µ?a ?at?????a
    ???ss?? p????aµµat?sµ??, ?? ?p??e? ????? ?? st???
    t?? a?t?µet?p?s? e?e?d??e?µ???? p??ß??µ?t?? st??
    d?ad??as?a a??pt???? ????sµ???? a??? ?a? ?a
    ?p?st??????? t?? e?????? t?? ???ss??
    µ??te??p???s??
  • ?.?.
  • ???ssa ??a pa??????? p????aµµat?sµ? (Ada)
  • ???ssa e??tapa?t?se?? ß?se?? ded?µ???? SQL

20
? G?aµµ? µ?d?? ?a? ? e??????? ??aµµ? µ?d??
(Kleppe, 2009)
Run a nuclear power plant
Business Concepts
Autonomous Negotiation
Business Process
Warehouse
Agent
Design pattern
Aspect
Abstraction
Component
Entity bean
Association
Object/Class
Virtual zero line
XML
Method
Subroutine
Database table
Loop
If statement
ASCII
Hardware zero line
Memory location
Instruction
Accumulator
21
???t??a, ?etaµ??t??a?a? ?etaµetaµ??t??a
  • G?a ?a d??µe t? s??s? t???

22
?etas??µat?sµ?? ???t????Model Transformation
  • ?etas??µat?sµ??
  • ??s?d?? t? µ??t??? p???? Ma p?? e??a? s?µf??? µe
    t? µetaµ??t??? MMa
  • ???d?? t? µ??t??? st???? Mb p?? e??a? s?µf??? µe
    t? µetaµ??t??? MMb
  • ??sse??? t?p??
  • ???t??? se µ??t??? (M2M)
  • ???t??? se ?e?µe?? (M2T)
  • ?e?µe?? se µ??t??? (T2M)
  • ?e?µe?? se ?e?µe?? (T2T)

23
?? µetaµetaµ??t??? ecore
  • ??? Eclipse Modeling Framework (EMF)

24
??a µetaµ??t??? ??a ta ??a???µµata ?atast?se??
  • ??ta p??? ta ???????a µetaµ??t??a, µ??t??a,
    ???sse?, ?a?? p?? ???s?µ?p?????ta? a?t? ??p??
    e??a? p??? ?e???t??? ??a µ??a
  • ?se?? ??????ete ?aµ?a ???ssa µ??te??p???s??
  • ? ?a?, ? UML

25
?????aµµa ?atast?se?? ??a t?? ???? Reservation
  • ??at?µe t? ??µµ?t?t?? t???? Reservation ap?
    t? ?????aµµa ???e??

26
??a???µµata ?atast?se??
  • S?µß??a
  • Start state
  • End state
  • Basic state
  • And state
  • Or state
  • Condition state
  • History state
  • Transition
  • Transition Expression ec/a

27
?????aµµa ?atast?se?? ??a t?? ???? Reservation
(s??.)
  • Assume that once a reservation becomes
    accepted, then it is in a waiting state
    untilthe client picks up the vehicle. The
    client then returns the vehicle and completes
    the lifecycle of the reservation. Before the
    client picks up the vehicle he can cancel the
    reservation.

28
?etas??µat?sµ?? ???t???? se ?e?µe?? (Model to
Text Trans. M2T)
  • ??s?d?? ?????aµµa ???e??, ?????aµµa ?atast?se??
  • ???d?? ??d??a? Java
  • ?a???e? ?etas??µat?sµ??
  • ???s? (Class) -gt Java class
  • ?d??t?ta (Property) -gt Java class property
  • ?d??t?ta S?s??t?s?? (Association property) -gt
    Java class property
  • ????d?? (Method) -gt Java method p?? ????e?
    (throws) ??a UnsupportedOperationException
  • Basic state -gt Java class public static final int
    property
  • Event -gt Java method. ? µ???d?? ??e? ??a switch
    ??a ???e basic state. ??µ?????e?ta? µ?a int
    µetaß??t? state p?? de???e? st? e?e???p???µ???
    basic state (Douglass, 1998)

29
Reservation Class
  • public class Reservation
  • private boolean _accepted
  • public Customer _myReservations
  • public ReservationSubSystem _hasReservations
  • public Pickup _selectedPickUp
  • public Return _selectedReturn
  • public Vehicle _selectedVehicle
  • public static final int Not_accepted 1
  • public static final int Not_started 2
  • public static final int Picked_up 3
  • public static final int Completed 4
  • public static final int Cancelled 5
  • private int state Not_accepted
  • public void setPickup()
  • throw new UnsupportedOperationException()
  • public void accept()
  • switch (state)
  • case Not_accepted state Not_started break
  • case Not_started break
  • case Picked_up break
  • case Completed break
  • case Cancelled break
  • public void pickup()
  • switch (state)
  • case Not_accepted break
  • case Not_started state Picked_up break
  • case Picked_up break
  • case Completed break
  • case Cancelled break

30
??a ?????aµµa ?atast?se?? µe pe??ss?te??
?ept?µ??e?a
31
??a ??af??et??? ?????aµµa ?atast?se??
  • (Niaz 2005)

32
????p??es? µetas??µat?sµ?? ?? µetaµ??t???
  • ?? µetaµ??t??? ep?t??pe?
  • ?a ??????µe µe t?p??? t??p? a?t? p?? ????aµe p???
    µe e?e??e?? ?e?µe??
  • ?a ???s?µ?p???s??µe t? Eclipse Modeling Framework
    ??a ?a p????µe a?t?µata e??a?e?a epe?e??as?a? t??
    µetaµ??t???? ?a? a?apa??stas? se Java
  • ?a ???s?µ?p???s??µe t?? Java ? p?? ??????
    ep?p?d?? e??a?e?a ??a ?a ?????µe µetas??µat?sµ???

33
?etaµ??t??? ??a???µµat?? ?atast?se??
34
???s?µ?p????ta? t?? Xpand t?? EMF
35
?p?peda MDA st? pa??de??µ? µa?
  • CIM
  • ?????aµµa ?e??pt?s?? ???s??
  • PIM
  • ?????aµµa ???e??
  • ?????aµµa ??t?t?t??-S??se??
  • ?????aµµa ?atast?se??
  • PSM
  • Java
  • C

36
?etas??µat?sµ?? ?e?µe??? se ?e?µe?? (Text to Text
Trans. T2T)
  • ?p??e?te ?a s?efte?te ??a? t?t???
  • G??eta? ?p?te p????aµµat??ete
  • ?ta? ???ete compile
  • C source file (.c) to executable program
    (machine language)
  • Java source file (.java) to Java interpreted
    file (.class)

37
???a e??a? ? d?ad??as?a p?? a???????saµe
  • ????eta? s?µf??a µe t? ?etaµ??t??? ?e????af??
    ??ad??as??? ???pt???? ????sµ???? SPEM (Software
    Process Engineering Metamodel) t?? OMG
  • S?µß???sµ??

38
??a ??ad??as?a ???pt???? ????sµ????
39
S????? - S?µpe??sµata
  • S?µe?a e?daµe ta
  • MDE Model-Driven Engineering
  • MDA Model-Driven Architecture, CIM, PIM, PSM
  • M2M, M2T, T2M, T2T transformations
  • EMF, Ecore, Xpand
  • DSL Domain Specific Language
  • Automatic code generation for UML statecharts

40
??daµe t?? te???????e?
  • Object Management Group
  • http//www.omg.com
  • IBM method Getting form Use Cases to code
  • http//www.ibm.com/developerworks/rational/library
    /5383.html
  • Eclipse Modeling Tools IDE
  • http//www.eclipse.org
  • Visual Paradigm tool
  • http//www.visual-paradigm.com

41
???a??st? ??a t?? p??s??? sa?
  • ??µa? d?a??s?µ?? ??a pe??ss?te?e? p????f???e? ?a?
    e??t?se??
  • ????? Spa???d????
  • ????? ??
  • ???ast???? ?fa?µ?sµ???? ?a??µat???? ?a?
    ??e?t??????? ?p?????st??
  • Ge???? ?µ?µa
  • ????te??e?? ???t??
  • ?.?s? ????te??e???p???, ??????p?d?a??, 73100,
    ?a???
  • G?afe?? 137.B.94
  • ???. 30 28210 37744
  • Fa? 30 28210 37842
  • ??. ta?/µe?? nikos_at_science.tuc.gr
  • ?st?se??da http//users.isc.tuc.gr/nispanoudakis
Write a Comment
User Comments (0)
About PowerShow.com