1 [email protected] toward the integration of theme/uml & jpdds andrew jackson, siobhán...
TRANSCRIPT
1
Toward the Integration of Theme/UML & JPDDs
Andrew Jackson, Siobhán Clarke
Distributed Systems Group, Dept. of Computer Science,
Trinity College Dublin, Ireland,{Andrew.Jackson, Siobhan.Clarke} @cs.tcd.ie
2
Presentation Overview
•Theme/UML– Well defined AOD language– Supports an symmetric decomposition model
•Problems (Auction System Case Study)– What we may like to do but cant…
•JPDD– Contextual join point selection
•Limitations & benefits
3
Theme/UML
<<theme>>
Close Auction
sd close()
Auction
new()
AuctionMonitor<<create>>
start()hasExpired()
Loop until true
close()
_do_New()
<<theme>>
Offer
Auction.New(..)
Bind[{<Auction.New()>, <Auction.New(Time)>}]
ThemeName(OfferSlice) match[name]
sd offer()
AuctionsViewoffer_Offer()
offer()
Auctionnew()
Auctionnew(Time)
Aspectual Themes
BaseThemes
Join point selection
Merge
Auction.New(..) AND visibility = true
4
Problems• What if I want to specify join point
selection that is based on the dynamic state of the system?
• What if I want to constrain selection based on some property that is not directly related to the join point?
• Assume:– Textual representation is less intuitive for the
designer and they would prefer a means for visually model join point selection
5
Join point designation diagrams
*:Auction
<?obj>*:AuctionView
<?jp>new(..)
<?jp><?obj>
AuctionConstructorJPPD<?obj>*: AuctionView
verified: Boolean [True]
*: Auction
+<?jp>new(..)
Structural selection context Behavioural selection context
Pattern Signature
Identifier
Instance Identifier
selected elements
Instance Identifier
Static context: public visibility
Dynamic Context: attribute value
6
Theme/UML & JPDD Integration
<<theme>>
Close Auction
sd close()
Auction
new()
AuctionMonitor<<create>>
start()hasExpired()
Loop until true
close()
_do_New()
<<theme>>
Offer
Auction.New(..) ThemeName(OfferSlice) match[name]
sd offer()
AuctionsViewoffer_Offer()
offer()
Auctionnew()
Auctionnew(Time)
*:Auction
<?obj>*:AuctionView
<?jp>new(..)
<?jp><?obj>
Bind: AuctionConstructorJPPD<?obj>*: AuctionView
verified: Boolean [True]
*: Auction
+<?jp>new(..)
7
Limitations - Comprehensibility
<<theme>>
Bid
<<theme>>
Persistence
<<theme>>
Registration <<theme>>
Join
<<theme>>
Offer
Bind[{<RegisteredUser.set *(..)>,<Auction.makeBid(Bid)>,<Auction.join(User)>,<Auction.set*(..)>}]
8
*:* *:Auction
set*(..):*<?jp>
*: Register *: RegisteredUser
set*(..):*<?jp>
*: Register *: RegisteredUser
setCreditCardDetails(CreditCardDetails)<?jp>
*:AuctionView <?ac>*:Auction
makeBid(Bid)<?jp>
*:AuctionsView *:Auction
joinAuction(User):*<?jp>
<?ac>*:Auction
+makeBid(Bid)
POUpdatesJPDD
p{?jp=?jp}
P{?ac=?ac}
p{?jp=?jp}
p{?jp=?jp}p{?jp=?jp}
p{?jp=?jp}
?ac?ac?jp
?jp
?jp?jp
?jp
?ac?jp
AuctionUpdatesJPDD RegisteredUserCCDUpdatesJPDD
JoinedAuctionJPDD
NewHighestBidJPDD
RegisteredUserUpdatesJPDD
AuctionOpVisibilityJPDD
9
Other Limitations• Limitations
– Tooling - Automated UML weaving • Themes would need to be well specified to ensure
dynamic models available for OCL meta-operations
• Work has begun to implement this composition in Kermeta (kermeta.org)
– Not clear how this can be extended for specific domains?
– Open for discussion?
10
Summary & Conclusions• In this paper we have:
– Identified a limitations of Theme/UML– Shown how JPDDs can over come these– Illustrated how these approaches can be represented
• JPDD - Theme integration cont’d– Join point selection based on dynamic – Control flow (see paper – aids reuse)– State based (see paper – state based selection)– Data flow (future work)
11
End• Discussion 5 mins…
– Implementation – Does anyone have a perspective or experiences they want to share with me?
– Do designers need this level of expressiveness for join point selection in UML models, do they real need visual models for join point selection?
– Reuse: Does improved compensability improve reuse?
– Can I design by contract in AOM? Composition Contracts?