Cheeking tim ing constraints in software sy stem using A O P Do Tuan Anh Faculty of Information Technology College of Technology Vietnam National University, Hanoi Supervised by Dr Truong Ninh Thuan A t h e s i s s u b m i t t e d in f u l f i l l m e n t o f t h e r e q u i r e m e n t s f o r t h e d e g r e e o f M a s te r of In fo rm a tio n T ec h n o lo g y D e c e m b e r, 2009 DAI HOC QUÔC GIA HÀ NÔI VIÊN TRUNG TÂM THÔNG TIN THU i ' L o / (n - - r a b l e o f C o n t e n t s In tro d u c tio n 1.1 M o t i v a t i o n 1.2 O b j e c t i v e s C o n t r i b u t i o n s 1.4 O u tlin e o f th e th e sis B ackground 2.1 2.2 U M L an d U M L T im in g D iag m 1 O v e r v i e w o f U M L U M L T i m i n g D i a g r a m A s p e c t O rie n te d P r o g r a m m in g a n d A sp ect.) A s p e c t O r i e n t e d P r o g r a m m i n g 2 1 T e r m i n o l o g y I m p l e m e n t a t i o n 10 Som e lim ita tio n s of O O P 11 B e n efits of A O P 14 /2 A s p e c t , ) 16 R e m a r k s 17 2 S um m ary C h e c k in g th e co n fo rm an ce o f tim in g c o n s tra in ts 19 3.1 G e n e r a t i n g v e r i f i c a t i o n a s p e c t s t o c h e c k t h e c o n f o r m a n c e A c h i e v i n g t i m e f r o m s p e c i f i c a t i o n a n d i m p l e m e n t a t i o n 21 T h e o r d e r o f e v e n t s 21 1 O r d e r o f e v e n t s in a a p p l i c a t i o n 21 O r d e r o f e v e n t s in s e v e r a l a p p l i c a t i o n s 22 2 R e a d i n g t i m i n g c o n s t r a i n t in s p e c i f i c a t i o n C a l c u l a t i n g e x e c u t i o n t i m e f r o m i m p l e m e n t a t i o n 25 iv 18 .23 19 T A B L 3 E O F O N T E N T S v ‘5.1 T h e b e f o r e a d v i c e 25 T h e a f t e r a d v i c e 2(5 C a s e s t u d i e s 26 3.3.1 26 3 3.4 C A u t o m a t e d T e l l e r M a c h i n e for b a n k i n g p u r p o s e 3 1 O b j e c t i v e o f t h i s c a s e s t u d y 2(5 T i m i n g c o n s t r a i n t s in W i t h d r a w a l s c e n a r i o 27 T a k i n g o ff p r o c e s s o f a n a i r p l a n e 3 O b j e c t i v e o f t h i s c a s e s t u d y 29 T i m i n g c o n s t r a i n t s o f t a k i n g o ff p r o c e s s S um m ary 29 31 Im p le m e n ta tio n T h e a r c h i t e c t u r e o f t h e s u p p o r t t o o l 32 O b s t a c l e s in t h e i m p l e m e n t a t i o n o f s u p p o r t t o o l 36 D i f f i c u l t i e s in r e a d i n g t i m i n g c o n s t r a i n t f r o m t h e T i m i n g D i agram 1.3 32 4.1 4.2.1 29 36 2 A s p e c t ) c o d e for c h e c k i n g t i m i n g c o n s t r a i n t s .37 S o m e r e s u l t s a n d r e m a r k s 38 S um m ary 39 R e la te d W ork 5.1 B u i l d i n g a set o f to o l a n d m e t h o d s for c h e c k i n g 41 5/2 B u i l d i n g f o r m a l f a c i l i t i e s fo r c h e c k i n g 42 C h e c k i n g a n d e v a l u a t i n g in s o m e r e a l - t i m e s y s t e m s C o n c lu sio n a n d p e rs p e c tiv e 6.1 C o n c l u s i o n .44 F u r t h e r r e s e a r c h 45 41 13 44 L ist 2.1 o f F i g u r e s U M L 2.0 D i a g r a m s 2 U M L Jo n c ise T im in g D ia g m U M L lo b u st r i m i n g D i a g r a m A n e x u n p l c o f c o d e t a n g l i n g 12 A n e x a m p l e o f c o d e s c a t t e r i n g 13 3.1 U M L S e q u e n c e T i m i n g D i a g r a m 20 3.2 T em p late fo r t h e V e r i f i c a t i o n A s p e c t s 21 3.3 T h e event E i is s e p a r a t e d f r o m t h e e v e n t E 22 T h e event E i is c o v e r e d b y t h e e v e n t E -2 T h e event E i is o v e r l a p p e d t o t h e e v e n t E *2 22 3.6 O r d e r r e l a t i o n 23 3.7 T h e re la tio n T i m i n g c o n s t r a i n t s a r e r e p r e s e n t e d in a t i m i n g d i a g r a m 24 U s e r is u s i n g A T M 3.10 U M L S e q u e n c e D i a g r a m o f t h e W i t h d r a w a l s c e n a r i o 28 3.11 U M L T i m i n g D i a g r a m o f t h e W i t h d r a w a l s c e n a r i o 28 A n a i r p l a n e is t a k i n g o f f 3 T i m i n g D i a g r a m o f a i r p l a n e e a s e s t u d y 30 1.1 T h e g e n e r a l c h e c k i n g p r o c e s s 33 T h e t i m e s t a m p s o f t w o p a r t s 34 4.3 T h e a rc h ite c t u re o f p r o p o s a l tool 4 A p i e c e o f c o d e t o r e a d t h e t i m i n g c o n s t r a i n t s i n f o r m a t i o n 38 G e n e r a t e d V e r i f i c a t i o n A s p e c t s 39 o v e r l a p ' b e f o r e ’’ 27 vi 34 22 23 C h a p t e r I n t r o d u c t i o n 1.1 M o tiv atio n T h e d e v e lo p m e n t- o f soft w a n ' in r e c e n t y e a r s d e m a n d s s o f t w a r e s y s t e m s m o r e a n d m o r e r e l i a b l e a n d r o b u s t B e s i d e t h e b e n e f it o f s o f t w a r e , t h e d a m a g e m a y b e s e v e r e if s o f t w a r e e r r o r s a p p e a r in t h e e x e c u t i o n T h i s c h a l l e n g e r e q u i r e s s o f t w a r e d e v e l o p e r s h a v i n g efficient m e t h o d s t o v e r i f y s o f t w a r e s y s t e m s b e f o r e u s i n g t h e m in p r a c t i c e S o f t w a r e v e r i f i c a t i o n is t h e p r o c e s s t o e n s u r e t h e c o r r e c t n e s s o f s o f t w a r e T h e r e a r e m a n y p r o p e r t i e s t o b e v e r i f i e d lik e i n v a r i a n t , p r e / p o s t c o n d i t i o n , p r o t o c o l e x e c u tio n , etc B e sid e t h e v erific atio n o f o t h e r p r o p e r tie s of s o f tw a r e s y s t e m , t h e tim in g c o n s tr a in ts a r e i m p o r t a n t , p a r ti c u la r l y in e m b e d d e d s o f tw a r e a n d r e a l- tim e s o ftw a re lik e t h e a i r c r a f t flig h t c o n t r o l s y s t e m T h e c h e c k i n g o f t i m i n g c o n s t r a i n t s in s o f t w a r e s y s t e m m o r e a n d m o r e i m p o r t a n t in s o f t w a r e e n g i n e e r i n g t o d a y I n s o f t w a r e d e v e l o p m e n t , s p e c i f i c a t i o n is t h e p r o c e s s u s e d t o d e s c r i b e o v e r v i e w s t r u c t u r e a n d c o n s t r a i n t s of so ftw a re s y s te m s T h i s p ro c e s s allo w s s ta k e h o ld e r s u n d e r s t a n d i n g f u n c t i o n s , t a s k s a n d a c t i v i t ies o f t h e s y s t e m B a s e d o n t h e s p e c i f i c a t i o n , p r o g r a m m e r s th e n im p lem e n t th e sy s te m u sin g p r o g m m in g la n g u ag es T h e im p l e m e n t a t i o n m a y lead to erro r A c c o rd in g ly , w e n ee d s o m e a u t o m a t i c m e t h o d s to v e r if y if t h e i m p l e m e n t a t i o n s a t i s f y its s p e c i f i c a t i o n T i m i n g c o n s t r a i n t s a r e o n e o f t h e m o s t i m p o r t a n t c h a r a c t e r i s t i c s in r e a l - t i m e , e m b e d d e d s y s t e m s D e s i g n i n g s u c h s y s t e m s r e q u i r e s t i m i n g c o n s t r a i n t s in s p e c i f i c a t i o n d o c u m e n t s , w h i c h a r e s o m e t i m e s r e f e r r e d t o a s c r i t i c a l s e c t i o n s It is d e s i r a b l e to b e a u to m a tic a lly checked as p ro g m are b ein g d ev e lo p e d a n d la te r m a in ta in e d S o m e s t a t i c an aly sis m e th o d s h av e b een p ro p o s e d (W e g e n e r & G ro c h tm a n n , C h a p t e r I n t r o d u c t i o n 1998) t o p red ict t h e w o rs t-c a s e a n d b e s t-e a s e e x e c u tio n tim e s o f a ta s k s c o d e o r to e s t i m a t e t h e t i m e e x e c u t i o n of a p i e c e o f s o u r c e c o d e T h e s e m e t h o d s a n a l y z e s t h e e x e c u tio n p a th s a n d sim u latin g processor c h a racteristics w ith o u t ever e x e cu tin g th e p r o g r a m oi r e q u i r i n g t h e p r o g r a m s i n p u t T h e l i m i t a t i o n o f s t a t i c a n a l y s i s is t h a t , t h i s m e t h o d is u n a b l e t o a p p l y t o l a r g e o r c o m p l e x s o f t w a r e s y s t e m s It c a n w o r k o n l y w i t h s o m e s i m p l e p r e d e f i n e d l a n g u a g e s In a d d itio n , th e h a r d w a r e co n fig u ratio n m u s t be d esc rib e d b efo re u sin g th e m e th o d O u r a p p r o a c h is b a s e d o n t h e d y n a m i c c h e c k i n g m e t h o d in w h i c h p r o g r a m s a r e c h e c k e d a t r u n - t i m e a n d t h e t i m i n g a n a l y s i s is p e r f o r m e d w h e n t h e p r o g r a m is e x e c u te d ; th e u ser c a n b e in fo rm ed o f a n y p o te n tia l tim in g c o n s tra in t v io latio n s T h i s p r o m is e s to so lv e t h e lim ita tio n s of s t a t i c a n a ly s is a p p r o a c h e s T h e r e a r e s o m e o t h e r w a y s t o c h e c k t i m i n g c o n s t r a i n t s o f a s y s t e m , like u s i n g P e tri n ets (B erth o m ieu D ia z , 9 ) o r r e a l t i m e lo g ic ( A n d r e i e t a L 0 ) T o d a y w i t h t h e a p p l y i n g U M L in s p e c i f i c a t i o n o f s o f t w a r e s y s t e m , e s p e c i a l l y t h e d e v e l o p m e n t o f U M L , t h e c h e c k i n g o f t i m i n g c o n s t r a i n t s is p e r f o r m e d in U M L d i a g r a m s U M L is u s e d p a r t i c u l a r l v in s o f t w a r e s y s t e m s b u i l t u s i n g t h e o b j e c t - o r i e n t e d s t y l e T h e U M L r e p r e s e n ts a co llectio n of th e b e s t e n g in e e rin g p r a c tic e s th a t h a v e p ro v e n s u c c e s s f u l in t h e m o d e l i n g o f l a r g e a n d c o m p l e x s y s t e m s It is u s e d p a r t i c u l a r l y in s o f t w a r e s y s t e m s b u i l t u s i n g t h e o b j e c t - o r i e n t e d s ty l e In a w o r k ( T r i n h et a l 0 b ) t h e c o m b i n a t i o n b e t w e e n A s p e c t O r i e n t e d P r o g r a m m i n g ( A O P ) a n d t h e U M L s p e c i f i c a t i o n is c r e a t e d in o r d e r t o v e r i f y i n g t h e c o n f o r m i t y b e t w e e n t h e i m p l e m e n t a t i o n a n d its s p e c i f i c a t i o n O b j e c t i n v a r i a n t s a n d p ro to c o l e x e c u tio n o f m e th o d s a re p ro p e rtie s of so ftw are p r o g m s w h ich h a v e b ee n c h e c k e d u s in g A O P technology In t h i s t h e s i s w e p r o p o s e a n a p p r o a c h t o d y n a m i c c h e c k i n g a p r o p e r t y o f r e a l - t i m e s o f t w a r e s y s t e m s , t h e t i m i n g c o n s t r a i n t s C h e c k i n g t i m i n g c o n s t r a i n t s is d i f f i c u l t for so m e so ftw are sy stem s W e c a n n o t h o o k in to t h e s y s te m , e s p e c ia lly w ith larg e s y s t e m s F r o m b e n e fit of A O P , w e p r o p o s e a n a p p r o a c h to a c h ie v e th is goal 1.2 O b jectiv es T h i s t h e s i s a i m s a t c h e c k i n g t h e t i m i n g c o n s t r a i n t s of a s o f t w a r e s y s t e m in A O P , o r m o re d e t a il e d , t h e c o n fo rm a n c e b e tw e e n th e sp e cific atio n a n d th e im p le m e n ta tio n o f a s o f t w a r e s y s t e m T h e f o llo w in g a r e s p e c i f i c o b j e c t i v e s t h a t w e w ill s t u d y in t h e C o n t r i b u t i o n s t h e s i s prcg ress: • S tilly A sp e c t O rie n te d P ro g m m in g , a m e th o d o lo g y s u p p o r t O b je c t O rie n te d P ro g r a m m in g to resolve t h e c r o s s c u tti n g c o n c e rn s • S tu d y U M L S p e c ific a tio n , es p e c ia lly T im i n g D ia g r a m s , a new d ia g m of UML2 • P ro p o se a n a p p r o a c h to ch eck in g th e tim in g c o n s tr a in ts o f s o ftw a re s y s te m u sirg A O P • Desi gn s o m e c a s e s t u d i e s t o i l l u s t r a t e a p p r o a c h e s • B u i d a to o l for c h e c k i n g a u t o m a t i c a l l y t h e t i m i n g c o n s t r a i n t s o f s o f t w a r e s y s terns 1.3 C o n trib u tio n s T h e m a i n c o n t r i b u t i o n o f t h i s t h e s is is p r o p o s i n g a n a p p r o a c h t o c h e c k t h e e x e c u t i o n o f t a s k s in J a v a w i t h t h e i r t i m i n g c o n s t r a i n t s T h is a p p ro a c h ca n b e s u m m a riz e d b y f o llo w in g s t e p s • S p ecify in g th e tim in g c o n s tr a in ts of ta s k s u sin g U M L T i m i n g D ia g r a m • A p p ly in g A s p e c t O rie n te d P r o g r a m m in g to c a lc u la te e x e c u tio n tim e o f ta sk s; usin g A s p e c tJ , a n a s p e c t o r ie n te d e x te n s io n for t h e J a v a p r o g r a m m i n g la n guage • R u n tim e w eav in g th e A sp e c t J c o d e in to th e s o ftw a re s y s te m a n d ch ec k in g w h e t h e r it s a t i s f i e s t i m i n g c o n s t r a i n t In a d d t i o n , w e h a v e b u i l t a s u p p o r t t o o l t o c h e c k t i m i n g c o n f o r m a n c e b e t w e e n sp e cific atio n a n d im p l e m e n ta tio n a u to m a tic a lly W e h a v e a lso d e v e lo p e d s o m e ca se stu d ie s to illu s tra te t h e a p p ro a c h 1.4 O u tlin e o f th e th esis T h e r e m a i n d e r o f t h i s t h e s i s c o n s i s t s of: C h a p t e r • C h a p te r B ackground I n t r o d u c t i o n T h i s c h a p t e r i n t r o d u c e s s o m e b a s i c c o n c e p t s of A s p e c t O rie n te d P ro g r a m m in g (A O P ) a n d U M L T im in g D ia g m s - o n e of n ew d ia g m ty p e s of U M L • C h a p t e r - P r o p o s e d a p p r o a c h o f c h e c k i n g t i m i n g c o n s t r a i n t s In t h e la st o f th is c h a p t e r w e p re se n t tw o ca se s tu d ie s to illu s tra te t h e a p p r o a c h • C h a p te r - Im p le m en ta tio n W e show th e a rc h ite c tu re o f o u r to o l b a s e d on t h e a p p r o a c h in c h a p t e r a n d s o m e d i f f i c u l t i e s w h e n w e i m p l e m e n t t h i s t o o l S o m e e x p e r i m e n t a l r e s u l t s a n d e v a l u a t i o n a r e a lso p r e s e n t e d • C h a p t e r - R e la te d w ork C h a p t er d isc u sse s so m e r e la te d w orks W e a n a ly z e t h e a d v a n t a g e s a n d d isa v an t ages of e a c h w ork • C h a p t e r - C o n c lu sio n a n d p ersp e ctiv e T h is c h a p te r sh o w s th e c o n clu sio n of t h e t h e s i s a n d s o m e f u tu r e w orks C h a p t e r B a c k g r o u n d T h is c h a p t e r g iv e s s o m e c o n c e p ts of t i m e a n d tim in g c o n s tr a in t F o llo w in g a n o v e r v i e w a b o u t t h e I JML T i m i n g D i a g r a m t h a t b e u s t'd t o s p e c i f y t i m i n g c o n s t r a i n t in t h e p r o p o s e d a p p r o a c h A f t e r t h a t , w e i n t r o d u c e A s p e c t - o r i e n t e d p r o g r a m m i n g , a p r o g r a m m i n g p a r a d i g m th a t in c re a se s m o d u l a r i t y by e n a b l i n g im p r o v e d s e p a r a ti o n o f c o n c e rn s a n d A s p e c t.) a sim p le a n d p c tic a l a s p e c t-o rie n te d e x te n sio n to Java 2.1 U M L a n d U M L T im in g D iag ram 2.1.1 O verview of UML T h e U n i f i e d M o d e l i n g L a n g u a g e ( U M L ) is a s t a n d a r d f r o m t h e O b j e c t M a n a g e m e n t G r o u p ( O M G ) p r o p o s e d as a se m i-fo rm a l sp e c ific a tio n l a n g u a g e for o b j e c t o r ie n te d s p e c i f i c a t i o n a n d d e s i g n U M L c o n t a i n s s e v e r a l d i f f e r e n t d i a g r a m t y p e s , for e x a m ple S t a t e D ia g r a m , C o lla b o r a tio n D ia g r a m , S e q u e n c e D ia g r a m , C la s s D ia g r a m a n d o t h e r s I f U M L 1.x h a s d i a g r a m t y p e s U M L e x p a n d s t o 13 d i a g r a m t y p e s It is d i v i d e d i n t o t w o g r o u p s : s t r u c t u r e d i a g r a m s a n d b e h a v i o r d i a g r a m s F i g u r e 2.1 s h o w s t h e U M L a n d c h a n g e s f r o m t h e U M L 1.5 ( S h i & T o r n g r e n , 0 ) It s h o w s t w o m a i n p a r t s o f U M L 2.0: s t a t i c p a r t ( S t r u c t u r a l D i a g r a m s ) a n d d y n a m ic p a rt (B eh a v io ral D iag m s) • S tr i u c tu r a l D ia g r a m s sh o w t h e b u ild in g b lo c k s of s y s t e m , fe a tu re s t h a t d o not c h a n g e w i t h t i m e S t r u c t u r a l D i a g r a m s c o n s is t of d i a g r a m s : C l a s s D i a g r a m , O b je c t D ia g r a m P a c k a g e D ia g r a m , C o m p o s ite S t r u c t u r e D ia g r a m , D ep lo y m em t D iag m C o m p o n e n t D iag m C h a p t e r B a c k g r o u n d F i g u r e 2.1: U M L D i a g r a m s • B eh av io ral D ia g m s c o n sist of d iag ram s: A c tiv ity D ia g m , S ta te M a c h in e D ia g m , U se C a s e D ia g r a m , I n te r a c tio n O v e rv ie w D ia g r a m , S e q u e n c e D ia g m , T im in g D ia g m a n d C o m m u n ic a tio n D iag m S o m e w o rk s (C h o n o le s from B e h a v io l D ia g m s & S c h a rd t, 2003) s e p a te In te c tio n d ia g m gro u p If B e h a v i o r a l D i a g r a m s s h o w h o w s y s t e m r e s p o n d s t o r e q u e s ts o r o th e r w is e evolves o v er tim e I n te r a c tio n D ia g r a m s d e p ic t t h e e x c h a n g e o f m e s s a g e s w i t h i n a c o l l a b o r a t io n e n r o u t e t o a c c o m p l i s h i n g i t s g o a l 2.1.2 U M L T im in g D iag ram T i m i n g D i a g r a m is o n e o f t h e n e w d i a g r a m t y p e s a d d e d t o U M L a l t h o u g h t h e y h a v e b e e n o n e o f th e core d ia g m s w ith in th e h a r d w a r e d esig n a n d r e a l-tim e c o m m u n itie s for d e c a d e s It is b a s e d o n h a r d w a r e t i m i n g d i a g r a m o r i g i n a l l y d e v e l o p e d by electrical en g in eers I t is a s p e c if ic t y p e o f i n t e r a c t i o n d i a g r a m It is u s e d t o e x p lo re th e b e h a v io rs of o n e or m o re o b je c ts th ro u g h o u t a g iv en p e rio d of tim e s (A k e rh o lm et al 2006) T i m i n g D i a g r a m s h o w s t h e c h a n g e o f o b j e c t ’s s t a t e in a g i v e n t i m e p e r i o d e m p h a s i z i n g t h e t i m i n g c o n s t r a i n t s A l s o it s h o w s m e s s a g e s w h i c h m o d i f y t h a t s t a t e , l i m i n g d i a g r a m is o f t e n u s e d t o d e s i g n e m b e d d e d s o f t w a r e , s u c h T h e a r c h i t e c t u r e o f t h e s u p p o r t 3 t o o l p r e s e n t e d in t h e f ir s t b lo c k T h e p a r t in r ig h t h a n d h e l p u s t o k n o w t h e p r o c e s s o f s t a n d a r d J a v a a p p l i c a t i o n N o r m a l l y a J a v a A p p l i c a t i o n ( r e p r e s e n t e d in t h e first b l o c k ) is c o m p i l e d in t h e s e c o n d b lo ck ( J a v a c o m p ile r) T h e r e s u l t is t h e J a v a b y t e c o d e T h e e x e c u t i o n a l lo w s u s receiv e th e resu lts I n t h e i n t e r e s t i n g J a v a a p p l i c a t i o n s ( in first b l o c k ) w e d e t e r m i n e c e r t a i n v a r i a b l e s c o n c ern in g tim in g c o n stra in ts T h e s e tim e s t a m p s c o rre s p o n d in g to th e se v ariab les a r e d e n o t e d ( t v l4 t \ r2, -••, t v m ) I report ^_ Violation F i g u r e 4.1: T h e g e n e r a l c h e c k i n g p r o c e s s J a v a c o m p i l e r p r o v i d e s J a v a b y t e c o d e t o p r e s e n t t h e s e v a r i a b l e s a s w e e x p c c t It m e a n s t h e tim in g c o n s tr a in ts a r e rea lize d B u t t h e p r o b l e m h e r e b y is w h e t h e r t h e c o n s t r a i n t s a r e v a lid I n t h e f ig u r e 1.1 t w o p a r t s a r e c o m b i n e d t o a n o v e r a l l c h e c k i n g p r o c e s s • T h e t i m i n g c o n s t r a i n t in t h e s p e c i f i c a t i o n is a s s i g n e d t o 1, t 2, , t n ; • T h e t i m e w h i c h is o b s e r v e d in r u n n i n is a s s i g n e d t o t v i , t v 2, , t v m W e s e e t h a t t h e f ir s t b l o c k o f t h e le ft p a r t ( U M L S p e c i f i c a t i o n ) c o n n e c t s t o t h e f irs t b l o c k o f t h e r i g h t ( J a v a a p p l i c a t i o n ) b y t h e i m p l i c i t lin e w i t h t h e m e a n i n g o f t h e i m p l e m e n t a t i o n T h e p r o c e s s o f i m p l e m e n t a t i o n n e e d s m — n It m e a n s t h e t i m i n g s p e c i f i c a t i o n in t h e first s c h e m a is c o r r e s p o n d i n g t o t h e t i m i n g s p e c i f i c a t i o n in t h e second O t h e r w i s e t h e c o n s t r a i n t s is b a s e d o n t h e s a m e f e a t u r e s in t w o s c h e m a s W e a r e a b l e t o u n i f y t z a n d t v , w i t h all i - , n C h a p t e r I m p l e m e n t a t i o n The timing constraints from the first schema — © — © © — © - © ©■ The time concerning to events from the second schema F i g u r e 1.2: T h e t i m e s t a m p s of t w o p a r t s T h e b l o c k n a m e d R u n t i m e w e a v i n g is e x e c u t e d u n d e r s o m e a s s u m p t i o n s : • It r e c e i v e s t i m i n g c o n s t r a i n t s in s p e c i f i c a t i o n t\, t 2, , t n fro m A sp ec t.) co d e o f t h e f ir s t s c h e m a • It receiv es in f o rm a tio n from th e e v e n ts c o n c e rn in g t\ t-2, tn T h i s b l o c k ( R u n t im e w e a v i n g ) c o m p a r e s t h e t i m i n g c o n s t r a i n t s in s p e c i f i c a t i o n a n d t i m e in r u n n i n g succesfu lly If t i m e in r u n n i n g s a t i s f i e s the* c o n s t r a i n t s , t h e p r o g r a m r u n s I f n o t , t h e p r o g r a m ( i m p l e m e n t a t i o n p a r t ) v i o l a t e s t h e c o n s t r a i n t s in t h e s p e c if ic a tio n a n d we receive th e v io la tio n re p o rt j Violation report I F i g u r e 4.3: T h e a r c h i t e c t u r e o f p r o p o s a l t o o l T h e a r c h i t e c t u r e o f t h e s u p p o r t t o o l T h e g e n e r a l c h e e k i n g p r o c e s s is d e s c r i b e d a b o v e p o s a l to o i a s t h e F i g u r e 4.3 In d e t a i l , w e i m p l e m e n t p r o In t h i s f ig u r e , t h e p a r t s w e h a v e i m p l e m e n t e d art' m a r k e d in d o t t e d e c lip s e s • I n s p e c i f i c a t i o n d o c u m e n t s , t a s k s in t h e p r o g r a m h a v e b e e n c o n s t r a i n e d u s i n g U M L T im in g D iag m s • W e p r e s e n t t h e T i m i n g D i a g r a m in a s u p p o r t t o o l I n t h i s c a s e w e u s e V i s u a l P arad ig m • U s i n g V i s u a l P a r a d i g m , w e t r a n s f o r m T i m i n g D i a g r a m t o X M L file • W e im p le m e n t a X M L r e a d e r to rea d tim in g c o n s tr a in ts of ta sk s • W e d e f i n e r u l e s e n a b l i n g t o g e n e r a t e a s p e c t c o d e in A s p e c t , ] c o n t a i n i n g t i m i n g c o n s tr a in ts of ta sk s • A s p e c t s , c o n t a i n i n g t i m i n g c o n s t r a i n t s a n d c a p a b i l i t y o f get t i n g t i m e e x e c u t i o n o f th e m e th o d s , are th e n w oven to th e J a v a a p p lic a tio n by A sp ec t J co m p ile r t o g e t t h e fin a l p r o g r a m • W h e n t h e final p r o g r a m is r u n n i n g , t h e w o v e n c o d e s c a n d e t e c t w h e t h e r t h e e x e c u tio n tim e of a scen ario s v io late th e ir tim in g c o n s tra in ts W e c o n c e n t r a t e o n i m p l e m e n t i n g X M L r e a d e r a r id a s p e c t s in A s p e c t J T h e g e n e r a t e d a s p e c ts c a n e x tr a c t tim in g c o n s tra in ts from U M L T im in g D ia g m s a n d m e a su re t i m i n g e x e c u t io n o f m e t h o d s in t h e a p p l i c a t i o n O t h e r p h a s e s h a v e b e e n s u p p o r t e d by J a v a a n d A s p e c tJ co m p ile rs N o te t h a t , th e g e n e r a te d a s p e c t d o e s not affect t h e ta s k s e x e c u tio n tim e o f th e J a v a a p p l i c a t i o n s S i n c e t h e n ' is n o s t a t e m e n t s a f f e c t e d b y t h e a s p e c t F u r t h e r m o r e o u r ch e ck in g a p p ro a c h d o es n o t re q u ire p ro g m m e rs to d o a n y th in g w ith th e ir program s T h e J a v a c h e c k e d a p p l i c a t i o n c a n b e g i v e n in s o u r c e c o d e o r c o m p i l e d c o d e a n d t h e w e a v i n g p r o c e s s c a n b e d o n e at c o m p i l e t i m e o r l o a d t i m e a s s u p p o r t e d by A sp ec tJ C h a p i t e r O b stacles in t h e im p lem en tatio n I m p l e m e n t a t i o n of support to o l 4.2.1 D ifficulties in r e a d i n g t i m in g c o n s t r a i n t f ro m t h e T i m ing D i a g r a m R e a d i n g t i m i n g c o n s t r a i n t f r o m t h e T i m i n g D i a g r a m is d i f f i c u l t t a s k b e c a u s e w e h a v e t o b u i l d a s m a l l t o o l for d r a w d i a g r a m a n d r e a d it W e f o u n d s o m e a v a i l a b l e to o ls for d r a w T i m i n g D i a g r a m W e c h o s e V i s u a l P a r a d i g m I n T i m i n g D i a g r a m s w e d escrib e th e tim e of each ta sk So we know tim in g c o n s tra in ts o f each ta s k a n d each ta sk a t t a c h e d to its e x e c u tio n tim e A fter th a t, we e x p o rt th is T im in g D iag m s in to a X M L file O u r t a s k n o w is r e a d i n g t i m i n g c o n s t r a i n t f r o m t h e X M L file W e r e a d t h e t a s k n a m e a n d i t s e x e c u t i o n t i m e f r o m X M L file, f r o m t h e r e w e h a v e i n f o r m a t i o n a b o u t tim in g c o n s tra in t R e t u r n i n g t o t h e A i r - p l a n e c a s e st u d y H e r e is s o m e d e t a i l s in t h e c o n t e n t o f X M L file It s h o w s t h e s t r u c t u r e o f t h e X M L file A X M L file e x p o r t e d f r o m t h e V i s u a l I ’a r a d i g m has m a n y p a r ts a n d in fo rm atio n s, b u t we p a y a tte n tio n to im p o r ta n t i n f o r m a t i o n s t o a c h i e v e e s s e n t i a l i n f o r m a t i o n for t h e t i m e o f e a c h t a s k (lie h a s t w o p a r t s : Models and Diagrams In t h e p a r t Models A XML E a c h c o m p o n e n t ’s p r o g r e s s is a L i f e l i n e H e r e is a L if e li n e o f F u e l: < Model, c o m p o site ~ "true" consider Default P roperties—’'false ” displayM odel Type - ” Lifeline ” id " T n 5q tfiF S-yyyR tjl ” m odelType- Life Line ” n a m e - " Fuel" > - < ModelPrope rt ies > < String P ro perty display N a m e - "N a m e " n a m e - "n a m e" value— ’' Fuel" / > < / Mod el Pi ope i i i es > W c p a y a t t e n t i o n o n t h e I D o f e a c h L if e li n e a n d o t h e r e l e m e n t s o f t h e X M L file I n t h i s c a s e i t is " T n S q e f i F S g y g R g l Time Unit and State Condition O th e r e le m e n ts w h ich we p ay a t t e n t i o n a re S ta te C o n d itio n re p re se n ts a ta s k of a n o b je ct H e r e is a s m a l l p i e c e in X M L file d e s c r i b i n g S t a t e C o n d i t i o n Fuel charging of o b je ct Fuel: < Model composite - "truey consider Default Properties = ”false” display ModelType — State Condition ' i d = ”X q e f i F S g y g R ia ” niudelType = ”StateCondition” name = "Fuel charging"> O b s t a c l e s T h e node i n t h e i m p l e m e n t a t i o n Fuel charging o f s u p p o r t t o o l Fuel Time Unit is a c h i l d n o d e o f rep rese n ts a tim e p o i n t H e r e is a p ie c e d e s c r i b i n g a T i m e U n it a t t i m e p o i n t s e c o n d < Model composite- "true" consider DefaultProperties- "false" display Model Type ”Time Unit" i d = ”M e P q e fiF S g y g R i h ’1 rnodt IType- Time Unit" name- ’0 V> W e r e t r i e v e tw o I D o f a T i m e U n i t a n d a S t a t e C o n d i t i o n T h e r e l a t i o n b e t w e e n T i m e U n i t a n d S t a t e C o n d i t i o n e x p r e s s e s in a Time Instance < Model composite="true” considerDefaultProperties—”false” display ModelType=”Time In stance ” id-~ ”MePqefiFS-gygRii" modelType - "TimeInstance” name - ” ”> < > < ModdRc¡Property display Name = ” T ime ¡Jn i t " name —”time Unit, ”> < Mode IRef i d = ”M e P q e fiF S g y g R i h ” /> < / ModelRefProperty> < Model Ref i d = ”X q e f i F S g y g R i a ” /> < /ModelRefProperty> We c o n c lu d e th a t th e Fuel c h a rg in g s ta r t s from se co n d T im e In s ta n c e an d know th a t th e S ta te C o n d itio n ch an g ed to W e c h a n g e to next Fuel charged a t th s e c o n d S o in the* s p e c i f i c a t i o n t h e F u e l c h a r g i n g t a k e s p l a c e in s e c o n d s F i g u r e is a p i c c c o f J a v a c o d c t o r e a d t h e i n f o r m a t i o n f r o m t h e X M L file r e p re s e n tin g th e U M L T im in g D iag ram : In th is piece of c o d e , t wo a r r a y s task Nanie2 and time UnitNarne2 k e e p s all in f o r m a t i o n a b o u t S t a t e C o n d i t i o n a n d T i m e U n i t in a ll T i m e I n s t a n c e c h a n g e to th e n ex t elem e n t of taskNarneS, W h e n we if w e s e e c h a n g e s ( l i n e 5) w e a s s i g n v a l u e o f ta s k N a m e to ta s k N a m e S a n d c a lc u la te th e tim e d u r a ti o n of th is ta s k b etw e e n la s t t i m e p o i n t a n d c u r r e n t t i m e p o i n t T h e s e t i m e d u r a t i o n s a r e k e p t in a r r a y tirneVal W e h a v e n a m e o f t a s k in taskNameS 2 A s p e c tJ c o d e for ch ec k in g tim in g c o n s tra in ts a n d i t s t i m i n g c o n s t r a i n t in timeVal R e t u r n t o t h e A T M C a s e S t u d y t i m i n g c o n s t r a i n t s in t h i s c a s e s t u d y is w r i t t e n b y A s p e c t J l a n g u a g e a n d t h e n c o m b i n i n g t h e m w i t h t h e g e n e r a t e d a s p e c t in F i g u r e , w e c a n ch eck th e c o n fo rm ity b etw e en th e im p le m e n ta tio n a n d th e tim in g c o n s tra in t sp e cific atio n I n th is a s p e c t, we d efin e tw o m e th o d s getMiriConstraint(String methodNarne) a n d C h a p t e r I m p l e m e n t a t i o n (1) for (i - 0: i CvalucArrLen; i f f){ (2) Systein.out.printing* Name of task: ” taskNamo2[i] ’’ tim e point: M -f timeUnit.Name2[i)): (3) temp taskName2[i); (4) if (i> ){ (5) if ( (!taskName2[i).equals(taskName2|i-l])) ){ (6) if (Integer.parseInt(tiineUnitName2[i]) > Integei parseInt(tim eUnitiNaine2[i-l])){ (7) taskName3[i3l taskName2[i-l]: (8) timeVal[i3| Integei parscInt(timeUnitNam c2[ij) - Integer.parsoInt(tim f) log(this.JoinPoint); } | vo id lay (Join Point jp){ System.out println(jp.getSourceLocation()-f jp.getSignatureO); F i g u r e 5: G e n e r a t e d V e r i f i c a t i o n A s p e c t s • th e tim in g c o n s tra in t of so m e se q u e n tia l ta sk s • t h e e x e c u tio n o rd e r of task s T h e v i o l a t e o f t i m i n g c o n s t r a i n t s o f t h e t a s k s in c a s e s t u d i e s is i n f o r m e d e x a c t l y T h e s o u r c e c o d e o f s o f t w a r e s y s t e m is s i m u l a t i o n If w e i n c r e a s e t h e e x e c u t i o n t i m e o v e r c o m e t h e c o n s t r a i n t , it will r e t u r n t h e v i o l a t e r e p o r t T h i s r e s u l t s h o w s t h a t t h e p r o p o s e d a p p r o a c h is s u i t a b l e fo r t h e s y s t e m s like s y s t e m s in c a s e s t u d y H o w e v e r , it is n o t b e a b l e t o d e t e c t t i m i n g c o n s t r a i n t s o f t a s k s in s o m e m o r e c o m p lic a te d in stan c es S um m ary T h is c h a p te r p rese n ts th e a rc h ite c tu re of s u p p o rt to o l a n d som e o b stacles w hen i m p l e m e n t i n g to o l F r o m t h e a r c h i t e c t u r e , w e i m p l e m e n t t h e p r o p o s a l t o o l w h ic h C h a p t e r I m p l e m e n t a t i o n is b a s e d o n X M L r e a d e r a n d A s p e c t J c o d e It c o m b i n e s w i t h s o m e o t h e r t o o l s like V isu a l P a rad ig m : J a v a co m p ile r: A s p e c tJ co m p ile r of t i m i n g co n stra in t to d e te c t th e co n fo rm an c e W e a p p l y t h e t o o l for t h e c a s e s t u d i e s a n d h a v e s o m e g o o d resu lts T h e n e x t c h a p t e r w ill p r e s e n t s o m e w o r k s c o n c e r n i n g t h e c h e c k i n g t i m i n g c o n s t r a i n t s o f a system C h a p t e r R e l a t e d W o r k C o n c e rn in g th e w ork of ch ecking tim in g c o n s tra in ts , th e r e a r e so m e w o rk s deal w ith th is T h i s t h e s i s is p a r t l y s u c c e e d e d s o m e i d e a s o f o t h e r w o r k s S t u d y i n g p r e v i o u s w o r k s is n e c e s s a r y W e s t u d y in t h r e e fields: • B u i l d i n g a s e t o f t o o l a n d m e t h o d s for c h e c k i n g • B u i l d i n g f o r m a l f a c i l i t i e s fo r c h e c k i n g • C h e c k i n g a n d e v a l u a t i n g in s o m e r e a l - t i m e s y s t e m s 5.1 B u ild in g a se t o f to o l a n d m e t h o d s for c h e c k in g A m o n et al ( A m o n e t a l., 9 ) p r e s e n t e d a n o v e l s e t o f t o o l s for p e r f o r m i n g s y m b o l i c t i m i n g v e r i f i c a t i o n o f t i m i n g d i a g r a m s T h e t o o l s a r e m u l t i - p u r p o s e w i t h u s e s in v e r ification d e r iv a tio n o f s y n th e s is c o n s tr a in ts , a n d d e s ig n e v a lu a tio n T h e m e th o d o l o g y o f t h i s w o r k is b a s e d o n u s i n g t e c h n i q u e s fo r m a n i p u l a t i n g P r e s b u r g e r f o r m u l a s U sin g th e s e fo rm u la s, th e y d e te r m in e w h e th e r th e d e la y s a n d g u a r a n te e s of a n im p l e m e n t a t i o n s a t i s f y c o n s t r a i n t s s p e c i f i e d a s a T i m i n g D i a g r a m T h e s e t o o l s a llo w efficient, v e r i f i c a t i o n d i r e c t l y f r o m t h e t i m i n g d i a g r a m H ow ever, th is w ork ca n n o t v e r if y t h e m a x i m u m / m i n i m u m s e p a r a t i o n t i m i n g c o n s t r a i n t s a n d t h e a l g o r i t h m for v e r i f y i n g t h e P r e s b u r g e r f o r m u l a s is m u l t i - e x p o n e n t i a l O u r p r o p o s a l t o o l c a n c h e c k th e m a x im u m /m in im u m s e p a tio n tim in g co n stra in t In ( D y m e k & K o t u l s k i *2008) p r o p o s e d a m e t h o d o f u s i n g T i m i n g D i a g r a m t o e s t i m a t e t h e o v e r l o a d i n g o f b o u n d a r y e l e m e n t s o f t h e s y s t e m in t h e e a r l i e s t p o s s i b l e 42 C h a p t e r R e la te d W o rk s ta g e o f system d e s ig n in g based on th e Use Case d ia g m a n d som e a d d itio n a l in fo rm a ttio n co n ce rn in g th e b e h a v io r o f th e user o f fu tu re syste m T h e a im o f th is w o rk is to p o i n t o u t t i e p o s s ib ility o f u sin g th e T im in g D ia g m to d e s c rib e user's b e h a v io r at tth e fir s t s ta je o f t he syste m m o d e lin g : th e d o c u m e n ta tio n o f u s e r’s re q u ire m e n ts A d d in g a new d a ta d e s c rib in g user's tim e a c tiv it y c h a c te ris tic expressed b y th e U M 1L T im in g D ia g m , it is able to e s tim a te th e o v e rlo a d in g o f th e b o u n d a ry Use Casses, it uses some e s tim a tio n s fo r th e w o rk lo a d and s y s te m w o rk lo a d T h e p re s e n te d a rith m e tic o f T im in g D ia g m s in th e a rtic le o f u s in g o n ly one ty p e o f U M L d ia g r a m s (Use Cases) is n o t enough fo r d e ta il c a lc u la tio n o f th e s y s te m e ffe c tiv e n e ss H o w e ve r it is s im p le and th e e v a lu a tio n is m ade 011 th e e a rlie s t level o f s y ste m d e v e lo p m e n t, n o t in ru n -tim e B u ild in g f o r m a l f a c ilit ie s fo r c h e c k in g D illlo n e t.a l ( D illo n et a l., 1993) p ro p o se d a te c h n iq u e and a p ro to ty p e to o l w h ic h d e s c r ib e te m p o l logics o f a c o n c u rre n t system s b e h a v io rs b y u s in g g p h ic a l n o t a t io n s I t s u p p o rts fo rm a l s p e c ific a tio n and v e rific a tio n o f c o n c u rre n t s o ftw a re systtcm s T h e o b je c tiv e o f th is a rtic le is to enable s o ftw a re e n g in e e rs to s p e c ify and reasson a b o u t te m p o l p ro p e rtie s o f c o n c u rre n t system s m o re e a s ily by p ro v id in g th e irn w it h a log ic th a t has an in t u itiv e g p h ic a l re p re s e n ta tio n and w it h to o ls th a t s u p > p o rt its use T h e researchers raise an e le v a to r system as a case s tu d y in e x p lo rin g th e to o l H owever, th e g p h ic a l n o ta tio n s w h ic h are used to te m p o l lo g ics are miKch c o m p lic a te d M o re o v e r, th e to o l does not s u p p o rt id e n tify in g tim e c o n s tra in ts a lo m g th e system S A C R E S (B e n v e n is te e t a l., 1998) is a v e rific a tio n e n v iro n m e n t fo r e m b e d d e d s ystte m s th a t a llo w s user to g p h ic a lly sp ecify p ro p e rtie s as S y m b o lic T im in g D i a g r a m s Designs are tra n s la te d in to fin it e s ta te m achines w h ic h are o p tim iz e d and th e m v e rifie d by s y m b o lic m o d e l ch e ckin g T h e a dva nta g e in th is w o rk is th a t th e ir a p p r o a c h can v e rify large, c o m p le x syste m s H ow ever th is w o r k focused o n ly d e siig n levels b u t not a t th e im p le m e n ta tio n level as in o u r a p p ro a c h 011 th e C h e c k i n g a n d e v a l u a t i n g in s o m e r e a l - t i m e s y s t e m s C h e c k in g and e v a lu a tin g in som e 43 r e a l-tim e sy ste m s (W egener & G ro c h tm a n n , 1998) p ro p o s e d an a p p ro a c h fo r v e rify in g tim in g co n s tra in ts o f R e a l-T im e S ystem s b y m eans o f e v o lu tio n a r y te s tin g In th is p a p e r, a v io la tio n o f t im in g c o n s tra in ts m eans t h a t o u u ts are p ro d u c e d to o e a rly , o r th e ir c o m p u ta tio n ta ke s to o lo n g T h e ta s k o f th e te s te r th e re fo re is to fin d th e in p u t s itu a tio n s w ith th e lo n g e st o r s h o rte s t e x e c u tio n tim e s , in o rd e r to check w h e th e r th e y p ro d u c e a te m p o r a l e rro r I f th e search fo r such in p u ts is in te rp re te d as a p ro b le m o f o p tim iz a tio n , e v o lu tio n a r y c o m p u ta tio n ca n be used to a u to m a tic a lly fin d th e in p u ts w ith th e longest o r s h o rte s t e x e c u tio n tim e s T h is a u to m a tic search fo r a c c u te te s t d a ta b y m eans o f e v o lu tio n a r y c o m p u ta tio n is c a lle d e v o lu tio n a ry te s tin g T h is te s tin g a p p ro a c h d iffe rs fro m o u rs w h ic h use A O P to a u to m a tic a lly check w ith t im in g c o n s tra in t s p e c ific a tio n B e side , th is approac h a n d o u rs m a y be c o m b in e d to b e co m e an e ffic ie n tly ch e ckin g (G u o fc Lee, 2007) p ro p o se d a c o m p o s itio n a l a p p ro a c h to s p e c ify in g a n d v e rify in g tim in g re q u ire m e n ts fo r r e a l-tim e s y ste m s in a s y s te m a tic m a n n e r T h e y s p e c ify b o th re q u ire m e n ts a n d s p e c ific a tio n o f a s y s te m u s in g M o d u la r T E R n ets, an e x te n s io n o f T E R n ets, to s u p p o r t t im in g a n a ly s is in a c o m p o s itio n a l wav H ow e ve r, th is p a p e r can o n ly check t im in g a n o m a lie s in re q u ire m e n ts and th e s p e c ific a tio n m o d e l usin g th e in c re m e n ta lly c o m p o s itio n b u t n o t check th e c o m p lia n c e b e tw e e n r u n -tim e ta sks a n d t im in g c o n s tr a in t s p e c ific a tio n ( M o k & L iu , 1997) is also d e te c ts th e t im in g c o n s tra in ts v io la tio n a t ru n tim e T h e y sh ow t h a t a t im in g v io la tio n can be c a u g h t as e a rly as p o ssib le b y d e riv in g a n d m o n ito r in g a m in im u m set o f t im in g c o n s tra in ts fro m th e t im in g c o n s tra in t s p e c ific a tio n O n ly O ( n ) tim e is needed in th e w o rs t ease fo r c h e c k in g a t each check p o in t T h e y in v e s tig a te th e a lg o r ith m ic p ro b le m s in v o lv e d in th e d e te c tio n o f a tim in g c o n s tr a in t v io la tio n a t th e e a rlie s t p o s s ib le tim e B y c o m p ilin g th e tim in g c o n s tr a in t s p e c ific a tio n s , r u n - tim e m o n ito r in g can be p e rfo rm e d e ffic ie n tly w ith low o ve rh e a d T h e m e m o ry re q u ire m e n t fo r th is m o n ito r in g a lg o r ith m is b o u n d e d and an u p p e r b o u n d ca n be d e te rm in e d a t c o m p ile tim e T h e a p p ro a c h in th is w o rk m e n tio n s o n ly th e t im in g c o n s tr a in t in s p e c ific a tio n fo r r u n tim e progress a fte rw a rd s an n o t check th e t im in g c o n s tr a in t a t r u n tim e d ire c tly (C h a p te r C C o n c lu s io n a n d p e r s p e c t iv e In n th e la s t c h a p te r, th e th e sis w o u ld lik e p re s e n t som e c o n c lu d in g re m a rk s T h e n , c e e rta in fu r th e r rese arch is p ro po sed C o n c lu s io n T i l m i n g c o n s tra in ts p la y an im p o r ta n t ro le in re a l-tim e a nd e m b e d d e d syste m s I t e x x is ts som e d iffe re n t w a ys to check th e t im in g c o n s tra in ts o f a s o ftw a re s y s te m In th h is th e sis, we have p ro p o s e d an a p p ro a c h fo r c h e c k in g th e tim in g c o n s tra in ts o f t& a sks in a s o fw a rc s y s te m in Ja va p ro g m s T h e tim in g c o n s tr a in ts are s p e c ifie d b y U M L T im in g D ia g m s a n d th e n tra n s la titc d a u to m a tic a lly t o m o n ito r co de in A s p e c t ! A s a spe cts can m o n ito r th e e xccutid o n o f a p ro g m fr o m o u ts id e so p ro g m m e rs d o n o t need to m o d ify th e source co o d e T h is a p p ro a c h a lso does not e ffe c t to th e e x e c u tio n tim e o f th e checked syste icin Because A s p c c tJ code weaves in th e b e g in n in g a n d th e end o f th e e x e c u tio n c o o d e , so th e y n o t e ffe ct to th e tim e o f e x e c u tio n In b rie f, u s in g th is a p p ro a c h , usiser ca n check th e tim e c o n fo rm a n c e b e tw e e n s p e c ific a tio n a nd im p le m e n ta tio n auto n m a tic a lly T he se a re th e a d v a n ta g e o f th is a p p ro a c h T h is th e sis p e rfo rm s som e a c tiv itie s o f re s e a rc h in g a n d u n d e rs ta n d in g b asic concejepts fo r m o n ito r in g , p rocess c o n tr o llin g a n d p ro g m m in g T h r o u g h th is w 'ork we s h h o w th a t A O P is a n e s s e n tia l a n d fle x ib le p a d ig m fo r c h e c k in g t im in g c o n s tra in t o f f a s o ftw a re s y s te m , e s p e c ia lly s o ftw a re s y s te m w r it t e n b y Java T w o case s tu d ie s a re d e v e lo p e d to illu s tr a te o u r a p p ro a c h O n e is a p p lic a tio n in A T M s y s te m , p u b lis h e d in ( T r in h e t a l., 2009a) a n d a n o th e r c o n c e rn in g to a process 44 6.2 F u r t h e r o f a irp la n e r e s e a r c h 45 O u r s u p p o r t to o l a p p lie d to case s tu d ie s a n d a c h ie v e d e x a c t re s u lts w h e n it n o tifie s t h a t s o ftw a re s y s te m s a tis fie s o r n o t e x a c tly O u r a p p ro a c h re m a in s som e lim ita tio n s F ir s tly , i t uses A s p e c tJ fo r b u ild in g aspe cts o f c h e c k in g t im in g c o n s tr a in ts , so it ca n be used w it h s o ftw a re s y s te m w r it t e n in Java S e co n d ly, e x p e rim e n ts are p e rfo rm e d in s c e n a rio s o f case s tu d ie s These cases are s t i l l s im p le F u r th e r r e se a r c h In th e fu tu re , w it h th e a d v a n ta g e s o f th is a p p ro a c h , w e p la n to re a liz e these w o rk s • P e r fo r m in g m o re e x p e rim e n ts so th a t th is a p p ro a c h ca n be a p p lie d in re a lity • In te g r a tin g o u r s u p p o r t to o l in to o th e r s u p p o r tin g m o d e lin g to o l • A p p ly th is a p p ro a c h in o th e r la n g u a g e s th a n Ja va • M a k in g a c o m p a ris o n a J a v a -b a s e d s o lu tio n to th e o th e rs fo r h a v in g a re m a rk s on e ffe c t a n d c o m p le x ity o f s o lu tio n s • T h e p ro g r a m o n J a va p re s e n te d in th e th e s is ca n b e e m b e d d e d in o th e r s o ftw a re fo r c h e c k in g t im in g c o n s tra in ts • D e v e lo p th is a p p ro a c h fo r m o re c o m p lic a te d a n d la rg e r s y s te m s to k n o w its e ffe c tiv e B ib lio g r a p h y A k k & e rh o lm , M , C rn k o v ic , I., & e t al (2 0 ) In tr o d u c tio n fo r u s in g U M L M a la rd a le n lU U n iversity, 2006 A rm n o n , T , B o r rie llo , G , H u , T , & L iu , J (19 97 ) f tim in g d ia g m s u sin g p re s b u rg e r fo rm u la s (C( co nfe re n c e on d e s ig n a u t o m a t i o n , S y m b o lic t im in g v e rific a tio n P roceedings o f the 34th a n n u a l 9 A m d d r e i S., C h in , W - N , & R in a rd M (2 0 ) In c re m e n ta l v e rific a tio n o f tim in g c c a o n s tra in ts fo r r e a l- tim e syste m s I E E E R eal T i m e arid E m b e d d e d Tech n o lo g y a n d /,4 A p p lic a tio n s S y m p o s i u m , 2004B a ik ld w in , D , & S cra g g , G VV (2 0 ) A gile m o d e l d r iv e n d e v e l o p m e n t w ith U M L Ç Ç D am bridge U n iv e r s ity Press, 2004 B e rn n v e n is te , A , H o le n d e rs k i, L , & e t a l (1 9 ) S a fe ty c r it ic a l e m b e d d e d syste m s dddesign: th e S A C R E S a p p ro a c h , 1998 B e rrtrth o m ie u , B , & D ia z , M (1 9 ) M o d e llin g a nd v e rific a tio n o f tim e d e p e n d e n t ssyyste m s u s in g tim e p e tr i n ets I E E E T r a n s a c tio n o n S o ftw a r e E n g i n e e r i n g , C ln o o n o le s M J , & S c h a rd t, J A (2 0 ) 9 U M L f o r d u m m i e s W ile y P u b lis h in g , Iln n c , 2003 D illlllo n , L K , K u t t y G , E M o s e r, L , P M M e llia r - S m ith , & R a m a k ris h n a , Y S ((1 9 ) A g r a p h ic a l in te r v a l logic f o r s p e c ify in g c o n c u r r e n t s y s t e m s (T e c h n ic a l IR d e p o r t) S a n ta B a rb a , C A 1993 D y /rrm e k , D , & K o tu ls k i L (2 0 ) E s tim a tio n o f s y s te m w o rk lo a d tim e c h a c te ris tic m s is in g U M L t im in g d ia g m s T h ir d I n t e r n a t i o n a l C o n fe r e n c e o n D e p e n d a b ility o f C C u o rn p u te r S y s t e m s , 2008 46 47 B ib lio g p h y E c lip s e o rg (2 0 ) h ttp ://w w w e c lip s e o r g /a s p e c tj E lr a d , T A k s its M , K ic z a le s , G , L ie b e rh e rr K , k O s h e r, II (20 01 ) D is c u s s in g aspects o f A O P C o m m u n i c a t i o n s o f the A C M , O c to b e r 0 G u o , H , k Lee, W ) (20 07 ) C o m p o s itio n a l v e r ific a tio n o f tim in g c o n s tra in ts fo r e m b e d d e d re a l- tim e syste m s P roceed in gs o f th e 6th C o n fe r e n c e o n W S E A S I n t e r n a t i o n a l C o n fe r e n c e o n A p p lie d C o m p u t e r S c ie n c e , 2007 H a m ilto n , K , k M ile s , R (2 0 ) L e a r n in g U M L 2.0 O ’ R e illy P u b lis h e r, 2006 IB M (2 09 ) h t t p : / / p u b lib b o u ld e r ib m c o m / K ic z a le s , G H ils d a le , E k e t al (2 01 ) A n o v e rv ie w o f A s p e c tJ P roceedings o f th e 15th E u r o p e a n C o n fe r e n c e o n O b je c t- O r ie n t e d P r o g r a m m i n g , 2001 L a d d a d , R (2 0 ) A s p e c t J in a c tion M a n n in g P u b lis h e r, 2003 M o k A K , k ru n tim e S h i, J , k L iu , G (1 9 ) E a r ly d e te c tio n o f t im in g c o n s tr a in t v io la tio n a t 18th I E E E R e a l - T i m e S y s t e m s S y m p o s i u m , 1997 A n o v e r v ie w o f U M L a n d b r i e f a s s e s s m e n t f r o m T o rn g re n , M (20 05 ) th e v ie w p o in t o f e m b e d d e d c o n tro l s y s t e m s d e v e lo p m e n t (T e c h n ic a l R e p o rt) R oyal I n s t it u t e o f T e c h n o lo g y , K i l l S to c k h o lm , 2005 T r in h T - B , D o , T - A , T ru o n g , N -T , k N g u y e n V - I I (2 0 a ) c o m p lia n c e o f t im in g c o n s tra in ts in s o ftw a re a p p lic a tio n s C h e c k in g th e I n t e r n a t i o n a l C o n fe r e n c e o n K n o w le d g e a n d S y s t e m s E n g i n e e r i n g , 2009 T r in h , T - B , T ru o n g , A -IL , k N guyen, V -H (2 0 b ) C h e c k in g p ro to c o l- c o n fo rm a n c e in c o m p o n e n t m o d e ls u s in g a s p e ct o rie n te d p ro g m m in g IA S T E P I n t e r n C o n f on A d v a n c e s in C o m p u t e r S c ie n c e a n d E n g in e e r i n g 0 , 150 155, 2009 W e g en er J , k G ro c h tm a n n , M (19 98 ) V e r ify in g t im in g c o n s tra in ts o f re a l-tim e sys te m s b y m ea ns o f e v o lu tio n a r y te s tin g R e a l- t im e S y s t e m s 275 298, 1998