Foundations for the Study

download Foundations for the Study

of 13

Transcript of Foundations for the Study

  • 7/29/2019 Foundations for the Study

    1/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 4 0

    F o u n d a t i o n s f o r t h e S t u d y o f S o f t w a r e A r c h i t e c t u r eDewayne E. Perry

    AT&T Bell Laboratories600 Mountain AvenueMurray Hill, New Jersey [email protected]

    Alexander L. WolfDepartment of Computer ScienceUniversity of ColoradoBoulder, Colorado [email protected]

    (~) 1989 ,1991 ,1992 Dew ayne E. P erry a nd A lexander L. Wolf

    A B S T R A C T

    T h e p u r p o s e o f t h i s p a p e r i s t o b u i ld t h e f o u n d a t i o nf o r s o f t w a r e a r c h i t e c t u r e . W e f i r st d e v e l o p a n i n t u i t i o nf o r s o f t w a r e a r c h i t e c t u r e b y a p p e a l i n g t o s e v e r a l w e l l -e s t a b l i s h e d a r c h i t e c t u r a l d is c i p l in e s . O n t h e b a si s o ft h i s i n t u i t i o n , w e p r e s e n t a m o d e l o f s o f t w a r e a r c h i t e c -t u r e t h a t c o n s is t s o f t h r e e c o m p o n e n t s : e l e m e n t s , f o r m ,a n d r a t i o n a l e . E l e m e n t s a r e e i th e r p r o ce s s i ng , d a t a , o rc o n n e c t i n g e l em e n t s . F o r m i s d e fi n e d i n t e r m s o f t h ep r o p e r t i e s o f, a n d t h e r e l a t i o n s h i p s a m o n g , t h e e l e m e n t s- - t h a t i s , t h e c o n s t r a i n t s o n t h e e l e m e n t s . T h e r a t i o -n a l e p r o v i d e s t h e u n d e r l y i n g b a s i s f o r t h e a r c h i t e c t u r e i nt e r m s o f t h e s y s t e m c o n s t r a in t s , w h i c h m o s t o f t e n d e r i v ef r o m t h e s y s t e m : r eq u ir e m e n ts . W e d i s c us s t h e c o m p o -n e n t s o f t h e m o d e l i n t h e c o n t e x t o f b o t h a r c h i t e c t u r e sa n d a r c h i t e c t u r a l s t y le s a n d p r e s e n t a n e x t e n d e d e x a m -p l e t o i l l u s t r a t e s o m e i m p o r t a n t a r c h i t e c t u r e a n d s t y l ec o n s i d e ra t i o n s. W e c o n c l u d e b y p r e s e n ti n g s o m e o f t h eb e n e f i ts o f o u r a p p r o a c h t o s o f t w a r e a r c h i t e c tu r e , s u m -m a r i z i n g o u r c o n t r i b u t i o n s , a n d r e l a t i n g o u r a p p r o a c ht o o t h e r c u r r e n t w o r k .

    1 I n t r o d u c t i o nSoftware design r e c e iv e d a g r e a t d e a l o f a t t e n t i o n b yr e s e a r c h e r s i n t h e 1 9 7 0 s. T h i s r e s e a r c h a r o s e i n r e s p o n s e

    t o t h e u n i q u e p r o b l e m s o f d e v e l o p i n g l a r g e - s c a l e s o f t -w a r e s y s t e m s f ir s t r e c o g n i z e d i n t h e 1 9 6 0s [5 ]. T h ep r e m i s e o f t h e r e s e a r c h w a s t h a t d e s i g n is a n a c t i v i t ys e p a r a t e f r o m i m p l e m e n t a t i o n , r e q u i r i n g s p ec i a l n o t a -t i o n s , t ech n iq u es : , an d t o o l s [3 , 9 , 1 7] . Th e r esu l t s o ft h i s s o f tw a r e d e s i gn r e s e a r c h h a s n o w b e g u n t o m a k e i n -r o a d s i n t o t h e m a r k e t p l a c e a s c o m p u t e r - a i d e d s o f t w a r ee n g i n e e r i n g ( C A S E ) t o o l s [ 7 ] .

    I n t h e 1 9 80 s , t h e f o c u s o f s o f t w a r e e n g i n e e r i n g r e -s e a r c h m o v e d a w a y f r o m s o f t w a r e d e s i g n s p e c i f ic a l l y a n d

    m o r e t o w a r d i n t e g r a t i n g d e s i g ns a n d t h e d e s i g n p r o c es si n t o t h e b r o a d e r c o n t e x t o f t h e s o f t w a r e p ro c e s s a n di ts m a n a g e m e n t . O n e r e s u l t o f t h i s in t e g r a t i o n w a s t h a tm a n y o f th e n o t a t i o n s a n d t e c h n i q u e s d e v e l o p e d f o r s o f t-w a r e d e s ig n h a v e b e e n a b s o r b e d b y i m p l e m e n t a t i o n l a n -g u a g es . C o n s i d e r , f o r e x a m p l e , t h e c o n c e p t o f s u p p o r t -i n g " p r o g r a m m m i n g - i n - t h e - l a r g e " . T h i s i n t e g r a t i o n h a st e n d e d t o b l u r , i f n o t c o n f u s e , t h e d i s t i n c t i o n b e t w e e nd e s i g n a n d i m p l e m e n t a t i o n .

    T h e 1 9 8 0 s a l s o s a w g r e a t a d v a n c e s i n o u r a b i l i t y t od e s c r ib e a n d a n a l y z e s o f tw a r e s y s t e m s . W e r e f e r h e r e t os u c h t h i n g s a s f o r m a l d e s c r i p t iv e t e c h n i q u e s a n d s o p h i s -t i c a t e d n o t i o n s o f t y p i n g t h a t e n a b l e u s t o r e a s o n m o r ee f f ec t iv e l y a b o u t s o f t w a r e s y s t e m s . F o r e x a m p l e , w e a r ea b l e t o re a s o n a b o u t " c o n s i st e n c y " a n d " i n c o n s i s te n c y "m o r e e f f e c ti v e ly a n d w e a r e a b le t o t a l k a b o u t " t y p ec o n f o r m a n c e " 1 r a t h e r t h a n j u s t " t y p e e q u i v a l e n c e " .

    T h e 1 9 9 0 s , w e b e l i e v e , w i l l b e t h e d e c a d e o f softwarearchitecture. W e u s e t h e t e r m " a r c h i t e c t u r e " , i n c o n -t r a s t t o " d e s i g n " , t o e v o k e n o t i o n s o f c o d i f i c a t i o n , o fa b s t r a c t i o n , o f s t a n d a r d s , o f f o r m a l t r a i n i n g ( o f s o f t-w a r e a r c h i t e c t s ) , a n d o f s t y l e . W h i l e t h e r e h a s b e e ns o m e w o r k i n d e f i n i n g p a r t i c u l a r s o f t w a r e a r c h i t e c t u r e s( e . g . , [ 1 9 , 2 2 ] ) , a n d e v e n s o m e w o r k i n d e v e l o p i n g g e n -e r a l s u p p o r t f o r t h e p r o c e s s o f d e v e lo p i n g a r c h i t e c t u r e s( n o t a b l y S A R A [ 8] ), i t i s t i m e t o r e e x a m i n e t h e r o l e o f a r -c h i t e c t u r e i n t h e b r o a d e r c o n t e x t o f t h e s o f t w a r e 1 5r oc es sa n d s o f t w a r e p ro c e s s m a n a g e m e n t , a s w e l l a s t o m a r s h a lt h e v a r i o us n e w t e c h n i q u e s t h a t h a v e b e e n d e v e l o p e d .

    S o m e o f t h e b e n e f i t s w e e x p e c t t o g a i n f r o m t h e e m e r -g e n c e o f s o f t w a r e a r c h i t e c t u r e a s a m a j o r d i s c i p l i n e a r e :1 ) a r c h i t e c t u r e a s t h e f r a m e w o r k f o r s a t i s f y i n g r e q u i r e -m e n t s ; 2 ) a r c h i t e c t u r e a s t h e t e c h n i c a l b a s i s f o r d e s i g n

    1Conformance is used to describe the relationship betweent y p e s a n d s u b t y p e s .

  • 7/29/2019 Foundations for the Study

    2/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 9 9 2 P a g e 4 1

    a n d a s t h e m a n a g e r i a l b a s is f o r c os t e s t i m a t i o n a n d p r o -c e s s m a n a g m e n t ; 3 ) a r c h i t e c t u r e a s a n e f f e c t iv e b a s i s f o rr e u s e ; a n d 4 ) a r c h i t e c t u r e a s t h e b a s i s f o r d e p e n d e n c ya n d c o n s i s t e n c y a n a l y s i s .

    T h u s , t h e p r i m a r y o b j e c t o f o u r r e s e ar c h i s s u p p o r tf o r t h e d e v e l o p m e n t a n d u s e o f s o f tw a r e a r c h i t e c t u r es p e c i f i c a t i o n s . T h i s p a p e r i s i n t e n d e d t o b u i l d t h e f o u n -d a t i o n f o r f u t u r e r e s e a r c h i n s o f t w a r e a r c h i t e c t u r e . W eb e g i n i n S e c t i o n 2 b y d e v e l o p i n g a n i n t u i t i o n a b o u ts o f t w a r e a r c h i t e c t u r e a g a i n s t t h e b a c k g r o u n d o f w e l l-e s t a b l i s h e d d i s c i p l i n e s s u c h a s h a r d w a r e , n e t w o r k , a n db u i l d i n g a r c h i t e c t u r e , e s t a b l i s h t h e c o n t e x t o f s o f t w a r ea r c h i t e c t u re , a n d p r o v i d e th e m o t i v a t i o n f o r o u r a p -p r o a c h . I n S e c t i o n 3 , w e p r o p o s e a m o d e l f o r , a n d ac h a r a c t e r i z a t i o n o f , s o f t w a r e a r c h i t e c t u r e a n d s o f t w a r ea r c h i t e c t u r a l s t y l e s . N e x t , i n S e c t i o n 4 , w e d is c u s s a ne a s i l y u n d e r s t o o d e x a m p l e t o e l i c i t s o m e i m p o r t a n t a s -p e c t s o f s o f t w a r e a r c h i t e c t u r e a n d t o d e l i n e a t e r e q u i r e -m e n t s f o r a s o f t w a r e - a r c h i t e c tu r e n o t a t i o n . I n S e c t i o n 5 ,w e e l a b o r a t e o n t w o o f t h e m a j o r b e n e f it s o f o u r a p -p r o a c h t o s o f t w a r e a r c h i t e c t u r e . W e c o n c l u d e , in S e c-t i o n 6 , b y s u m m a r i z i n g t h e m a j o r p o i n t s m a d e i n t h i sp a p e r a n d c o n s i d e r in g r e l a t e d w o r k .

    2 I n t u i t i o n , C o n t e x t , a n d M o t i v a t i o nB e f o r e p r e s e n ti n g o u r m o d e l o f s o ft w a r e a r c h i t e c t u re ,

    w e l a y t h e p h i l o s o p h i c a l f o u n d a t i o n s f o r it b y : 1 ) de v e l -o p i n g a n i n t u i t io n a b o u t s o f t w a r e a r c h it e c t u r e t h r o u g han a lo g i es t o ex i s t i n g d i sc ip l i n es ; 2 ) p ro p o s in g a co n -t e x t f o r s o f t w a r e a r c h i t e c t u r e i n a m u l t i - l e v e l p r o d u c tp a r a d i g m ; a n d 3 ) p r o v i d in g s o m e m o t i v a t i o n fo r so f t-w a r e a r c h i t e c t u r e a s a s e p a r a t e d i s c i p l i n e .

    2 . 1 D e v e l o p i n g a n I n t u i t i o n a b o u t S o f t -w a r e A r c h i t e c t u r e

    I t i s i n t e r e s t i n g t o n o t e t h a t w e d o n o t h a v e nameds o f tw a r e a r c h it e c t u re s . W e h a v e s o m e i n t u it i o n t h a tt h e r e a r e d i f f e r e n t k i n d s o f s o f t w a r e a r c h i t e c t u r e s , b u tw e h a v e n o t f o r m a l i z e d , o r i n s t i t u t i o n a l i z e d , t h e m . I t iso u r c l a i m t h a t i t i s b e c a u s e t h e r e a r e s o m a n y s o f t w a r ea r c h i t e c t u r e s , n o t b e c a u s e t h e r e a r e s o f e w , t h a t t h ep r e s e n t s t a t e o f a ff a i rs e x is t s . I n t h i s s e c t i o n w e l o o k a ts e v e r a l a r c h i t e c t u r a l d i s c i p l i n e s i n o r d e r t o d e v e l o p o u ri n t u i t io n a b o u t s o f t w a r e a r c h i t e c t ur e . W e l o o k a t h a r d -w a r e a n d n e t w o r k a r c h i t e c t u r e b e c a u s e t h e y h a v e t r a -d i t i o n a l l y b e e n c o n s i d e r e d s o u r c e s o f i d e a s f o r s o f t w a r ea r c h i t e c t u r e ; w e l o o k a t b u i l d i n g a r c h i t e c t u r e b e c a u s e i ti s t h e " c l a s si c a l " a r c h i t e c t u r a l d i s c ip l i n e .

    2 .1 .1 C o m p u t i n g H a r d w a r e A r c h i t e c tu r eT h e r e a r e s e v e r a l d i f f e r e n t a p p r o a c h e s t o h a r d w a r e

    a r c h i t e c t u r e t h a t a r e d i st i n g ui s h e d b y t h e a s p e c t o f t h eh a r d w a r e t h a t i s e m p h a s i z e d . R I S C m a c h i n e s a r e e x -a m p l e s o f a h a r d w a r e a r c h i t e c t u r e t h a t e m p h a s i z e s t h ei n s t r u c t i o n s e t a s t h e i m p o r t a n t f e a t u r e . Pipelined m a -c h i n e s a n d multi-processor m a c h i n e s a r e e x a m p l e s o fh a r d w a r e a r c h i t e c t u r e s t h a t e m p h a s i z e t h e c o n f i g u r a -t i o n o f a r c h i t e c t u r a l p i e c e s o f t h e h a r d w a r e .

    T h e r e a r e t w o i n t e r e s t in g f e a t u r e s o f t h e s e c o n d a p -p r o a c h t o h a r d w a r e a r c h i t e c t u r e t h a t a r e i m p o r t a n t i no u r c o n s i d e r a t i o n o f s o f t w a r e a r c h i t e c t u r e :

    t h e r e a r e a r e l a t i v e l y s m a l l n u m b e r o f d e s ig n e l e -m e n t s ; a n d

    s c a l e is a c h i e v e d b y r e p l i c a t i o n o f t h e s e d e s i g n e l e -m e n t s .

    T h i s c o n t r a s t s w i t h s o f tw a r e a r c h i t e c tu r e , w h e r e t h e r e i sa n e x c e e d i n g l y l a r g e n u m b e r o f p o s s i b l e d e s ig n e l e m e n t s .F u r t h e r , s c a l e i s a c h i e v e d n o t b y r e p l i c a t i n g d e s i g n e l -e m e n t s , b u t b y a d d i n g m o r e d i s t i n c t d e s ig n e l e m e n t s .H o w e v e r , t h e r e a r e s o m e s i m i l a r i t i e s : w e o f t e n o r g a n i z ea n d c o n f i g u re s o f t w a r e a r c h i t e c t u r e s i n w a y s a n a l o g o u st o t h e h ~ d w a r e a r c h i t e c t u re s m e n t i o n e d a b o v e . F o r ex -a m p l e , w e c r e a t e m u l t i - p r o c e s s s of t w a r e s y s te m s a n d u s ep i p e l i n e d p r o c e s s in g .

    T h u s , t h e i m p o r t a n t i n s i g h t f r o m t h i s d i s c u s s i o n i st h a t t h e r e a r e f u n d a m e n t a l a n d i m p o r t a n t d i f f e r e n c e sb e t w e e n t h e t w o k i n ds o f a r c h it e c t u r e . B e c a u s e o f t h e sed i f f e r e n c e s , i t i s s o m e w h a t i r o n i c t h a t w e o f t e n p r e s e n ts o f t w a r e a r c h i t e c t u re i n h a r d w a r e - l ik e t e r m s .2 .1 .2 N e t w o r k A r c h i t e c t u r e

    N e t w o r k a r c h i t e c t u r e s a r e a c h i e v e d b y a b s t r a c t i n g t h ed e s i g n e l e m e n t s o f a n e t w o r k i n t o n o d e s a n d c o n n e c -t io n s , a n d b y n a m i n g t h e k i n ds o f r e la t i o n s h ip s t h a tt h e s e t w o e l e m e n t s h a v e t o e a c h o t h e r . T h u s w e g e ts tar n e t w o r k s , ring n e t w o r k s , a n d manhat tan s t ree t n e t -w o r k s a s e x a m p l e s o f n a m e d n e t w o r k a r c h i t e c t u r e s .

    T h e t w o i n te r e s t i ng a r c h i t e c t u r a l p o i n t s a b o u t n e t -w o r k a r c h i t e c t u r e a r e :

    t h e r e a r e t w o c o m p o n e n t s - - n o d e s a n d c o n n e c -t i o n s ; an d

    t h e r e a r e o n l y a f e w t o p o l o g i e s t h a t a r e c o n s i d e r e d .I t i s c e r t a i n l y t h e c a s e t h a t w e c a n a b s t r a c t t o a s im i l a rl e v el i n s o f t w a r e a r c h i t e c t u r e - - f o r e x a m p l e , p r o c e s s e sa n d i n t e p ro c e s s c o m m u n i c a t i o n . H o w e v e r , r a t h e r t h a na f e w t o p o l o g i e s t o c o n s i d e r , t h e r e a r e a n e x c e e d i n g l y

  • 7/29/2019 Foundations for the Study

    3/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 4 2

    l a r g e n u m b e r o f p o s s ib l e t o p o l o g ie s a n d t h o s e t o p o l o -g ie s g e n e r a ll y go w i t h o u t n a m e s . M o r e o v e r , w e e m p h a -s i z e a s p e c t s d i f f e r e n t f r o m t h e t o p o l o g y o f t h e n o d e s a n dc o n n e c t i o n s . W e c o n s i d e r i n s t e a d s u c h m a t t e r s a s t h ep l a c e m e n t o f p r o c e s s e s ( e . g ., dislribuled a r c h i t e c t u r e s )o r t h e k i n d s o f i n t e rp r o c e s s c o m m u n i c a t i o n ( e . g. , mes-sage passing a r c h i t e c t u r e s ) .

    T h u s , w e d o n o t b e n e f i t m u c h f r o m u s i n g n e t w o r k sa s a n a n a l o g y f o r s o ft w a r e a r c h i t e c t u re , e v e n t h o u g h w ec a n l o o k a t a r c h i t e c t u r a l e l e m e n t s f r o m a s i m i l a r l e v e lo f a b s t r a c t i o n .

    2 . 1 .3 B u i l d i n g A r c h i t e c t u r eT h e c l a s s i c a l f i e ld o f a r c h i t e c t u r e p r o v i d e s s o m e o f

    t h e m o r e i n t e r e s t i n g i n s i g h t s f o r s o f t w a r e a r c h i t e c t u r e .W h i l e t h e s u b j e c t m a t t e r f o r t h e t w o i s q u i t e d i ff e r en t ,t h e r e a r e a n u m b e r o f in t e r e s t i n g a r c h i t e c t u r a l p o i n t si n b u i l d i n g a r c h i t e c t u r e t h a t a r e s u g g e s t i v e f o r s o f t w a r ea r c h i t e c t u r e :

    m u l t i p l e v i e w s ; a r c h i t e c t u r a l s t y le s ; s t y l e a n d e n g i n e e r i n g ; a n d s t y l e a n d m a t e r i a l s .A b u i l d i n g a r c h i t e c t w o r k s w i t h t h e c u s t o m e r b ym e a n s o f a n u m b e r o f d if f e re n t v ie w s i n w h i c h s o m e

    p a r t i c u l a r a s p e c t o f t h e b u i l d in g i s e m p h a s i z e d . F o re x a m p l e , t h e r e a r e e l e v a t i o n s a n d f l o o r p l a n s t h a t g i v et h e e x t e r i o r v i e w s a n d " t o p - d o w n " v i e w s , r e s p e c t i v e l y .T h e e l e v a t io n v ie w s m a y b e s u p p l e m e n t e d b y c o n t e x t u a ld r a w i n g s o r e v e n sc a le m o d e l s t o p r o v i d e t h e c u s t o m e rw i t h t h e l o o k o f t h e b u i l d i n g i n i t s c o n t e x t . F o r t h eb u i l d e r , t h e a r c h it e .c t p r o v i d e s t h e s a m e f l o o r p l a n s p l u sa d d i t i o n a l s t r u c t u r a l v ie w s t h a t p r o v i d e a n i m m e n s ea m o u n t Q d e t a i l a b o u t v a r i o u s e x p l i c i t d e s i g n c o n s i d e r -a t i o n s s u c h a s e l e c t r i c a l w i r i n g , p l u m b i n g , h e a t i n g , a n da i r - c o n d i t i o n i n g .A n a l o g o u s ly , t he s o f t w a r e a r c h i te c t n e e d s a n u m b e r o fd i f f e r e n t v i e w s o f t h e s o f t w a r e a r c h i t e c t u r e f o r t h e v a r -i o u s u s e s a n d u s e r s . A t p r e s e n t w e m a k e d o w i t h o n l yo n e v i e w : t h e i m p l e m e n t a t i o n . I n a r e a l s e n s e , t h e i m -p l e m e n t a t i o n i s l ik e a b u i l d e r s d e t a i l e d v i e w - - t h a t i s ,l i k e a b u i l d i n g w i t h n o s k i n i n w h i c h a l l t h e d e t a i l s a r ev i s ib l e . I t i s v e r y d i f fi c u l t t o a b s t r a c t t h e d e s i g n a n d a r -c h i t e c t u r e o f t h e s y s t e m f r o m a l l t h e d e t a il s . ( C o n s i d e rt h e P o m p i d o u C e n t e r i n P a r i s a s a n e x a m p l e . )

    T h e n o t i o n o f a r c h i t e c t u r a l s t y l e i s p a r t ic u l a r l y u s e -f u l f r o m b o t h d e s c r i p ti v e a n d p r e s c r i p ti v e p o i n t s o f

    v i e w . D e s c r i p t i v e l y , a r c h i t e c t u r a l s t y l e d e f i n e s a p a r t i c -u l a r c o d i f i c a t io n o f d e si g n e l e m e n t s a n d f o r m a l a r r a n g e -m e n t s . P r e s c r i p t i v e l y , s t y l e l i m i t s th e k i n d s o f d e s i g ne l e m e n t s a n d t h e i r f o r m a l a r r a n g e m e n t s . T h a t i s , a na r c h i t e c t u r a l s t y l e c o n s t r a i n s b o t h t h e d e s i g n e l e m e n t sa n d t h e f o r m a l r e l a t io n s h i p s a m o n g t h e d e s ig n e l e m e n t s .A n a l o g o u s l y , w e s h a l l f i n d t h i s a m o s t u s e f u l c o n c e p t i ns o f t w a r e a r c h i t e c t u r e .

    O f e x t r e m e i m p o r t a n c e i s t h e r e l a t i o n s h ip b e t w e e ne n g i n e e r i n g p r i n c i p l e s a n d a r c h i t e c t u r a l s t y l e ( a n d , o fc o u r s e , a r c h i t e c t u r e i t s e lf ) . F o r e x a m p l e , o n e d o e s n o tg e t t h e l i g h t , a i r y f e e l o f t h e p e r p e n d i c u l a r s t y l e a s e x -e m p l i f i e d in t h e c h a p e l a t K i n g ' s C o l le g e , C a m b r i d g e ,f r o m r o m a n e s q u e e n g i n e e ri n g . D i f f er e n t e n g i n e e r in gp r i n c ip l e s a r e n e e d e d t o m o v e f r o m t h e m a s s i v e n e ss o ft h e r o m a n e s q u e t o l ig h t n e ss o f t h e p e r p e n d i c u l a r . I t i sn o t j u s t a m a t t e r o f a e s t h e ti c s . T h i s r e l a t i o n s h ip b e -t w e e n e n g i n e e r i n g p r i n c i p l e s a n d s o f t w a r e a r c h i t e c t u r ei s a l so o f f u n d a m e n t a l i m p o r t a n c e .

    F i n a l l y , t h e r e l a t i o n s h i p b e t w e e n a r c h i t e c t u r a l s t y l ea n d m a t e r i a l s i s o f c r i ti c a l i m p o r t a n c e . T h e m a t e r i -a l s h a v e c e r t a i n p r o p e r t i e s t h a t a r e e x p l o i t e d i n p r o -v i d i n g a p a r t i c u l a r s ty l e . O n e m a y c o m b i n e s t r u c t u r a lw i t h a e s t h e t ic u s e s o f m a t e r i a l s , s u c h a s t h a t f o u n d i nt h e p o s t a n d b e a m c o n s t r u c t i o n o f t u d o r - s t y l e h o u s e s.H o w e v e r , o ne d o e s n o t b u i l d a s k y s c r a p e r w i t h w o o d e np o s t s a n d b e a m s . T h e m a t e r i a l a s p e c ts o f t h e d e s ig ne l e m e n t s p r o v i d e b o t h a e s t h e t i c a n d e n g i n e e r i n g b a s e sf o r a n a r c h i t e c t u r e . A g a i n , t h i s r e l a t i o n s h i p i s o f c r i t i c a li m p o r t a n c e i n s o f t w a r e a r c h i t e c t u r e .

    T h u s , w e f i n d i n b u i l d i n g a r c h i t e c t u r e s o m e f u n d a -m e n t a l i n si g h ts a b o u t s o f t w a r e a r c h i te c t u r e : m u l t i p l ev i e w s a r e ne e d e d t o e m p h a s i z e a n d t o u n d e r s t a n d d if -f e r e n t a s p e c t s o f t h e a r c h i t e c t u r e ; s t y l e s a r e a c o g e n ta n d i m p o r t a n t f o r m o f c od i f ic a t i o n t h a t c a n b e u s e db o t h d e s c r i p t i v e l y a n d p r e s c r i p t i v e l y ; a n d , e n g i n e e r i n gp r i n c ip l e s a n d m a t e r i a l p r o p e r t i e s a r e o f f u n d a m e n t a li m p o r t a n c e i n th e d e v e l o p m e n t a n d s u p p o r t o f a p a r t ic -u l a r a r c h i t e c t u r e a n d a r c h i t e c t u r a l s t y l e .2 . 2 T h e C o n t e x t o f A r c h i t e c t u r e

    B e f o r e d i s c u s s i n g o u r m o t i v a t i o n f o r s o f t w a r e a r c h i -t e c t u r e s p e c i f i c a t i o n s , w e p o si a c h a r a c t e r i z a t i o n o f a r -c h i t e c t u r e i n t h e c o n t e x t o f th e e n t i r e s o f tw a r e p r o d u c t .N o t e t h a t w e d o n o t m e a n t o i m p l y a n y t h i n g a b o u t t h ep a r t i c u l a r p r o c e s s b y w h i c h t h i s p r o d u c t i s c r e a t e d - -t h o u g h o f c ou r s e th e r e m a y b e i m p l i c a t i o n s a b o u t t h ep r o c e s s t h a t a r e i n h e r e n t in o u r v ie w . O u r p u r p o s e i sp r i m a r i l y t o p r o v i d e a c o n t e x t f o r a r c h i t e c t u r e i n w h a tw o u l d b e c o n s i d e r e d a f a i rl y s t a n d a r d s o f t w a r e p r o d u c t .

    W e c h a r a c t e r i z e t h e d i ff e r e nt p a r t s o f t h e s o f t w a r e

  • 7/29/2019 Foundations for the Study

    4/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 4 3

    p r o d u c t b y t h e k i n d s o f t h i n g s t h a t a r e i m p o r t a n t f o rt h a t p a r t - - t h e k i n d s o f e n t it i e s, t h e i r p r o p e r t i e s a n dr e l a t i o n s h i p s t h a t a r e i m p o r t a n t a t t h a t l e v e l , a n d t h ek i n d s o f d e c i s i o n a n d e v a l u a t i o n c r i t e r i a t h a t a r e r e l e -v a n t a t t h a t l e v e l :

    r e q u i r e m e n t s a r e c o n c e r n e d w i t h t h e d e t e r m i n a t i o no f th e i n f o r m a t i o n , p r oc e s s in g , a n d t h e c h a r a c t e r -i st ic s o f t h a t i n f o r m a t i o n a n d p r o c e s si n g n e e d e d b yt h e u s e r o f t h e s y s t e m ; 2a r c h i t e c tu r e i s c o n c e r n e d w i t h t h e s e l e c t i o n o f a rc h i -t e c t u r a l e l e m e n t s , t h e i r i n t e r a c t i o n s , a n d t h e c o n -s t r a i n t s o n t h o s e e l e m e n t s a n d t h e i r i n t e r a c t i o n sn e c e s s a r y t o p r o v i d e a f r a m e w o r k i n w h i ch t o s a t -i s f y t h e r e q u i r e m e n t s a n d s e r v e a s a b a s i s f o r t h ed es ig n ;d e s ig n i s c o n c e r n e d w i t h t h e m o d u l a r i z a t i o n a n dd e t a i l e d i n t e r f a c e s o f t h e d e s i g n e l e m e n t s , t h e i ra l g o r i t h m s a n d p r o c e d u r e s , a n d t h e d a t a t y p e sn e e d e d t o s u p p o r t t h e a r c h i t e c t u r e a n d t o s a t i sf yt h e r e q u i r e m e n t s ; a n di m p l e m e n t a t i o n is" c o n c e r n e d w i t h t h e r e p r e s e n t a -t i o ns o f t h e a l g o r i t h m s a n d d a t a t y p e s t h a t s a t i sf yt h e d e s ig n , a r c h i t e c tu r e , a n d r e q u i r e m e n t s .

    T h e d i ff e r e nt p a r t s o f a p a r t i c u l a r p r o d u c t a r e b y n om e a n s a s si m p l e a s t h i s c h a r a c t e r iz a t i o n . T h e r e i s ac o n t i n u u m o f p o s s i b l e c h o i c e s o f m o d e l s , a b s t r a c t i o n s ,t r a n s f o r m a t i o n s , a n d r e p r e s e n t a t i o n s . W e s i m p l i f y t h i sc o n t i n u u m i n t o f o u r di s c r e te p a r t s p r i m a r i l y t o p r o v i d ea n i n t u i t i o n a b o u t h o w a r c h i t e c t u r e i s r e l a t e d t o t h er e q u i r e m e n t s a n d d e s ig n o f a s o f t w a r e s y s te m .

    I t s h o u l d b e n o t e d t h a t t h e r e a r e s o m e d e v e l o p m e n tp a r a d i g m s t o w h i c h o u r c h a r a c t e r i z a t i o n w il l n o t a p p l y- - f o r e x a m p l e , th e e x p l o r a t o r y p r o g r a m m i n g p a r a d i g mo f t e n f o u n d in A I r e s e a r c h . H o w e v e r , o u r c h a r a c t e r i z a -t i o n r e p r e s e n ts a w i d e v a r i e t y o f d e v e l o p m e n t a n d e v o -l u t i o n a r y p a r a d i g m s u s e d i n t h e c r e a t i o n o f p r o d u c t i o ns o f tw a r e , a n d d e l i n e a t e s a n i m p o r t a n t , a n d h i t h e r t o u n -d e r c o n s i d e r e d , p a r t o f a u n i f i e d s o f t w a r e p r o d u c t [ 15 ].2 . 3 M o t i v a t i o n f o r A r c h i t e c t u r a l S p e c i -

    f i c a t i o n sT h e r e a r e a n u m b e r o f f a c t o r s th a t c o n t r i b u t e t o t h e

    h i g h c os t o f s o f tw a r e . T w o fa c t o r s t h a t a r e i m p o r t a n t2 Note t ha t the no t io n of requ i rements p resen ted here i s an ide -

    ai is t ic one. In practice, req uirem ents are not so "pure" ; they oftenconta in cons t ra in t s on the a rch i tec tu re o f a sys tem, con s t ra in t s ont h e s y s t e m d e s i g n , and even cons t ra in t s on the implementa t ion .

    t o s o f t w a r e a r c h i t e c t u r e a r e e v o l u t i o n a n d c u s t o m i z a -t i o n . S y s t e m s e v o l v e a n d a r e a d a p t e d t o n e w u s e s, j u s ta s b u il d in g s c h a n g e o v e r t i m e a n d a r e a d a p t e d t o n e wu s es . O n e f r e q u e n t l y a c c o m p a n y i n g p r o p e r t y o f e v o l u-t i o n i s a n i n c r e a s i n g b r i t t le n e s s o f t h e s y s t e m - - t h a t i s ,a n i n c r e a s i n g r e s i s t a n c e t o c h a n g e , o r a t l e a s t t o c h a n g -i n g g r a c e f u l l y [ 5 ] . T h i s i s d u e i n p a r t t o t w o a r c h i t e c -t u r a l p r o b l e m s : a r c h i t e c tu r a l e r o s io n a n d a r c h i t e c t u r a ldr i f t . A r c h i t e c t u r a l e r o s i o n is d u e t o v i o l a t i o n s o f t h e a r -c h i t e c t u r e . T h e s e v i o l a t i o n s o f t e n l e a d t o a n i n c r e a s e i np r o b l e m s i n t h e s y s t e m a n d c o n t r i b u t e t o t h e i n c r e a s i n gb r i tt l e n e s s o f a s y s t e m - - f o r e x a m p l e , r e m o v i n g l o a d -b e a r i n g w a l ls o f t e n l e a d s t o d i s a s t r o u s r e s u l t s . A r c h i t e c -t u r a l d r i f t i s d u e t o i n s e n s i t i v i t y a b o u t t h e a r c h i t e c t u r e .T h i s i n s e n s it i v it y le a d s m o r e t o i n a d a p t a b i l i t y t h a n t od i s a s t e r s a n d r e s u l t s i n a la c k o f c o h e r e n c e a n d c l a r i t yo f f o r m , w h i c h i n t u r n m a k e s i t m u c h e a s ie r t o v i o l a t et h e a r c h i t e c t u r e t h a t h a s n o w b e c o m e m o r e o b s c u r e d .

    C u s t o m i z a t i o n i s a n i m p o r t a n t f a c t o r i n s o f t w a r e a r -c h i t e c t u r e , n o t b e c a u s e o f p r o b l e m s t h a t i t c a u s e s , b u tb e c a u s e o f t h e l a c k o f a r c h i t e c t u r a l m a t u r i t y t h a t i t i n-d i c a t e s . I n b u i l d i n g s o f t w a r e s y s t e m s , w e a r e s ti l l a tt h e s t a g e o f r e c r e a t i n g e v e r y d e s i g n e l e m e n t f o r e a c hn e w a r c h i t e c t u r e . W e h a v e n o t y e t a r r i v e d a t t h e s t a g ew h e r e w e h a v e a s t a n d a r d s e t o f a r c h i t e c t u r a l s t y l e sw i t h t h e i r a c c o m p a n y i n g de s ig n e l e m e n t s a n d f o r m a la r r a n g e m e n t s . E a c h s y s t e m i s , i n e s s e n ce , a n e w a r -c h i t e c t u r e , a n e w a r c h i t e c t u r a l s ty l e . T h e p r e s e n s e o fu b i q u i t o u s c u s t o m i z a t i o n i n d i c a t e s t h a t t h e r e i s a g e n -e r a l n e e d f o r c o d i f i c a t i o n - - t h a t i s, t h e r e i s a n e e d f o ra r c h i t e c t u r a l t e m p l a t e s f o r v a r i o u s a r c h i t e c t u r a l s t y l e s .F o r t h e s t a n d a r d p a r t s o f a s y s t e m i n a p a r t i c u l a r s t y l e ,t h e a r c h i t e c t c a n s e l e c t f r o m a s e t o f w e l l - k n o w n a n du n d e r s t o o d e l e m e n t s a n d u s e t h e m i n w a y s a p p r o p r i a t et o t h e d e s ir e d a r c h i te c t u r e . T h i s u s e o f s t a n d a r d t e m -p l a t e s f o r a r c h i t e c t u r a l e l e m e n t s t h e n f r e e s t h e a r c h i t e c tt o c o n c e n t r a t e o n t h o s e e l e m e n t s w h e r e c u s t o m i z a t i o ni s c ru c i a l .

    G i v e n o u r c h a r a c t e r i z a t i o n o f a r c h i t e c t u r e a n d m o t i -v a t i n g p r o b l e m s , t h e r e a r e a n u m b e r o f t h i n g s t h a t w ew a n t t o b e a b l e t o d o w i t h a n a r c h i t e c t u r a l s p e c i f i c a t i o n :

    * P r e s c r ib e th e a r c h i t e c tu r a l c o n s t r a in t s r id th e d e s i r e dl e v e l - - t h a t i s , i n d i c a t e t h e d e s i r e d r e s t r i c t i v e n e s so r p e r m i s s i v e n e s s , d e t e r m i n e t h e d e s i r e d l e v el o fg e n e r a l i t y o r p a r t i c u l a r i t y , d e f i n e w h a t i s n e c e s s i t ya n d w h a t i s l u x u r y , a n d p i n - p o i n t t h e d e g r e e o f r e l -a t iv e n e s s a n d a b s o l ut e n e s s. W e w a n t a m e a n s o fs u p p o r t i n g a " p r i n c i p l e o f l e a s t c o n s t r a i n t " t o b ea b l e t o t o e x p r e s s o n l y t h o s e c o n s t r a i n t s i n t h e a r -c h i t e c t u r e t h a t a r e n e c e s s a r y a t t h e a r c h i t e c t u r a ll e v e l o f t h e s y s t e m d e s c r i p t i o n . T h i s i s a n i m p o r -

  • 7/29/2019 Foundations for the Study

    5/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 4 4

    t a n t d e p a r t u r e f r o m c u r r e n t p r a c t i c e t h a t , i n s t e a do f sp ec i fy in g 1 ;he co n s t r a in t s , su p p l i es sp ec i f i c so lu -t i o n s t h a t e m b o d y t h o s e d e s i r ed c o n s t r a i n ts .

    S e pa ra t e a e s t~ ie t ic s f ro m e n g in e e r in g - - t h a t i s , i n -d i c a t e w h a t i s " l o a d - b e a r i n g " f r o m w h a t i s " d e c -o r a t i o n " . T h i s s e p a r a t i o n e n a b l e s u s t o a v o i d t h ek i n d s o f c h a n g e s t h a t r e s u l t i n a r c h i t e c t u r a l e r o s i o n .

    E xpr e ss d i f f e re n t a spe c t s o f t h e a rc h i t e c tu re i n a na p p r o p r i a t e m a n n e r - - t h a t i s , d e s c r i b e d i f f e r e n tp a r t s o f th e a r c h i t e c t u r e i n a n a p p r o p r i a t e v i ew .

    P e r f o r m d e p e n d e n c y a n d c o n s is t e n c y a n a l y s is - -t h a t i s, d e t e r m i n e t h e i n t e r d e p e n d e n c i e s b e t w e e na r c h i t e c t u r e , r e q u i r e m e n t s a n d d e s i g n ; d e t e r m i n ei n t e r d e p e n d e n c i e s b e t w e e n v a r i ou s p a r t s o f t h e a r -c h i t e c t u r e ; a n d d e t e r m i n e t h e c o n s i s t e n c y , o r l a c ko f i t , b e t w e e n a r c h i t e c t u r a l s t y l e s , b e t w e e n s t y l e sa n d a r c h i t e c t u r e , a n d b e t w e e n a r c h i t e c t u r a l e l e -m e n t s .

    3 M o d e l o f S o f t w a r e A r c h i t e c t u r eI n S e c t i o n 2 w e u s e t h e f i el d o f b u i l d i n g a r c h i t e c t u r e

    t o p r o v i d e a n u m b e r o f in s i gh t s i n t o w h a t s o f t w a r e a r-c h i t e c t u r e m i g h t b e . T h e c o n c e p t o f b u i ld i n g a r c h i te c -t u r e t h a t w e a p p e a l t o i s t h a t o f t h e s t a n d a r d d e f in i ti o n :"T h e a r t o r sc i e n c e o f bu i l d in g : e spe c ia l l y d e s ig n in g a n dbu i l d in g h a b i ta l s t ru c tu re s" [ 1 1 ] . P e r h a p s m o r e r e l e v a n tt o o u r n e e d s h e r e i s a s e c o n d a r y d e f i n i t i o n : " A u n i f y i n go r c o h e re n t f o r m o r s t r u c t u r e " [11] . I t i s th is sense ofa r c h i t e c t u r e - - p r o v i d i n g a u n i f y i n g o r c o h e r e n t f o r mo r s t r u c t u r e - - t h a t i nf u se s o u r m o d e l o f s o f t w a r e a rc h i-t e c t u r e .

    W e f ir s t p r e s e n t o u r m o d e l o f so f t w a r e a r c h i t e c t u r e ,i n t r o d u c e t h e n o t i o n o f s o f t w a r e a r c h i t e c t u r a l s ty l e , a n dd i s c u ss t h e i n t e r d e p e n d e n c e o f p r o c e s s i n g , d a t a , a n dc o n n e c t o r v i ew s .3 . 1 T h e M o d e l

    B y a n M o g y t o b u i l d i n g a r c h i t e c t u r e , w e p r o p o s e t h ef o l l o w i n g m o d e l o f s o f t w a r e a r c h i t e c t u r e :

    S o f t w a r e A r c h i t e c t u r e ={ E l e m e n t s , F o r m , R a t i o n a l e }T h a t i s, a s o f t w a r e a r c h i t e c t u r e i s a s e t o f a r c h i t e c t u r a l( o r , i f y o u w i l l, d e s i g n ) e l e m e n t s t h a t h a v e a p a r t i c u l a rf o r m .

    W e d i s t i n g u i s h t h r e e d i f f e r e n t c l a s se s o f a r c h i t e c t u r a le l e m e n t s :

    p r o c e s s i n g e l e m e n t s ; d a t a e l e m e n t s ; a n d c o n n e c t i n g e l e m e n t s .

    T h e p r o c e s si n g e l e m e n t s a r e t h o s e . c o m p o n e n t s t h a t s u p -p l y t h e t r a n s f o r m a t i o n o n t h e d a t a e l e m e n t s ; t h e d a t ae l e m e n t s a r e t ho s e t h a t c o n t a i n t h e i n f o r m a t i o n t h a t i su s e d a n d t r a n s f o r m e d ; t h e c o n n e c t i n g e l e m e n t s ( w h i c ha t t i m e s m a y b e e i t h e r p r o c e s si n g o r d a t a e l e m e n t s ,o r b o t h ) a r e t h e glue t h a t h o l d s t h e d i f f e r e n t p ie c e so f t h e a r c h i t e c t u r e to g e t h e r . F o r e x a m p l e , p r o c e d u r ec a l l s , s h a r e d d a t a , a n d m e s s a g e s a r e d i f f e r e n t e x a m p l e so f c o n n e c t i n g e l e m e n t s t h a t s e rv e t o " g lu e " a r c h i t e c t u r a le l e m e n t s t o g e t h e r .

    C o n s i d e r t h e e x a m p l e o f w a t e r p o l o a s a m e t a p h o r f o rt h e d i f f e r e n t c la s s e s o f e l e m e n t s : t h e s w i m m e r s a r e t h ep r o c e s s i n g e l e m e n t s , t h e b a l l i s t h e d a t a e l e m e n t , a n dw a t e r i s t h e p r i m a r y c o n n e c t i n g e l e m e n t ( t h e " g l u e " ) .C o n s i d e r f u r t h e r t h e s i m i l a r i t i e s o f w a t e r p o l o , p o l o , a n ds o c c e r . T h e y a l l h a v e a s i m i l a r " a r c h i t e c t u r e " b u t d i f -f e r i n t h e " g l u e " - - t h a t i s , t h e y h a v e s i m i l a r e l e m e n t s ,s h a p e s a n d f o r m s , b u t d i ff e r m a i n l y in t h e c o n t e x t i nw h i c h t h e y a r e p l a y e d a n d i n t h e w a y t h a t t h e e l e m e n t sa r e c o n n e c t e d t o g e t h e r . W e s h a l l s e e b e l o w t h a t t h e s ec o n n e c t i n g e l e m e n t s p l a y a f u n d a m e n t a l p a r t i n d i s t i n -g u i s h in g o n e a r c h i t e c t u re f r o m a n o t h e r a n d m a y h a v ea n i m p o r t a n t e f f e c t o n t h e c h a r a c t e r is t i c s o f a p a r t i c u -l a r a r c h i t e c t u r e o r a r c h i t e c t u r a l s t y l e .

    T h e a r c h i t e c t u r a l f o r m c o n s i s ts o f w e i g h t e d p r o p e r -t i e s a n d r e l a t io n s h i p s . T h e we ig h t in g i n d i c a t e s o n e o ft w o t h in g s : e i t h e r t h e i m p o r t a n c e o f t h e p r o p e r t y o r t h er e l a t i o n s h i p , o r t h e n e c e s s i t y o f s e l e c t i n g a m o n g a l t e r n a -t iv e s , s o m e o f w h i c h m a y b e p r e f e r r e d o v e r o t h e r s . T h eu s e o f w e i g h t in g t o i n d i c a t e i m p o r t a n c e e n a b l e s t h e a r -c h i t e c t t o d i s t i n g u i s h b e t w e e n " l o a d - b e a r i n g " a n d " d e c -o r a t i v e " f o r m a l a s p e c ts ; t h e u s e o f w e i g h t i n g t o i n d i c a t ea l t e r n a t iv e s e n a b l e s t h e a r c h i t e c t t o c o n s t r a i n t h e c h o i c ew h i l e g i v i n g a d e g r e e o f l a t i t u d e t o t h e d e s i g n e r s w h om u s t s a t i s f y a n d i m p l e m e n t t h e a r c h i t e c t u r e .

    P r o p e r t i e s a r e u s e d t o c o n s t r a i n t h e c h o i c e o f a r c h i -t e c t u r a l e l e m e n t s - - t h a t i s, t h e p r o p e r t i e s a r e u se d t od e f i n e c o n s t r a i n t s o n t h e e l e m e n t s t o t h e d e g r e e d e s i r e db y t h e a r c h i te c t . P r o p e r t i e s d e fi n e t h e m i n i m u m d e -s i r e d c o n s t r a i n t s u n l e s s o t h e r w i s e s t a t e d - - t h a t i s , t h ed e f a u l t o n c o n s t r a i n t s d e f i n e d b y p r o p e r t i e s i s: " w h a ti s n o t c o n s t r a i n e d b y t h e a r c h i t e c t m a y t a k e a n y f o r md e s ir e d b y t h e d e s i g n e r o r i m p l e m e n t e r " .

    R e l a t i o n s h i p s a r e u s e d t o c o n s t r a i n t h e " p l a c e m e n t "o f a r c h i t e c t u r a l e l e m e n t s - - t h a t i s, th e y c o n s t r a i n h o wt h e d i f f e re n t e l e m e n t s m a y i n t e r a c t a n d h o w t h e y a r eo r g a n i z e d w i t h r e s p e c t t o e a c h o t h e r i n t h e a r c h i t e c t u r e .

  • 7/29/2019 Foundations for the Study

    6/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 4 5

    A s w i t h p r o p e r t i e s , r e l a t io n s h i p s d e fi n e t h e m i n i m u md e s i r e d c o n s t r a i n t s u n l e s s o t h e r w i s e s t a t e d .

    A n u n d e r l y i n g , b u t i n t e g r a l, p a r t o f a n a r c h i t e c t u r e i st h e rat ionale f o r t h e v a r i o u s c h o i c e s m a d e i n d e f i n i n g a na r c h i t e c t u re . T h e r a t i o n a l e c a p t u r e s t h e m o t i v a t i o n f o rt h e c h o i c e o f a r c h i t e c t u r a l s t y l e , t h e c h o i c e o f e l e m e n t s ,a n d t h e f o r m . I n b u i ld i n g a r c h i te c t u r e , t h e r a t i o n a l ee x p l i c a t e s t h e u n d e r l y i n g p h i l o s o p h i c a l a e s t h e t i c s t h a tm o t i v a t e t h e a r c h i te c t . I n s o f t w a r e a r c h i t e c t u re , t h er a t i o n a l e i n s t e a d e x p l i c a t e s t h e s a t i s f a c t i o n o f t h e s y s -t e m c o n s t r a i n ts . T h e s e c o n s t r a i n t s a r e d e t e r m i n e d b yc o n s i d e r a ti o n s r a n g i n g f r o m b a s ic f u n c t i o n a l a s p e c t s t ov a r i o u s n o n - f u n c t i o n a l a s p e c t s s u c h a s e c o n o m i c s [ 4 ] ,p e r f o r m a n c e [2] a n d r e l i a b i l i t y [ 13 ].3 . 2 A r c h i t e c t u r a l S t y l e

    I f a r c h i t e c t u r e i s a f o r m a l a r r a n g e m e n t o f a rc h i t e c -t u r a l e l e m e n t s , t h e n a r c h i t e c t u r a l s t y l e i s t h a t w h i c ha b s t r a c t s e l e m e n t s a n d f o r m a l a s p e c t s f r o m v a r i o us s p e-c i fi c a r c h i t e c t u r e s . A n a r c h i t e c t u r a l s t y l e i s l e ss c o n -s t r a i n e d a n d l e s s c o m p l e t e t h a n a s p e c if i c a r c h i t e c t u r e .F o r e x a m p l e , w e m i g h t t a l k a b o u t a dis tr ibuted s ty le o ra mul t i -process s ty le . I n t h e s e c a s e s , w e c o n c e n t r a t e o no n l y c e r t a i n a s p e c t s o f a s p e c i fi c a r c h i t e c t u r e : r e l a t i o n -s h i p s b e t w e e n p r o c e s s i n g e l e m e n t s a n d h a r d w a r e p r o -c e s s o r s , a n d c o n s t r a i n t s o n t h e e l e m e n t s , r e s p e c t i v e l y .

    G i v e n t h i s d e f i n i ti o n o f a r c h i te c t u r e a n d a r c h i t e c t u r a ls t y l e , t h e r e i s n o h a r d d i v i d i n g l i n e b e t w e e n w h e r e a r -c h i t e c t u r a l s t y l e l e a ve s o f f a n d a r c h i t e c t u r e b e g i n s . W eh a v e a c o n t i n u u m i n w h i c h o n e p e r s o n ' s a r c h i t e c t u r em a y b e a n o t h e r ' s a r c h i t e c t u r a l s t y le . W h e t h e r i t i s a na r c h i t e c t u r e o r a s t y l e d e p e n d s i n s o m e s e n s e o n t h eu s e . F o r e x a m p l e , w e p r o p o s e i n S e c t i o n 2 .3 t h a t a r c h i -t e c t u r a l s t y l e s b e u s e d a s c o n s t r a i n t s o n a n a r c h i t e c t u r e .G i v e n t h a t w e w a n t t h e a r c h i t e c t u r a l s p e c i fi c a ti o n t o b ec o n s t r a i n e d o n l y t o t h e l e v e l d e s i r e d b y t h e a r c h i t e c t ,i t c o u ld e a s il y h a p p e n t h a t o n e p e r s o n ' s a r c h i t e c t u r em i g h t w e l l b e l es s c o n s t r a i n e d t h a n a n o t h e r ' s a r c h i t e c -t u r a l s t y l e .

    T h e i m p o r t a n t t h i n g a b o u t a n a r c h i t e c t u r a l s t y l ei s t h a t i t e n c a p s u la t e s i m p o r t a n t d e c i s io n s a b o u t t h ea r c h i t e c t u r a l e l e m e n t s a n d e m p h a s i z e s i m p o r t a n t c o n -s t r a i n t s o n t h e e l e m e n t s a n d t h e i r r e la t i o n s h i p s . T h eu s e f u l t h i n g a b o u t s t y l e i s t h a t w e c a n u s e i t b o t h t oc o n s t r a i n t h e a r c h i t e c t u r e a n d t o c o o r d i n a t e c o o p e r a t -i n g a r c h i te c t s . M o r e o v e r , s t y l e e m b o d i e s t h o s e d e c i s i o n st h a t s u f f e r e r o s i o n a n d d r i f t . A n e m p h a s i s o n s ty l e a sa c o n s t r a i n t o n t h e a r c h i t e c t u r e p r o v i d e s a v i s ib i l i t y t oc e r t a i n a s p e c t s o f t h e a r c h i t e c t u r e s o t h a t v i o l a t io n s o ft h o s e a s p e c t s a n d i n s e n s i t i v it y t o t h e m w i ll b e m o r eo b v i o u s .

    3 . 3 P r o c e s s / D a t a / C o n n e c t o rI n t e r d e p e n d e n c e

    A s m e n t i o n e d a b o v e , a n i m p o r t a n t i n s ig h t f r o m b u il d -i n g a r c h i t e c tu r e i s t h a t O f m u l t i p l e v ie w s . T h r e e i m -p o r t a n t v i ew s i n s o f t w a r e a r c h i t e c t u r e a r e t h o s e o f p r o -c e s s in g , d a t a , a n d c o n n e c t i o n s . W e o b s e r v e t h a t i f ap r o c e s s v i e w 3 o f a n a r c h i t e c t u r e i s p r o v i d e d , t h e r e s u l t -i n g e m p h a s i s i s o n t h e d a t a f l o w t h o u g h t h e p r o c e s s i n ge l e m e n t s a n d o n s o m e a s p e c t s o f t h e c o n n e c t i o n s b e -t w e e n t h e p r o c e s s i n g e l e m e n t s w i t h r e s p e c t t o t h e d a t ae l e m e n t s . C o n v e r s e l y , i f a d a t a v i e w o f a n a r c h i t e c t u r ei s p r o v i d e d , t h e r e s u l t i n g e m p h a s i s i s o n t h e p r o c e s s -i n g f l ow , b u t w i t h l e ss a n e m p h a s i s o n t h e c o n n e c t i n ge l e m e n t s t h a n w e h a v e i n t h e p r o c e s s v i e w . W h i l e t h ec u r r e n t c o m m o n w i s d o m s e e m s t o p u t t h e e m p h a s i s o no b j e c t - o r i e n t e d ( t h a t i s , d a t a - o r i e n t e d ) a p p r o a c h e s , w eb e l i e v e t h a t a l l t h r e e v i e w s a r e n e c e s s a r y a n d u s e f u l a tt h e a r c h i t e c t u r a l l e v e l .

    W e a r g u e i n f o r m a l l y , i n t h e f o l l o w i n g w a y , t h a t t h e r ei s a p r o c e s s a n d d a t a i n t e r d e p e n d e n c e :

    t h e r e a r e s o m e p r o p e r t i e s t h a t d i s t i n g u i s h o n e s t a t eo f t h e d a t a f r o m a n o t h e r ; a n d

    t h o s e p r o p e r t i e s a r e th e r e s u l t o f s o m e t r a n s f o r m a -t i o n p r o d u c e d b y s o m e p r o c e s si n g e l e m e n t .

    T h e s e t w o v ie w s a r e th u s i n t e r t w i n e d - - e a c h d e p e n d e n to n t h e o t h e r f o r a t l e a s t s o m e o f t h e i m p o r t a n t c h a r a c -t e r i s t ic s o f b o t h d a t a a n d p r o c e s s i n g . ( F o r a m o r e g e n -e r a l d i s c u ss i o n o f p r o c e s s a n d d a t a i n t e r d e p e n d e n c e , s e e[10].)

    T h e i n t e r d e p e n d e n c e o f p r o c e s si n g a n d d a t a u p o n t h ec o n n e c t i o n s i s m o r e o b v i o u s : t h e c o n n e c t i n g e l e m e n t sa r e t h e m e c h a n i s m s f o r m o v i n g d a t a a r o u n d f r o m p r o -c e s s o r t o p r o c e s s o r . B e c a u s e o f t h i s a c t i v i t y u p o n t h ed a t a , t h e c o n n e c t i n g e l e m e n t s w i ll n e c e s s a r i l y h a v e s o m eo f t h e p r o p e r t i e s r e q u i r e d b y t h e d a t a e l e m e n t s i n pr e -c i se l y t h e s a m e w a y t h a t p r o c e s si n g e l e m e n t s h a v e s o m eo f t h e p r o p e r t i e s r e q u i r e d b y t h e d a t a e l e m e n t s .

    A t t h e a r c h i t e c t u r a l l e v e l , w e n e e d a l l t h r e e v i e w sa n d t h e a b i l it y t o m o v e f r e e ly a n d e a s i ly a m o n g t h e m .O u r e x a m p l e i n t h e n e x t s e c t i o n p r o v i d e s i l l u s t r a t i o n so f t h i s i n t e r d e p e n d e n c e a n d h o w w e m i g h t p r o v i d e t h r e ed i f f e r e n t , b u t o v e r l a p p i n g , v i e w s .

    3 We use the dichot omy of p r o c e s s a n d d a t a instead of.functi0na n d o b j e c t because these terms seem to be more neutra l . Thela t ter terms seem to suggest something more speci f ic in terms ofprogr amming than the former .

  • 7/29/2019 Foundations for the Study

    7/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o i 1 7 n o 4 O c t 1 9 92 P a g e 4 6

    4 E x a m p l e sO n e o f t h e f e w s o f tw a r e a r c h i t e c t u r a l s t y le s t h a t h a s

    a c h i e v e d w i d e sp r e a d a c c e p t a n c e i s t h a t o f t h e m u l t i -p h a s e c o m p i l e r . I t i s p r a c t i c a l l y t h e o n l y s t y l e i nw h i c h e v e r y s o f t w a r e e n g i n e e r i s e x p e c t e d t o h a v e b e e nt r a i n e d . W e r e l y o n t h is f a m i l i a r i ty t o i l l u st r a t e s o m eo f t h e i n s i g h t s t h a t w e h a v e g a i n e d i n t o s o f t w a r e a r c h i -t e c t u r e s a n d t h e i r d e s c r i p t i o n s .

    I n t h i s s e c t i o n w e l o o k a t t w o c o m p i l e r a r c h i t e c t u r e so f th e m u l t i - p h a s e s t y le :

    a c o m p i l e r t h a t i s o r g a n i z e d s e q u e n t i a l l y ; a n d a c o m p i l e r t h a t i s o r g a n i z e d a s a s e t o f p a r a l l e l p r o -

    c e s se s c o n n e c t e d b y m e a n s o f a s h a r e d i n t e r n a l r e p -r e s e n t a t i o n .

    B e c a u s e o f sp a c e l i m i t a t i o n s a n d f o r p r e s e n t a t i o n p u r -p o s e s, o u r e x a m p l e s a r e s o m e w h a t s i m p l i fi e d a n d i d e a l -i z e d , w i t h m a n y d e t a i l s i g n o r e d . M o r e o v e r , w e u se e x is t -i n g n o t a t i o n s b e c a u s e t h e y a r e c o n v e n i e n t f o r il l u s tr a t i v ep u r p o s e s ; p r o p o s a l s f o r s p e c i f ic a r c h i t e c t u r a l n o t a t i o n sa r e b e y o n d t h e s c o p e o f t h i s p a p e r . I n e a c h ca s e w e f o c u so n t h e a r c h i t e c t u r a l c o n s i d e r a t i o n s t h a t s e e m t o b e t h em o s t i n t e r e s t in g t o d e r i ve f r o m t h a t p a r t i c u l a r e x a m p l e .( O f c o u r s e , o t h e r e x a m p l e s o f m u l t i - p h a s e c o m p i l e r ar -c h i t e c t u r e s e x is t a n d w e m a k e n o c l a i m s o f e x h a u s t i v ec o v e r a g e o f t h i s a r c h i t e c t u r a l l a n d s c a p e . ) B e f o r e e x p l o r -i n g t h e s e e x a m p l e s , w e p r o v i d e a b r i e f r e v i e w o f t h e i rc o m m o n a r c h i t e c t u r a l s t y le .4 .1 T h e M u l t i - p h a s e A r c h i t e c t u r a lS t y l e

    O u r s i m p l i f i e d m o d e l o f a c o m p i l e r d i s t i n g u i s h e s f iv ep h a s e s : l e x i c a l a n a l y s i s , s y n t a c t i c a n a l y s i s , s e m a n t i ca n a l y s is , o p t i m i z a t i o n , a n d c o d e g e n e r a t i o n . L e x i c a la n a l y s i s a c t s o n ,characters i n a s o u r c e t e x t t o p r o d u c et o k e n s f o r s y n t a c t i c a n a l y s i s . S y n t a c t i c a n a l y s i s p r o -d u c e s phrases t h a t a r e e i t h e r d e f i n i t i o n p h r a s e s o r u s ep h r a s e s . S e m a n t i c a n a l y s i s c o r r e l a t e s u s e p h r a s e s w i t hd e f i n i t i o n p h r a s e s - - i . e ., e a c h u s e o f a p r o g r a m e l e m e n ts u c h a s a n i d e n t i f i e r is a s s o c i a t e d w i t h t h e d e f i n i t i o n f o rt h a t e l e m e n t , r e s u l t i n g in correla ted phrases . O p t i m i z a -t i o n p r o d u c e s anno ta t ions o n c o r r e l a t e d p h r a s e s t h a ta r e h i n t s u s e d d u r i n g g e n e r a t i o n o f object code. T h eo p t i m i z a t i o n p h a s e i s c o n s i d e r e d a p r e f e r r e d , b u t n o tn e c e s s a r y , a s p e c t o f t h i s s ty l e . T h u s , t h e m u l t i - p h a s es t y l e r e c o g n i z e s t h e f o l l o w i n g a r c h i t e c t u r a l e l e m e n t s :

    process ing e lemen ts : l e x e r , p a r s e r , s e m a n t o r , o p -t i m i z e r , a n d c o d e g e n e r a t o r ;a n d

    da ta e lemen ts : c h a r a c t e r s , t o k e n s , p h r a s e s ,c o r r e l a t e d ph r a se s , a n n o t a t e dp h r a s e s , a n d o b j e c t c o d e .

    N o t i c e t h a t w e h a v e n o t s p e c if ie d c o n n e c t i n g e l e m e n t s .I t i s s i m p l y t h e c a s e t h a t t h i s s t y l e d o e s n o t d i c t a t ew h a t c o n n e c t i n g e le m e n t s a r e t o b e u s e d . O f c o u rs e , t h ec h o ic e o f c o n n e c t in g e l e m e n t s h a s a p r o f o u n d i m p a c t o nt h e r e s u l t i n g a r c h i t e c t u r e , a s s h o w n b e l o w .

    T h e f o r m o f t h e a r c h i t e c t u r a l s t y l e i s e x p r e s s e d b yw e i g h t e d p r o p e r ti e s a n d r e l a t io n s h i p s a m o n g t h e a r c h i -t e c t u r a l e l e m e n t s. F o r e x a m p l e , t h e o p t i m i z e r a n d a n -n o t a t e d p h r a s e s m u s t b e f o u n d t o g e t h e r , b u t t h e y a r eb o t h o n l y p r e f e r r e d e l e m e n t s , n o t n e c e s s a r y . A s a n -o t h e r e x a m p l e , t h e r e a r e l i n e a r r e l a t i o n s h i p s b e t w e e nt h e c h a r a c t e r s c o n s t i t u t i n g t h e t e x t o f t h e p r o g r a m , t h et o k e n s p r o d u c e d b y t h e l e x e r , a n d t h e p h r a s e s p r o d u c e db y t h e p a r s e r . I n p a r t i c u l a r , t o k e n s c o n s i s t o f a s e q u e n c eo f c h a r a c t e r s , a n d p h r a s e s c o n s i s t o f a s e q u e n c e o f to -k e n s . H o w e v e r , t h e r e e x i s t s a n o n - l i n e a r r e l a t i o n s h i pb e t w e e n p h r a s e s a n d c o r r e l a t e d p h ra s e s . T h e s e r e l a t i o n -s h i p s a r e d e p i c t e d i n F i g u r e 1 . A s a fi n a l e x a m p l e , e a c ho f t h e p r o c e s si n g e l e m e n t s h a s a s e t o f p r o p e r t ie s t h a td e f in e s t h e c o n s t r a i n t s o n t h o s e e l e m e n t s . T h e l e x e r , f o ri n s t a n c e , t a k e s a s i n p u t t h e " c h a r a c t e r s t h a t r e p r e s e n tt h e p r o g r a m t e x t a n d p r o d u c e s a s o u t p u t a s e q u en c e o ft o k e n s . M o r e o v e r , t h e r e i s a n o r d e r i n g c o r r e s p o n d e n c eb e t w e e n t h e t o k e n s a n d t h e c h a r a c t e r s t h a t m u s t b ep r e s e r v e d b y t h e l e x e r . A g o o d a r c h i t e c t u r a l d e s c r i p -t i o n w o u ld c a p t u r e t h e s e a n d o t h e r s u c h p r o p e r t i e s a n dr e l a t i o n s h i p s .

    L e t u s i l l u s t r a t e t h i s b y f o r m a l l y d e s c r i b i n g t h e r e l a -t i o n s h ip b e t w e e n c h a r a c t e r s a n d t o k e n s a n d d e s c r i b in gt h e o r d e r - p r e s e rv i n g p r o p e r t y o f t h e l e x e r. W e b e g i nt h e d e s c r i p t i o n w i t h a d a t a v i e w s t a t e d i n t e r m s o f s e-q u e n c e s a n d d i s j o i n t s u b s e q u e n c e s .

    Le t C = { c l , c 2 , . . . , C m } be a sequence of char-acters represe n t ing a sourc e tex t , C~ i _~ j be asubsequence of C w hose elements are al l the el -em ents in C betw een ci and cj inclusive, T ----{ t l , t 2 , . . . , t n } b e a seq u en ce o f t o k en s, an d "~ "in d i ca te t h e co r r esp o n d en ce b e tween a t o k en i n Tand a subsequence of C. T i s said to preserve Cf f there ex is ts an i , j , k , q , r , and s such tha t1 _ < i < j _ < m , 1 < k < n , 1 < q ~_ r < m, an dfor al l t E T there ex is ts a C~ such that :

    [ C~ if t = t lC~ i f t = tn l _ < u _ < q - 1V ur i f $ = t~ , where S u , tk -1 = C~-1

    tk+l --~ C~+1

  • 7/29/2019 Foundations for the Study

    8/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 9 92 P a g e 4 7CharactersTokensPhrasesCorrelated Phrases

    L ~ I L l I I L _ _ I I I I I L ~ J I I

    L ~ I L l L I I I L J

    ,i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .

    F i g u r e 1: D a t a E l e m e n t R e l a t i o n s h i p s .

    T h e l e x e r i s n o w c o n s t r a i n e d f r o m a p r o c e s s i n g p e r s p e c -t i v e to a c c e p t a s e q u e n c e o f c h a r a c te r s C , p r o d u c e as e q u e n c e o f t o k e n s T , a n d t o p r e s e r v e t h e o r d e r i n g c o r -r e s p o n d e n c e b e t w e e n c h a r a c t e r s a n d t o k e n s :

    lexer : C ---+ T, wh ere T preserves CF i n a l l y , i t i s i n t e r e s t i n g t o n o t e t h a t t h e c o n n e c -

    t o r v i e w r e v e a l s a d d i t i o n a l c o n s t r a i n t s t h a t s h o u l d b ep l a c e d o n t h e a r c h i t e c t u r a l s t y le . T h e s e c o n s t r a i n t s a r ei l l u s tr a t e d b y t h e c o n n e c t i o n b e t w e e n t h e l e x e r a n d t h ep a r s e r . I n p a r t i c u l a r , c o n n e c t i n g e l e m e n t s m u s t e n s u r et h a t t h e t o k e n s p r o d u c e d b y t h e l e x e r a r e p r e s e rv e d f o rt h e p a r s e r , s u c h t h a t t h e o r d e r r e m a i n s i n t a c t a n d t h a tt h e r e a r e n o l o s s e s , d u p l i c a t e s , o r s p u r i o u s a d d i t i o n s .4 . 2 S e q u e n t i a l A r c h i t e c t u r e

    I f t h e r e i s a " c l a s s ic a l " m u l t i - p h a s e c o m p i l e r a rc h i -t e c t u r e , t h e n i t i s t h e s e q u e n t i a l o n e , i n w h i c h e a c hp h a s e p e r f o r m s i t s f u n c t io n t o c o m p l e t i o n b e f or e t h en e x t p h a s e b e g in s a n d i n w h i c h d a t a e l e m e n t s a r e p a s s e dd i r e c t l y f r o m o n e p r o c e s si n g e l e m e n t t o t h e o t h e r . T h u s ,w e a d d t h e f o l lo w i n g a r c h i t e c t u r a l e l e m e n t s t o t h o s ec h a r a c t e r i z i n g t h e o v e r a l l s t y l e :

    connecting elements: p r o c e d u r e c a l l a n d p a r a m e -t e r s .

    F u r t h e r m o r e , w e r e f i n e t o k e n s t o i n c l u d e t h e s t r u c t u r -i n g o f t h e i d e n t if i e r t o k e n s i n t o a name table ( N T ) , a n dr e f i n e p h r a s e s t o b e o r g a n i z e d i n t o a n abstract syntaxt r e e ( A S T ) . C o r r e l a t i o n o f p h r a s e s r e s u l t s i n a n abstractsyntax graph ( A S G ) a n d o p t i m i z a t i o n i n a n annotatedabstract syntax graph ( A A S G ) . F i g u r e 2 g iv e s a p r o c e s s -i n g v i ew o f t h e s e q u e n t i a l a r c h i t e c t u r e , s h o w i n g t h e f l o wo f d a t a t h r o u g h t h e s y s t e m . N o t i c e t h a t t h e r e a r e t w op a t h s f r o m t h e s e m a n t o r t o t h e c o d e g e n e r a t o r , o n l y o n eo f w h i c h p a s s e s t h r o u g h t h e o p t i m i z e r . T h i s r e f l e c t s t h ef a c t t h a t a s e p a r a t e o p t i m i z a t i o n p h a s e is n o t n e c e s s a ryi n t h i s a r c h i t e c t u r e . T h a t i s , a d e s ig n s a t i s f y i n g t h i sa r c h i t e c t u r e n e e d n o t p r o v i d e a n o p t i m i z e r .

    T o i l l u s t r a te t h e i n t e r d e p e n d e n c e o f p ro c e s s in g a n dd a t a v i e w s , l e t u s c o n s i d e r t h e d a t a a s a w h o l e b e i n g

    Characters

    ObJect Code

    YG< Corr elated Phr ases(NT~ASG)

    TokensO V T ) , , , , , , , ~ @

    IPhrases(NT+AST)

    AnnotatedCor. Phrases CorrelatedPhrases(NT+AASG) (NT+ASG)

    F i g u r e 2 : P r o c e s s i n g V i e w o f S e -q u e n t i a l C o m p i l e r A r -c h i t e c t u r e .

    c r e a t e d a n d t r a n s f o r m e d a s t h e y f l ow t h r o u g h t h e s y s -t e m . W e h a v e f o u n d t h a t t h e d a t a v i e w i s b e s t c a p t u r e db y a n o t i o n t h a t w e c a l l application-oriented properties.A p p l i c a t i o n - o r ie n t e d p r o p e r t i e s d e s c r ib e t h e s t a t e s o f ad a t a s t r u c t u r e t h a t a r e o f si g ni f ic a n c e t o t h e p r o c es s -i n g e l e m e n t s m a n i p u l a t i n g t h a t s t r u c t u r e . T h e y c a n b eu s e d f o r s u c h t h i n g s a s c o n t r o l l i n g t h e o r d e r o f p r o c e s s -i n g , h e l p in g t o d e f i n e t h e e f f e c t s o f a p r o c e s s i n g e l e m e n to n a d a t a s t r u c t u r e , a n d e v e n h e l p i n g t o d e f i n e t h e o p -e r a t i o n s n e e d e d b y t h e p r o c e s s i n g e l e m e n t s t o a c h i e v eth o se e f f ec t s .

    F o r t h i s e x a m p l e , t h e ( s i m p l i f i e d ) a p p l i c a t i o n -o r i e n t e d p r o p e r t i e s a r e a s f o l l o w s :

    has-all-tokens: a s t a t e p r o d u c e d a s a r e s u l t o f l e x -i c a l l y a n a l y z i n g t h e p r o g r a m t e x t ,n e c e s s a r y f o r t h e p a r s e r t o b e g i np r o c e s s i n g ;

  • 7/29/2019 Foundations for the Study

    9/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 9 92 P a g e 4 8

    has-alLphrases: a state produced by the parser,necessary for the semantor to be-gin processing;

    has-all-correlated-phrases: a state produced by thesemantor, necessary for the opti-mizer and code generator to beginprocessing; and

    has-all-optimizalion-annotations: a state producedby the optimizer, preferred for thecode generator to begin process-ing.

    Notice again that the last property is only preferred.While in this example the application-oriented proper-ties may appear obvious and almost trivial, in the nextexample they are crucial to the description of the archi-tecture and in guaranteeing the compliance of designsand implementations with tha t architecture.

    An interesting question to consider is why we evi-dently chose to use a property-based scheme for de-scribing architectural elements rather than a type-basedscheme. The rea~3on is tha t type models, as they cur-rently exist, are essentially only able to characterize el-ements and element types in terms of the relationshipof one element type to an other (e.g., subtyping and in-heritance [12]), in terms of the relationships that par-ticular elements :have with other elements (e.g., as inOrtos [18]), and in terms of the operations tha t canbe performed on the elements. They are not suited todescriptions of characteristics of elements such as theapplication-oriented properties mentioned above. Forexample, simply knowing that there is an operation as-sociated with abstract syntax graphs to connect onephrase to another does not lead to an understandingthat the abstract syntax graph must have all phrasescorrelated before the code generator can access thegraph.

    Property-based schemes, on the other hand, can beused to capture easily all these characteristics; one prop-erty of an element could be the set of operations withwhich it is associated. It seems reasonable to considerenhancing type models in this regard and we see thisas a potentially interesting area of future work. Wenote, however, that type-based schemes are already ap-propriately used at the design level, as mentioned inSection 2. Further, we note that application-or ientedproperties provide a good vehicle with which to drivethe design, or justify the suitability, of a set of opera-tions for an element type.

    Returning to the interdependence between the pro-cess ing and da ta views, we can see that the data

    1~'~CneO~tor

    " x e r

    l~r'ser

    C o d e , /O p t im i ze r m C ~ r ~ a / ~ te ~ d .

    Figure 3 : D a t a V i e w o f Sequentia lCompile r Arch i tec ture .view concentrates on th e particular application-orientedproperties that are of importance in describing eachdata structure, while the processing view concentrateson the functional properties of each processing element.These views are actually complementary. In fact, if wedepict the data view, as is done in Figure 3, and com-pare it to the processing view, shown in Figure 2, thenthe correspondence becomes fairly obvious.

    The important architectural considerations that de-rive from this example can be summarized as follows: the form descriptions must include the relation-

    ships and constraints among the elements, includ-ing relative weightings and preferences;

    current type-based schemes for characterizing ele-ments are insufficient; and

    there is a natural interdependence between the pro-cessing and data views that can provide comple-mentar y descriptions of an architecture.

    4 . 3 P a r a l l e l P r o c e s s , S h a r e dS t r u c t u r e A r c h i t e c t u r e

    D a t a

    Suppose that performance is of paramount impor-tance, such that one wants to optimize the speed ofthe compiler as much as possible. One possible solut ionis to adopt an architecture that treats the processingelements as independent processes driven by a sharedinternal representation -- that is, the connecting ele-ment is the shared representation and each processingelement performs eager evaluation. Figure 4 depicts a

  • 7/29/2019 Foundations for the Study

    10/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 4 9

    Characters )

    L

    I n t e r n a lRepresentation

    F i g u r e 4: P a r t i a l P r o c e s s V i e w o fP a r a l l e l P r o c e s s , S h a r e dD a t a S t r u c t u r e C o m -p i l e r A r c h i t e c t u r e .

    Js ic p r o p e r t i e s m u s t b e e x p l i c i t l y d e s c r i b ed . A n u m -b e r o f n o t a t i o n s e x i st t h a t a r e s u i ta b l e f o r m a k i n gs u c h d e s c r i p t i o n s , i n c l u d i n g parallel path expressions[6], constrained expressions [1 ] , and petri nets [16 ] . Int h i s e x a m p l e w e u s e p a r a l l e l p a t h e x p r e s s i o n s , w h e r ea c o m m a in d i c a t e s s eq u e n c e , a p l u s s i g n i n d i c a t e s o n eo r m o r e r e p e t i t i o n s , a n a s t e r i s k i n d i c a t e s z e r o o r m o r er e p e t i t i o n s , a n d s u b e x p r e s s i o n s a r e e n c l o s e d i n p a r e n -t h e s e s. S y n c h r o n i z a t i o n p o i n t s o c c u r w h e r e n a m e s o fa p p l i c a t i o n - o r i e n t e d p r o p e r t i e s a r e t h e s a m e i n d i f f e r -e n t p a r a l le l p a t h e x p r e s s io n s . F i r s t , t h e p a t h e x p r e s -s i o n s f o r e a c h o f t h e d a t a e l e m e n t s - - t o k e n s , p h r a s e s ,a n d c o r r e l a t e d p h r a s e s - - a r e g i v e n :( 1 ) ( n o - t o k e n s , h a s - t o k e n + ) * ,

    w i l l - b e - n o - m o r e - t o k e n s , h a s - t o k e n * , n o - t o k e n s( 2 ) ( n o - p h r a s e s , h a s - p h r a s e + ) * ,w i l l - b e - n o - m o r e - p h r a s e s , h a s - p h r a s e * , n o - p h r a s e s( 3 ) n o - c o r r e l a t e d - p h r a s e s , ( h a v e - c o r r e l a t e d - p h r a s e s ) * ,

    a l l - p h r a s e s - c o r r e l a t e d

    s i m p l i f i e d a n d p a r t i a l p r o c e s s v i e w o f t h i s a r c h i t e c t u r e ,s h o w i n g t h e r e l a t i o n s h i p s b e t w e e n t h e i n t e r n a l r e p r e -s e n t a t i o n a n d t h e l e x e r , t h e p a r s e r , a n d t h e s e m a n t o r .( W e o n l y c o n s i d e r t h e s e t h r e e p r o c e s s in g e l e m e n t s i n t h er e m a i n d e r o f t h is e x a m p l e . )

    T h e a p p l i c a t i o n - o r i e n t e d p r o p e r t i e s o f t h e s h a r e d i n -t e r n a l r e p r e s e n t a t i o n i n t h i s a r c h i t e c t u r e a r e m u c h m o r ec o m p l i c a t e d , a n d i n t e r e s t i n g , t h a n t h o s e g i v e n i n t h ep r e v i o u s e x a m p l e . I n p a r t i c u l a r , a n u m b e r o f p r o c es s -i n g e l e m e n t s a r e a f f e c t i n g t h e s t a t e o f t h e i n t e r n a l r e p r e -s e n t a t i o n , a n d d o i n g so c o n c u r r e n t l y . T h i s i m p l i e s t h a tt h e a p p l i c a t i o n - o r i e n t e d p r o p e r t i e s m u s t p r o v i d e f o r c o -o r d i n a t i o n a n d s y n c h r o n i z a t i o n a m o n g t h e p r o c e s s i n ge l e m e n t s . W e b e g i n b y g i v i n g t h e b a s i c p r o p e r t i e s t h a tt h e i n t e r n a l r e p r e s e n t a t io n m a y e x h i b i t :

    no-tokenshas- tokenwill-be-no-more-tokensno-phraseshas-phrasewill-be-no-more-phrasesno- correlated-phraseshave- correlated-phrasesall-phrases- correlated

    N o t i c e t h a t t h e se p r o p e r ti e s i m p l y t h a t t o k e n s a n dp h r a s e s a r e consumed, b u t t h a t c o r r e l a t e d p h r a s e sa re accumulated ( c o n s i d e r " h a s - p h r a s e " v e r s u s " h a v e -c o r r e l a t e d - p h r a s e s " ) .

    B e c a u s e o f t h e p a r a l l e l b e h a v i o r o f th e p r o c e s s in g e l -e m e n t s , t h e i n t e r r e l a t i o n s h i p s a m o n g t h e v a r i o u s b a -

    N e x t , t h e p a t h e x p r e s s i o n s r e l a t i n g t h e a p p l i c a t i o n -o r i e n t e d p r o p e r t i e s a r e g iv e n :( 4 ) w i l l - b e - n o - m o r e - t o k e n s , w i l l - b e - n o - m o r e - p h r a s e s ,

    a l l -p l i ra s e s -co r re l a t ed( 5 ) h a s - t o k e n + , h a s - p h r a s e( 6 ) h a s - p h r a s e + , h a s - c o r r e l a t e d - p h r a s e

    T h u s , t o k e n s a r e c o n s u m e d t o p r o d u c e p h r a s e s , a n dp h r a s e s a r e c o r r e l a t e d u n t i l t h e y a r e a l l p ro c e s s ed .W h a t w e h a v e g i v e n s o f a r i s e s s e n t i a l l y a c o n n e c t o r

    v iew (a nd , in th i s c a s e , e f fec t ive ly a da ta v i ew a s we l l ).C o n c e n t r a t i n g i n s t e a d o n t h e p r o c e s s i n g v i e w a l l o w s u st o d e s c r i b e h o w e a c h p r o c e s s i n g e l e m e n t t r a n s f o r m s t h ei n t e r n a l r e p r e s e n t a t i o n a s w e l l a s h o w t h o s e p r o c e s s i n ge l e m e n t s a r e s y n c h r o n i z e d :

    l e x e r :

    pa rs e r :

    s e m a n t o r :

    (no-tokens, has-token + ) ~,will-be-no-more-tokensno-phrases, (ha s-tok en +, has-phrase)*,will-be-no-mo re-tokens, (has-token +has-phrase)*, no-tokens,will-be-no-more-phrasesno-correlated-phrases, (has-phrase +has-correlated-phrase)*,will-be-no-more-phrases, (has-phrase +has-correlated-phrase)*, no-phrases,all-phrases- correlated

    A n i n t e r e s t i n g q u e s t i o n t o a s k i s h o w t h i s a r c h i t e c -t u r e r e l a t e s t o t h e p r e v i o u s o n e . I n f a c t , t h e a b i l i t y t o

  • 7/29/2019 Foundations for the Study

    11/13

    A C M S IG S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 5 0

    relate similar architectures is an importan t aspect of thesoftware process; an example is the eva luation of "com-peting" architectures. Certainly, the architectures bothbeing of a common style captures some portion of therelationship. More can be said, however, given the useof application-oriented properties. In particular, we candraw correlation~3 among the properties of the differentarchitectures. The table below shows some of these cor-relations.Sequent ial Ar ch i tec tur ehas-all-tokenshas-all-phraseshas-all-correlated-phrases

    Paral le l Arch i t ec turewill-be-no-more-tokenswill-be-no-more-pharsesall-phrases-correlatedIn this case, the correlations indicate common pointsof processing, leading, for instance, to a better under-standing of the possible reusability of the processingelements.

    The importa nt points of this example can be summa-rized as follows:

    the processing elements are much the same as inthe previous architecture, but with different "locusof control" properties;

    the form of this architecture is more complexthan that of the previous one - - there are moreapplication-oriented properties and those proper-ties require a richer notation to express them andtheir interrelationships;

    we still benefit from the processing/data/connectorview interdependence, albeit with more complexity;and

    application-oriented properties are useful in relat-ing similar architectures.

    5 So me Be n e f i t s De r iv e d f ro m So f twa r eA r c h i t e c t u r e

    We have previously mentioned the use of software ar-chitecture in the context of requirements and design.Software architecture provides the framework withinwhich to satisfy the system requirements and providesboth the technical and managerial basis for the designand implementation of the system. There are two fur-ther benefits that. we wish to discuss in detail: the kindsof analysis that software architecture specifications willenable us to perform and the kinds of reuse that we gainfrom our approach to software architecture.

    5 .1 So f twa r e Arc h i t e c tu re a n d An a ly s i sAside from provid ing clear and precise documenta-

    tion, the primary purpose of specifications is to provideauto mate d analysis of the documents and t o expose var-ious kinds of problems that would otherwise go unde-tected. There are two primary categories of analysisthat we wish to perform: consistency and dependencyanalysis. Consistency occurs in several dimensions: con-sistency within the architecture and architectural styles,consistency of the architecture with the requirements,and consistency of the design with the architecture. Inthe same way that Inscape [14] formally and auto mat-ically manages the interdependencies between interfacespecifications and implementations, we also want to beable to manage the interdependencies between require-ments, architecture, and design.

    Therefore, we want to provide and support at leastthe following kinds of analysis:

    consistency of architectura l style constraints; satisfaction of architectural styles by an architec-

    ture;consistency of architectural constraints;satisfaction of the architecture by the design;establishment of dependencies between architec-ture and design, and architecture and require-ments; anddetermina tion of the implications of changes in ar-chitecture or architectural style on design and re-quirements, and vice versa.

    5 .2 Arc h i t e c tu re a n d th e P ro b le ms o fUs e a n d Re u s e

    An important aspect in improving the productivityof the designers and the programmers is that of beingable to build on the efforts of others -- that is, usingand reusing components whether they come as part ofanother system or as parts from standard componentscatalogs.

    There has been much attention given to the problemof finding components to reuse. Finding componentsmay be important in reducing the duplication of effortand code within a system, but it is not the primaryissue in attaining effective use of standardized compo-nents. For example, finding the components in a mat hlibra ry is not an issue. The pr imary issue is under-standing the concepts embodied in the library. If they

  • 7/29/2019 Foundations for the Study

    12/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 9 92 P a g e 5 1

    are understood, then there is usually no problem find-ing the appropriate component in the library to use. I fthey are ndt understood, then browsing will help onlyin conjunction with the acquisition of the appropriateconcepts.The pr imary focus in architecture is the identificationof impor tant properties and relationships -- constraintson the kinds of components that are necessary for thearchitecture, design, and implementation of a system.Given this as the basis for use and reuse, the architect,designer, or implementer may be able to select the ap-propriate architectural element, design element, or im-plemented code to satisfy the specified constraints atthe appropriate level.

    Moreover, the various parts of previously imple-mented software may be teased apart to select thatwhich is useful from that which is not. For example,the design of a component from another system mayhave just the right architectural constraints to satisfya particular architectural element, but the implementa-tion is constrained such that-it conflicts with other sys-tem constraints. The solut ion is to use the design butnot the implementation: This becomes possible only byindentifying the architectural, design, and implemen-tation constraints and use them to satisfy the desiredgoals of the architecture, design, and implementation.

    The important lesson in reusing components is thatthe possibilities for reuse are the greatest where specifi-cations for the components are constrained the least - -at the architectural level. Component reuse at the im-plementation level is usually too la te because the imple-mentation elements often embody too many constraints.Moreover, consideration of reuse at the archi tecturallevel may lead development down a different, equallyvalid solution path, but one that results in greater reuse.

    6 C o n c l u s i o n sOur efforts over the past few years have been directed

    toward improving the software process associated withlarge, complex software systems. We have come to be-lieve that software architecture can play a vital role inthis process, but th at i t has been both underuti lized andunderdeveloped. We have begun to address this sit-uation by establishing an intuition about and contextfor software architecture and architectural style. Wehave formulated a model of software architecture thatemphasizes the architectural elements of data, process-ing, and connection, highlights their relationships andproperties, and captures constraints on their realizationor satisfaction. Moreover, we have begun to delineate

    the necessary features of architectural description tech-niques and their supporting infrastructure. In so doing,we have set a direction for future research that shouldestablish the primacy of software architecture.

    Others have begun to look at soft'rare architecture.Three that are most relevant are Schwanke, et al., Zach-man, and Shaw.

    Schwanke, et al., [20] define architecture as the per-mit ted or allowed set of connections among components.We agree that that aspect of architecture is important,but feel that there is much more to architecture thansimply components and connections, as we demonstratein this paper.

    Zachman [23] uses the metaphor of building architec-ture to advantage in constructing an architecture forinformation systems. He exploits the notion of differ-ent architectural documents to provide a vision of whatthe various documents ought to be in the building ofan information system. The architect is the mediatorbetween the user and the builders of the system. Thevarious documents provide the various views of differentparts of the product -- the users view, the contractorsviews, etc. His work differs from ours in tha t he isproposing a specific architecture for a specific applica-tion domain while we are attempt ing to define the philo-sophical underpinnings of the discipline, to determine anotation for expressing the specification of the variousarchitectural documents, and determine how these doc-uments can be used in automated ways.

    Shaw [21] comes the closest in approach to ours. Shetakes the view of a programming language designer andabstracts classes of components, methods of composi-tion, and schemas from a wide variety of systems. Thesecorrespond somewhat to our notions of processing anddata elements, connecting elements, and architecturalstyle, respectively. One major difference between ourwork and Shaw's is that she is taking a traditional type-based approach to describing architecture, while weare taking a more expressive property-based approach.Our approach appears better able to more directly cap-ture notions of weighted properties and relationships.Shaw's approach of abstracting the various propertiesand relationships of existing architectures and embody-ing them in a small set of component and compositiontypes appears rather restrictive. Indeed, she is seekingto provide a fixed set of useful architectural elementsthat one can mix and match to create an architecture.Shaw's approach is clearly an important and useful oneand does much to promote the understanding of basicand important architectural concepts. Our approach,on the other hand, emphasizes the importance of the

  • 7/29/2019 Foundations for the Study

    13/13

    A C M S I G S O F T S O F T W A R E E N G I N E E R I N G N O T E S v o l 1 7 n o 4 O c t 1 99 2 P a g e 5 2

    u n d e r l y i n g p r o p e r t i e s a n d r e l a ti o n s h ip s a s a m o r e g e n -e r a l m e c h a n i s m t h a t c a n b e u s e d t o d e s c ri b e t h e p a r t i c -u l a r t y p e s o f e l e m e n t s a n d c o m p o s i t i o n s in s u c h a w a yt h a t p r o v i d e s a l a t i t u d e o f c h o i c e.

    I n c o n c l u s i o n , w e o f f e r th e f o l l o w i n g c o n j e c t u r e : p e r -h a p s t h e r e a s o n f o r s u c h s l o w p r o g re s s i n t h e d e v e l o p -m e n t a n d e v o l u t i o n o f s o f t w a r e s y s te m s i s t h a t we h a vet ra in e d c a rpe n te rs a n d c o n t ra c to rs , bu t n o a rc h i t e c t s .

    R E F E R E N C E S[1] G.S. Avru lfin, L.K. Dillon., J.C . Wflede n, and

    W.E . R id d l e , Constra ined Expressions: Ad ding Anal -ys i s Ca pa b~ t i e s t o Design Methods for ConcurrentS ys t e ms , I E E E T r a n s . o n S o f t w a r e E n g i n e e r in g ,Vol. SE-12, No. 2, Feb. 19 86, pp. 278-292.[2] J . L . B e n tl e y, ' W r i t i n g E f f i c i e n t P r o g r a m s , A d d is o n-Wesley, Reading, MA, 1982.[3] G.D. Berg land , A Guided Tour o f P ro g ram Design

    Methodologies , I E E E C o m p u t e r , V o l . 14, No . 10 ,Oct . 1981 , pp . 13-37 .[4] B . W . B o e hm , S o f t w a r e E n g i n e e r i n g E c o n o m i c s ,Pren t ice-Ha i l , Englewood Cl if fs , N J , 1981.[5] F . P. B r oo ks , J r . ,. T h e M y t h i c a l M a n - M o n t h ,Addison-Wesley, Re~ding, MA, 1972.[6 ] R .H. Cam p b e l l an d A.N. Hab erm an n , The Specifica-

    tion of Process Synchro nization by Pa th Expressions,L e c t u r e N o t e s i n C o m p u t e r S c i e n c e , No . 16,Apr . 1974 , pp . 89-102 .

    [7 ] E . J . C h ik o fs k y ( e d. ), S o f t w a r e D e v e l o p m e n t - -C o m p u t e r - a i d e d S o f t w a r e E n g i n e e r i n g , Te ch no l-ogy Ser ies , IEEE Computer Society Press , 1988 .

    [8] G. Estrin, R.S. Fenchel, R.R. Razouk, and M.K. Ver-n o n , S A R A ( S y s t e m A R c h i t e c t s A p p r e n t i c e ) , I E E ET r a n s . o n S o f t w a r e E n g i n e e r i n g , V o l. S E- 12 , N o . 2 ,Feb. 1986, pp. 293-277.

    [9 ] P . F reem an an d A. I . Wasse rm a~ , Tu to r i a l o n S o f t -w a r e D e s i g n T e c h n i q u e s , I E E E C o m p u te r S o ci et yPress, 1976.[10] D. Ja~ckson, Co mpo s in g Da ta an d Process Descriptions

    in th e Design o f Sof tware Systems, L C S T e c h . R e -p o r t 4 1 9 , Massach u se t ts In s t i t u t e o f Tech n o lo g y , Cam -br idge, MA, May 1988.[ 1 1 ] F . C . M i s h , x ~ r e b s t e r ~ s N i n t h N e w C o l l e g i a t e D i e -t l on ar y , M erf iam Webster , Spr ingfield , MA , 1983 .[12] J.E.B. Moss ~md A.L. Wolf, Toward Principles o f In -

    heri tance and Subtyping for Programming Languages,C O I N S T e c] ~. R e p o r t 8 8 - 9 5 , C O I N S D e pt ., U n iv .of Mass., Am hers t , MA, Nov. 1988.[1 3] J .D . M us a, S o f t w a r e R e l i a b i l i t y : M e a s u r e m e n t ,P r e d i c t i o n , A p p l i c a t i o n , M c G ra w -H i ll , N e w Y ork ,NY, 1990.

    [14] D.E. Perry , T h e l n sc a peE n v i ro n me n t , P r o c . E l e v e n t h I n t e r . C o n f . o n S o f t -w a r e E n g i n e e r i n g , P i tt sb u r gh , P A , I E E E C o m p u t e rSociety Press , M ay 1989 , pp . 2 -12 .

    [15] D.E. Perry , Industr ia l S trength Sof tware Deve lopmentEnvironments , P r o e . I F I P C o n g r e s s ' 8 9, T h e 1 1 t hW o r l d C o m p u t e r C o n g r e s s , S a n F ra nc is co , C A ,Aug. 1989.

    [16] J .L. Peterson , Petri Ne ts , A C M C o m p u t i n g S ur -ve ys , V ol. 9, No. 3, Sept. 1977, pp. 223-252.[ 17 ] W . E . R id d le a n d J .C . W i le d en , T u t o r i a l o n S o f t w a r eS y s t e m D e s i g n : D e s c r i p t i o n a n d . A n al y si s , C o m -puter Society Press , 1980 .[18] W.R. Rosenblat t , J .C. Wfleden , and A.L. Wolf , O R O S :

    T o wa rd s a T ype Mo d e l f o r S o f twa re De ve l o pme n tEnvironments , P r o e . O O P S L A ~ 8 9, N ew O rl ea ns ,Louisiana, Oc tob er 1989.[19] E. Sandewall , C. StrSmberg, and H. SSrensen, Sof twareArchi tec ture Based on Communicat ing Resident ia l En-vironments , P r o c . F i f t h I n t e r . C o n f . o n S o f t w a r eE n g i n e e r i n g , S a n D i eg o, C A , I E E E C o m p u t e r So c ie t yPres s, Ma r. 198 1, pp.