Zinovy Diskin, Yingfei Xiong, Krzysztof Czarnecki Genera9ve - - PowerPoint PPT Presentation
Zinovy Diskin, Yingfei Xiong, Krzysztof Czarnecki Genera9ve - - PowerPoint PPT Presentation
Zinovy Diskin, Yingfei Xiong, Krzysztof Czarnecki Genera9ve So;ware Lab University of Waterloo, Canada Overlap? Consistency? Model D1 Model D2 same A C D
Overlap? ¡ Consistency? ¡
Model D1
A ¡ B ¡ Model D2 C ¡ E ¡ Model D3 F ¡ G ¡ D ¡ same ¡ Merge model Σ AC ¡ GE ¡ D ¡ BF ¡
Model ¡ ¡A1 ¡
Model ¡A0 ¡
? price: int Order price: int date: Date
OnlineOrder
price: int
Model ¡ ¡A2 ¡
mapping ¡(leg) ¡f1 ¡ mapping ¡(leg) ¡f2 ¡
Model ¡A1 ¡ Model ¡ ¡A2 ¡ Model ¡ (head) ¡A0 ¡
Model ¡A0 ¡reifies ¡all ¡same-‑links ¡ Triple ¡(A0,f1,f2) ¡is ¡called ¡a ¡span ¡from ¡A1 ¡to ¡A2 ¡
Model ¡Correspondence ¡via ¡Span ¡
Class ¡diagram ¡ ¡ cd ¡ Sequence ¡diagram ¡ sd ¡ Statechart ¡ sc ¡
?
Problems ¡1: ¡Type ¡Safety ¡
same ¡
IncompaMble ¡types: ¡OperaMon ¡vs. ¡MessageType ¡! ¡
Problem ¡2: ¡Indirect ¡correspondence ¡
No ¡explicit ¡target ¡in ¡mmSD ¡(and ¡sd)! ¡ ¡
same ¡ ?
Problem ¡3: ¡Inter-‑Model ¡Constraints ¡
Sequence ¡diagram ¡ sd ¡ Statechart ¡ sc ¡
≤ ¡
The ¡inter-‑model ¡constraint ¡is ¡neither ¡ in ¡mmSD ¡nor ¡mmSC! ¡
Problem ¡4: ¡N-‑ary ¡Metamodel ¡RelaMons ¡
Pairwise, ¡ternary, ¡… ¡overlaps! ¡ Overlaps ¡between ¡overlaps! ¡
Problem ¡1: ¡Type ¡Correspondence ¡
Class diagram cd Sequence diagram sd Metamodel ¡ mmCD Metamodel ¡ mmSD Metamodel mmCA ¡ cd2CA sd2CA ¡
view def m1 view def m2 Operation ‘get’ models view execution mechanism traceability mapping m1 traceability mapping m2
same ¡ Common ¡metamodel ¡
Problem ¡2: ¡Indirect ¡Overlap ¡
Problem ¡3: ¡Inter-‑Model ¡Constraints ¡
A ¡view ¡to ¡ mmSD ¡ A ¡view ¡to ¡ mmSC ¡ Mapped ¡to ¡derived ¡ elements ¡in ¡mmSD ¡ Inter-‑model ¡constraint: ¡ Traces ¡consistent ¡with ¡ the ¡flat ¡Statemachine ¡
Problem ¡4: ¡N-‑ary ¡Metamodel ¡ InterrelaMons ¡
m1
mmCD mmCA mmSC mmSD
m2 m3
mmCTrSM
m4 m5 m6 [=] [=]
Summary ¡
- Heterogeneous ¡consistency ¡check ¡is ¡reduced ¡
to ¡the ¡homogeneous ¡one ¡but ¡metamodel ¡ merging ¡is ¡minimal ¡
– only ¡to ¡manage ¡inter-‑metamodel ¡constraints, ¡ working ¡as ¡locally ¡as ¡possible ¡
- Despite ¡heterogeneity, ¡matching ¡is ¡type ¡safe ¡
- Applicability ¡to ¡a ¡wide ¡class ¡of ¡metamodeling ¡
techniques ¡(based ¡on ¡graph-‑like ¡structures) ¡
- Formal ¡foundaMons ¡based ¡on ¡the ¡well-‑
established ¡ins6tu6on ¡theory ¡
Local ¡vs. ¡total ¡consistency ¡checking: ¡ Discussion ¡
Class diagram cd Sequence diagram sd Statechart sc Two ¡approaches: ¡ (a) Total ¡direct ¡merge: ¡cd, ¡sd, ¡sc ¡are ¡ considered ¡instances ¡of ¡the ¡same ¡ global ¡metamodel ¡M. ¡ M ¡can ¡be ¡derived ¡from ¡the ¡ metamodel ¡mappings. ¡ cd + sd + sc Merge (b) ¡Local ¡merge: ¡we ¡first ¡specify ¡an ¡
- verlap ¡metamodel ¡ ¡CA ¡= ¡a ¡common ¡
view ¡to ¡CD, ¡SD, ¡SC. ¡Then ¡project ¡the ¡ three ¡models ¡to ¡the ¡overlap ¡and ¡apply ¡ Consistency ¡Checking ¡by ¡Merge. ¡ ¡ cd2CA cd sc sc2CA sd sd2CA cd2CA+ sd2CA+ sc2CA
10/5/10 ¡ MDI-‑2010, ¡Oslo ¡ 22 ¡
Future ¡work ¡
- TheoreMcal ¡validaMon ¡
– complete ¡the ¡formal ¡semanMcs ¡outlined ¡in ¡the ¡ paper ¡ – prove ¡that ¡(a) ¡local ¡and ¡(b) ¡global ¡(via ¡total ¡ merging ¡of ¡all ¡metamodels) ¡CC ¡are ¡equivalent ¡ – develop ¡a ¡taxonomy ¡of ¡heterogeneous ¡ mulMmodels ¡and ¡verify ¡its ¡usability ¡
- Experimental ¡validaMon ¡of ¡the ¡approach ¡