    !"#%$'&)( 687:9:; <>*,=4+.?A-)@ /02143)5
XvVv±Z²:³¤W´µZ{wvè h¡|½:3¾ 254 ô,õ »Z¼2k mb¡
1 B>C:DFE
GIH8J:K:LNMPO,QSRUTWV:XZYZ[]\_^U`baPc8dWebfhgjilk 68a 7:nq9<;8=?>?@BACDFEHGHI
M_O2Q]R_T:VPtvuw^Wx:ybzwe|{w}_~A
gZmofAnqpZ rhnsb x:r yozeo\wXq:v_8euh^lMPO,QSRWTWn V KS H8JlÂvX  ÃZnÄv5 ÅvThÆ 5m ZUhÇm uWX ^ Ã:¾ ÄWfZÅjabÆ M8LÇ|ÕO{NoÀ:±ZÁ Ôo:{< Püj RQ 
:qjA nqW) \,^NMPO2Q]R_T8VWX8|{q8 ¡ ü:ýv nq8Ã8ÄWÅAÆ :Çouh^ V8 Ã8Ä,R W e Ã:Ä f
P MPO2Q]R_TWVq:qjA {8v
 Wnq¡ ^VP¢W£b¤2Q¥6o¦   fPn§28¨U k mj¡ a nqn  Nw^ [^XÐPÃ8¢:Ä8³HÅ:XOYjÆ HK8ÇZZBV: LZÃ:\Õ ÄNA±:W\ÔAn{ ]& V8^qí Ã8nbÄ _ WX8eZ©U¤¯ª Q°t_6^W¦|«:M8¬8O)­8Qq®ZR8tvTAuwVA^ VApZ±Arw²8so³r ¤_MP´O,µUQS¢RU¶_TW·8V8¸ X:VU¢W£ ^ Ã8ÂÄ {]üjWÁ\ n^U5öW e`3V8Ã8Ä)ôl \ õ Znbûv ^ Ã8Ä8Å:À8ÆÁ8HjÇÂAu T XH{]»8¼ ¡o½h¾w
tAuw^]VP¢W¹Z£bº ¤ ÄWÅ:Æ 8Ç|{]ü:ýv n éjÃ8Äêo_úja ¡n^ ¹jº bX aZdÒ co±bnÃ Ò
Q¿6|¦M8O)QqRWTAVjVA±A²8³¤_´µ ^{À8ÁH:ÂA nqÃ8Ä8Å:Æ 8ÇXqÈjÉ W¡¹Zhº ÊjË  nq À 3f eHf|k gmj¡aAa Ò cbnq±bÒÁowH8Âv nqÃ8Ä8Å:Æ 8Çuw^8À8Á 8 ^ Ã8ÄWÅAÆ ^Vg À8Á W aAÒdcb±bÒÌÍÏÎ ±:Ð|ÑhÒPÓWÔbÕh¤UX:VP¢W£b¤,QÖtP8×|k monq
cb±bÒ
hHi Ã8aAÄ8Ò Å:
tAuh^UxjybzweAØh n8 {WVP¢8£b¤)Q 
ÆÎ ±:aAÐdÒ cbÑh±bÒPÓWÒ ÔbÕh¤ avdÒ cb±bÒ¡e:jÙØhÔjÚU±w¸8ÛAuw^8 ÞAnÜjßApZà:r\ {]»jÝ ¡ a8MP\:O2a Q] R_x:T:ybVz
V
|
Ì
Ï
Í
À8ÁowH8Âv nqÃ8Ä:Å:Æ 8ÇoUú:a ¡ ^8À8Á : <u jkoq: n¡W há [  8,8¡
w^Wx:ybzwe:ØP nW lt_^m Ã:\óÄW_XÅjÆ Ì58n ÇÕó:Q]Ø_O: oUnq±pWXo)F qb8r  _¾w¾_wA  W \ w¾nÃX«:¬:­oX¨àjuw^{8VU¢j£¤¯Q
ÔvÚ8±_¸:ÛZ{q»AÝ ^
â:ãWäv_ePåA:a q¡¡ j}hÙ æb nvçA tj nnÜ: px:r yoze:Ø ÄWØhÅ: Æ nq8WÇZtAfPÞvuh^ßAÃ8àAÄ::Å:vØ Æuv:ØPnW Ã8nqÄ8WÅ:)Æ  H^:sØ_\n t nqWaj  nqW {UVP¢8£b¤,Q :¡:Ù ÔjÚU±w¸8Û ^oVW±A²P³  F^ s Bn t aZAØU nj Xhbö wAã:eN{q`ð n ¨à:tW^¤w´bµWèXqé:êvthë8ìqíFÖî)[ çA {]ävvP nq Ã8ÄWÅjÆ jØh n:, ^Fs nvt ajjØh n: {W«:¬8­ouw^ ¹jº XZYv[qïbð nq¾wqñvò ^óGIH:J:K:LóMPO,QSRUT:VWX VP¢W£b¤2Q X:\Ø u|<{ x v yv  V8±:²P³Z¤w´bµUBX jk
XWè ½
8uw^W«:¬8­8®ZtP»8¼ók mA¡ a n VP¢8£b¤,Q¥6¦oM_O2Q
:è h¾
U
^
v
x

y
P
z

e
Z

_
Ø

{
w
n
:


VW¢v£¤¯Q A¡Zô2Ù õ ÔvÚA±U¸jÛ ^XPö R_TWV8VW±:²P³b¤w´bµUFX z<{H|8ý {ãva ¾h
Wè}~
ddö:Wè ¾
{ ©_÷ Û ¡ ^{»8¼
8\HRdO_Xâ:ãUävPe_åja ¡ }hæ
«:¬:­vtvuw^
qxAybzwejØh {8VP¢  
£¤FQ jh¡vÙ ÔbÚj±_¸vÛo nPÜvpr {»vnÝ 8_¾U  ¡¢£{qãZa nZçZ t8^oV8±A²_³o¤P´oµw8èXwéAê
t_^Wx:ybzwejØh nqW {UV_¢W£o¤2Q W¡ íFî)[ À8Á 8 u Ã8Ä8Å:Æ) ^ Ã8ÄW¤BÅj¥d¦Æ §Fu:¨KV ©Ì¤BÍ ª¬Î « ±AÐÑPÒPÓ
çA fhäv  \ nqøùWu_úûhGÏHWJjK8L2MPO2Q]R_T8VWXjVP¢8£b¤2Q¿6o¦ ?mÔbUhÕhm¤ \Ø u^V |Ì[Í Î ­±AÐVP¢8ÑP£bÒPÓ8¤,ÔbQ <ÕPj¤UkZuwÀ8 Á nWW, {q ^^ ¹T
ü8ýA^Uþ8«u_úûhjVW±A²P³Z¤h´bµWXqöjWèA^8ÿ u_ú º vyv ûhXq»8¼|{  ¾wÀ8Á W VP¢W£b¤2Q
Ã8ÄWÅ:Æ 8VPÇ¢W£b{À8¤2ÁoQ H8Â|\k ® nqW  !"#2 
Ã8ÄWÅ:Æ 8ÇoX X :Øh$%uw&^ pZ
')r (MP*%O),QS+%Ã8V ÄWÌÅ:ÍÏÆÎ ±:ÐÑhÃ8ÒPÄ ÓWÔbÅ:ÕhÆ ¤WVP¢W£on¤2WQ 
RUTW-V8/X:.,V80 ±:1 ²_³Z¤P´bµhrbs{^8À8ÁowH8Âv nÃ:ÄWÅAÆ :ÇoXÈ:É W¡PÊ:Ë,¡Ã8Ä X ÅjÆ ZAvX s \n t aj:Øh nqWa nuw^U«:¬:­W®ot pbrwsor MPO,QSRWTWV
2002MT071

2002MT073

2002MT096[1](

E-AOSAS)

E-AOSAS
(

AOSA)

•

–

•

E-AOSAS––

E-AOSAS• E-AOSAS
AOSA
•
AOSA

1

[3]

AOSA

<<hook>>AOSA•

E-AOSAS+<<hook>>• E-AOSAS+

E-AOSAS<<hook>>E-

1 E-AOSAS

AOSAS+E-AOSAS+••

E-AOSAS•

E-AOSAS<<hook>>3_ñ ò ½ ^:ÀvÁl)UHb' Â(  *%n_,Ãv+/ÄvÅo-,Æ ZÇl X

ÈAÉ jq¡ ^óG H:JAKjL2MWO)QRWT:VjX
{qjè
 nq
9<>?@"!$#&%('*)+-,/.10!324
x:yoze  uh ^oÐP¢:H³ XZybzW6f 5/7 w¾ khajP^Uì/8\_HjÂN{9;:-<&^ n jeotv nw «v¬j­btbuhyz  u_^= > ¾ &· ?|Ò|QÏ{ ]:^qí nAçA8I/Ë @  nq
x:yozel{ 9/Av n /ª B uw^ CbE± D]R_T81V FW1t 9/AZ n/ª RUB T8V& ^NF8tUMPxjO2yoQ]zwR_eT81V jF:ØP6t  9/nqAv:  n {/ª üjB ýbfj  nnq  MPO2 Q
B¡ ^ ¹jº X  B fj nq±:ÔÑPÒ Ì Ó/H n"I Ò6HJ K/L/M¤ JRQ/<We K/L/M
OÍ NG G Í P ÓZÕhNU¸Ow´bTZÕh²Z6Ò H Ì /Ó H n"I 6Ò HJ A S e
1 K/L/M
FOjX  uw^8yb-z 5/7?ZZ:Ð_¢8³ XAUú3Y T_6 UVZf
W \ nw B" KLMtv n G ±vÔNÑ_Ò Ì Ó H nXI YÒ H
uw/^ Z/[Y\]"^UXyoz:3X 5Y7- _ ¡ ^8Av-X ` Z
b Xdc m {e7gf nAçv \(hÖxjybzwe|{9Avt ½UnwYº Q/a <e K/L/Mbtj n OÍ N G Í P ÓbÕh¤Wuw^Wyo-z 5Y75ZAhA
dX ` º 6{ ikjIfU^WA{ l;mw nU¾ ðjFX Z b dX c m 3f 7
f nq A
 S ev1 KYL/MZtj n N_¸O´bTZÕw²Z6Ò H Ì/Ó H n"I 6Ò HWuw^Wyo-z 57?ZAF Z b X c m uW\8a:f_^ ©
nXAvX-oYp a ^UevvXd` º f37(f nq
«:¬:­vtvuw^ CbE± D]R_T:VPfPyozv{ Y çA¾dq ÉA^lMPO
QSRUTW&V FWthxjybzwe|{ 9/Av {íFr Fs üý ¾ GIHWJ:K8LóMPO2QSR_T8VPtAn /ªuw^B G ±:ÔÑhnqÒ Ì Ó
H nI &Ò H  Í N G dÍ P ÓoÕU¤A{qëvã P¾P « tbtZu_^
G HAJAKjL,MWO¯QR:T:Vj ±AÔlÑWÒ Ì Ó H nI Ò
H:{ü8ý ¾q ÉoXh^oVW±A²P³bG ¤w´oµUXwW_åja ¡ ku nq
'|{6}~ !
!«:¬:­vvtvw&uwx"^óy6GÏz HWJ:K:LNMUx O2Q]R_T8VW-X  W¡ ¸8± X³ Xo{   s ;J ^UX n · Q XwK8Ll{Án ·FQ Ð_¢8H[I¸b8± X n · Q Ðh¢8 H³ Xjuw^ n 1"j_¢:·Õ]´  D V^
-&$A n · Q {jûå qñZòja ¡ :è
<{ x B yv ¾ ¸b8± X n · Q ÐP¢8H³ XAX
:è P¾ ¸± X n · Q ÐU¢jb³ XZXuPY^ j^ {    n c P Ð_¢8p³ X  ^lMPO,QSRUTWVj{   n c P ÐP¢8³X8t_8× ¾h ­ c P Ð_¢8³HXo{ÀjÁo
H8Âv nqÃ8ÄWÅjÆ :Ç :¡ ü8ý H^ c P ÐP¢:H³ X b X\Ø ul{UV_¢W£o¤2Q jkB jHkv
W^ -{  n c P ÐW¢jp³ Xbb uP/^ C± DR8T:nqVj X ÃjÄ {    nh 
MPO,QSRUTWVj{   n c P ÐP¢8³XAuh^Y{ X  n c {  P ÐP¢:H³ XvX ÃjÄ {Aû  w^lM_O2QSRUTWV:Ã8Ä  nq'|{6}~ !324
:è P¾X13{vû r &_v^Uw&xAx"yy6zPz eN{_}_~ P¾x ¸H± X³ Xo{]ü:ýv nq ÐP¢8³ XAx:ybzweAØhn ·FQ Ð_¢8H
nW { ü8ýv n /ª B U¡ ^ ¹jº X /ª B fW}  õ mbnq

E-AOSAS

DoorSystem<<hook>>Door<<hook>>

[4]

• N
•
• N

N

N

N

N

3.2

<<hook>>DoorSTM ¡£¢¥¤§¦©¨ª§«­¬®­¯<<interface>>
DoorAction<<interface>>
DoorState

AOSA

3.1



µ ±·¶§¸ 

§©¡£¢¥¤§¦¨´ª­«§¬®­¯ ¡£¢¥¤§¦©¨ª§«­¬®­¯
RLSystem<<hook>>SwitchSystem<<hook>>RLSystemSTM<<hook>><<interface>>
RLSystemState

<<interface>>
RLSystemAction

LightSystem°±³²<<hook>>RoomLightSystem<<hook>>Light<<hook>>LightSTM<<hook>><<hook>><<interface>>
LightAction<<interface>>
LightState¹º¹¹ §»­¼£ ¯©½º¹ ¹¹ ­»§¼¯©½£ÄÅ§Æ ¹º¹¹ ¾¤À¿ÂÁ§Ã­ ¹º¹¹ ¯§Ç´»È1ÉOÊ1ËOÌ:©ÎÍ ¦ÏÊO¤
Ã8ÄWÅ:Æ 88ÇoÇoUU·&·&?? Ò|Ò|QÏQÏ{{PP n8 X3ÐZ Ñ/Ò•Ã8ÄWÅ:Æn8, ½OÓ n•·&?ÒlQÏ{P nqW X3bÐ Ñ/Ò ¡ ü8ýZ nq Éj^Ux:yzejØh n8 X-Ñ/|Ò {d_Ð » Ww¾ WbtMUO2Q]R_T
Vj{]ü:ýv n gZfv n ©Uª t_^Z·&? ÒlQÏ{\P nqW  ½eÓ  ¡ ü:ýv nq É:^FPjc/oÔ XW·&|? Ò|QS{&ÕdAQ n?WÒ| Q {WP ¡ ^Wx:ybzh ejØh n8t_^W{Ñ/x:oÒybtzhe½UjnØh·n8, ½eÓ nvçA
nx:ybjzwe{-j8Ð Øh»  j \jaU{q:^oÐPt_¢:üj³HýX8t f ½:nw «A¬A8­bÇtbUuP· ^n:
Ã8Ä8Å:Æ
?Ò|QÏ{P n8,  ½OÓ  ¡ ü8ýv nü8ý w¾ ¸o±8X n · Q Ð_¢8³HX:tAuh^/bC ±SD RWTWV8X:VÌÍÏÎ ±:Ð|ÑhÒ_ÓWÔÕh¤hfZÐP¢:³HXvd {Á¯[Öjn o±:ÔÑhÒ Ì Ó/H n"I Ò6:H {]ëjã±:ÔÑhÒ
NGÌ Ó/H n"I Ò6jH {d× P Ô:T:¤2Q 6o¦wü8¾ývw Nn GaW±ED X
<<hook>><<hook>>2

AOSA

|{|8ý ¾ ¤ n ¢zZ{<x Byv 
3

N_VersionMachine-instance:N_VersionMachine+getInstance(): N_VersionMachine+put(Event):EventAOSA

E-AOSAS
AOSA
2

AOSA

3.3

AOSA

<<interface>>
VersionSelectionAlgorithmMachine-instance:SelectionAlgorithmMachine-ht:HashTable

Version1

Version2

Version3+put(Event):void+put(Event):void+put(Event):void+getInstance():SelectionAlgorithmMachine+regist(Event):void+getEventt():DoorEvent-researchMaxCountEvent():DoorEvent£ 3 N ØYÉdÙ/ÚrÛOÜÝÞË6ßÛOÞ¤O¨Ë ¦ £¤ n ¢ZuU^ Version × P ÔATv¤)Q 
N VersionMachine× P ÔZTb¤ Q{6   nU
SelectionAlgorismMachine
¤
Z
¢
P
u
Y
^




k
n
b
m
¾ ·?|Òl¤ Q n XP¢A×uwà^ {h´TbÕVersion¤w nq SelectionAlgorismMachine
Version× P Ô8T8¤2Q XY- ¾ ·&?ÒQÏ{á&â ^ãYä|{Oåv 
9< >?@"!-æç
3.4 
ü8ý w¾ ¸o±8X n · Q Ð_¢8³HXv_úja ¡ ^Ux:yze:Ø nW fPÞAßvà:Br8 ¡ a nAçA {\eHf ¾w!ëìx:ybzwejèØhéeê" wn:é  uh^/Cb±DSR_T8VPf Ã8Ä:Å:Æ 8Ç
U&· ?|Ò|Q { PÞAßAàj:vØ u a x:ybz
e:ØP nqW uwn:^b,&· ? ÒlQÏ{ P n8,¡   nq½ Ó  ¡ üÁA n ü:ý ¾ ¸b± X n · QIÐP¢:H³ Xv_úAa ¡ ^Wx:yzejØh n8 fW^W J6X × P Ô:T:¤2Q ÞZß ¡ an {<x vyv 

:è h¾ ¸±FX n · Q ÐU¢j³bXZX
tbuP^/C±D
R_TWV_fvÐ_¢8³ XA3 {Á,[ n:qx:yoze|VP¢8£b¤
QÏ{]í   a 3bÐ_¢8³HX M_O2QR_T8V
N3{    mjn ¡ Ð8¢vnwK³  XZtWZ×2k mn G] HAJZKZL,M:O Q
R_TWVWX:VW±:²P³Z¤w´bµWuw^ x XZYv[qx:ybzeVP¢b£¤2QÏ{]ëjãAt ½Unq
4 E-AOSAS+ Z_L` £
xoylzWeóVj¢Z£l¤ Qq{hí   m|¾
ZP¡ ^
  Bª ¤ 

{
:
»
b
¼

8

è
o
¸
HX n ·FQIÐU¢:³
±

n

w¾
9<>?@"!æç
x:yoze:Øh n8 {^oÐP¢:³HX:f Ã:ÄWÅ:Æ 8ÇU· XZ¤,X Q 8q¡jÙ 8ÔjúAÚ8a ±h¡ ¸8^UÛ xA¡yzha e|nA ØP n: uAVWXA¢:V_£¢?ÒlQÏ{P nqW ôNõ ^VP¢W£o¤2Q W¡ 8v nq V £b¤2Q X:\Ø u|O{ x v yv × P
Ì|Í Î ±jÐlÑPÒ_Ó8ÔoÕ_¤ ^Ô:T:¤2Q U·&?|Ò|Q {P nôN8õ  uh^oVP¢8£b¤2Q b jkgihijek
acbedcfÓH Û ¾w VP¢8£b¤2Q b jHk  ^ G ±:ÔlÑhÒ Ì zc{}|v~¢ zZ<{ x v yv n"I Ò6HUjØh nW X:ÐW± Î Òp
AOSA

4

DoorButton

SwitchButton

open()

on()void open() {DoorEvent ev;

void on() {SwitchEvent ev;

6ev = new DoorEvent(DoorEvent.OPEN);

ev = new SwitchEvent(SwitchEvent.ON);

N_VersionMachine nvm;
nvm = N_VersionMachine.getInstance();
nvm.put(ev);

N_VersionMachine nvm;
nvm = N_VersionMachine.getInstance();
nvm.put(ev);}}

E-AOSAS

4

E-AOSAS+AOSA

E-AOSAS+

7

N VersionMachine<<hook>>N<<hook>>5//
pointcut atDoorButton_to_NVersionMachine():call(void DoorSTM.put()) && within(DoorButton);pointcut atNVersionMachine_to_DoorSTM():call(void DoorSTM.put()) && within(DoorButton);//void around():atDoorButton_to_NVersionMacine(){N_VersionMachine nvm = N_VersionMachine.getInstance();
nvm.put(DoorButton.getInstance().getEvent());}
after():atNVersionMacine_to_DoorSTM(){
N_VersionMachine nvm = N_VersionMachine.getInstance();
DoorSTM stm = DoorSTM.getInstance();stm.put(nvm.getEvent());}:7;=<?>=@=A

DoorButton

N_Version
Machine

Version1

Version2

Door

Version3

open()<<hook>>put(ev)Selection
Algorithm
Machineput(ev)

put_open()regist(ev)put(ev)£ 7 E-AOSAS+ ¤v¥d¦\§8¨5©¤vª¬«x:ybzweV_¢W£o¤2QIuw^ g gva Òdbc ±oÒtA n À8Á W
VP¢W£b¤2Q
ú2^U»:¼v
ú:a ¡ hHi ôNAa Òõ#bc  ±¡Ò  Uò?^ n x:n yoE-AOSAS+ze|VP¢8£b¤
Q uw^V ÌÍ Î ±jÐÑ_ÒPÓ8ÔbÕP¤WVP¢8£b¤,Q ôóõ Ã:ÄWÅÆ ÐV:Ñh¢AÒ_OZ£|ÕP¤¯¤jQSkvj® ·?óÒ,x:Q]yo{<zP en VPL ¢WÕO£ooN ¤2±ZQ ÔAfhüA×AÁ|£k ±nwmonW X m {<x 8 vvy  <<hook>> &'&(& !#"%$}

lim npoNqcrs!tvuew#x!y<<hook>>)'*,+.-0/212- &'&(&
354768*'9

public aspect FaultToleranceAspect{

stm:
DoorSTM

put_open()2=825U882' ,2U
2¡'¢2£

regist(ev)put(ev)<<Aspect>>

start()

put_open()wait()

regist(ev)getEvent()<<Aspect>><<hook>><<hook>>put(ev)trans(){call(void{call(voidDoorSTM.put())
DoorSTM.put())&&&&within(DoorButton)}
within(DoorButton)}{advicetype{advicetype==after}
around}<<hook>>,1}FEHG'!Wè ¾ qx:yvzeJILVh¢WKNMP£bO¤2 QI{]íF  m ^ ¸b±
X n · QIÐP¢8³XAXjVW±A²P³b¤w´oµ:{]öjWèZ nw x:yzeVP¢8£b¤2Q {]í   m ö:8è w¾ V8±:²_³Z¤w´µ:{x v yv 

3.5

AOSA

AOSA

6





DoorSystem<<hook>>Door<<hook>>

Q,R,SUT<<hook>><<interface>>
Version<<hook>>SelectionAlgorithmMachine<<hook>><<hook>>§©¡£¢¥¤§¦©¨ª­«§¬®­¯<<interface>>
DoorAction<<hook>>SwitchSystem

<<hook>>Light<<hook>> 

§©¡£¢ ¤ ¦¨´ª­«§¬®´¯§©¡£¢¥¤§¦©¨ª­«§¬®­¯
RoomLightSystem

RLSystem<<hook>><<hook>>RLSystemSTM<<interface>>
RLSystemState<<hook>><<interface>>
RLSystemAction

LightSystem°± ²

DoorSTM<<interface>>
DoorState

N_VersionMachineµ ±·¶§¸

<<hook>>LightSTM<<hook>><<hook>>£ 6  %¥¦§¨5©WVXZY\[C] ^ È&ÉÊËOÌ:Î© Í ¦ ÏÊO¤ AOSA<<hook>>¤8¥ §¦ ¢,£8

£ 8 E-AOSAS+ ¤dÍÉB¨/Û¦ £x:ybzweV_¢W£o¤2QIuw^V ÌÍ Î ±:Ð|ÑhÒ_ÓWÔÕh¤8VP¢£b¤2Q tPÁ)[I^ Ã8ÄWÅAÆ V_¢W£o¤2Q ^UX:×Wªg ©oW&· ?
ÒNQ]\{ P /{ Õ-Qb xAyzPe|VW¢:£¤¯QIAuP^
V ÌÍ Î ±jnwÐ:ÑPÒPÓ:ÔbÕh¤8nhVP ¢8£b¤,Q ^_Xw8×:g © ôlõ
X LZ\Õ NA±jÔj{ ]:^wí n kwajXh^Ux:yoze:Ø_ nqWp{jkZ x:yoze|VP¢8£b¤,Q ^UX:×Wgª©ouw^Wx:yzejØhn n8 {qÁ > ¾ ãYäl{^ Ã8ÄWÅjÆ VU¢W£o¤2Q^_X8×Wg ©oB P nq
5 ¬«»j¼ h¾XhâvãWäbWeUåZa }Uæb{qãZa ¡ ^[XG H8JjK:L,M_O,¡ Q]RUT:V8nw 
¦^

{Wè
 F^ [oXwâ:ã ­®W¦ ^ ¾
 nq¾
E-AOSAS+
E-AOSAS+
AOSA<<interface>>
LightAction<<interface>>
LightState8,8

<<Aspect>><<hook>>{call(void{call(voidDoorSTM.put())
DoorSTM.put())&&&&within(DoorButton)}
within(DoorButton)}{advicetype{advicetype==around}around}£ 5 N Ø&ÉÙÚ ÛeÜdÝÞË6ßÛeÞBBª%C#D

(,2

<<Aspect>><<hook>>2<<hook>>notify()<<hook>>

5.1

¯

AOSA

!±°\;H²P³µ´ #% ')+/,59H¶H·  AOSA !

»Z¼ U¾QR8T:V:X{oû W^ [|XNGHvJbKvL¯M:O{üjýo  nh [|XGSH:JAKAL2MWO)Q

E-AOSAS+AOSA

RWT:VA3X  ^{üýZ n GSH8:J¡X P ±j²v{qK:Lb n uh^/YjJ 5NÒ cb±w^WJ ?NÒ cb±h^ P ±:²P£¸{6û :w^ -&$A P ]±A²  S  $b{jûqå x:ybzeV_¢W£o¤2Q uw^UJ ?N|dÒ cb±h^UJ  ?NdÒ co± ôóõ Ð¢8³ X ZX-bqí   mo¾w ü8ý ¾ X<{ x v yv 
ABS(Anti-lockBrakeSystem)
ABS

ABS

%&'(
A$BCD<<hook>>HSensor

HSensorSTM%&'(<<hook>>N_VersionMachine<<interface>>
VersionAntiLockBrakeSystem

SelectionAlgorithmMachine

ABSystem<<hook>><<hook>>SSensorSystem

BPedalSystem<<hook>><<hook>><<hook>>-./10$2$34657896:<<hook>>%&'( $;<=>?@Brake

BrakeSTM<<hook>><<hook>><<interface>>
BrakeAction<<hook>>»8¼ ¾qñvòja ¡ ^Ux:ybzeVP¢W£o¤2Q{qí  X{wjètuU^ÐW¢ZK³ X m ¾ 1 oX T8m&UWm f ÃAÄv½WÅZ¾UÆ  AÇ2{bûå_8 8 Y^ ZX nwx:yozeVP¢8£b¤2Q {]í  
mZRW¾wT: Vj»:X ¼ ¾ Xhj© èWúva uP^ û][oFâ XE:GIäbHWJ:GIK8HKLNJIM_LNO2M Q¡
E-AOSAS+
ABS
AOSA

ABS

E-AOSAS+AOSA

O PRQS TVU!W X YFZ\[¶· ]5.2 ¯
hKi j^VkV_ l ` E m nIh op eabdcVe E-AOSAS+ fg MAOSA
TU jkVl E m nIkVudM crv ixwyz {AOSA frq sRt|}~K kV {K  fx TU  {I MVi w yz {IkF{R frt T  Q
FTU  {IK ih\¡F¢ir£ ¤R¥ ¦F§ ¢i¢ ¨©rª«\ª fg ¬ iI­h I®Kª ¯ªi°\±² ©¤KiI¢³¨ ´¢µ ª
U · ¸\¹ Gº »I¥d
iR\¡F¢FMV\¢³ ¨©r ªf«g¶ª¼N½ ¾k¿kVÀÁIh  FÂ e¿U q s cVe wy z { |}N~dr
 k AOSA fÃ 10 hÄ t UabdcVe E-AOSAS+ hÅRÆL v i · ¸\¹ GºK »¥d
wyFzF{ |F}d~ È  k AOSA fVq
f³Ç ReKUÂ wFe y
h ÊRL
º
Q
S
sv i ªËK\¥zFÌ\{Í |}d~ kÉÎ³Ï  QK· ¸k ¹ AOSA
º
G



I
»
¥d
g
q TUs a bdcVe

M
H
¿

i
j

Q
S
E-AOSAS+ÒKÓ h oFp ek¿f
lFÔÑÐÈ
m n

L
h
i
R
l
Ô
TÕ
g
AOSA fqs\tÖ KGH¿JLM O PRQS TUÜÝ×Þ ØÚQ  Ùi Û E-AOSAS hÅºÆIL eNß³àFá |\}È~  k AOSA fqs c i ·F¸I¹ GhRâ t Tã ä fÂ e U ·¸¹ GNhâ t TKãä R»¥¿M c¿v
å\æFç ªKèé cv L T¿U ·F¸I¹ G  »I¥ÈêhÊFL v i<<interface>>
PhoneSystemStateö÷!øúùûüý þ<<hook>>SpeakerSystem<<hook>> 

<<hook>>AntennaSenderSystem

î!ï!ð!ñ

ABSystemSTM<<hook>>PhoneSystemSTM

MicroPhoneSystem<<hook>> <<hook>>ò!ó$ôõ<<hook>><<hook>><<interface>>
PhoneSystemAction

ö6÷øúùûüýÿþ

ò!ó!ôõ<<hook>>Display<<interface>>
BrakeState£ 9 ABS ¤ AOSA

í<<hook>>AntennaReciverSystem

DisplaySystem-$./10!23465789:)*+,<<hook>><<hook>>)*+,<<interface>>
ABSystemAction

BrakeSystem

6





<<hook>>DisplaySTM<<interface>>
DisplayAction<<interface>>
DisplayState 

<<interface>>
ABSystemState

î!ïð$ñ

PhoneSystem<<hook>>PhoneSystem !"

í í



<<hook>><<hook>>SelectionAlgorithmMachine

<<hook>><<interface>>
ButtonAction<<hook>><<hook>><<hook>># $%&'<<interface>>
HSensorAction<<interface>>
HSensorState<<hook>> !"$#<<hook>><<interface>>
Versioní

<<hook>>ButtonSTM<<interface>>
ButtonState

N_VersionMachine

AOSA

ö6÷øúùûüýÿþ

ò!ó!ôõ<<hook>>Button -$./10!23465789:)*+,<<hook>><<hook>><<hook>>9

HSensorSystem

î!ï!ð!ñ

ButtonSystemëìí<<hook>>()+*+,.-0/+132046587:9<;0=

10

AOSA

h IH  ei·F¸º¹ GhRâ t Tã ä k ·f R¸¹ G  R»¥ h Fé Q S TU qRs
é c¿v icKe ßràá |R}~  ³FRkf
M cKv i·¸ ¹ G» ¥  f¿  IÂ AOSAe E-AOSAS
klÔ
a
d
b
¿
c
¿
e
U
a

b

c
e
E-AOSAS+ f
M c¿v i j k ßàFá |RE-AOSAS+}È~ VRk
Ö G kMxixwyz {|}N~K  k {IKFk
AOSA
cVeU
AOSA frq s
k ÉM c³v i F¢K± ç ©ª K¢k
k
H

½
Â
d
u
M

i




k
º
h


T
U
³
c
v
v
K Fk
M
|
N
}
~
T
V
T

U
ê
ß
à
á
d q hÊLf v F¢K±Ó çf ©rª  K¢kf
ÒKÓ M Q iFk q f ä t TVUÜ ÝÞ f T h Fe  i
IhV}
L e
L e
i
R «R¤  f L e Lf e
i
k
Õ i
Õ i
Õ i
Õ i
Õ iÜ
Õ i
Õ i
Õ h
eIc
h
Ut
e i

c

I
v
SKe
ÝÞ
k f h g gec t U
3>3?

@6A6IHJ

.@BA

DC

FEHG

LK6J

NMBO

BPRQ

SRT

FUWV

YX

[Z

]\

Lcbd

^3_Da

Rh

6g

C

PBa

X

i

.^`_ba

FeRf

[Z

Rh

]\

.^`_ba:j

kWl[oRprq.s`t:mbn+xzyR{0|W}`~R`6

+R}`~

WRDN

RR`F

.

RR¢`£R¤F

WoRpbq

r¯

W·

x¶y

.RRR

RR`R

M3¸

`¥

6°
.¹ªº

RuRv

Rw

Rw

LL



F

.

W

xR¦B§
.±

x

WRDN

.

W

`R`¡

F¨ª©¬«R­b®

F

¯

«R­6®

³²

.

a

G

®N´

W

N¯

µC

N¯

»½¼]¾À¿

i U
U
i U
i U
i
i
U
i U
i U i UiUii U
Ui R»º¥  o~ ÈV FªRË º¥ÌÍ k hâ t T Ý Þ i i iÝÞUoi¿F§¿ªè  x¿© R¢ F¢ ® ç ª\±
¢ i
i U i
U
i
i U
U
U

i

i U

[1] AspectJ http://eclipse.org/aspectj/ Dec 2005
[2] T Elrad M Aksits G Kiczales K Lieberherr and H Ossher “Discussing Aspects ofAOP,” COMMUNICATION of the ACM Vol
44 No 10 pp 33-38 2001
[3] Java http://java.sun.com/ Dec 2005
Äu[4] Á3Â6Ã“WÅÇÆ`È
```bLË`Ì
,” ÉbÊ
RÍRËRÌRRÎWÏBÐWÑ`ÒWÓ
p 67 2004
FÔWÕ3Ö
R×
0Ø
R×ÙX
[5]
ÇÚ rÛ0Ü`ÝRÆ`ÞRß
p 248 1989
[6] UML http://www.uml.org/ Dec 2005